* {
    box-sizing: border-box;
}

/* User weather settings and the cached seven-day Dashboard forecast. */
.settings-weather-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(300px, .75fr);
    align-items: start;
    gap: 18px;
}

.settings-weather-card {
    display: grid;
    min-width: 0;
    gap: 18px;
    padding: 20px;
}

.settings-weather-card__header {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.settings-weather-card__header > span {
    display: grid;
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    place-items: center;
    border-radius: 8px;
    color: #fff;
    background: var(--app-accent-gradient);
}

.settings-weather-card__header svg,
.settings-weather-search .yc-btn svg {
    width: 20px;
    height: 20px;
}

.settings-weather-card__header h2,
.settings-weather-card__header p,
.settings-weather-provider,
.settings-weather-empty,
.settings-weather-current {
    margin: 0;
}

.settings-weather-card__header h2 {
    font-size: 18px;
}

.settings-weather-card__header p,
.settings-weather-provider,
.settings-weather-empty span,
.settings-weather-current span {
    color: var(--yc-night-muted, #64748b);
    font-size: 13px;
}

.settings-weather-empty,
.settings-weather-current {
    display: grid;
    gap: 4px;
    padding: 14px 16px;
    border: 1px solid rgba(148, 163, 184, .25);
    border-radius: 8px;
    background: var(--yc-night-surface, #f8fafc);
}

.settings-weather-save,
.settings-weather-results {
    display: grid;
    gap: 12px;
}

.settings-weather-results {
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

.settings-weather-results legend {
    margin-bottom: 8px;
    color: var(--yc-night-muted, #334155);
    font-size: 13px;
    font-weight: 800;
}

.settings-weather-result {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 11px;
    min-height: 50px;
    padding: 9px 12px;
    border: 1px solid var(--yc-night-border, #dbe2ea);
    border-radius: 8px;
    cursor: pointer;
}

.settings-weather-result:has(input:checked) {
    border-color: var(--app-accent);
    background: var(--app-accent-soft);
    box-shadow: 0 0 0 2px rgba(var(--app-accent-rgb), .08);
}

.settings-weather-result input {
    accent-color: var(--app-accent);
}

.settings-weather-result > span {
    display: grid;
    min-width: 0;
    gap: 2px;
}

.settings-weather-result strong,
.settings-weather-result small {
    line-height: 1.35;
    overflow-wrap: anywhere;
    white-space: normal;
}

.settings-weather-result small {
    color: var(--yc-night-muted, #64748b);
}

.settings-weather-actions {
    display: flex;
    justify-content: flex-end;
}

.settings-weather-search {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 10px;
}

.settings-weather-combobox {
    position: relative;
    min-width: 0;
}

.settings-weather-suggestions {
    position: absolute;
    z-index: var(--yc-z-dropdown);
    top: calc(100% + 6px);
    left: 0;
    width: 100%;
    max-height: min(320px, 45dvh);
    overflow-x: hidden;
    overflow-y: auto;
    padding: 6px;
    border: 1px solid rgba(148, 163, 184, .32);
    border-radius: 8px;
    background: var(--yc-night-surface, #fff);
    box-shadow: 0 18px 38px rgba(15, 23, 42, .18);
    overscroll-behavior: contain;
}

.settings-weather-suggestions.is-portal {
    position: fixed;
    top: auto;
    left: auto;
    z-index: var(--yc-z-dropdown);
}

.settings-weather-suggestion {
    appearance: none;
    display: grid;
    width: 100%;
    min-height: 44px;
    gap: 2px;
    padding: 8px 10px;
    border: 0;
    border-radius: 6px;
    color: var(--yc-night-text, #172033);
    background: transparent;
    cursor: pointer;
    font: inherit;
    text-align: left;
}

.settings-weather-suggestion:hover,
.settings-weather-suggestion.is-active,
.settings-weather-suggestion[aria-selected="true"] {
    color: var(--yc-night-accent, var(--app-accent-dark));
    background: var(--app-accent-soft);
}

.settings-weather-suggestion:focus-visible {
    outline: 2px solid var(--app-accent);
    outline-offset: -2px;
}

.settings-weather-suggestion strong,
.settings-weather-suggestion small {
    overflow-wrap: anywhere;
}

.settings-weather-suggestion small {
    color: var(--yc-night-muted, #64748b);
}

.settings-weather-suggest-status {
    margin: 6px 0 0;
    color: var(--yc-night-muted, #64748b);
    font-size: 12px;
}

.settings-weather-suggest-status[data-state="error"] {
    color: var(--yc-night-error, #b91c1c);
}

.settings-weather-search-status {
    margin: 0;
    padding: 10px 12px;
    border: 1px solid rgba(148, 163, 184, .28);
    border-radius: 8px;
    color: var(--yc-night-muted, #475569);
    background: var(--yc-night-surface, #f8fafc);
    font-size: 13px;
}

.settings-weather-search [data-weather-search-submit].is-loading svg {
    animation: weather-search-spin .8s linear infinite;
}

@keyframes weather-search-spin {
    to {
        transform: rotate(360deg);
    }
}

.dashboard-weather {
    display: grid;
    min-width: 0;
    gap: 16px;
    padding: 18px;
    border: 1px solid rgba(148, 163, 184, .22);
    border-radius: 8px;
    background: var(--yc-night-surface, #fff);
    box-shadow: 0 12px 30px rgba(15, 23, 42, .07);
}

.dashboard-weather__header,
.dashboard-weather__title,
.dashboard-weather__footer,
.dashboard-weather__empty {
    display: flex;
    align-items: center;
}

.dashboard-weather__header {
    justify-content: space-between;
    gap: 14px;
}

.dashboard-weather__title {
    min-width: 0;
    gap: 12px;
}

.dashboard-weather__title > span {
    display: grid;
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    place-items: center;
    border-radius: 8px;
    color: #fff;
    background: var(--app-accent-gradient);
}

.dashboard-weather__title svg,
.dashboard-weather__empty > span svg {
    width: 23px;
    height: 23px;
}

.dashboard-weather__header .yc-btn svg {
    width: 18px;
    height: 18px;
}

.dashboard-weather__title h2,
.dashboard-weather__title p,
.dashboard-weather__empty p,
.dashboard-weather-day p {
    margin: 0;
}

.dashboard-weather__title h2 {
    font-size: 18px;
}

.dashboard-weather__title p,
.dashboard-weather__empty p,
.dashboard-weather__footer {
    color: var(--yc-night-muted, #64748b);
    font-size: 12px;
}

.dashboard-weather__days {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 9px;
    min-width: 0;
}

.dashboard-weather-day {
    display: grid;
    min-width: 0;
    gap: 8px;
    padding: 12px 10px;
    border: 1px solid rgba(148, 163, 184, .22);
    border-radius: 8px;
    background: var(--yc-night-surface, #f8fafc);
    text-align: center;
}

.dashboard-weather-day.is-first {
    border-color: rgba(var(--app-accent-rgb), .35);
    background: var(--app-accent-soft);
}

.dashboard-weather-day__date,
.dashboard-weather-day__temperature,
.dashboard-weather-day__meta {
    display: grid;
}

.dashboard-weather-day__date strong {
    overflow: hidden;
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dashboard-weather-day__date span,
.dashboard-weather-day__temperature span {
    color: var(--yc-night-muted, #64748b);
    font-size: 11px;
}

.dashboard-weather-day__icon {
    display: grid;
    width: 72px;
    height: 72px;
    place-items: center;
    justify-self: center;
    border: 1px solid rgba(96, 125, 154, .1);
    border-radius: 12px;
    background: linear-gradient(145deg, #f8fafc, #e9f0f5);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9), 0 5px 12px rgba(51, 65, 85, .08);
}

.dashboard-weather-day__icon.is-clear {
    background: linear-gradient(145deg, #fffdf1, #ffefb5);
}

.dashboard-weather-day__icon.is-partly-cloudy,
.dashboard-weather-day__icon.is-showers {
    background: linear-gradient(145deg, #fff9dd, #e9f6ff);
}

.dashboard-weather-day__icon.is-cloudy,
.dashboard-weather-day__icon.is-unknown {
    background: linear-gradient(145deg, #f8fafc, #e5edf4);
}

.dashboard-weather-day__icon.is-fog {
    background: linear-gradient(145deg, #f6f9fb, #e8eef3);
}

.dashboard-weather-day__icon.is-drizzle,
.dashboard-weather-day__icon.is-rain,
.dashboard-weather-day__icon.is-freezing-rain {
    background: linear-gradient(145deg, #f3fbff, #dff3ff);
}

.dashboard-weather-day__icon.is-snow {
    background: linear-gradient(145deg, #f7fdff, #e5f8ff);
}

.dashboard-weather-day__icon.is-storm {
    background: linear-gradient(145deg, #f3f4fb, #e6e9f3);
}

.dashboard-weather-day__icon svg {
    width: 56px;
    height: 56px;
    pointer-events: none;
}

.dashboard-weather-day__label {
    min-height: 32px;
    color: var(--yc-night-muted, #334155);
    font-size: 12px;
    line-height: 1.3;
}

.dashboard-weather-day__temperature {
    grid-template-columns: auto auto;
    align-items: baseline;
    justify-content: center;
    gap: 5px;
}

.dashboard-weather-day__temperature strong {
    font-size: 20px;
}

.dashboard-weather-day__meta {
    gap: 4px;
    color: var(--yc-night-muted, #475569);
    font-size: 10px;
}

.dashboard-weather-day__meta span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    white-space: nowrap;
}

.dashboard-weather-day__meta svg {
    width: 13px;
    height: 13px;
}

.dashboard-weather-day__meta .is-precipitation {
    color: var(--yc-night-blue, #0369a1);
}

.dashboard-weather-day__meta .is-wind {
    color: var(--yc-night-muted, #526f85);
}

.dashboard-weather__footer {
    justify-content: space-between;
    gap: 12px;
    border-top: 1px solid var(--yc-night-border, #edf0f4);
    padding-top: 11px;
}

.dashboard-weather__footer a {
    color: var(--yc-night-accent, var(--app-accent-dark));
    font-weight: 700;
}

.dashboard-weather__empty {
    min-height: 84px;
    gap: 13px;
    padding: 13px;
    border-radius: 8px;
    background: var(--yc-night-surface, #f8fafc);
}

.dashboard-weather__empty > span {
    display: grid;
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    place-items: center;
    border-radius: 8px;
    color: var(--yc-night-accent, var(--app-accent));
    background: var(--app-accent-soft);
}

.dashboard-weather__empty > div {
    min-width: 0;
    margin-right: auto;
}

@media (max-width: 1199.98px) {
    .dashboard-weather__days {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .settings-weather-search {
        grid-template-columns: minmax(0, 1fr);
    }

    .settings-weather-search .yc-btn {
        width: 100%;
    }
}

@media (max-width: 899.98px) {
    .settings-weather-layout {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 599.98px) {
    .settings-weather-card,
    .dashboard-weather {
        padding: 14px;
    }

    .settings-weather-search {
        grid-template-columns: minmax(0, 1fr);
    }

    .settings-weather-search .yc-btn,
    .settings-weather-actions .yc-btn {
        width: 100%;
    }

    .settings-weather-suggestions {
        position: static;
        width: 100%;
        max-height: none;
        margin-top: 6px;
        overflow: visible;
    }

    .settings-weather-suggestion {
        min-height: 48px;
    }

    .tox .tox-tbtn {
        width: 40px;
        height: 40px;
    }

    .dashboard-weather__header,
    .dashboard-weather__footer {
        align-items: flex-start;
    }

    .dashboard-weather__header .yc-btn span {
        display: none;
    }

    .dashboard-weather__header .yc-btn {
        width: 48px;
        min-width: 48px;
        padding: 0;
    }

    .dashboard-weather__days {
        grid-auto-columns: minmax(142px, 72vw);
        grid-template-columns: none;
        grid-auto-flow: column;
        overflow-x: auto;
        overscroll-behavior-inline: contain;
        scroll-snap-type: x proximity;
        scrollbar-width: thin;
    }

    .dashboard-weather-day {
        scroll-snap-align: start;
    }

    .dashboard-weather-day__icon {
        width: 66px;
        height: 66px;
    }

    .dashboard-weather-day__icon svg {
        width: 50px;
        height: 50px;
    }

    .dashboard-weather__empty {
        display: grid;
        grid-template-columns: auto minmax(0, 1fr);
    }

    .dashboard-weather__empty .yc-btn {
        grid-column: 1 / -1;
        width: 100%;
    }

    .dashboard-weather__footer {
        display: grid;
    }
}

@media (max-width: 1024px) {
    .tox.tox-tinymce .tox-tbtn {
        min-height: 40px !important;
    }

    .tox.tox-tinymce .tox-tbtn:not(.tox-split-button__chevron) {
        min-width: 40px !important;
    }

    .tox.tox-tinymce .tox-split-button__chevron {
        min-width: 28px !important;
    }
}
/* Lifestyle daily tracker */
.lifestyle-page {
    display: grid;
    min-width: 0;
    gap: 16px;
}

.lifestyle-day-navigation {
    display: grid;
    min-width: 0;
    gap: 14px;
}

.lifestyle-day-navigation__main {
    display: grid;
    min-width: 0;
    grid-template-columns: 44px minmax(0, 1fr) 44px;
    align-items: center;
    gap: 10px;
}

.lifestyle-day-navigation__main > .app-icon-btn {
    width: 44px;
    height: 44px;
}

.lifestyle-selected-date {
    min-width: 0;
    margin: 0;
    color: var(--yc-night-text, #0f172a);
    text-align: center;
    font-size: 18px;
    line-height: 1.3;
}

.lifestyle-day-strip {
    display: grid;
    min-width: 0;
    grid-template-columns: repeat(7, minmax(70px, 1fr));
    gap: 8px;
}

.lifestyle-day-tile {
    position: relative;
    display: grid;
    min-width: 0;
    min-height: 64px;
    place-content: center;
    gap: 2px;
    border: 1px solid var(--yc-night-border, #dbe3ef);
    border-radius: 8px;
    color: var(--yc-night-muted, #475569);
    background: var(--yc-night-surface, #fff);
    text-align: center;
    text-decoration: none;
    transition: border-color 160ms ease, background 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.lifestyle-day-tile:hover,
.lifestyle-day-tile:focus-visible {
    border-color: rgba(var(--app-accent-rgb), 0.42);
    outline: none;
    box-shadow: 0 0 0 3px rgba(var(--app-accent-rgb), 0.14);
}

.lifestyle-day-tile.is-active {
    border-color: transparent;
    color: #fff;
    background: var(--app-accent-gradient);
    box-shadow: 0 8px 20px rgba(var(--app-accent-rgb), 0.2);
}

.lifestyle-day-tile > span {
    font-size: 12px;
    font-weight: 800;
}

.lifestyle-day-tile > strong {
    font-size: 14px;
}

.lifestyle-day-tile > i {
    position: absolute;
    right: 6px;
    bottom: 6px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    opacity: 0.75;
}

.lifestyle-future-note {
    margin: 0;
    border-left: 3px solid rgba(var(--app-accent-rgb), 0.5);
    padding: 8px 10px;
    color: var(--yc-night-muted, #475569);
    background: var(--app-accent-soft);
    font-size: 13px;
    font-weight: 700;
}

.lifestyle-cards {
    display: grid;
    min-width: 0;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.lifestyle-card {
    display: flex;
    min-width: 0;
    min-height: 250px;
    flex-direction: column;
    gap: 14px;
    border: 1px solid var(--yc-night-border, #dce4ef);
    border-radius: 8px;
    padding: 16px;
    background: var(--yc-night-surface, #fff);
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.07);
}

.lifestyle-card__header {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 10px;
}

.lifestyle-card__header > div {
    min-width: 0;
}

.lifestyle-card__header h2,
.lifestyle-card__header p {
    margin: 0;
}

.lifestyle-card__header h2 {
    color: var(--yc-night-text, #0f172a);
    font-size: 17px;
    line-height: 1.2;
}

.lifestyle-card__header p {
    margin-top: 3px;
    overflow: hidden;
    color: var(--yc-night-muted, #64748b);
    font-size: 12px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.lifestyle-card__icon {
    display: grid;
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    place-items: center;
    border-radius: 8px;
    color: var(--yc-night-accent, var(--app-accent));
    background: var(--app-accent-soft);
}

.lifestyle-card__icon svg {
    width: 21px;
    height: 21px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.lifestyle-day-arrow--previous {
    transform: rotate(-90deg);
}

.lifestyle-day-arrow--next {
    transform: rotate(90deg);
}

.lifestyle-card--sleep .lifestyle-card__icon {
    color: var(--yc-night-blue, #0369a1);
    background: var(--yc-night-blue-bg, #e0f2fe);
}

.lifestyle-card--beer .lifestyle-card__icon {
    color: var(--yc-night-warning, #a16207);
    background: var(--yc-night-warning-bg, #fef3c7);
}

.lifestyle-card--cigarette .lifestyle-card__icon {
    color: var(--yc-night-error, #be123c);
    background: var(--yc-night-error-bg, #ffe4e6);
}

.lifestyle-card__toggle {
    width: 100%;
}

.lifestyle-duration {
    display: grid;
    gap: 9px;
}

.lifestyle-duration.is-hidden,
.lifestyle-time-inputs.is-hidden {
    display: none;
}

.lifestyle-duration__quick {
    display: grid;
    min-width: 0;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
}

.lifestyle-duration__quick .yc-btn {
    width: 100%;
    min-width: 0;
    padding-inline: 8px;
}

.lifestyle-duration__quick .yc-btn.is-active {
    border-color: rgba(var(--app-accent-rgb), 0.55);
    color: var(--yc-night-accent, var(--app-accent));
    background: var(--app-accent-soft);
    box-shadow: inset 0 0 0 1px rgba(var(--app-accent-rgb), 0.16);
}

.lifestyle-custom-time-toggle {
    min-height: 44px;
    border: 0;
    padding: 0;
    color: var(--yc-night-accent, var(--app-accent));
    background: transparent;
    text-align: left;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
}

.lifestyle-custom-time-toggle:hover,
.lifestyle-custom-time-toggle:focus-visible {
    outline: none;
    text-decoration: underline;
}

.lifestyle-time-inputs {
    display: grid;
    min-width: 0;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.lifestyle-time-inputs .yc-input {
    min-width: 0;
    padding-inline: 8px;
}

.lifestyle-card__hint {
    margin: 0;
    color: var(--yc-night-muted, #64748b);
    font-size: 12px;
    line-height: 1.45;
}

.lifestyle-counter {
    display: flex;
    flex: 1;
    min-height: 78px;
    align-items: baseline;
    justify-content: center;
    gap: 6px;
    color: var(--yc-night-text, #0f172a);
}

.lifestyle-counter strong {
    font-size: clamp(38px, 4vw, 54px);
    line-height: 1;
}

.lifestyle-counter span {
    color: var(--yc-night-muted, #64748b);
    font-size: 13px;
    font-weight: 800;
}

.lifestyle-counter__actions {
    display: grid;
    min-width: 0;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.lifestyle-counter__actions .yc-btn {
    width: 100%;
    min-width: 0;
    min-height: 48px;
    padding-inline: 8px;
    font-size: 16px;
}

.lifestyle-counter__add {
    border-color: rgba(var(--app-accent-rgb), 0.36);
    color: var(--yc-night-accent, var(--app-accent));
    background: var(--app-accent-soft);
}

.lifestyle-card__status {
    min-height: 18px;
    margin: auto 0 0;
    color: var(--yc-night-muted, #64748b);
    font-size: 12px;
    font-weight: 700;
}

.lifestyle-card__status.is-error {
    color: var(--yc-night-error, #b91c1c);
}

.lifestyle-header-action svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.lifestyle-overview-controls {
    display: grid;
    min-width: 0;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 18px;
    padding: 14px 16px;
}

.lifestyle-overview-switch {
    display: inline-grid;
    grid-template-columns: repeat(2, minmax(92px, 1fr));
    gap: 4px;
    border: 1px solid var(--yc-night-border, #dbe3ef);
    border-radius: 8px;
    padding: 4px;
    background: var(--yc-night-surface, #f8fafc);
}

.lifestyle-overview-switch a {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    padding: 8px 14px;
    color: var(--yc-night-muted, #475569);
    font-size: 14px;
    font-weight: 800;
    text-decoration: none;
}

.lifestyle-overview-switch a:hover,
.lifestyle-overview-switch a:focus-visible {
    outline: none;
    color: var(--yc-night-accent, var(--app-accent-dark));
    background: var(--app-accent-soft);
}

.lifestyle-overview-switch a.is-active {
    color: #fff;
    background: var(--app-accent-gradient);
    box-shadow: 0 7px 16px rgba(var(--app-accent-rgb), 0.2);
}

.lifestyle-period-navigation {
    display: grid;
    min-width: 0;
    grid-template-columns: 44px minmax(0, 1fr) 44px;
    align-items: center;
    gap: 10px;
}

.lifestyle-period-navigation > .app-icon-btn {
    width: 44px;
    height: 44px;
}

.lifestyle-period-navigation > strong {
    min-width: 0;
    color: var(--yc-night-text, #172033);
    font-size: 15px;
    text-align: center;
    overflow-wrap: anywhere;
}

.lifestyle-kpi-grid {
    display: grid;
    min-width: 0;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.lifestyle-kpi {
    display: grid;
    min-width: 0;
    grid-template-columns: 42px minmax(0, 1fr);
    align-items: center;
    gap: 11px;
    border: 1px solid var(--yc-night-border, #dce4ef);
    border-radius: 8px;
    padding: 14px;
    background: var(--yc-night-surface, #fff);
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.06);
}

.lifestyle-kpi__icon {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 8px;
    color: var(--yc-night-accent, var(--app-accent-dark));
    background: var(--app-accent-soft);
}

.lifestyle-kpi__icon svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
}

.lifestyle-kpi > div {
    min-width: 0;
}

.lifestyle-kpi h2,
.lifestyle-kpi strong,
.lifestyle-kpi p {
    margin: 0;
}

.lifestyle-kpi h2 {
    color: var(--yc-night-muted, #64748b);
    font-size: 12px;
    text-transform: uppercase;
}

.lifestyle-kpi strong {
    display: block;
    margin-top: 3px;
    color: var(--yc-night-text, #0f172a);
    font-size: 20px;
    line-height: 1.2;
    overflow-wrap: anywhere;
}

.lifestyle-kpi p {
    margin-top: 4px;
    color: var(--yc-night-muted, #64748b);
    font-size: 11px;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.lifestyle-chart-grid {
    display: grid;
    min-width: 0;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.lifestyle-chart-card {
    --lifestyle-chart-color: var(--app-accent);
    min-width: 0;
    border: 1px solid var(--yc-night-border, #dce4ef);
    border-radius: 8px;
    padding: 16px;
    background: var(--yc-night-surface, #fff);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

.lifestyle-chart-card--sleep {
    --lifestyle-chart-color: #0284c7;
}

.lifestyle-chart-card--beer {
    --lifestyle-chart-color: #ca8a04;
}

.lifestyle-chart-card--cigarette {
    --lifestyle-chart-color: #e11d48;
}

.lifestyle-chart-card > header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
}

.lifestyle-chart-card > header h2,
.lifestyle-chart-card > header span,
.lifestyle-chart-card__summary {
    margin: 0;
}

.lifestyle-chart-card > header h2 {
    color: var(--yc-night-text, #0f172a);
    font-size: 17px;
}

.lifestyle-chart-card > header span {
    color: var(--yc-night-muted, #64748b);
    font-size: 12px;
    font-weight: 800;
}

.lifestyle-chart {
    position: relative;
    width: 100%;
    min-width: 0;
    min-height: 260px;
}

.lifestyle-chart > svg {
    display: block;
    width: 100%;
    max-width: 100%;
    height: 260px;
    overflow: visible;
}

.lifestyle-chart > svg[hidden] {
    display: none;
}

.lifestyle-chart__grid-line {
    stroke: #e6ebf2;
    stroke-width: 1;
}

.lifestyle-chart__axis-label {
    fill: #64748b;
    font-family: Inter, system-ui, sans-serif;
    font-size: 10px;
}

.lifestyle-chart__bar {
    opacity: 0.82;
    transition: opacity 120ms ease;
}

.lifestyle-chart__bar:hover,
.lifestyle-chart__bar:focus-visible {
    opacity: 1;
    outline: none;
    stroke: #0f172a;
    stroke-width: 1;
}

.lifestyle-chart__empty {
    display: grid;
    min-height: 260px;
    place-items: center;
    margin: 0;
    padding: 20px;
    color: var(--yc-night-muted, #64748b);
    text-align: center;
}

.lifestyle-chart__empty.is-hidden {
    display: none;
}

.lifestyle-chart__tooltip {
    position: absolute;
    z-index: 3;
    max-width: min(250px, calc(100% - 16px));
    border-radius: 6px;
    padding: 7px 9px;
    color: #fff;
    background: #172033;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.2);
    font-size: 12px;
    line-height: 1.35;
    pointer-events: none;
}

.lifestyle-chart-card__summary {
    border-top: 1px solid var(--yc-night-border, #eef2f7);
    padding-top: 10px;
    color: var(--yc-night-muted, #64748b);
    font-size: 12px;
    line-height: 1.4;
}

@media (max-width: 1199px) {
    .lifestyle-cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .lifestyle-kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 899px) {
    .lifestyle-page {
        gap: 10px;
    }

    .lifestyle-day-navigation {
        gap: 10px;
        padding: 12px;
    }

    .lifestyle-day-navigation__main {
        grid-template-columns: 44px minmax(0, 1fr) 44px;
        gap: 6px;
    }

    .lifestyle-selected-date {
        overflow: hidden;
        font-size: 15px;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .lifestyle-day-strip {
        display: none;
    }

    .lifestyle-header-action {
        width: 44px;
        min-width: 44px;
        height: 44px;
        padding: 0;
    }

    .lifestyle-header-action span {
        display: none;
    }

    .lifestyle-overview-controls {
        grid-template-columns: minmax(0, 1fr);
        gap: 12px;
        padding: 12px;
    }

    .lifestyle-overview-switch {
        width: 100%;
    }

    .lifestyle-period-navigation {
        width: 100%;
    }

    .lifestyle-chart-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .lifestyle-cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .lifestyle-card {
        min-height: 232px;
        gap: 10px;
        padding: 12px;
    }

    .lifestyle-card__header {
        gap: 8px;
    }

    .lifestyle-card__icon {
        width: 36px;
        height: 36px;
        flex-basis: 36px;
    }

    .lifestyle-card__icon svg {
        width: 18px;
        height: 18px;
    }

    .lifestyle-card__header h2 {
        font-size: 15px;
    }

    .lifestyle-card__toggle {
        min-height: 44px;
        padding-inline: 8px;
        font-size: 12px;
    }

    .lifestyle-duration__quick,
    .lifestyle-counter__actions {
        gap: 6px;
    }

    .lifestyle-counter strong {
        font-size: 40px;
    }
}

@media (max-width: 370px) {
    .lifestyle-card {
        padding: 10px;
    }

    .lifestyle-card__header {
        align-items: flex-start;
    }

    .lifestyle-card__icon {
        width: 32px;
        height: 32px;
        flex-basis: 32px;
    }

    .lifestyle-card__header p {
        font-size: 11px;
    }
}

:root {
    color-scheme: light;
    background-color: var(--yc-bg);
    --app-accent: #6d28d9;
    --app-accent-dark: #4c1d95;
    --app-accent-light: #a21caf;
    --app-accent-rgb: 109, 40, 217;
    --app-accent-soft: rgba(var(--app-accent-rgb), 0.08);
    --app-accent-gradient: linear-gradient(135deg, var(--app-accent) 0%, var(--app-accent-light) 100%);
    --yc-primary: var(--app-accent);
    --yc-primary-dark: var(--app-accent-dark);
    --yc-primary-light: var(--app-accent-light);
    --yc-primary-rgb: var(--app-accent-rgb);
    --yc-primary-soft: var(--app-accent-soft);
    --yc-danger: #dc2626;
    --yc-success: #16A34A;
    --yc-success-dark: #15803d;
    --yc-success-light: #22c55e;
    --yc-success-rgb: 22, 163, 74;
    --yc-warning: #F59E0B;
    --yc-text: #111827;
    --yc-muted: #64748B;
    --yc-border: rgba(148, 163, 184, 0.3);
    --yc-surface: #FFFFFF;
    --yc-bg: #F4F5F7;
    --yc-radius-sm: 8px;
    --yc-radius-md: 12px;
    --yc-radius-lg: 16px;
    --yc-radius-xl: 22px;
    --yc-shadow-sm: 0 6px 16px rgba(15, 23, 42, 0.06);
    --yc-shadow-md: 0 14px 34px rgba(15, 23, 42, 0.1);
    --yc-shadow-lg: 0 28px 70px rgba(15, 23, 42, 0.18);
    --yc-transition: 0.16s ease;
    --yc-font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --yc-focus-ring: 0 0 0 4px rgba(var(--yc-primary-rgb), 0.13);
    --yc-primary-gradient: var(--app-accent-gradient);
    --yc-z-dropdown: 7600;
    --yc-z-backdrop: 5000;
    --yc-z-modal: 5010;
    --yc-z-toast: 4990;
    --yc-z-editor-popup: 5020;
}

.yc-accent-blue { --app-accent: #2563eb; --app-accent-dark: #1e3a8a; --app-accent-light: #38bdf8; --app-accent-rgb: 37, 99, 235; }
.yc-accent-teal { --app-accent: #0f766e; --app-accent-dark: #134e4a; --app-accent-light: #14b8a6; --app-accent-rgb: 15, 118, 110; }
.yc-accent-green { --app-accent: #16a34a; --app-accent-dark: #166534; --app-accent-light: #22c55e; --app-accent-rgb: 22, 163, 74; }
.yc-accent-red { --app-accent: #dc2626; --app-accent-dark: #991b1b; --app-accent-light: #f43f5e; --app-accent-rgb: 220, 38, 38; }
.yc-accent-orange { --app-accent: #ea580c; --app-accent-dark: #9a3412; --app-accent-light: #f97316; --app-accent-rgb: 234, 88, 12; }
.yc-accent-indigo { --app-accent: #4338ca; --app-accent-rgb: 67, 56, 202; }
.yc-accent-cyan { --app-accent: #155e75; --app-accent-rgb: 21, 94, 117; }
.yc-accent-sky { --app-accent: #0369a1; --app-accent-rgb: 3, 105, 161; }
.yc-accent-ocean { --app-accent: #075985; --app-accent-rgb: 7, 89, 133; }
.yc-accent-emerald { --app-accent: #047857; --app-accent-rgb: 4, 120, 87; }
.yc-accent-forest { --app-accent: #166534; --app-accent-rgb: 22, 101, 52; }
.yc-accent-lime { --app-accent: #4d7c0f; --app-accent-rgb: 77, 124, 15; }
.yc-accent-olive { --app-accent: #3f6212; --app-accent-rgb: 63, 98, 18; }
.yc-accent-gold { --app-accent: #a16207; --app-accent-rgb: 161, 98, 7; }
.yc-accent-amber { --app-accent: #b45309; --app-accent-rgb: 180, 83, 9; }
.yc-accent-copper { --app-accent: #9a3412; --app-accent-rgb: 154, 52, 18; }
.yc-accent-ruby { --app-accent: #9f1239; --app-accent-rgb: 159, 18, 57; }
.yc-accent-rose { --app-accent: #be185d; --app-accent-rgb: 190, 24, 93; }
.yc-accent-magenta { --app-accent: #a21caf; --app-accent-rgb: 162, 28, 175; }
.yc-accent-orchid { --app-accent: #7e22ce; --app-accent-rgb: 126, 34, 206; }
.yc-accent-plum { --app-accent: #581c87; --app-accent-rgb: 88, 28, 135; }
.yc-accent-slate { --app-accent: #475569; --app-accent-rgb: 71, 85, 105; }
.yc-accent-graphite { --app-accent: #374151; --app-accent-rgb: 55, 65, 81; }
:is(.yc-accent-indigo, .yc-accent-cyan, .yc-accent-sky, .yc-accent-ocean, .yc-accent-emerald, .yc-accent-forest, .yc-accent-lime, .yc-accent-olive, .yc-accent-gold, .yc-accent-amber, .yc-accent-copper, .yc-accent-ruby, .yc-accent-rose, .yc-accent-magenta, .yc-accent-orchid, .yc-accent-plum, .yc-accent-slate, .yc-accent-graphite) {
    --app-accent-dark: color-mix(in srgb, var(--app-accent) 70%, black);
    --app-accent-light: color-mix(in srgb, var(--app-accent) 83%, white);
}
.settings-system-swatches { padding: 3px; }
.settings-system-swatches > label > span { background: var(--swatch); }
.settings-system-swatches .settings-accent-mark { visibility: hidden; fill: none; stroke: white; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.settings-system-swatches input:checked + span .settings-accent-mark { visibility: visible; }
.settings-system-swatches .mf-account-appearance__choice input:checked + span { outline-offset: 2px; }

/* Literal colors in older components remain the light fallbacks of these UI roles. */
.yc-theme-dark {
    color-scheme: dark;
    --yc-text: #f1f4f8;
    --yc-muted: #b8c4d3;
    --yc-border: #384659;
    --yc-surface: rgb(var(--yc-night-surface-rgb));
    --yc-bg: #101620;
    --yc-text-muted: var(--yc-muted);
    --yc-night-surface-rgb: 25, 33, 45;
    --yc-night-soft-rgb: 34, 45, 60;
    --yc-night-surface: var(--yc-surface);
    --yc-night-soft: rgb(var(--yc-night-soft-rgb));
    --yc-night-border: var(--yc-border);
    --yc-night-text: var(--yc-text);
    --yc-night-muted: var(--yc-muted);
    --yc-night-green: #8be2b6;
    --yc-night-green-bg: #243c34;
    --yc-night-green-bg-rgb: 36, 60, 52;
    --yc-night-blue: #a1caff;
    --yc-night-blue-bg: #293d57;
    --yc-night-blue-bg-rgb: 41, 61, 87;
    --yc-night-warning: #ffd08e;
    --yc-night-warning-bg: #49382a;
    --yc-night-warning-bg-rgb: 73, 56, 42;
    --yc-night-error: #ffabb3;
    --yc-night-error-bg: #492a33;
    --yc-night-error-bg-rgb: 73, 42, 51;
    --yc-night-button-border: var(--yc-border);
    --yc-night-button-hover-border: color-mix(in srgb, var(--yc-border) 66%, var(--yc-muted));
    --yc-night-button-danger-border: #70404b;
    --yc-night-button-danger-hover-border: color-mix(in srgb, var(--yc-night-button-danger-border) 72%, var(--yc-night-error));
    --yc-night-button-warning-border: color-mix(in srgb, var(--yc-night-warning-bg) 72%, var(--yc-night-warning));
    --yc-night-button-success-border: color-mix(in srgb, var(--yc-night-green-bg) 76%, var(--yc-night-green));
    --yc-night-accent: color-mix(in srgb, var(--app-accent) 32%, white);
    --yc-night-accent-bg: color-mix(in srgb, var(--app-accent) 27%, var(--yc-surface));
    --yc-night-pink: #f5b6d8;
    --yc-night-pink-bg: #472b3e;
    --yc-tabs-surface: var(--yc-surface);
    --yc-tabs-edge: var(--yc-surface);
    --yc-switch-track: #303e50;
    --yc-switch-border: #8191a6;
    --yc-switch-thumb: var(--yc-text);
    --yc-switch-active: var(--app-accent-gradient);
    --yc-switch-active-border: var(--yc-night-accent);
    --app-accent-soft: var(--yc-night-accent-bg);
    --app-accent-gradient: linear-gradient(135deg, var(--app-accent-dark), color-mix(in srgb, var(--app-accent) 78%, #161b24));
    --yc-focus-ring: 0 0 0 3px color-mix(in srgb, var(--yc-night-accent) 55%, transparent);
}

.settings-appearance-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; max-width: 390px; }
.settings-appearance-option { position: relative; display: grid; min-width: 0; gap: 8px; padding: 8px; background: var(--yc-surface); border: 1px solid var(--yc-border); border-radius: 8px; cursor: pointer; }
.settings-appearance-option > input { position: absolute; margin: 0; inline-size: 1px; block-size: 1px; opacity: 0; }
.settings-appearance-option:has(input:checked) { border-color: var(--yc-night-accent, var(--yc-primary)); box-shadow: 0 0 0 1px var(--yc-night-accent, var(--yc-primary)); }
.settings-appearance-option:has(input:focus-visible) { outline: 2px solid var(--yc-night-accent, var(--yc-primary)); outline-offset: 4px; }
.settings-appearance-name { display: flex; align-items: center; gap: 6px; min-height: 23px; color: var(--yc-text); font-size: .84rem; font-weight: 650; }
.settings-appearance-name svg { width: 16px; height: 16px; flex: 0 0 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.settings-appearance-name .settings-appearance-check { margin-inline-start: auto; visibility: hidden; color: var(--yc-night-accent, var(--yc-primary)); }
.settings-appearance-option:has(input:checked) .settings-appearance-check { visibility: visible; }
.settings-appearance-preview { display: grid; grid-template: 10px 20px / 27% 1fr 1fr; gap: 4px; padding: 5px; border: 1px solid var(--preview-line); border-radius: 5px; background: var(--preview-bg); }
.settings-appearance-preview--light { --preview-bg: #f0f2f7; --preview-line: #d5dce8; --preview-surface: #fff; --preview-side: #dcd0f5; }
.settings-appearance-preview--dark { --preview-bg: #181c22; --preview-line: #454e5d; --preview-surface: #303844; --preview-side: #494065; }
.yc-theme-dark .settings-appearance-preview--dark { --preview-bg: var(--yc-bg); --preview-line: var(--yc-border); --preview-surface: var(--yc-night-soft); }
.settings-appearance-preview > i { grid-row: 1 / -1; border-radius: 3px; background: var(--preview-side); }
.settings-appearance-preview::after { grid-area: 1 / 2 / 2 / 4; content: ''; background: var(--preview-surface); border-radius: 3px; }
.settings-appearance-preview > b { grid-row: 2; border-radius: 3px; background: var(--preview-surface); }

.yc-theme-dark :is(input, textarea)::placeholder { color: var(--yc-muted); opacity: 1; }
.yc-theme-dark :is(input, select, textarea):autofill {
    box-shadow: inset 0 0 0 100px var(--yc-night-soft);
    -webkit-text-fill-color: var(--yc-text);
    caret-color: var(--yc-text);
}
.yc-theme-dark .mobile-topbar-brand { color: var(--yc-text); }
.yc-theme-dark .dashboard-weather-day__icon {
    background: linear-gradient(145deg, var(--yc-night-soft), var(--yc-night-blue-bg));
    border-color: var(--yc-border);
    box-shadow: none;
}
.yc-theme-dark .app-sidebar :is(.sidebar-link,.sidebar-user,.sidebar-collapse,.workspace-trigger) { --yc-night-accent: #f3effc; }
.yc-theme-dark body .app-sidebar {
    background: linear-gradient(180deg, color-mix(in srgb, var(--app-accent-dark) 60%, var(--yc-bg)), color-mix(in srgb, var(--app-accent) 42%, var(--yc-bg))) !important;
}
.yc-theme-dark :is(.finance-tab.is-active,.finance-tabs a.is-active) { color: #fff; }
.yc-theme-dark .mf-fv2-axis { fill: var(--yc-muted); }
.yc-theme-dark .mf-fv2-grid-line { stroke: var(--yc-border); }
.yc-theme-dark .mf-fv2-zero { stroke: var(--yc-muted); }
.yc-theme-dark :is(.mf-fv2-balance-line,.mf-fv2-point) { stroke: var(--yc-night-accent); }
.yc-theme-dark .mf-fv2-point { fill: var(--yc-surface); }
.yc-theme-dark .mf-fv2-area-fill { fill: var(--app-accent-light); }
.yc-theme-dark .mf-fv2-bar--income { fill: var(--yc-night-green); }
.yc-theme-dark .mf-fv2-bar--expense { fill: var(--yc-night-error); }
.yc-theme-dark .mf-v3-area__header .my-finance-symbol { color: color-mix(in srgb, var(--mf-area-color), white 45%); }
.yc-theme-dark .mf-account-picker__icon { color: color-mix(in srgb, var(--mf-account-color), white 45%); }
.yc-theme-dark .mf-v3-areas { scrollbar-color: var(--yc-muted) var(--yc-bg); }
.yc-theme-dark .schedule-page {
    --schedule-ink: var(--yc-text);
    --schedule-muted: var(--yc-muted);
    --schedule-line: var(--yc-border);
    --schedule-soft: var(--yc-night-soft);
    --schedule-card: var(--yc-surface);
    --schedule-priority-high: var(--yc-night-error);
    --schedule-priority-high-dark: var(--yc-night-error);
    --schedule-priority-normal: var(--yc-muted);
    --schedule-priority-low: var(--yc-night-green);
}
.yc-theme-dark body .schedule-page .day-tab.is-today .day-tab-badge { color: var(--yc-night-green); }
.yc-theme-dark .calendar-page {
    --cal-edge: var(--yc-border);
    --cal-wash: var(--yc-night-soft);
    --cal-accent: var(--yc-night-accent);
    --cal-selected: var(--yc-night-accent-bg);
    --cal-today: color-mix(in srgb, var(--app-accent) 32%, var(--yc-surface));
    --cal-day-badge: var(--app-accent-dark);
}
.yc-theme-dark :is(.calendar-toggle, .meeting-toggle, .modal-toggle-row) input[type="checkbox"]:focus-visible {
    outline: 2px solid var(--yc-night-accent);
    outline-offset: 3px;
}

/* The bundled TinyMCE ships the Oxide skin only; keep its behavior and theme its chrome. */
.yc-theme-dark .tox :is(.tox-editor-header,.tox-toolbar,.tox-toolbar__primary,.tox-toolbar__overflow,.tox-statusbar,
    .tox-menubar,.tox-menu,.tox-dialog,.tox-dialog__header,.tox-dialog__body,.tox-dialog__footer,.tox-pop,
    .tox-edit-area__iframe,.tox-listboxfield .tox-listbox,.tox-textfield,.tox-textarea,.tox-selectfield select) {
    background: var(--yc-surface);
    color: var(--yc-text);
    border-color: var(--yc-border);
}
.yc-theme-dark .tox.tox-tinymce { border-color: var(--yc-border); }
.yc-theme-dark .tox :is(.tox-tbtn,.tox-mbtn,.tox-collection__item,.tox-dialog__title,.tox-label,.tox-statusbar a,.tox-statusbar__path-item,.tox-button--naked) { color: var(--yc-text); }
.yc-theme-dark body .tox :is(.tox-tbtn,.tox-mbtn,.tox-split-button,.tox-listbox) { background-color: var(--yc-surface); }
.yc-theme-dark .tox :is(.tox-tbtn--select,.tox-tbtn--bespoke,.tox-split-button:focus,.tox-listbox) { background-color: var(--yc-night-soft); }
.yc-theme-dark .tox :is(.tox-statusbar__wordcount,.tox-statusbar__branding,.tox-statusbar__path-divider) { color: var(--yc-muted); }
.yc-theme-dark .tox :is(.tox-tbtn,.tox-mbtn,.tox-collection__item,.tox-icon,.tox-statusbar__resize-handle) svg { fill: currentColor; }
.yc-theme-dark .tox :is(.tox-tbtn:hover,.tox-tbtn--enabled,.tox-mbtn:hover,.tox-collection__item--active,.tox-collection__item--enabled,.tox-button--secondary) {
    background: var(--yc-night-soft);
    color: var(--yc-text);
    border-color: var(--yc-border);
}
.yc-theme-dark body .tox :is(.tox-tbtn--disabled,.tox-tbtn:disabled) { background-color: var(--yc-night-soft); color: var(--yc-muted); opacity: .65; }

/* TinyMCE portals menus to body, so its palette must clear a YourCRM edit modal. */
.tox-tinymce-aux {
    z-index: var(--yc-z-editor-popup) !important;
}

.tox-tinymce-aux .tox-menu,
.tox-tinymce-aux .tox-collection {
    max-width: calc(100vw - 16px);
    max-height: calc(100dvh - 16px);
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: var(--yc-font-family);
    color: var(--yc-text);
    background: var(--yc-bg);
}

button,
input,
select,
option {
    font: inherit;
}

textarea {
    font: inherit;
}

button,
a,
input,
select,
textarea,
label,
summary {
    -webkit-tap-highlight-color: transparent;
}

.app-text-ellipsis {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.work-row-title,
.work-mobile-title,
.shopping-product-name strong,
.shopping-product-name i,
.shopping-list-dashboard-main strong,
.shopping-list-dashboard-main small,
.shopping-list-tile strong,
.shopping-list-tile small,
.shopping-management-card__main span,
.shopping-side-list-card strong,
.shopping-side-list-card small {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

img,
svg {
    max-width: 100%;
}

.yc-btn {
    display: inline-flex;
    min-height: 42px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid transparent;
    border-radius: var(--yc-radius-md);
    padding: 0 14px;
    color: var(--yc-text);
    background: var(--yc-surface);
    box-shadow: 0 1px 0 rgba(15, 23, 42, 0.03);
    font-weight: 600;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: transform var(--yc-transition), border-color var(--yc-transition), background var(--yc-transition), color var(--yc-transition), box-shadow var(--yc-transition);
}

.yc-btn:hover,
.yc-btn:focus-visible {
    transform: translateY(-1px);
    outline: 0;
}

.yc-btn:disabled,
.yc-btn.is-disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
}

.yc-btn--primary {
    color: #fff;
    background: var(--yc-primary-gradient);
    box-shadow: 0 6px 14px rgba(124, 58, 237, 0.12);
}

.yc-btn--primary:hover,
.yc-btn--primary:focus-visible {
    background: linear-gradient(135deg, var(--yc-primary) 0%, var(--yc-primary-light) 100%);
    box-shadow: 0 8px 18px rgba(124, 58, 237, 0.14);
}

.yc-btn--secondary {
    border-color: var(--yc-border);
    color: var(--yc-night-muted, #334155);
    background: var(--yc-surface);
}

.yc-btn--secondary:hover,
.yc-btn--secondary:focus-visible {
    border-color: var(--yc-night-button-hover-border, rgba(148, 163, 184, 0.45));
    background: var(--yc-night-surface, #F8FAFC);
    box-shadow: var(--yc-shadow-sm);
}

.yc-btn--danger {
    color: var(--yc-danger);
    border-color: var(--yc-night-button-danger-border, rgba(220, 38, 38, 0.58));
    background: var(--yc-night-surface, #fff);
    box-shadow: none;
}

/* Home consumption */
.consumption-page,
.consumption-live-content {
    display: grid;
    gap: 12px;
    min-width: 0;
}

.consumption-pricing,
.consumption-pricing-form,
.consumption-meter-options {
    display: grid;
    gap: 12px;
    min-width: 0;
}
.consumption-meter-options > summary,
.consumption-pricedetails > summary {
    cursor: pointer;
    color: var(--yc-night-accent, var(--app-accent));
    font-weight: 600;
}
.consumption-meter-options > :not(summary) { margin-top: 8px; }
.consumption-electricity-register-inputs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}
.consumption-reading-cards.consumption-reading-cards--single { grid-template-columns: minmax(0, 1fr); }
.consumption-reading-card[hidden] { display: none; }
@media (max-width: 340px) {
    .consumption-electricity-register-inputs { grid-template-columns: minmax(0, 1fr); }
}
.consumption-cost-cards,
.consumption-cost-split {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}
.consumption-cost-split { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.consumption-cost-card {
    display: grid;
    gap: 5px;
    padding: 14px 16px;
}
.consumption-cost-card > span {
    display: flex;
    gap: 7px;
    align-items: center;
    font-weight: 650;
}
.consumption-cost-card svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    color: var(--yc-night-accent, var(--app-accent));
}
.consumption-cost-card[data-consumption-cost-card="total"] svg {
    fill: none;
    stroke: currentColor;
    stroke-width: 1.75;
    stroke-linecap: round;
}
.consumption-cost-card strong { overflow-wrap: anywhere; font-size: 19px; }
.consumption-cost-advance {
    display: flex; justify-content: space-between; flex-wrap: wrap; gap: 4px 10px;
    grid-column: 1 / -1; margin-top: 5px; padding-top: 8px; border-top: 1px solid var(--yc-border);
}
.consumption-cost-advance span { color: var(--yc-muted); }
.consumption-muted,
.consumption-pricing small { color: var(--yc-muted); }
.consumption-pricing .consumption-card-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 6px 12px;
    margin-bottom: 4px;
}
.consumption-pricing .consumption-card-head > a {
    color: var(--yc-night-accent, var(--app-accent-dark));
    font-weight: 600;
    font-size: .875rem;
}
.consumption-pricing :is(p, dl) { margin: 8px 0 0; }
.consumption-cost-details dl > div {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
    gap: 8px;
    padding: 8px 0;
    border-bottom: 1px solid var(--yc-border);
}
.consumption-cost-details dt { overflow-wrap: anywhere; }
.consumption-cost-details dl > div:last-child { border-bottom: 0; }
.consumption-cost-details dd { margin: 0; text-align: right; font-weight: 650; overflow-wrap: anywhere; }
.consumption-cost-details dd small,
.consumption-cost-table td small { display: block; font-weight: 400; }
.consumption-pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
    gap: 10px 12px;
    align-items: end;
}
.consumption-pricing-grid .yc-field { min-width: 0; }
.consumption-pricing-grid .yc-field[hidden] { display: none; }
.consumption-pricing-grid .yc-input { width: 100%; min-width: 0; }
.consumption-pricing-grid > .yc-btn { justify-self: start; }
.consumption-pricedetails {
    margin-top: 10px;
    padding: 10px 12px;
    border: 1px solid var(--yc-border);
    border-radius: 6px;
    background: var(--yc-night-soft, var(--yc-surface));
}
.consumption-pricedetails summary small { margin-inline-start: 8px; }
.consumption-pricedetails[open] > summary { margin-bottom: 10px; }
.consumption-pricing-form fieldset {
    margin: 0;
    min-width: 0;
    padding: 10px 12px;
    border: 1px solid var(--yc-border);
    border-radius: 6px;
}
.consumption-pricing-form legend { font-weight: 650; padding-inline: 5px; }
.consumption-pricing-form fieldset > label { display: block; margin-top: 9px; }
.consumption-scroll-region { max-width: 100%; overflow-x: auto; margin-top: 8px; }
.consumption-cost-chart { --cost-electricity: #b75724; --cost-water: #2775ac; }
.yc-theme-dark .consumption-cost-chart { --cost-electricity: #e48c57; --cost-water: #64a7d8; }
.consumption-terms-history { display: grid; gap: 6px; list-style: none; padding: 0; margin: 0; }
.consumption-terms-history li, .consumption-advance-line { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; padding: 8px 0; border-top: 1px solid var(--yc-border); }
.consumption-terms-history span, .consumption-advance-line small { color: var(--yc-muted); }
.consumption-pricing-settings h3, .consumption-bill-summary h3 { margin: 0; font-size: 15px; }
.consumption-pricing-settings a { color: var(--yc-night-accent, var(--app-accent-dark)); }
.consumption-bill-summary [data-consumption-balance="positive"] { color: var(--yc-night-green, #166534); }
.consumption-bill-summary [data-consumption-balance="negative"] { color: var(--yc-night-error, #b91c1c); }
.consumption-cost-legend { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
.consumption-cost-legend span::before {
    content: "";
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 2px;
    margin-inline-end: 6px;
    background: var(--cost-electricity);
}
.consumption-cost-legend span + span::before { background: var(--cost-water); }
.consumption-cost-plot {
    display: grid;
    grid-auto-columns: minmax(52px, 1fr);
    grid-auto-flow: column;
    padding: 8px 4px 2px;
    width: max-content;
    min-width: 100%;
}
.consumption-cost-month { display: grid; gap: 6px; justify-items: center; padding-inline: 5px; }
.consumption-cost-month > div {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    width: 100%;
    height: 140px;
    gap: 4px;
    border-bottom: 1px solid var(--yc-border);
    background: repeating-linear-gradient(to top, transparent 0 calc(25% - 1px), var(--yc-border) calc(25% - 1px) 25%);
}
.consumption-cost-bar {
    width: min(40%, 26px);
    height: max(4px, var(--cost-height));
    padding: 0;
    background: var(--cost-electricity);
    border: 0;
    border-radius: 4px 4px 0 0;
    cursor: pointer;
}
.consumption-cost-bar--water { background: var(--cost-water); }
.consumption-cost-bar.is-partial { opacity: .58; }
.consumption-cost-bar:focus-visible { outline: 2px solid var(--yc-text); outline-offset: 2px; }
.consumption-cost-table { width: 100%; border-collapse: collapse; min-width: 470px; }
.consumption-cost-table :is(th, td) { padding: 8px 10px; text-align: right; border-bottom: 1px solid var(--yc-border); }
.consumption-cost-table :is(th, td):first-child { text-align: left; }
.consumption-cost-table tbody tr:last-child > * { border-bottom: 0; }
html:is([data-native-offline="true"], [data-native-network-unavailable]) :is([data-consumption-cost-summary], [data-consumption-pricing-settings]) {
    display: none !important;
}
@media (max-width: 660px) {
    .consumption-cost-cards, .consumption-cost-split { grid-template-columns: minmax(0, 1fr); gap: 8px; }
    .consumption-cost-card { grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 4px 10px; padding: 10px 12px; }
    .consumption-cost-card strong { text-align: right; font-size: 15px; }
    .consumption-cost-card small { grid-column: 1 / -1; }
}

.consumption-tabs-panel {
    padding: 12px 16px;
}

.consumption-filter {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: end;
    gap: 12px;
}

.consumption-filter.finance-filter-panel {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}
.consumption-filter-box > .consumption-filter { grid-template-columns: repeat(2, minmax(0, 170px)); }
.consumption-filter-box > .consumption-filter input { min-width: 0; width: 100%; }

.consumption-period-presets {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.consumption-period-presets .yc-btn {
    min-width: 0;
    min-height: 40px;
    padding: 8px 12px;
    font-size: 13px;
}
.consumption-period-presets .yc-btn.is-active {
    border-color: var(--app-accent);
    background: var(--app-accent-soft);
    color: var(--yc-night-accent, var(--app-accent));
}

.consumption-kpis,
.consumption-overview-grid,
.consumption-stat-layout {
    display: grid;
    gap: 16px;
}

.consumption-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.consumption-overview-grid {
    grid-template-columns: minmax(0, 1fr);
}

.consumption-stat-layout {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.consumption-card--wide {
    grid-column: 1 / -1;
}

.consumption-kpi,
.consumption-card {
    padding: 18px;
}

.consumption-kpi {
    display: flex;
    align-items: center;
    gap: 18px;
    min-height: 128px;
}

.consumption-kpi-body {
    display: grid;
    gap: 8px;
    min-width: 0;
}

.consumption-kpi-icon {
    flex: 0 0 48px;
    width: 48px;
    height: 48px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.consumption-kpi span,
.consumption-card h2,
.consumption-card-head h2 {
    margin: 0;
}

.consumption-kpi span,
.consumption-kpi small,
.consumption-reading-mini small,
.consumption-horizontal-row small {
    color: var(--yc-muted);
    font-weight: 700;
}

.consumption-kpi strong {
    color: var(--yc-text);
    font-size: 26px;
    line-height: 1.1;
}

.consumption-kpi--water strong {
    color: var(--yc-night-blue, #0284c7);
}

.consumption-kpi--water .consumption-kpi-icon {
    color: var(--yc-night-blue, #0284c7);
}

.consumption-kpi--electricity strong {
    color: var(--yc-night-accent, #7c3aed);
}

.consumption-kpi--electricity .consumption-kpi-icon {
    color: var(--yc-night-accent, #7c3aed);
}

.consumption-statistics-history {
    margin-bottom: 0;
}
.consumption-dual-chart { display: grid; grid-template-columns: max-content minmax(0, 1fr) max-content; min-width: 0; gap: 6px; }
.consumption-dual-chart .finance-history-chart { min-width: 0; grid-auto-flow: column; grid-auto-columns: minmax(52px, 1fr); grid-template-columns: none; min-height: 0; padding: 0 0 8px; gap: 10px; }
.consumption-dual-chart .finance-history-chart__bars { height: 240px; min-height: 240px; padding: 0; }
.consumption-dual-chart .finance-history-chart__month { grid-template-rows: 240px 20px; }
.consumption-chart-axis { display: flex; flex-direction: column; justify-content: space-between; height: 240px; position: relative; margin-top: 28px; font-size: 11px; font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.consumption-chart-axis strong { position: absolute; top: -24px; right: 0; }
.consumption-chart-axis--water { color: var(--yc-night-blue, #0369a1); }
.consumption-chart-axis--electricity { color: var(--yc-night-accent, #6d28d9); text-align: left; }
.consumption-chart-axis--electricity strong { left: 0; right: auto; }
.consumption-dual-chart .finance-history-chart { margin-top: 28px; }
.consumption-dual-chart .finance-history-chart__month > small { font-size: 11px; white-space: nowrap; }

.consumption-statistics-history .consumption-chart-point {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    flex: 1 1 24px;
    max-width: 32px;
    min-width: 0;
    height: 100%;
    padding: 0;
    border: 0;
    border-radius: 4px;
    background: transparent;
    box-shadow: none;
    appearance: none;
    cursor: pointer;
}
.consumption-statistics-history .consumption-chart-point:focus-visible {
    outline: 2px solid var(--app-accent);
    outline-offset: 2px;
}
.consumption-chart-tooltip {
    position: fixed;
    z-index: 200;
    width: max-content;
    max-width: min(320px, calc(100vw - 24px));
    max-height: calc(100dvh - 24px);
    overflow: auto;
    padding: 10px 12px;
    border: 1px solid var(--yc-border, #e2e8f0);
    border-radius: 8px;
    background: var(--yc-night-surface, #fff);
    color: var(--yc-text, #0f172a);
    box-shadow: 0 8px 24px rgba(15, 23, 42, .16);
    white-space: pre-line;
    overflow-wrap: anywhere;
    font-size: 13px;
    line-height: 1.5;
}

.consumption-statistics-history .finance-history-chart__bars .is-water {
    background: linear-gradient(180deg, #38bdf8 0%, #0284c7 100%);
}

.consumption-statistics-history .finance-history-chart__bars .is-electricity {
    background: linear-gradient(180deg, #a78bfa 0%, #7c3aed 100%);
}

.consumption-chart-legend .water::before {
    background: #0284c7;
}

.consumption-chart-legend .electricity::before {
    background: #7c3aed;
}
.consumption-volume-chart .consumption-dual-chart { min-width: calc(76px + 72px * var(--volume-months)); }
.consumption-volume-chart .finance-history-chart { grid-auto-columns: minmax(60px, 1fr); overflow: visible; }
.consumption-volume-chart [data-volume-series=water] { --consumption-series: #2775ac; }
.consumption-volume-chart [data-volume-series=vt] { --consumption-series: #b75724; }
.consumption-volume-chart [data-volume-series=nt] { --consumption-series: #168273; }
.consumption-volume-chart [data-volume-series=total] { --consumption-series: #71768f; }
.yc-theme-dark .consumption-volume-chart [data-volume-series=water] { --consumption-series: #64a7d8; }
.yc-theme-dark .consumption-volume-chart [data-volume-series=vt] { --consumption-series: #ec9b68; }
.yc-theme-dark .consumption-volume-chart [data-volume-series=nt] { --consumption-series: #57c5a6; }
.yc-theme-dark .consumption-volume-chart [data-volume-series=total] { --consumption-series: #a1a8c6; }
.consumption-volume-chart [data-volume-series] > span,
.consumption-volume-chart .consumption-chart-legend [data-volume-series]::before { background: var(--consumption-series); }
.consumption-volume-chart [data-volume-series] > span { min-height: 2px; }

.consumption-card {
    display: grid;
    gap: 16px;
}

.consumption-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.consumption-chart {
    display: grid;
    grid-auto-columns: minmax(70px, 1fr);
    grid-auto-flow: column;
    align-items: end;
    min-height: 250px;
    overflow-x: auto;
    gap: 12px;
    padding: 10px 4px 0;
}

.consumption-chart-month {
    display: grid;
    grid-template-rows: 1fr auto;
    min-height: 220px;
    gap: 8px;
    text-align: center;
    color: var(--yc-muted);
    font-size: 12px;
    font-weight: 800;
}

.consumption-bars {
    display: flex;
    align-items: end;
    justify-content: center;
    height: 190px;
    gap: 6px;
    padding: 10px;
    border-radius: 8px;
    background: var(--yc-night-surface, #f8fafc);
}

.consumption-bar {
    display: block;
    width: 16px;
    min-height: 8px;
    border-radius: 999px 999px 4px 4px;
}

.consumption-bar--water,
.consumption-fill--water {
    background: linear-gradient(180deg, #38bdf8, #0284c7);
}

.consumption-bar--electricity,
.consumption-fill--electricity {
    background: linear-gradient(180deg, #a78bfa, #7c3aed);
}

.consumption-fill--cost {
    background: linear-gradient(90deg, #22c55e, #7c3aed);
}

.consumption-reading-stack,
.consumption-evaluation {
    display: grid;
    gap: 10px;
}

.consumption-reading-mini,
.consumption-mobile-card,
.consumption-evaluation span {
    display: grid;
    gap: 6px;
    padding: 14px;
    border: 1px solid var(--yc-border);
    border-radius: 8px;
    background: var(--yc-night-surface, #fff);
}

.consumption-reading-mini {
    grid-template-columns: auto 1fr auto;
    align-items: center;
}

.consumption-type {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
}

.consumption-type--water {
    color: var(--yc-night-blue, #0369a1);
    background: var(--yc-night-blue-bg, #e0f2fe);
}

.consumption-type--electricity {
    color: var(--yc-night-accent, #6d28d9);
    background: var(--yc-night-accent-bg, #f3e8ff);
}

.consumption-row-actions {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.consumption-table {
    display: grid;
    gap: 8px;
}

.consumption-table-head,
.consumption-table-row {
    display: grid;
    grid-template-columns: minmax(120px, 0.9fr) minmax(120px, 0.8fr) minmax(150px, 1fr) minmax(150px, 1fr) auto;
    align-items: center;
    gap: 10px;
}

.consumption-table-head {
    padding: 0 14px;
    color: var(--yc-muted);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.consumption-table-row {
    min-height: 64px;
    padding: 12px 14px;
    border: 1px solid var(--yc-border);
    border-radius: 8px;
    background: var(--yc-night-surface, #fff);
    font-weight: 700;
}

.consumption-mobile-list {
    display: none;
}

.consumption-table.consumption-reading-groups { display: grid; }
.consumption-reading-filter {
    display: grid; grid-template-columns: repeat(3, minmax(0, 190px)); gap: 8px; margin: 0 0 12px;
}
.consumption-reading-filter .yc-input { min-width: 0; width: 100%; }
.consumption-readings-header { display: none; }
.consumption-day {
    display: grid; grid-template-columns: minmax(92px, auto) minmax(0, 1fr); gap: 12px;
    padding: 10px 12px; border: 1px solid var(--yc-border); border-radius: 8px;
}
.consumption-day[hidden] { display: none; }
.consumption-day h3, .consumption-meter-row h4 { margin: 0; font-size: .9rem; }
.consumption-day h3 small, .consumption-meter-row h4 small { display: block; color: var(--yc-muted); font-weight: 400; }
.consumption-archive-line { display: block; }
.consumption-meter-row [data-consumption-meter-archive][hidden] { display: none; }
.consumption-day-meters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 16px; }
.consumption-table-row.consumption-meter-row { grid-template-columns: minmax(0, 1fr); align-content: start; min-height: 0; padding: 0; border: 0; gap: 8px; background: transparent; }
.consumption-meter-row[data-consumption-type=water] { order: -1; }
.consumption-meter-row header { min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 0; }
.consumption-registers { display: grid; gap: 4px; margin: 0; font-size: .82rem; }
.consumption-registers > div { display: grid; grid-template-columns: minmax(0, .7fr) minmax(0, 1fr) minmax(0, 1fr); gap: 6px; }
.consumption-registers > div[hidden] { display: none; }
.consumption-registers dd { margin: 0; text-align: right; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.consumption-registers dt { overflow-wrap: anywhere; }
.consumption-registers [data-consumption-derived] { color: var(--yc-muted); font-weight: 400; }
.consumption-registers [data-consumption-derived]::before { content: '+'; margin-inline-end: 2px; }
.consumption-registers [data-consumption-derived].is-unavailable::before { content: none; }
.consumption-meter-reset { display: flex; align-items: center; gap: 6px; color: var(--yc-muted); }
@media (min-width: 1100px) {
    .consumption-day, .consumption-readings-header {
        display: grid; grid-template-columns: 102px minmax(0, 1fr); align-items: center;
        gap: 8px; padding: 6px 8px;
    }
    .consumption-readings-header { color: var(--yc-muted); font-size: .78rem; font-weight: 600; }
    .consumption-readings-header .consumption-day-meters { align-items: center; }
    .consumption-readings-header .consumption-day-meters > :last-child { grid-column: 5 / 7; text-align: right; }
    .consumption-day-meters {
        grid-template-columns: repeat(4, minmax(0, 1fr)) repeat(2, 64px);
        align-items: center; gap: 4px 8px;
    }
    .consumption-table.consumption-reading-groups { gap: 0; }
    .consumption-day { border-width: 1px 0 0; border-radius: 0; }
    .consumption-table-row.consumption-meter-row:not([data-offline-removed]), .consumption-meter-row[data-consumption-type=electricity] .consumption-registers { display: contents; }
    .consumption-meter-row header, .consumption-meter-row .consumption-registers,
    .consumption-meter-row .consumption-registers > div, .consumption-meter-row > .native-sync-icon { grid-row: var(--meter-track, 1); }
    .consumption-meter-row[data-consumption-type=water] .consumption-registers { grid-column: 1; }
    .consumption-registers > [data-consumption-register=vt] { grid-column: 2; }
    .consumption-registers > [data-consumption-register=nt] { grid-column: 3; }
    .consumption-registers > [data-consumption-register=total] { grid-column: 4; }
    .consumption-meter-row[data-consumption-type=water] header { grid-column: 5; }
    .consumption-meter-row[data-consumption-type=electricity] header { grid-column: 6; }
    .consumption-meter-row > .native-sync-icon { grid-column: 4; justify-self: end; align-self: start; }
    .consumption-meter-row header { flex-wrap: wrap; justify-content: flex-end; gap: 1px; }
    .consumption-meter-row h4 { font-size: .63rem; text-align: right; }
    .consumption-meter-row h4 small { display: inline; }
    .consumption-meter-row h4 small + small:not([hidden])::before { content: ' · '; }
    .consumption-meter-row .consumption-commodity-name, .consumption-registers > div:not([data-consumption-register=sewer]) dt { display: none; }
    .consumption-meter-row .consumption-row-actions { gap: 3px; flex-wrap: nowrap; }
    .consumption-meter-row .consumption-row-actions .app-icon-btn { width: 30px; height: 30px; min-width: 30px; min-height: 30px; padding: 0; }
    .consumption-registers > div { display: block; min-width: 0; }
    .consumption-registers dd { text-align: left; }
    .consumption-registers > [data-consumption-register=sewer] dt { font-size: .68rem; }
}
@media (max-width: 1050px) {
    .consumption-day { grid-template-columns: minmax(0, 1fr); gap: 8px; }
    .consumption-day h3 { display: flex; gap: 8px; align-items: baseline; }
}
@media (max-width: 640px) {
    .consumption-reading-filter { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .consumption-reading-filter > label:last-of-type { grid-column: 1 / -1; }
    .consumption-day-meters { grid-template-columns: minmax(0, 1fr); }
    .consumption-day-meters > article + article { padding-top: 8px; border-top: 1px solid var(--yc-border); }
}

.consumption-horizontal-chart {
    display: grid;
    gap: 12px;
    overflow-x: auto;
}

.consumption-horizontal-row {
    display: grid;
    grid-template-columns: 80px minmax(160px, 1fr) 90px minmax(160px, 1fr) 90px;
    align-items: center;
    gap: 10px;
}

.consumption-horizontal-row--cost {
    grid-template-columns: 80px minmax(220px, 1fr) 120px;
}

.consumption-horizontal-row span,
.consumption-summary-table div {
    overflow: hidden;
    border-radius: 8px;
    background: var(--yc-night-soft, #f1f5f9);
}

.consumption-fill {
    display: block;
    min-width: 4px;
    height: 18px;
    border-radius: 8px;
}

.consumption-summary-table {
    display: grid;
    gap: 8px;
    overflow-x: auto;
}

.consumption-summary-table div {
    display: grid;
    grid-template-columns: repeat(6, minmax(130px, 1fr));
    gap: 10px;
    min-width: 760px;
    padding: 12px 14px;
    background: var(--yc-night-surface, #fff);
    border: 1px solid var(--yc-border);
}

.consumption-evaluation strong {
    color: var(--yc-night-accent, #6d28d9);
}

.consumption-empty {
    margin: 0;
    padding: 16px;
    color: var(--yc-muted);
    text-align: center;
}

.consumption-form-card {
    gap: 18px;
}

.consumption-date-row {
    display: grid;
    grid-template-columns: minmax(220px, 360px);
}

.consumption-reading-cards {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.consumption-reading-card {
    display: grid;
    gap: 14px;
    align-content: start;
    padding: 18px;
    border: 1px solid var(--yc-border);
    border-radius: 8px;
    background: var(--yc-night-surface, #fff);
}

.consumption-reading-card.is-disabled {
    opacity: 0.56;
    background: var(--yc-night-surface, #f8fafc);
}

.consumption-reading-card.is-disabled input {
    cursor: not-allowed;
}

.consumption-reading-card header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.consumption-reading-card h2 {
    margin: 0;
    color: var(--yc-text);
    font-size: 20px;
}

.consumption-reading-card header span,
.consumption-meter-input span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 42px;
    padding: 0 12px;
    border: 1px solid var(--yc-border);
    border-radius: 8px;
    color: var(--yc-muted);
    background: var(--yc-night-surface, #f8fafc);
    font-weight: 900;
}

.consumption-reading-card p {
    margin: 0;
    color: var(--yc-muted);
    font-size: 13px;
    font-weight: 700;
}

.consumption-meter-input {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    align-items: center;
}

.consumption-form-error {
    margin: 0;
    padding: 12px 14px;
    border: 1px solid rgba(220, 38, 38, 0.22);
    border-radius: 8px;
    color: var(--yc-night-error, #b91c1c);
    background: rgba(var(--yc-night-error-bg-rgb, 254, 226, 226), 0.58);
    font-weight: 800;
}

.consumption-form-success {
    margin: 0;
    padding: 12px 14px;
    border: 1px solid rgba(22, 163, 74, 0.22);
    border-radius: 8px;
    color: var(--yc-night-green, #166534);
    background: rgba(var(--yc-night-green-bg-rgb, 220, 252, 231), 0.72);
    font-weight: 800;
}

.consumption-settings-form {
    display: grid;
    gap: 14px;
}

.consumption-settings-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.consumption-settings-note {
    margin: 0;
    color: var(--yc-muted);
    font-size: 13px;
    font-weight: 700;
}
.consumption-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

@media (max-width: 1180px) {
    .consumption-kpis {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .consumption-overview-grid,
    .consumption-stat-layout {
        grid-template-columns: 1fr;
    }

    .consumption-filter {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .consumption-page {
        gap: 12px;
    }

    .consumption-filter,
    .consumption-kpis,
    .consumption-date-row,
    .consumption-reading-cards {
        grid-template-columns: 1fr;
    }

    .consumption-filter.finance-filter-panel {
        display: none;
        grid-template-columns: minmax(0, 1fr);
    }

    .consumption-filter.finance-filter-panel.is-open {
        display: grid;
    }

    .consumption-table {
        display: none;
    }

    .consumption-mobile-list {
        display: grid;
        gap: 10px;
    }

    .consumption-mobile-card header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
    }

    .consumption-mobile-card footer {
        display: flex;
        align-items: center;
        justify-content: flex-start;
    }

    .consumption-mobile-card {
        gap: 8px;
    }

    .consumption-mobile-card p {
        margin: 0;
    }

    .consumption-reading-mini {
        grid-template-columns: 1fr;
    }

    .consumption-row-actions {
        justify-content: flex-start;
    }

    .consumption-settings-grid {
        grid-template-columns: 1fr;
    }
    .consumption-form-actions {
        flex-direction: column;
    }

    .consumption-form-actions .yc-btn {
        width: 100%;
        justify-content: center;
    }
}

.yc-btn--danger:hover,
.yc-btn--danger:focus-visible {
    color: var(--yc-night-error, #b91c1c);
    border-color: rgba(185, 28, 28, 0.72);
    background: rgba(var(--yc-night-error-bg-rgb, 254, 226, 226), 0.58);
    box-shadow: none;
}

.yc-btn--success {
    color: #fff;
    background: linear-gradient(135deg, #166534 0%, #16A34A 100%);
    box-shadow: 0 8px 18px rgba(22, 163, 74, 0.14);
}

.yc-btn--success:hover,
.yc-btn--success:focus-visible {
    background: linear-gradient(135deg, #15803D 0%, #22C55E 100%);
}

.yc-btn--ghost {
    border-color: transparent;
    color: var(--yc-muted);
    background: transparent;
    box-shadow: none;
}

.yc-btn--ghost:hover,
.yc-btn--ghost:focus-visible {
    color: var(--yc-night-accent, var(--yc-primary-dark));
    background: var(--yc-primary-soft);
}

.yc-btn--icon {
    width: 38px;
    min-width: 38px;
    min-height: 38px;
    padding: 0;
}

.yc-btn--icon svg {
    width: 16px;
    height: 16px;
}

.work-subsection {
    display: grid;
    gap: 18px;
}

.work-add-panel {
    display: grid;
    gap: 0;
    align-self: start;
}

.work-add-panel > summary {
    display: flex;
    min-height: 52px;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border: 1px solid rgba(148, 163, 184, .24);
    border-radius: 16px;
    padding: 0 18px;
    color: var(--yc-night-muted, #334155);
    background: var(--yc-night-surface, #fff);
    box-shadow: var(--yc-shadow-sm);
    font-size: 15px;
    font-weight: 800;
    list-style: none;
    cursor: pointer;
    transition: border-color var(--yc-transition), box-shadow var(--yc-transition), color var(--yc-transition), transform var(--yc-transition);
}

.work-add-panel > summary::-webkit-details-marker {
    display: none;
}

.work-add-panel > summary::after {
    content: "+";
    display: inline-grid;
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    place-items: center;
    border-radius: 999px;
    color: #fff;
    background: var(--yc-primary-gradient);
    font-size: 20px;
    font-weight: 800;
    line-height: 1;
    transition: transform var(--yc-transition);
}

.work-add-panel > summary:hover,
.work-add-panel > summary:focus-visible {
    color: var(--yc-night-accent, var(--yc-primary-dark));
    border-color: rgba(124, 58, 237, .28);
    box-shadow: 0 16px 34px rgba(15, 23, 42, .08);
    outline: 0;
    transform: translateY(-1px);
}

.work-add-panel[open] > summary {
    border-color: rgba(124, 58, 237, .32);
    border-radius: 16px 16px 10px 10px;
    color: var(--yc-night-accent, var(--yc-primary-dark));
}

.work-add-panel[open] > summary::after {
    content: "-";
    transform: rotate(180deg);
}

.work-add-panel[open] > .work-subsection-form {
    margin-top: 10px;
}

.work-subsection-form,
.work-sub-card {
    border: 1px solid rgba(148, 163, 184, .28);
    border-radius: 18px;
    background: var(--yc-night-surface, #fff);
    padding: 18px;
    box-shadow: 0 18px 42px rgba(15, 23, 42, .07);
}

.work-subsection-form {
    background: linear-gradient(180deg, var(--yc-night-surface, #fff) 0%, var(--yc-night-accent-bg, #fbfaff) 100%);
}

.work-subsection-form .finance-form-actions {
    margin-top: 14px;
    justify-content: flex-end;
}

.work-subsection-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    align-items: end;
}

.work-subsection-hint {
    margin: 12px 0 0;
    padding: 10px 12px;
    border: 1px solid rgba(124, 58, 237, .14);
    border-radius: 12px;
    background: rgba(124, 58, 237, .06);
    color: var(--yc-night-muted, #64748b);
    font-size: 13px;
    line-height: 1.45;
}

.work-subsection-list,
.work-notes-grid,
.work-documents-grid {
    display: grid;
    gap: 12px;
}

.work-subsection-list > h3 {
    margin: 2px 0 0;
    color: var(--yc-night-text, #0f172a);
    font-size: 17px;
    font-weight: 800;
}

.work-task-list,
.work-task-list .work-completed-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
    min-width: 0;
}

.work-task-list .work-completed-list {
    display: grid;
    gap: 12px;
}

.work-task-list,
.work-task-open-list,
.work-task-list .work-completed-list {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    gap: 8px;
    min-width: 0;
}

.work-task-card {
    padding: 9px 10px;
}

.work-task-row {
    display: flex;
    min-width: 0;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.work-task-row__content {
    min-width: 0;
    flex: 1 1 auto;
}

.work-task-row__content span {
    display: block;
    min-width: 0;
    overflow: hidden;
    color: var(--yc-night-text, #0f172a);
    font-size: 14px;
    font-weight: 400;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.work-task-actions {
    flex: 0 0 auto;
}

.work-task-drag-handle {
    flex: 0 0 auto;
}

.work-task-list > .work-placeholder,
.work-task-list > .modal-overlay,
.work-task-list > .work-completed-list,
.work-task-list .work-completed-list > summary,
.work-task-list .work-completed-list > .modal-overlay {
    grid-column: 1 / -1;
}

@media (max-width: 1199px) {
    .work-task-list,
    .work-task-list .work-completed-list {
        grid-template-columns: 1fr;
    }
}

.work-notes-grid,
.work-documents-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.work-notes-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.work-documents-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-width: 0;
}

.work-documents-header h2 {
    margin: 0;
}

.work-documents-content {
    display: grid;
    gap: 12px;
    border: 1px solid rgba(148, 163, 184, .22);
    border-radius: 18px;
    background: rgba(var(--yc-night-surface-rgb, 255, 255, 255), .82);
    padding: 18px;
    box-shadow: 0 18px 42px rgba(15, 23, 42, .06);
}

.documents-page__card > .work-subsection {
    gap: 0;
}

.password-page__card {
    display: grid;
    gap: 12px;
    padding: 18px;
}

.documents-page__card .work-documents-content {
    border: 0;
    border-radius: 0;
    padding: 0;
    background: transparent;
    box-shadow: none;
}

.documents-page .documents-page__split-content {
    border: 0;
    border-radius: 0;
    padding: 0;
    background: transparent;
    box-shadow: none;
    gap: 16px;
}

.documents-page .documents-page__split-box {
    display: grid;
    gap: 12px;
    padding: 18px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 18px;
    background: rgba(var(--yc-night-surface-rgb, 255, 255, 255), 0.86);
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.06);
    min-width: 0;
}

.documents-page .documents-page__split-box-header h2 {
    margin: 0;
    font-size: 20px;
    line-height: 1.2;
}


.password-page__content {
    border: 0;
    border-radius: 0;
    padding: 0;
    background: transparent;
    box-shadow: none;
}

.documents-page,
.documents-page__card,
.documents-page__card .work-subsection,
.documents-page__card .work-documents-content,
.documents-page__card .work-documents-grid,
.documents-page__card .work-sub-card,
.password-page,
.password-page__card,
.password-page__content,
.password-page .work-documents-grid,
.password-page .work-sub-card {
    min-width: 0;
}

.work-documents-grid--folders {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.password-page .password-items-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.work-documents-grid--folder-documents {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.work-documents-grid > .work-sub-card {
    height: 100%;
    min-height: 82px;
}

.work-documents-grid .work-sub-card__header {
    height: 100%;
    align-items: center;
}

.work-documents-grid > .work-placeholder {
    grid-column: 1 / -1;
}

.work-notes-grid > .work-placeholder {
    grid-column: 1 / -1;
}

.work-documents-sortable .work-document-card {
    cursor: grab;
}

.work-documents-sortable .work-document-card:active {
    cursor: grabbing;
}

.work-folder-card__link {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    min-width: 0;
    color: inherit;
    text-decoration: none;
}

.work-folder-card__link h3 {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.work-folder-card {
    position: relative;
}

.work-folder-card__link::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    border-radius: inherit;
}

.work-folder-card__link > * {
    position: relative;
    z-index: 2;
}

.work-folder-card .work-sub-actions--header {
    position: relative;
    z-index: 3;
}

.work-folder-edit-trigger,
.work-folder-upload-trigger {
    position: relative;
    z-index: 3;
}

.work-folder-card__icon {
    font-size: 28px;
    line-height: 1;
}

.work-folder-card__link:hover h3 {
    color: var(--yc-night-accent, #6d28d9);
}

.work-folder-view {
    display: grid;
    gap: 12px;
}

.work-folder-view__header {
    display: flex;
    align-items: center;
    gap: 12px;
    justify-content: space-between;
    padding: 12px 14px;
    border: 1px solid rgba(226, 232, 240, .9);
    border-radius: 14px;
    background: var(--yc-night-surface, #fff);
}

.work-folder-view__header h3 {
    margin: 0;
    color: var(--yc-night-text, #0f172a);
    font-size: 17px;
    font-weight: 800;
}

.work-folder-view__title {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    min-width: 0;
    margin-left: auto;
}

.work-folder-view__title h3 {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.password-search-card,
.password-search-inline {
    padding: 14px;
}

.password-search-card .yc-field,
.password-search-inline .yc-field {
    margin: 0;
}

.password-search-inline {
    border: 1px solid rgba(226, 232, 240, .9);
    border-radius: 14px;
    background: var(--yc-night-surface, #fff);
}

.password-card-icon,
.password-entry-card__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--yc-night-accent, #7c3aed);
}

.password-card-icon svg {
    width: 28px;
    height: 28px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.password-entry-card__icon {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    border-radius: 14px;
    background: rgba(124, 58, 237, .1);
}

.password-entry-card__icon svg {
    width: 21px;
    height: 21px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
}

.password-reveal-field {
    margin: 12px 0 0;
}

.password-reveal-input {
    font-size: 18px;
    font-weight: 800;
    letter-spacing: .02em;
}

.password-reveal-result {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 10px;
}

.password-reveal-result .password-reveal-field {
    margin: 0;
}

.password-copy-button {
    min-width: 112px;
    justify-content: center;
}

.password-copy-button.is-copied {
    min-width: 48px;
}

.password-copy-button.is-copied svg {
    width: 18px;
    height: 18px;
}

@media (max-width: 560px) {
    .password-reveal-result {
        grid-template-columns: minmax(0, 1fr);
    }

    .password-copy-button {
        width: 100%;
    }
}

.yc-modal-form {
    display: grid;
    gap: 16px;
}

.work-documents-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 10px;
}

.work-documents-actions .yc-btn {
    width: auto;
    min-width: 140px;
}

.documents-page__actions .yc-btn {
    width: auto;
    white-space: nowrap;
}

.work-document-modal-form {
    border: 0;
    border-radius: 0;
    padding: 0;
    background: transparent;
    box-shadow: none;
}

.work-document-modal-form .yc-modal__actions {
    margin-top: 18px;
}

.work-document-dropzone {
    position: relative;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    min-height: 126px;
    overflow: hidden;
    border: 1.5px dashed rgba(124, 58, 237, .34);
    border-radius: 16px;
    padding: 18px;
    color: var(--yc-night-muted, #334155);
    background: linear-gradient(180deg, var(--yc-night-surface, #fff) 0%, var(--yc-night-surface, #faf7ff) 100%);
    cursor: pointer;
    transition: border-color var(--yc-transition), background var(--yc-transition), box-shadow var(--yc-transition), transform var(--yc-transition);
}

.work-document-dropzone:hover,
.work-document-dropzone:focus-within,
.work-document-dropzone.is-dragover {
    border-color: rgba(124, 58, 237, .78);
    background: linear-gradient(180deg, var(--yc-night-surface, #fff) 0%, var(--yc-night-soft, #f4ecff) 100%);
    box-shadow: 0 18px 42px rgba(124, 58, 237, .12);
    transform: translateY(-1px);
}

.work-document-dropzone.has-file {
    border-style: solid;
    border-color: rgba(22, 163, 74, .42);
    background: linear-gradient(180deg, var(--yc-night-surface, #fff) 0%, var(--yc-night-green-bg, #f0fdf4) 100%);
}

.work-document-dropzone__input {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    opacity: 0.01;
}

.work-document-dropzone__icon {
    display: inline-grid;
    width: 48px;
    height: 48px;
    place-items: center;
    border-radius: 16px;
    color: var(--yc-night-accent, #6d28d9);
    background: rgba(124, 58, 237, .12);
}

.work-document-dropzone__icon,
.work-document-dropzone__content,
.work-document-dropzone__file {
    position: relative;
    z-index: 2;
    pointer-events: none;
}

.work-document-dropzone__icon svg {
    width: 22px;
    height: 22px;
}

.work-document-dropzone__content {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.work-document-dropzone__content strong {
    color: var(--yc-night-text, #0f172a);
    font-size: 15px;
    font-weight: 800;
}

.work-document-dropzone__content small,
.work-document-dropzone__file {
    color: var(--yc-night-muted, #64748b);
    font-size: 13px;
}

.work-document-dropzone__file {
    display: block;
    grid-column: 1 / -1;
    min-height: 42px;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, .24);
    border-radius: 14px;
    padding: 12px 14px;
    text-overflow: ellipsis;
    white-space: nowrap;
    background: rgba(var(--yc-night-surface-rgb, 255, 255, 255), .84);
    font-weight: 700;
    line-height: 1.2;
}

.work-document-dropzone.has-file .work-document-dropzone__file {
    color: var(--yc-night-green, #166534);
    border-color: rgba(34, 197, 94, .36);
    background: rgba(var(--yc-night-green-bg-rgb, 220, 252, 231), .95);
    box-shadow: inset 0 0 0 1px rgba(34, 197, 94, .12);
}

.mobile-camera-upload__input,
.mobile-camera-upload__button {
    display: none;
}

.work-subsection .tox.tox-tinymce {
    border: 1px solid rgba(148, 163, 184, .28);
    border-radius: var(--yc-radius-md);
    overflow: hidden;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .72);
}

.work-subsection .tox .tox-toolbar,
.work-subsection .tox .tox-toolbar__overflow,
.work-subsection .tox .tox-toolbar__primary {
    background: var(--yc-night-surface, #fff);
}

.work-subsection .tox .tox-edit-area::before {
    border-color: rgba(124, 58, 237, .62);
    border-radius: 0;
}

.work-subsection .tox .tox-statusbar {
    border-top-color: rgba(148, 163, 184, .18);
}

.work-rich-content {
    color: var(--yc-night-text, #1f2937);
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.work-rich-content p {
    margin: 0;
}

.work-rich-content p + p {
    margin-top: 0;
}

.work-rich-content ul,
.work-rich-content ol {
    margin: 0 0 .45em 1.25em;
    padding-left: 1.2em;
}

.work-rich-content li {
    margin: .12em 0;
}

.work-rich-content blockquote {
    margin: .45em 0;
    border-left: 3px solid rgba(124, 58, 237, .36);
    padding-left: 12px;
    color: var(--yc-night-muted, #475569);
}

.work-rich-content h3,
.work-rich-content h4 {
    line-height: 1.3;
    margin: .7em 0 .3em;
}

.work-rich-content h3 {
    font-size: 17px;
}

.work-rich-content h4 {
    font-size: 15px;
}

.work-rich-content > :first-child {
    margin-top: 0;
}

.work-rich-content > :last-child {
    margin-bottom: 0;
}

.work-rich-content img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 12px 0;
    border-radius: 12px;
}
.work-rich-content hr {
    border: 0;
    border-top: 1px solid rgba(148, 163, 184, .28);
    margin: 12px 0;
}

.work-attachments {
    display: grid;
    gap: 8px;
    margin-top: 12px;
}

.work-attachments > strong {
    color: var(--yc-night-text, #0f172a);
    font-size: 13px;
    font-weight: 900;
}

.work-attachments__list {
    display: grid;
    gap: 8px;
}

.work-attachment {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    border: 1px solid rgba(148, 163, 184, .18);
    border-radius: 12px;
    padding: 10px;
    background: rgba(var(--yc-night-soft-rgb, 248, 250, 252), .72);
}

.work-attachment strong,
.work-attachment small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.work-notes-grid[data-work-note-sortable] .work-note-card {
    cursor: grab;
}

.work-notes-grid[data-work-note-sortable] .work-note-card:active {
    cursor: grabbing;
}

.work-note-card {
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

.work-note-card__content {
    display: block;
    flex: 0 0 auto;
}

.work-note-card .work-rich-content {
    align-self: stretch;
    margin-top: 12px;
    justify-content: flex-start;
}

.work-note-card .work-note-attachments {
    margin-top: auto;
    padding-top: 12px;
}

.work-dashboard-pin-toggle {
    margin-top: 14px;
    width: 100%;
    min-width: 0;
    align-items: center;
}

.work-note-textarea {
    min-height: 440px;
}

/* Keep the larger note field after TinyMCE replaces its source textarea. */
.work-note-textarea + .tox.tox-tinymce {
    height: 440px !important;
    min-height: 440px;
}

/* Standalone notes use a separate source class but the same desktop note space. */
.notes-editor-form textarea[data-notes-rich-editor] + .tox.tox-tinymce {
    height: 440px !important;
    min-height: 440px;
}

@media (max-width: 899px) {
    .work-note-textarea {
        min-height: 220px;
    }

    .work-note-textarea + .tox.tox-tinymce {
        height: 320px !important;
        min-height: 220px;
    }

    .notes-editor-form textarea[data-notes-rich-editor] + .tox.tox-tinymce {
        height: 300px !important;
        min-height: 220px;
    }
}

.work-note-card .work-sub-card__header h3 {
    min-width: 0;
}

.work-note-actions,
.work-note-attachment-card .work-document-actions {
    flex: 0 0 auto;
    flex-wrap: nowrap;
    align-items: center;
}

.work-note-attachments__list {
    gap: 8px;
}

.work-note-attachment-card {
    min-height: 58px;
    padding: 10px;
}

.work-note-attachment-card .work-sub-card__header {
    height: 100%;
    align-items: center;
}

.work-note-attachment-card .work-sub-card__main {
    display: flex;
    flex: 1 1 auto;
    min-width: 0;
    align-items: center;
    gap: 10px;
}

.work-note-attachment-card__meta {
    display: grid;
    min-width: 0;
    gap: 2px;
}

.work-note-attachment-card__meta strong,
.work-note-attachment-card__meta small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.work-document-preview-page {
    display: grid;
    gap: 14px;
}

.work-document-preview-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(240px, 320px);
    gap: 14px;
    align-items: start;
}

.work-document-preview-card,
.work-document-preview-meta {
    min-width: 0;
}

.work-document-preview-card {
    display: grid;
    gap: 14px;
    padding: 18px;
}

.work-document-preview-card__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.work-document-preview-card__head h2,
.work-document-preview-meta h2 {
    margin: 0;
    color: var(--yc-night-text, #0f172a);
    font-size: 18px;
    font-weight: 800;
}

.work-document-preview-card__head span {
    overflow: hidden;
    border-radius: 999px;
    padding: 6px 10px;
    color: var(--yc-night-muted, #64748b);
    background: var(--yc-night-surface, #f8fafc);
    font-size: 12px;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.work-document-preview-frame {
    display: grid;
    min-height: min(72vh, 760px);
    overflow: auto;
    border: 1px solid rgba(148, 163, 184, .22);
    border-radius: 16px;
    background: var(--yc-night-surface, #f8fafc);
}

.work-document-preview__image {
    display: block;
    max-width: 100%;
    max-height: min(72vh, 760px);
    margin: auto;
    object-fit: contain;
}

.work-document-preview__iframe {
    width: 100%;
    min-height: min(72vh, 760px);
    border: 0;
    background: var(--yc-night-surface, #fff);
}

.work-document-preview__empty {
    display: grid;
    place-items: center;
    gap: 12px;
    padding: 34px 18px;
    text-align: center;
}

.work-document-preview__empty p {
    margin: 0;
    color: var(--yc-night-muted, #475569);
    font-weight: 800;
}

.work-document-preview-meta {
    display: grid;
    gap: 14px;
    padding: 18px;
}

.work-document-preview-meta dl {
    display: grid;
    gap: 10px;
    margin: 0;
}

.work-document-preview-meta dl > div {
    display: grid;
    gap: 4px;
    min-width: 0;
    border: 1px solid rgba(148, 163, 184, .18);
    border-radius: 14px;
    padding: 10px 12px;
    background: var(--yc-night-surface, #fbfdff);
}

.work-document-preview-meta dt {
    color: var(--yc-night-muted, #64748b);
    font-size: 12px;
    font-weight: 800;
}

.work-document-preview-meta dd {
    min-width: 0;
    margin: 0;
    overflow-wrap: anywhere;
    color: var(--yc-night-text, #0f172a);
    font-size: 14px;
    font-weight: 800;
}

.work-sub-card {
    display: grid;
    gap: 12px;
    min-width: 0;
    transition: transform var(--yc-transition), box-shadow var(--yc-transition), border-color var(--yc-transition);
}

.work-sub-card:hover {
    border-color: rgba(124, 58, 237, .22);
    box-shadow: 0 22px 54px rgba(15, 23, 42, .09);
    transform: translateY(-1px);
}

.work-sub-card > h3,
.work-sub-card__header > h3,
.work-folder-card h3,
.work-log-card h3 {
    margin: 0;
    color: var(--yc-night-text, #0f172a);
    font-size: 16px;
    font-weight: 800;
}

.work-sub-card > p {
    margin: 0;
    color: var(--yc-night-muted, #475569);
    font-size: 14px;
    line-height: 1.55;
}

.work-sub-card__header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: flex-start;
    gap: 14px;
    min-width: 0;
}

.work-sub-card__header > h3,
.work-sub-card__header .work-dashboard-card__header {
    grid-column: 1;
    grid-row: 1;
    min-width: 0;
    margin: 0;
}

.work-sub-card__header > .work-sub-card__main {
    grid-column: 1;
    grid-row: 1;
}

.work-sub-card__main,
.work-log-item {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.work-sub-card__main > div,
.work-log-item > div {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.work-sub-card__main strong,
.work-log-item strong {
    min-width: 0;
    overflow: hidden;
    color: var(--yc-night-text, #0f172a);
    font-size: 15px;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.work-sub-card__main small,
.work-log-item small,
.work-sub-card small {
    min-width: 0;
    overflow: hidden;
    color: var(--yc-night-muted, #64748b);
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.work-status-dot {
    width: 10px;
    height: 10px;
    flex: 0 0 10px;
    border-radius: 999px;
}

.work-status-dot--open {
    background: #a855f7;
}

.work-status-dot--done {
    background: #22c55e;
}

.work-sub-card--done {
    border-color: rgba(34, 197, 94, .2);
    background: var(--yc-night-surface, #fbfffd);
    opacity: .88;
}

.work-inline-edit {
    border-top: 1px solid rgba(148, 163, 184, .2);
    padding-top: 12px;
}

.work-inline-edit > summary {
    display: inline-flex;
    min-height: 32px;
    align-items: center;
    border-radius: 999px;
    padding: 0 12px;
    cursor: pointer;
    color: var(--yc-night-accent, #6d28d9);
    font-weight: 700;
    font-size: 13px;
    background: rgba(124, 58, 237, .08);
}

.work-inline-edit > summary.app-icon-btn {
    width: 38px;
    min-width: 38px;
    height: 38px;
    min-height: 38px;
    padding: 0;
    border-radius: 12px;
    list-style: none;
}

.work-inline-edit > summary.app-icon-btn::-webkit-details-marker {
    display: none;
}

.work-inline-edit[open] > summary.app-icon-btn {
    display: none;
}

.work-edit-form-actions {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
    width: 100%;
    margin-top: 2px;
}

.work-sub-actions,
.work-inline-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.work-sub-actions {
    justify-content: flex-end;
}

.work-sub-actions--header {
    flex: 0 0 auto;
    grid-column: 2;
    grid-row: 1;
    margin-left: auto;
}

.work-sub-actions--header:has(.work-inline-edit[open]) {
    grid-column: 1 / -1;
    grid-row: 2;
    flex: 1 1 100%;
    width: 100%;
    margin-left: 0;
    margin-top: 2px;
}

.work-sub-actions--header:has(.work-inline-edit[open]) > :not(.work-inline-edit) {
    display: none;
}

.work-sub-actions--header .work-inline-edit {
    border-top: 0;
    padding-top: 0;
}

.work-sub-actions--header .work-inline-edit > summary,
.work-sub-actions--header .yc-btn,
.work-sub-actions--header button {
    display: inline-flex;
    min-height: 38px;
    height: 38px;
    align-items: center;
    justify-content: center;
    padding-top: 0;
    padding-bottom: 0;
    line-height: 1;
    white-space: nowrap;
}

.work-sub-actions--header .work-inline-edit[open] {
    flex: 1 1 100%;
    width: 100%;
    min-width: 0;
}

.work-sub-actions--header .work-inline-edit[open] > form {
    width: 100%;
    margin-top: 10px;
}

.work-inline-row .yc-input {
    flex: 1 1 220px;
}

.work-log-toggle-empty {
    width: 13px;
    height: 13px;
    border: 2px solid currentColor;
    border-radius: 999px;
}

.work-completed-list {
    border-top: 1px solid rgba(148, 163, 184, .22);
    padding-top: 12px;
}

.work-completed-list > summary {
    min-height: 38px;
    cursor: pointer;
    color: var(--yc-night-muted, #475569);
    font-weight: 800;
}

.work-document-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--yc-night-accent-bg, #f3e8ff);
    color: var(--yc-night-accent, #6d28d9);
    font-size: 11px;
    font-weight: 900;
}

.work-document-icon--image {
    overflow: hidden;
    padding: 0;
    background: var(--yc-night-surface, #f8fafc);
    border: 1px solid var(--yc-night-border, #e2e8f0);
}

.work-document-icon--image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.work-document-icon__fallback {
    display: inline-flex;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
}

.work-document-icon__fallback svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
}

.work-document-icon__fallback[hidden] {
    display: none;
}

.work-document-icon.work-document-icon--image {
    width: 44px;
    min-width: 44px;
    max-width: 44px;
    height: 44px;
    min-height: 44px;
    max-height: 44px;
    flex: 0 0 44px;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: 12px;
}

.documents-page .work-documents-grid .work-document-icon--image img,
.work-detail-card--documents .work-documents-grid .work-document-icon--image img,
.work-note-attachment-card .work-document-icon--image img {
    display: block;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center;
}

.work-document-actions {
    align-items: center;
    flex-wrap: nowrap;
}

.work-document-action-menu {
    display: none !important;
}

.work-document-action-menu-panel {
    min-width: 190px;
    background: var(--yc-night-surface, #fff);
}

.work-document-action-menu-panel .yc-dropdown__item {
    width: 100%;
    min-height: 38px;
    align-items: center;
    gap: 10px;
    padding: 0 12px;
    font-weight: 650;
    line-height: 1;
    white-space: nowrap;
}

.work-document-action-menu-panel .yc-dropdown__item svg {
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.work-document-drag-handle,
.work-folder-drag-handle,
.work-note-drag-handle {
    cursor: grab;
    touch-action: none;
}

.work-document-drag-handle:active,
.work-folder-drag-handle:active,
.work-note-drag-handle:active {
    cursor: grabbing;
}

.work-document-drag-placeholder,
.work-folder-drag-placeholder {
    min-height: 58px;
    border: 1px dashed rgba(124, 58, 237, 0.42);
    border-radius: 16px;
    background: rgba(124, 58, 237, 0.08);
}

.work-document-card.is-work-document-dragging,
.job-work-item-card.is-work-document-dragging,
.work-folder-card.is-work-folder-dragging,
.work-task-card.is-work-task-dragging,
.work-note-card.is-work-note-dragging {
    opacity: 0.35;
}

.work-document-drag-preview,
.work-folder-drag-preview {
    position: fixed;
    z-index: 1200;
    pointer-events: none;
    transform: rotate(-0.25deg);
    box-shadow: 0 20px 45px rgba(15, 23, 42, 0.16);
}

.work-document-drag-preview .work-document-action--overflowable,
.work-folder-drag-preview .work-document-action--overflowable {
    display: none !important;
}

.work-document-drag-preview .work-document-action-menu,
.work-folder-drag-preview .work-document-action-menu {
    position: relative;
    display: inline-block !important;
    flex: 0 0 30px;
    width: 30px;
    min-width: 30px;
    overflow: visible;
}

.work-document-drag-preview .work-sub-card__header,
.work-folder-drag-preview .work-sub-card__header {
    display: flex;
    width: 100%;
    height: 100%;
    min-width: 0;
    align-items: center;
    flex-wrap: nowrap;
    gap: 10px;
}

.work-document-drag-preview .work-sub-card__main,
.work-folder-drag-preview .work-sub-card__main,
.work-document-drag-preview .work-folder-card__link,
.work-folder-drag-preview .work-folder-card__link {
    display: flex;
    flex: 1 1 auto;
    min-width: 0;
    align-items: center;
    gap: 10px;
}

.work-document-drag-preview .yc-dropdown__menu,
.work-folder-drag-preview .yc-dropdown__menu {
    display: none !important;
}

.work-document-drag-preview .work-sub-actions--header,
.work-folder-drag-preview .work-sub-actions--header {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: nowrap;
    gap: 8px;
    width: auto;
    min-width: max-content;
    align-self: center;
    margin-left: auto;
}

.work-document-drag-preview .work-document-drag-handle,
.work-document-drag-preview .work-folder-drag-handle,
.work-document-drag-preview .work-document-action-menu .app-icon-btn,
.work-document-drag-preview .work-document-action-menu summary,
.work-folder-drag-preview .work-document-drag-handle,
.work-folder-drag-preview .work-folder-drag-handle,
.work-folder-drag-preview .work-document-action-menu .app-icon-btn,
.work-folder-drag-preview .work-document-action-menu summary {
    display: inline-flex;
    width: 30px;
    min-width: 30px;
    max-width: 30px;
    height: 30px;
    min-height: 30px;
    max-height: 30px;
    flex: 0 0 30px;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.work-document-drag-preview .work-document-drag-handle svg,
.work-document-drag-preview .work-folder-drag-handle svg,
.work-document-drag-preview .work-document-action-menu svg,
.work-folder-drag-preview .work-document-drag-handle svg,
.work-folder-drag-preview .work-folder-drag-handle svg,
.work-folder-drag-preview .work-document-action-menu svg {
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
}

.work-progress {
    height: 9px;
    overflow: hidden;
    border-radius: 999px;
    background: var(--yc-night-accent-bg, #ede9fe);
}

.work-progress span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #7c3aed, #22c55e);
}

.work-log-items {
    display: grid;
    gap: 10px;
}

.work-log-item {
    padding: 12px;
    border: 1px solid rgba(148, 163, 184, .24);
    border-radius: 14px;
    background: var(--yc-night-surface, #f8fafc);
}

.work-log-item.is-done strong {
    text-decoration: line-through;
    color: var(--yc-night-muted, #64748b);
}

.work-log-item .work-inline-edit {
    margin-left: auto;
    border: 0;
    padding: 0;
}

.work-log-item .work-sub-actions--header {
    margin-left: auto;
}

.work-log-item-form {
    padding-top: 12px;
    border-top: 1px solid rgba(148, 163, 184, .2);
}

.job-work-items-section {
    gap: 16px;
}

.job-work-summary-card {
    display: grid;
    gap: 12px;
}

.job-work-summary-card > div:first-child {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.job-work-summary-card > div:first-child strong {
    color: var(--yc-night-text, #0f172a);
    font-size: 16px;
    font-weight: 900;
}

.job-work-summary-card > div:first-child span {
    color: var(--yc-night-green, #16a34a);
    font-size: 18px;
    font-weight: 900;
}

.job-work-summary-card dl {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin: 0;
}

.job-work-summary-card dl div,
.job-work-items-box {
    border: 1px solid rgba(148, 163, 184, .22);
    border-radius: 16px;
    background: rgba(var(--yc-night-surface-rgb, 255, 255, 255), .82);
}

.job-work-summary-card dl div {
    padding: 12px;
}

.job-work-summary-card dt,
.job-work-summary-card dd {
    margin: 0;
}

.job-work-summary-card dt {
    color: var(--yc-night-muted, #64748b);
    font-size: 12px;
    font-weight: 800;
}

.job-work-summary-card dd {
    color: var(--yc-night-text, #0f172a);
    font-size: 16px;
    font-weight: 900;
}

.job-work-items-layout {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.job-work-items-box {
    display: grid;
    align-content: start;
    gap: 12px;
    padding: 14px;
}

.job-work-items-box__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.job-work-items-box__header h3 {
    margin: 0;
    color: var(--yc-night-text, #0f172a);
    font-size: 17px;
    font-weight: 900;
}

.job-work-items-box__header span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 30px;
    height: 30px;
    border-radius: 999px;
    color: var(--yc-night-accent, #6d28d9);
    background: var(--yc-night-accent-bg, #f3e8ff);
    font-size: 13px;
    font-weight: 900;
}

.job-work-items-list {
    display: grid;
    gap: 10px;
}

.job-work-item-card {
    background: var(--yc-night-surface, #fff);
}

.job-work-item-card__description {
    margin: 0;
    color: var(--yc-night-muted, #475569);
    font-size: 14px;
    line-height: 1.55;
}

.job-work-item-actions {
    flex-wrap: nowrap;
}

.job-work-item-drag-handle {
    cursor: grab;
    touch-action: none;
}

.job-work-item-drag-handle:active {
    cursor: grabbing;
}

.work-placeholder {
    margin: 0;
    border: 1px dashed rgba(148, 163, 184, .45);
    border-radius: 16px;
    padding: 18px;
    color: var(--yc-night-muted, #64748b);
    background: rgba(var(--yc-night-surface-rgb, 255, 255, 255), .72);
    text-align: center;
}

@media (max-width: 1200px) {
    .job-work-items-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 1100px) {
    .work-documents-grid--folders,
    .work-documents-grid--folder-documents {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .work-document-preview-layout,
    .work-subsection-grid {
        grid-template-columns: 1fr;
    }

    .work-documents-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .work-documents-actions {
        justify-content: flex-start;
    }

    .documents-page .work-documents-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .documents-page .work-sub-card__header {
        grid-template-columns: minmax(0, 1fr);
    }

    .documents-page .work-folder-card__link,
    .documents-page .work-sub-card__main {
        min-width: 0;
    }

    .documents-page .work-sub-actions--header {
        justify-content: flex-start;
        width: 100%;
    }

    .work-log-item {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .job-work-summary-card dl {
        grid-template-columns: 1fr;
    }

    .job-work-item-card .work-sub-card__header {
        align-items: flex-start;
    }

    .job-work-item-actions {
        gap: 6px;
    }

    .work-subsection-form,
    .work-sub-card {
        padding: 14px;
    }

    .work-document-modal-form {
        padding: 0;
    }

    .work-documents-content {
        padding: 14px;
    }

    .work-document-dropzone {
        grid-template-columns: 1fr;
        justify-items: center;
        text-align: center;
    }

    .mobile-camera-upload__button {
        position: relative;
        z-index: 3;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        justify-self: center;
        min-height: 38px;
        border: 1px solid rgba(124, 58, 237, .22);
        border-radius: 999px;
        padding: 8px 14px;
        color: var(--yc-night-accent, #6d28d9);
        background: rgba(124, 58, 237, .1);
        font-size: 13px;
        font-weight: 800;
        cursor: pointer;
    }

    .mobile-camera-upload__button.app-icon-btn {
        width: 42px;
        height: 42px;
        min-height: 42px;
        flex: 0 0 42px;
        padding: 0;
        border-radius: 14px;
        font-size: 0;
    }

    .mobile-camera-upload__button.app-icon-btn svg {
        width: 20px;
        height: 20px;
    }

    .work-document-dropzone .mobile-camera-upload__button {
        grid-column: 1 / -1;
        margin-top: -2px;
        background: var(--yc-night-surface, #fff);
        box-shadow: 0 10px 24px rgba(124, 58, 237, .12);
    }

    .shopping-thumb-picker.has-mobile-camera-upload {
        display: grid;
        gap: 8px;
    }

    .shopping-thumb-picker--compact.has-mobile-camera-upload {
        display: inline-flex;
        align-items: center;
        gap: 8px;
    }

    .shopping-thumb-picker--compact .mobile-camera-upload__button {
        display: inline-flex;
        width: 44px;
        height: 44px;
        min-height: 44px;
        flex: 0 0 44px;
        padding: 0;
        border-radius: 14px;
    }

    .shopping-thumb-picker .mobile-camera-upload__button,
    .settings-logo-upload .mobile-camera-upload__button {
        justify-self: start;
    }

    .shopping-thumb--picker.has-mobile-camera-upload .mobile-camera-upload__button {
        position: absolute;
        right: 4px;
        bottom: 4px;
        width: 28px;
        height: 28px;
        min-height: 28px;
        padding: 0;
        border-radius: 10px;
        font-size: 0;
    }

    .shopping-thumb--picker.has-mobile-camera-upload .mobile-camera-upload__button svg {
        width: 15px;
        height: 15px;
    }

    .work-attachment {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .work-attachment .work-sub-actions {
        grid-column: 1 / -1;
        justify-content: flex-start;
    }

    .work-document-preview-card,
    .work-document-preview-meta {
        padding: 14px;
    }

    .work-document-preview-card__head {
        align-items: flex-start;
        flex-direction: column;
    }

    .work-document-preview-frame,
    .work-document-preview__iframe {
        min-height: 62vh;
    }

    .work-document-preview__image {
        max-height: 62vh;
    }

    .work-sub-actions {
        justify-content: stretch;
    }

    .work-sub-card__header {
        flex-wrap: wrap;
    }

    .work-sub-actions--header {
        justify-content: flex-end;
        width: auto;
    }

    .work-sub-actions .yc-btn,
    .work-sub-actions form,
    .work-sub-actions button {
        flex: 1 1 auto;
    }

    .work-sub-actions--header .yc-btn,
    .work-sub-actions--header form,
    .work-sub-actions--header button {
        flex: 0 0 auto;
    }

    .work-sub-actions--header .work-inline-edit[open] {
        flex-basis: 100%;
    }

    .documents-page .work-sub-card__header {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: 10px;
    }

    .documents-page .work-sub-actions--header {
        grid-column: 1;
        grid-row: auto;
        justify-content: flex-start;
        width: 100%;
        margin-left: 0;
    }

    .documents-page .work-sub-actions--header .yc-btn,
    .documents-page .work-sub-actions--header form,
    .documents-page .work-sub-actions--header button {
        flex: 0 0 auto;
    }

    .documents-page .work-folder-card .work-sub-card__header {
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
    }

    .documents-page .work-folder-card .work-sub-actions--header {
        grid-column: 2;
        grid-row: 1;
        justify-content: flex-end;
        width: auto;
        margin-left: auto;
    }
}

@media (max-width: 640px) {
    .work-documents-grid--folders,
    .work-documents-grid--folder-documents {
        grid-template-columns: 1fr;
    }

    .documents-page .yc-page-header {
        flex-wrap: wrap;
    }

    .documents-page .yc-page-header__actions {
        flex: 1 1 100%;
        justify-content: flex-start;
        width: 100%;
        max-width: 100%;
        margin-left: 0;
        overflow-x: visible;
    }

    .documents-page .yc-page-header__actions .yc-btn {
        flex: 1 1 min(100%, 140px);
    }
}

@media (min-width: 901px) {
    .mobile-camera-upload__button {
        display: none !important;
    }
}

.yc-btn--with-icon::before,
.yc-btn-icon--add::before,
.yc-btn-icon--save::before,
.yc-btn-icon--check::before,
.yc-btn-icon--edit::before,
.yc-btn-icon--trash::before,
.yc-btn-icon--close::before,
.yc-modal-btn--cancel::before,
.yc-modal-btn--danger::before,
.yc-modal-btn--success::before {
    content: "";
    display: inline-block;
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
    background: currentColor;
    -webkit-mask: var(--yc-btn-icon) center / contain no-repeat;
    mask: var(--yc-btn-icon) center / contain no-repeat;
}

.yc-btn--icon::before {
    display: none;
}

.yc-btn-icon--add {
    --yc-btn-icon: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 5v14M5 12h14' stroke='black' stroke-width='2.4' stroke-linecap='round'/%3E%3C/svg%3E");
}

.yc-btn-icon--save,
.yc-btn-icon--check,
.yc-modal-btn--success {
    --yc-btn-icon: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M20 6 9 17l-5-5' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.yc-btn-icon--edit {
    --yc-btn-icon: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 20h9M16.5 3.5a2.1 2.1 0 0 1 3 3L7 19l-4 1 1-4z' stroke='black' stroke-width='2.1' stroke-linecap='round' stroke-linejoin='round' fill='none'/%3E%3C/svg%3E");
}

.yc-btn-icon--trash,
.yc-modal-btn--danger {
    --yc-btn-icon: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4 7h16M9 7V5h6v2m-8 0 1 13h8l1-13M10 11v5m4-5v5' stroke='black' stroke-width='2.1' stroke-linecap='round' stroke-linejoin='round' fill='none'/%3E%3C/svg%3E");
}

.yc-btn-icon--close,
.yc-modal-btn--cancel {
    --yc-btn-icon: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M6 6l12 12M18 6 6 18' stroke='black' stroke-width='2.4' stroke-linecap='round'/%3E%3C/svg%3E");
}

.yc-btn--sm {
    min-height: 34px;
    border-radius: var(--yc-radius-sm);
    padding: 0 10px;
    font-size: 13px;
}

.yc-btn--lg {
    min-height: 50px;
    border-radius: var(--yc-radius-lg);
    padding: 0 18px;
    font-size: 16px;
}

.yc-btn--full {
    width: 100%;
}

.yc-field {
    display: grid;
    gap: 7px;
    min-width: 0;
}

.yc-label {
    color: var(--yc-night-muted, #475569);
    font-size: 13px;
    font-weight: 850;
}

.yc-input,
.yc-select,
.yc-textarea {
    width: 100%;
    min-width: 0;
    border: 1px solid var(--yc-border);
    border-radius: var(--yc-radius-md);
    color: var(--yc-text);
    background: rgba(var(--yc-night-surface-rgb, 255, 255, 255), 0.96);
    box-shadow: 0 1px 0 rgba(15, 23, 42, 0.03);
    transition: border-color var(--yc-transition), box-shadow var(--yc-transition), background var(--yc-transition);
}

:root {
    --yc-control-height: 44px;
    --yc-control-padding: 12px;
    --yc-control-font-size: 14px;
    --yc-control-focus: var(--app-accent-dark);
}

.yc-theme-dark {
    --yc-control-focus: var(--yc-night-accent);
}

@media (max-width: 700px) {
    :root { --yc-control-font-size: 16px; }
}

:is(.yc-input, .yc-select):not(textarea, [type="checkbox"], [type="radio"], [type="color"], [type="range"]) {
    min-height: var(--yc-control-height);
    padding-inline: var(--yc-control-padding);
    font-size: var(--yc-control-font-size);
}

.yc-textarea {
    min-height: 112px;
    padding: 12px 13px;
    resize: vertical;
}

.yc-input:hover,
.yc-select:hover,
.yc-textarea:hover {
    border-color: rgba(148, 163, 184, 0.48);
}

.yc-input:focus,
.yc-select:focus,
.yc-textarea:focus {
    border-color: var(--yc-control-focus, var(--yc-border));
    background: var(--yc-night-surface, #fff);
    box-shadow: var(--yc-focus-ring);
    outline: 0;
}

.yc-input:disabled,
.yc-select:disabled,
.yc-textarea:disabled {
    color: #94A3B8;
    background: var(--yc-night-soft, #F1F5F9);
    cursor: not-allowed;
}

.yc-field.is-error .yc-input,
.yc-field.is-error .yc-select,
.yc-field.is-error .yc-textarea,
.yc-input.is-error,
.yc-select.is-error,
.yc-textarea.is-error {
    border-color: rgba(124, 58, 237, 0.56);
    box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.1);
}

.yc-checkbox {
    width: 18px;
    height: 18px;
    accent-color: var(--yc-primary);
}

.yc-toggle {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    gap: 9px;
    border: 1px solid var(--yc-border);
    border-radius: var(--yc-radius-md);
    padding: 0 13px;
    color: var(--yc-night-muted, #334155);
    background: rgba(var(--yc-night-surface-rgb, 255, 255, 255), 0.96);
    font-weight: 800;
    cursor: pointer;
    transition: border-color var(--yc-transition), background var(--yc-transition), box-shadow var(--yc-transition);
}

.yc-toggle:hover,
.yc-toggle:focus-within {
    border-color: rgba(124, 58, 237, 0.36);
    background: var(--yc-night-surface, #fff);
}

.yc-toggle:focus-within {
    box-shadow: var(--yc-focus-ring);
}

.yc-form-row {
    display: flex;
    min-width: 0;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.yc-form-grid {
    display: grid;
    min-width: 0;
    grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
    gap: 10px;
}

.yc-form-actions {
    display: flex;
    min-width: 0;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
    align-items: center;
}

.yc-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: var(--yc-z-backdrop);
    display: none;
    place-items: center;
    padding: 18px;
    background: rgba(15, 23, 42, 0.46);
    backdrop-filter: blur(10px);
}

.yc-modal-backdrop:target,
.yc-modal-backdrop.is-open {
    display: grid;
}

.yc-modal {
    position: relative;
    z-index: var(--yc-z-modal);
    width: min(460px, 100%);
    max-height: calc(100dvh - 32px);
    overflow: auto;
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: var(--yc-radius-xl);
    padding: 22px;
    background: linear-gradient(180deg, rgba(var(--yc-night-surface-rgb, 255, 255, 255), 0.98), rgba(var(--yc-night-soft-rgb, 248, 250, 252), 0.96));
    box-shadow: var(--yc-shadow-lg);
}

.yc-modal__header,
.yc-modal__body,
.yc-modal__footer {
    min-width: 0;
}

.yc-modal__header {
    display: grid;
    gap: 6px;
    margin-bottom: 14px;
}

.yc-modal__title {
    margin: 0;
    color: var(--yc-text);
    font-size: 22px;
    line-height: 1.14;
}

.yc-modal__body {
    color: var(--yc-muted);
    line-height: 1.5;
}

.yc-modal__footer,
.yc-modal__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 18px;
}

.yc-global-confirm-modal {
    width: min(540px, calc(100vw - 32px));
    overflow: hidden;
    padding: 0;
}

.yc-global-confirm-modal .yc-modal__header {
    margin: 0;
    padding: 28px 28px 8px;
}

.yc-global-confirm-modal .yc-modal__body {
    padding: 0 28px 26px;
}

.yc-global-confirm-modal .yc-modal__body p {
    margin: 0;
}

.yc-global-confirm-modal__footer {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    justify-content: flex-end;
    margin: 0;
    padding: 22px 28px 24px;
    border-top: 1px solid var(--yc-border);
}

.yc-global-confirm-modal__footer .yc-btn--secondary {
    color: var(--yc-text);
    border-color: var(--yc-border);
    background: var(--yc-night-surface, #fff);
    box-shadow: none;
}

.yc-global-confirm-modal__footer .yc-btn--secondary:hover,
.yc-global-confirm-modal__footer .yc-btn--secondary:focus-visible {
    color: var(--yc-text);
    border-color: var(--yc-night-button-hover-border, rgba(148, 163, 184, 0.55));
    background: var(--yc-night-surface, #f8fafc);
    box-shadow: none;
}

.yc-global-confirm-modal__footer form {
    display: flex;
    margin: 0;
}

@media (max-width: 480px) {
    .yc-global-confirm-modal__footer {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
        padding-inline: 16px;
    }

    .yc-global-confirm-modal__footer > *,
    .yc-global-confirm-modal__footer .yc-btn {
        min-width: 0;
    }

    .yc-global-confirm-modal__footer form {
        display: block;
    }

    .yc-global-confirm-modal__footer .yc-btn {
        display: block;
        width: 100%;
        min-height: 44px;
        height: auto;
        padding: 8px;
        line-height: 1.25;
        white-space: normal;
        overflow-wrap: anywhere;
        text-align: center;
    }
}

.yc-table-wrap {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    border: 1px solid var(--yc-border);
    border-radius: var(--yc-radius-lg);
    background: var(--yc-surface);
    box-shadow: var(--yc-shadow-sm);
    -webkit-overflow-scrolling: touch;
}

.yc-table {
    width: 100%;
    min-width: 640px;
    border-collapse: collapse;
    color: var(--yc-text);
    font-size: 14px;
}

.yc-table th,
.yc-table td {
    border-bottom: 1px solid rgba(148, 163, 184, 0.18);
    padding: 11px 13px;
    text-align: left;
    vertical-align: middle;
}

.yc-table th {
    color: var(--yc-night-muted, #475569);
    background: var(--yc-night-surface, #F8FAFC);
    font-size: 12px;
    font-weight: 850;
    text-transform: uppercase;
}

.yc-table tr:hover td {
    background: rgba(124, 58, 237, 0.04);
}

.yc-table__actions {
    display: flex;
    gap: 6px;
    justify-content: flex-end;
    align-items: center;
}

.yc-card,
.yc-panel {
    min-width: 0;
    border: 1px solid var(--yc-border);
    border-radius: var(--yc-radius-lg);
    background: var(--yc-surface);
    box-shadow: var(--yc-shadow-sm);
}

.yc-card {
    overflow: hidden;
}

.yc-card__header,
.yc-card__body,
.yc-card__footer {
    min-width: 0;
    padding: 16px;
}

.yc-card__header,
.yc-card__footer {
    display: flex;
    gap: 10px;
    justify-content: space-between;
    align-items: center;
}

.yc-card__header {
    border-bottom: 1px solid rgba(148, 163, 184, 0.16);
}

.yc-card__footer {
    border-top: 1px solid rgba(148, 163, 184, 0.16);
}

.yc-panel {
    padding: 16px;
}

.yc-section-title {
    margin: 0;
    color: var(--yc-text);
    font-size: 18px;
    font-weight: 850;
    line-height: 1.2;
}

.yc-badge {
    display: inline-flex;
    min-height: 24px;
    align-items: center;
    border: 1px solid transparent;
    border-radius: 999px;
    padding: 0 9px;
    font-size: 12px;
    font-weight: 850;
    line-height: 1;
    white-space: nowrap;
}

.yc-badge--primary {
    border-color: rgba(124, 58, 237, 0.18);
    color: var(--yc-night-accent, var(--yc-primary-dark));
    background: var(--yc-night-accent-bg, #f5f3ff);
}

.yc-badge--success {
    border-color: rgba(22, 163, 74, 0.18);
    color: var(--yc-night-green, #166534);
    background: var(--yc-night-green-bg, #DCFCE7);
}

.yc-badge--warning {
    border-color: rgba(245, 158, 11, 0.22);
    color: var(--yc-night-warning, #92400E);
    background: var(--yc-night-warning-bg, #FEF3C7);
}

.yc-badge--danger {
    border-color: rgba(124, 58, 237, 0.22);
    color: var(--yc-night-accent, #4c1d95);
    background: var(--yc-night-accent-bg, #f5f3ff);
}

.yc-badge--neutral {
    border-color: rgba(148, 163, 184, 0.2);
    color: var(--yc-night-muted, #475569);
    background: var(--yc-night-soft, #F1F5F9);
}

.yc-dropdown {
    position: relative;
    display: inline-block;
}

.yc-dropdown__trigger {
    list-style: none;
}

.yc-dropdown__trigger::-webkit-details-marker,
.yc-dropdown__trigger::marker {
    display: none;
    content: "";
}

.yc-dropdown__menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: var(--yc-z-dropdown);
    display: none;
    min-width: 180px;
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: var(--yc-radius-lg);
    padding: 8px;
    background: rgba(var(--yc-night-surface-rgb, 255, 255, 255), 0.98);
    box-shadow: var(--yc-shadow-md);
}

.yc-dropdown__menu > :is(.yc-dropdown__item, .yc-dropdown__form, form),
.yc-dropdown__menu > :is(.yc-dropdown__form, form) > .yc-dropdown__item {
    position: relative;
}

.yc-dropdown__menu > :is(.yc-dropdown__item, .yc-dropdown__form, form) + .yc-dropdown__item::before,
.yc-dropdown__menu > :is(.yc-dropdown__item, .yc-dropdown__form, form) + :is(.yc-dropdown__form, form) > .yc-dropdown__item::before {
    content: "";
    position: absolute;
    top: -3px;
    right: 8px;
    left: 8px;
    height: 1px;
    background: rgba(148, 163, 184, 0.22);
    pointer-events: none;
}

.yc-dropdown[open] .yc-dropdown__menu,
.yc-dropdown.is-open .yc-dropdown__menu {
    display: grid;
    gap: 4px;
}

@media (max-width: 899px) {
    .yc-dropdown.yc-dropdown--preparing-open > .yc-dropdown__menu {
        visibility: hidden !important;
        opacity: 0 !important;
        pointer-events: none !important;
    }

    .yc-dropdown.yc-dropdown--fixed-mobile {
        position: static !important;
        z-index: var(--yc-z-dropdown) !important;
        overflow: visible !important;
    }

    .yc-dropdown.yc-dropdown--fixed-mobile > .yc-dropdown__menu,
    .yc-dropdown__menu.yc-dropdown__menu--portal {
        position: fixed !important;
        z-index: var(--yc-z-dropdown) !important;
        top: auto;
        left: auto;
        right: auto !important;
        bottom: auto !important;
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) !important;
        grid-auto-flow: row !important;
        gap: 4px !important;
        min-width: 0 !important;
        max-height: calc(100vh - 24px);
        overflow-y: auto;
        margin: 0 !important;
        transform: none !important;
        pointer-events: auto;
    }

    .yc-dropdown.yc-dropdown--fixed-mobile > .yc-dropdown__menu .yc-dropdown__item,
    .yc-dropdown__menu.yc-dropdown__menu--portal .yc-dropdown__item {
        display: flex !important;
        width: 100% !important;
        min-width: 0 !important;
        max-width: none !important;
        min-height: 38px;
        align-items: center !important;
        justify-content: flex-start !important;
        gap: 10px !important;
        color: var(--yc-night-muted, #334155);
        font-size: 14px;
        font-weight: 600;
        line-height: 1.2;
        white-space: nowrap;
    }

    .yc-dropdown.yc-dropdown--fixed-mobile > .yc-dropdown__menu .yc-dropdown__item svg,
    .yc-dropdown__menu.yc-dropdown__menu--portal .yc-dropdown__item svg {
        width: 16px !important;
        height: 16px !important;
        flex: 0 0 16px !important;
        color: var(--yc-night-accent, var(--yc-primary)) !important;
        fill: none !important;
        stroke: var(--yc-primary) !important;
        stroke-width: 2 !important;
        stroke-linecap: round !important;
        stroke-linejoin: round !important;
    }

    .yc-dropdown.yc-dropdown--fixed-mobile > .yc-dropdown__menu .yc-dropdown__item svg *,
    .yc-dropdown__menu.yc-dropdown__menu--portal .yc-dropdown__item svg * {
        color: var(--yc-night-accent, var(--yc-primary)) !important;
        fill: none !important;
        stroke: var(--yc-primary) !important;
    }

    .yc-dropdown.yc-dropdown--fixed-mobile > .yc-dropdown__menu .yc-dropdown__item span,
    .yc-dropdown__menu.yc-dropdown__menu--portal .yc-dropdown__item span {
        display: inline-block !important;
        min-width: 0;
        overflow: hidden;
        color: var(--yc-night-text, #111827);
        font-weight: 600;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
}

.yc-dropdown__item {
    display: flex;
    min-height: 40px;
    align-items: center;
    gap: 9px;
    border: 0;
    border-radius: var(--yc-radius-md);
    padding: 0 10px;
    color: var(--yc-night-muted, #334155);
    background: transparent;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
}

.yc-dropdown__item:hover,
.yc-dropdown__item:focus-visible {
    color: var(--yc-night-accent, var(--yc-primary-dark));
    background: var(--yc-primary-soft);
    outline: 0;
}

.yc-grid {
    display: grid;
    min-width: 0;
    gap: 12px;
}

.yc-grid--2,
.yc-grid--3,
.yc-grid--4 {
    grid-template-columns: 1fr;
}

.yc-stack {
    display: grid;
    min-width: 0;
    gap: 12px;
}

.yc-cluster {
    display: flex;
    min-width: 0;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.yc-full {
    width: 100%;
    max-width: 100%;
}

.yc-min-0 {
    min-width: 0;
}

.auth-page {
    background:
        radial-gradient(circle at 20% 10%, rgba(255, 255, 255, 0.22), transparent 24%),
        radial-gradient(circle at 78% 78%, rgba(255, 255, 255, 0.14), transparent 28%),
        linear-gradient(165deg, var(--yc-primary-dark) 0%, var(--yc-primary) 58%, var(--yc-primary-light) 100%);
    overflow-x: hidden;
}

.auth-shell {
    min-height: 100vh;
    min-height: 100dvh;
    margin-left: 0 !important;
    align-items: center;
    justify-items: center;
    place-items: center;
    align-content: center;
    justify-content: center;
    place-content: center;
    padding: 24px;
}

.app-shell.auth-shell {
    width: 100vw !important;
    max-width: none !important;
    min-height: 100vh;
    min-height: 100dvh;
    margin-left: 0 !important;
    align-items: center !important;
    justify-items: center !important;
    place-items: center !important;
    align-content: center !important;
    justify-content: center !important;
    place-content: center !important;
    padding: 24px !important;
}

.auth-stack {
    display: grid;
    width: min(430px, 100%);
    max-width: calc(100vw - 36px);
    gap: 14px;
}

.auth-card {
    position: relative;
    width: min(430px, 100%);
    max-width: calc(100vw - 36px);
    border: 1px solid rgba(255, 255, 255, 0.58);
    border-radius: 26px;
    padding: 30px;
    background: rgba(var(--yc-night-surface-rgb, 255, 255, 255), 0.94);
    box-shadow: 0 34px 90px rgba(38, 12, 83, 0.34);
    backdrop-filter: blur(18px);
}

.auth-stack .auth-card {
    width: 100%;
    max-width: 100%;
}

.auth-card::before {
    content: "";
    position: absolute;
    inset: 1px;
    z-index: -1;
    border-radius: 25px;
    background: linear-gradient(135deg, rgba(var(--yc-night-surface-rgb, 255, 255, 255), 0.7), rgba(var(--yc-night-surface-rgb, 255, 255, 255), 0.18));
}

.auth-card__brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin-bottom: 26px;
    text-align: left;
}

.auth-card__logo {
    display: grid;
    width: 52px;
    height: 52px;
    flex: 0 0 auto;
    place-items: center;
    border-radius: 17px;
    color: #fff;
    background: var(--yc-primary-gradient);
    box-shadow: 0 18px 34px rgba(124, 58, 237, 0.28);
    font-size: 21px;
    font-weight: 900;
    overflow: hidden;
}

.auth-card__logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.auth-card h1 {
    margin: 0;
    color: var(--yc-text);
    font-size: 24px;
    line-height: 1.1;
}

.auth-card p {
    margin: 4px 0 0;
    color: var(--yc-muted);
    font-size: 14px;
    font-weight: 750;
}

.auth-form {
    display: grid;
    gap: 14px;
}

.auth-form .yc-field {
    gap: 8px;
}

.auth-form .yc-label {
    color: var(--yc-night-muted, #334155);
    font-size: 12px;
    text-transform: uppercase;
}

.auth-form .yc-input {
    min-height: 50px;
    border-color: rgba(124, 58, 237, 0.18);
    border-radius: 15px;
    background: rgba(var(--yc-night-soft-rgb, 248, 250, 252), 0.9);
    font-weight: 750;
}

.auth-form .yc-input:hover {
    border-color: rgba(124, 58, 237, 0.32);
    background: var(--yc-night-surface, #fff);
}

.auth-form .yc-input:focus {
    border-color: rgba(124, 58, 237, 0.62);
    background: var(--yc-night-surface, #fff);
    box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.14);
}

.auth-form .yc-btn {
    min-height: 50px;
    margin-top: 4px;
    border-radius: 15px;
    font-size: 15px;
    box-shadow: 0 18px 34px rgba(124, 58, 237, 0.26);
}

.auth-error {
    margin: 0 0 14px;
    border: 1px solid rgba(220, 38, 38, 0.18);
    border-radius: var(--yc-radius-md);
    padding: 11px 13px;
    color: var(--yc-night-error, #991b1b);
    background: rgba(var(--yc-night-error-bg-rgb, 254, 242, 242), 0.96);
    font-size: 13px;
    font-weight: 800;
}
.auth-pwa-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 12px 14px;
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.54);
    border-radius: 22px;
    padding: 16px;
    background: rgba(var(--yc-night-surface-rgb, 255, 255, 255), 0.82);
    box-shadow: 0 22px 60px rgba(38, 12, 83, 0.2);
    backdrop-filter: blur(16px);
}

.auth-pwa-card[hidden],
.auth-pwa-modal[hidden] {
    display: none !important;
}

.auth-pwa-card__icon {
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    border-radius: 16px;
    color: var(--yc-night-accent, var(--yc-primary));
    background: rgba(124, 58, 237, 0.12);
    box-shadow: inset 0 0 0 1px rgba(124, 58, 237, 0.12);
}

.auth-pwa-card__icon svg {
    width: 24px;
    height: 24px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.auth-pwa-card__content {
    min-width: 0;
}

.auth-pwa-card h2 {
    margin: 0;
    color: var(--yc-text);
    font-size: 15px;
    line-height: 1.25;
}

.auth-pwa-card p {
    margin: 4px 0 0;
    color: var(--yc-night-muted, #64748b);
    font-size: 12px;
    line-height: 1.45;
    font-weight: 650;
}

.auth-pwa-card__status {
    color: var(--yc-night-accent, var(--yc-primary)) !important;
    font-weight: 800 !important;
}

.auth-pwa-card__button {
    grid-column: 1 / -1;
    min-height: 42px;
    border: 0;
    border-radius: 14px;
    padding: 0 16px;
    color: #fff;
    background: linear-gradient(135deg, #7c3aed, #5b21b6);
    box-shadow: 0 14px 28px rgba(91, 33, 182, 0.22);
    font: inherit;
    font-size: 13px;
    font-weight: 850;
    cursor: pointer;
}

.auth-pwa-card__button:hover,
.auth-pwa-card__button:focus-visible {
    transform: translateY(-1px);
    box-shadow: 0 18px 34px rgba(91, 33, 182, 0.28);
    outline: none;
}

.auth-pwa-card__button:disabled {
    cursor: default;
    opacity: 0.72;
    transform: none;
    box-shadow: none;
}

.auth-pwa-modal {
    position: fixed;
    inset: 0;
    z-index: 1100;
    display: grid;
    place-items: center;
    padding: 20px;
    background: rgba(15, 23, 42, 0.44);
    backdrop-filter: blur(10px);
}

.auth-pwa-modal__dialog {
    position: relative;
    width: min(390px, 100%);
    border: 1px solid rgba(226, 232, 240, 0.72);
    border-radius: 22px;
    padding: 24px;
    background: rgba(var(--yc-night-surface-rgb, 255, 255, 255), 0.98);
    box-shadow: 0 28px 80px rgba(15, 23, 42, 0.26);
}

.auth-pwa-modal__dialog h2 {
    margin: 0 40px 10px 0;
    color: var(--yc-text);
    font-size: 20px;
}

.auth-pwa-modal__dialog p,
.auth-pwa-modal__dialog li {
    color: var(--yc-night-muted, #475569);
    font-size: 14px;
    line-height: 1.55;
}

.auth-pwa-modal__dialog ol {
    margin: 14px 0 20px;
    padding-left: 22px;
}

.auth-pwa-modal__close {
    position: absolute;
    top: 14px;
    right: 14px;
    display: grid;
    width: 36px;
    height: 36px;
    place-items: center;
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 12px;
    color: var(--yc-night-muted, #64748b);
    background: var(--yc-night-surface, #fff);
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}

.auth-pwa-modal__close:hover,
.auth-pwa-modal__close:focus-visible {
    color: var(--yc-night-accent, var(--yc-primary));
    border-color: rgba(124, 58, 237, 0.28);
    outline: none;
}

@media (min-width: 600px) {
    .yc-grid--2,
    .yc-grid--3,
    .yc-grid--4 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 480px) {
    .auth-shell {
        padding: 18px;
    }

    .auth-stack {
        max-width: calc(100vw - 24px);
    }

    .auth-card {
        border-radius: 22px;
        padding: 24px;
    }

    .auth-card__brand {
        justify-content: flex-start;
    }

    .auth-pwa-card {
        padding: 14px;
    }
}

@media (max-height: 520px) {
    .auth-shell {
        align-items: start;
        padding-top: 18px !important;
        padding-bottom: 18px !important;
    }
}

@media (min-width: 768px) {
    .yc-grid--3,
    .yc-grid--4 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (min-width: 900px) {
    .yc-grid--4 {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (min-width: 1200px) {
    .yc-container {
        width: min(1180px, 100%);
        margin-inline: auto;
    }
}

@media (max-width: 600px) {
    .yc-btn,
    .yc-input,
    .yc-select,
    .yc-toggle {
        min-height: 44px;
    }

    .yc-form-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .yc-modal__footer,
    .yc-modal__actions {
        display: flex;
        flex-wrap: nowrap;
        gap: 8px;
        justify-content: stretch;
    }

    .yc-modal__footer > *,
    .yc-modal__actions > *,
    .yc-modal__footer .yc-btn,
    .yc-modal__actions .yc-btn {
        flex: 1 1 0;
        min-width: 0;
    }

    .yc-modal__footer form,
    .yc-modal__actions form {
        display: flex;
    }

    .yc-modal__footer form .yc-btn,
    .yc-modal__actions form .yc-btn {
        width: 100%;
    }

    @media (max-width: 340px) {
        .yc-modal__footer,
        .yc-modal__actions {
            flex-wrap: wrap;
        }

        .yc-modal__footer > *,
        .yc-modal__actions > * {
            flex-basis: 100%;
        }
    }

    .yc-modal-backdrop {
        padding: 12px;
    }

    .yc-modal {
        max-height: calc(100dvh - 24px);
        border-radius: var(--yc-radius-lg);
        padding: 18px;
    }

    .modal.work-note-modal,
    .work-detail-page .modal.work-task-modal,
    .work-page .modal.work-task-modal {
        width: calc(100vw - 24px);
        max-width: none;
    }

    .yc-table {
        min-width: 560px;
    }
}

.app-shell {
    min-height: 100vh;
    display: grid;
    justify-items: center;
    align-items: start;
    padding: 88px 12px 40px;
}

.mobile-topbar {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    z-index: 35;
    display: flex;
    height: 64px;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: rgba(var(--yc-night-surface-rgb, 244, 245, 247), 0.92);
    backdrop-filter: blur(14px);
}

.mobile-menu-toggle {
    display: grid;
    width: 44px;
    height: 44px;
    flex: 0 0 auto;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.36);
    border-radius: 12px;
    color: #fff;
    background: var(--yc-primary-gradient);
    box-shadow: 0 12px 28px rgba(124, 58, 237, 0.2);
    cursor: pointer;
}

.mobile-topbar-brand {
    display: flex;
    align-items: center;
    gap: 9px;
    color: var(--yc-night-accent, var(--yc-primary-dark));
    font-weight: 900;
    text-decoration: none;
}

.mobile-topbar-logo {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 11px;
    color: #fff;
    background: var(--yc-primary-gradient);
    font-weight: 900;
}

.mobile-menu-toggle svg,
.sidebar-header svg,
.sidebar-link-icon svg {
    display: block;
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.sidebar-overlay {
    position: fixed;
    inset: 0;
    z-index: 42;
    display: none;
    background: rgba(15, 23, 42, 0.54);
}

.app-sidebar {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 45;
    display: flex;
    width: 100vw;
    max-width: none;
    height: 100vh;
    height: 100dvh;
    max-height: 100dvh;
    flex-direction: column;
    overflow: hidden;
    padding: 18px 14px;
    color: #fff;
    background: linear-gradient(165deg, var(--yc-primary-dark) 0%, var(--yc-primary) 58%, var(--yc-primary-light) 100%);
    box-shadow: 24px 0 70px rgba(124, 58, 237, 0.2);
    transform: translateX(-104%);
    transition: transform 0.22s ease, width 0.18s ease;
}

body.is-sidebar-open .app-sidebar {
    transform: translateX(0);
}

body.is-sidebar-open .sidebar-overlay {
    display: block;
}

.sidebar-header {
    position: relative;
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
}

.sidebar-brand {
    display: flex;
    min-width: 0;
    flex: 1;
    align-items: center;
    gap: 10px;
    color: #fff;
    text-decoration: none;
}

.sidebar-brand-logo {
    display: block;
    height: 38px;
    width: auto;
    max-width: 100%;
    object-fit: contain;
    object-position: left center;
}

.sidebar-close,
.sidebar-collapse {
    display: grid;
    width: 38px;
    height: 38px;
    flex: 0 0 auto;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 12px;
    color: #fff;
    background: rgba(var(--yc-night-surface-rgb, 255, 255, 255), 0.1);
    cursor: pointer;
}

.sidebar-collapse {
    display: none;
}

.sidebar-nav {
    display: grid;
    gap: 18px;
    min-height: 0;
    flex: 1 1 auto;
    max-height: calc(100dvh - 78px);
    margin-right: -14px;
    overflow-y: auto;
    scrollbar-color: rgba(216, 180, 254, 0.72) rgba(76, 29, 149, 0.42);
    scrollbar-width: thin;
    padding: 4px 14px 32px 2px;
}

.sidebar-nav::-webkit-scrollbar {
    width: 7px;
}

.sidebar-nav::-webkit-scrollbar-track {
    border-radius: 999px;
    background: rgba(76, 29, 149, 0.42);
}

.sidebar-nav::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: rgba(216, 180, 254, 0.72);
}

.sidebar-nav::-webkit-scrollbar-thumb:hover {
    background: rgba(233, 213, 255, 0.94);
}

.sidebar-user {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 10px;
    border-radius: 14px;
    padding: 9px 12px 10px 10px;
    color: rgba(255, 255, 255, 0.9);
    background: rgba(var(--yc-night-surface-rgb, 255, 255, 255), 0.1);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16);
}

.sidebar-user-avatar {
    display: flex;
    width: 34px;
    height: 34px;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    color: var(--yc-night-accent, var(--yc-primary-dark));
    font-size: 15px;
    font-weight: 800;
    background: var(--yc-night-surface, #fff);
}

.sidebar-user-meta {
    display: grid;
    min-width: 0;
    gap: 2px;
}

.sidebar-user-name,
.sidebar-user-role {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar-user-name {
    font-size: 14px;
    font-weight: 750;
}

.sidebar-user-role {
    color: rgba(255, 255, 255, 0.62);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.sidebar-section {
    display: grid;
    gap: 7px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.24);
}

.sidebar-section:last-child {
    border-bottom: 0;
}

.sidebar-section h2 {
    margin: 0;
    padding: 0 12px;
    color: #fde68a;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-shadow: 0 1px 8px rgba(15, 23, 42, 0.18);
}

.sidebar-items {
    display: grid;
    gap: 5px;
}

.sidebar-link {
    display: flex;
    min-height: 44px;
    align-items: center;
    gap: 10px;
    border-radius: 14px;
    padding: 7px 14px 7px 10px;
    color: rgba(255, 255, 255, 0.82);
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.sidebar-link:hover,
.sidebar-link.is-active {
    color: #fff;
    background: linear-gradient(135deg, rgba(var(--yc-night-surface-rgb, 255, 255, 255), 0.26), rgba(var(--yc-night-surface-rgb, 255, 255, 255), 0.1));
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22), 0 12px 30px rgba(31, 41, 55, 0.14);
}

.sidebar-link-icon {
    display: flex;
    width: 32px;
    height: 32px;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    border-radius: 11px;
    color: rgba(255, 255, 255, 0.96);
    background: rgba(var(--yc-night-surface-rgb, 255, 255, 255), 0.12);
}

.sidebar-link.is-active .sidebar-link-icon {
    color: var(--yc-night-accent, var(--yc-primary-dark));
    background: var(--yc-night-surface, #fff);
}

.sidebar-link-text {
    overflow: hidden;
    font-weight: 500;
    white-space: nowrap;
}

.sidebar-link.is-active .sidebar-link-text {
    font-weight: 800;
}

.home {
    text-align: center;
}

.home h1 {
    margin: 0 0 8px;
    font-size: 40px;
    font-weight: 700;
}

.home p {
    margin: 0;
    font-size: 18px;
    color: var(--yc-night-muted, #555);
}

.page {
    width: min(760px, 100%);
}

.schedule-page {
    width: 100%;
    max-width: none;
}

.page-header {
    margin-bottom: 16px;
}

.page-header h1 {
    margin: 0 0 6px;
    font-size: 32px;
    line-height: 1.1;
}

.yc-page-title {
    margin: 0;
    color: var(--yc-text);
    font-size: 28px;
    line-height: 1.15;
}

.page-header .yc-page-title,
.calendar-hero .yc-page-title {
    margin: 0;
    color: var(--yc-text);
    font-size: 28px;
    line-height: 1.15;
}

.page-header p {
    margin: 0;
    color: var(--yc-night-muted, #626975);
    font-size: 16px;
}

.day-switcher {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    margin: 0 -12px 16px;
    padding: 0 12px 4px;
    overflow-x: auto;
    overflow-y: visible;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}

.day-tab {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    min-width: 92px;
    min-height: 58px;
    border: 1px solid var(--yc-night-border, #d8dde5);
    border-radius: 999px;
    padding: 8px 14px;
    color: var(--yc-night-text, #111);
    background: var(--yc-night-surface, #fff);
    font-weight: 700;
    line-height: 1.15;
    text-decoration: none;
    cursor: default;
    scroll-snap-align: start;
    white-space: nowrap;
}

.day-tab-label {
    font-size: 13px;
}

.day-tab-date {
    color: var(--yc-night-muted, #6b7280);
    font-size: 12px;
    font-weight: 700;
}

.day-tab.is-active {
    color: #fff;
    background: #111;
    border-color: #111;
}

.day-tab.is-active .day-tab-date {
    color: rgba(255, 255, 255, 0.78);
}

.day-tab.is-day-drop-target,
.day-tab.is-active.is-day-drop-target {
    position: relative;
    color: var(--yc-night-green, #166534);
    background: var(--yc-night-green-bg, #dcfce7);
    border-color: #22c55e;
    box-shadow: 0 10px 28px rgba(34, 197, 94, 0.28);
    transform: scale(1.05);
    font-weight: 900;
}

.day-tab.is-day-drop-target::before,
.day-tab.is-active.is-day-drop-target::before {
    content: "+";
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 2;
    display: grid;
    width: 26px;
    height: 26px;
    place-items: center;
    border: 2px solid rgba(255, 255, 255, 0.92);
    border-radius: 999px;
    color: #fff;
    background: #22c55e;
    box-shadow: 0 10px 24px rgba(34, 197, 94, 0.34);
    font-size: 20px;
    font-weight: 900;
    line-height: 1;
    pointer-events: none;
    transform: translate(-50%, -50%);
}

.day-tab.is-day-drop-success,
.day-tab.is-active.is-day-drop-success {
    color: var(--yc-night-green, #166534);
    background: var(--yc-night-green-bg, #dcfce7);
    border-color: #22c55e;
    box-shadow: 0 10px 28px rgba(34, 197, 94, 0.28);
    transform: scale(1.05);
    animation: day-drop-pulse 0.65s ease;
}

body.is-schedule-dragging .day-tab {
    cursor: copy;
}

.schedule-day {
    overflow: hidden;
    background: var(--yc-night-surface, #fff);
    border: 1px solid var(--yc-night-border, #dfe3e8);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(17, 17, 17, 0.05);
}

.schedule-day-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    padding: 16px;
    color: #fff;
    background: #1f2937;
}

.schedule-day-header span {
    font-weight: 800;
    letter-spacing: 0;
}

.schedule-day-header strong {
    font-size: 18px;
}

.quick-add {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 14px;
    border-bottom: 1px solid var(--yc-night-border, #edf0f4);
}

.quick-add input,
.meeting-time-input,
.priority-picker-trigger {
    min-width: 0;
    min-height: 48px;
    border: 1px solid var(--yc-night-border, #d8dde5);
    border-radius: 8px;
    padding: 0 12px;
    background: var(--yc-night-surface, #fff);
}

.meeting-toggle {
    display: flex;
    min-height: 48px;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--yc-night-border, #d8dde5);
    border-radius: 8px;
    padding: 0 12px;
    color: var(--yc-night-muted, #374151);
    background: var(--yc-night-surface, #fff);
    font-weight: 700;
}

.meeting-toggle input {
    width: 16px;
    height: 16px;
    flex: 0 0 auto;
}

.meeting-time-input {
    width: 100%;
}

.priority-native-select {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.priority-picker {
    position: relative;
    display: block;
    min-width: 0;
    width: 100%;
}

.priority-picker-trigger,
.priority-picker-option {
    display: flex;
    width: 100%;
    align-items: center;
    gap: 9px;
    color: var(--yc-night-text, #111827);
    font: inherit;
    font-weight: 700;
    text-align: left;
}

.priority-picker-trigger {
    justify-content: flex-start;
    cursor: pointer;
}

.priority-picker-menu {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: auto;
    z-index: 25;
    display: none;
    width: 100%;
    min-width: 170px;
    overflow: hidden;
    border: 1px solid var(--yc-night-border, #d8dde5);
    border-radius: 8px;
    background: var(--yc-night-surface, #fff);
    box-shadow: 0 16px 36px rgba(17, 24, 39, 0.14);
}

.priority-picker.is-open .priority-picker-menu {
    display: grid;
}

.priority-picker-option {
    min-height: 42px;
    border: 0;
    padding: 0 12px;
    background: var(--yc-night-surface, #fff);
    cursor: pointer;
}

.priority-picker-option:hover,
.priority-picker-option.is-selected {
    background: var(--yc-night-surface, #f8fafc);
}

.priority-dot {
    width: 10px;
    height: 10px;
    flex: 0 0 auto;
    border-radius: 999px;
}

.priority-option-high .priority-dot {
    background: var(--schedule-priority-high, #dc2626);
}

.priority-option-normal .priority-dot {
    background: #334155;
}

.priority-option-low .priority-dot {
    background: #16a34a;
}

.quick-add > button[type="submit"] {
    min-height: 48px;
    border: 0;
    border-radius: 8px;
    padding: 0 14px;
    color: #fff;
    background: #111;
    font-weight: 700;
    cursor: default;
}

.schedule-items {
    display: grid;
    gap: 8px;
    padding: 14px;
}

.schedule-sortable {
    display: grid;
    gap: 8px;
}

.schedule-sortable + .schedule-sortable {
    margin-top: 8px;
}

.schedule-sortable.is-sorting {
    border-radius: 8px;
    background: var(--yc-night-surface, #f8fafc);
}

.schedule-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 8px;
    min-height: 48px;
    padding: 8px 10px;
    background: var(--yc-night-surface, #fbfcfd);
    border: 1px solid var(--yc-night-border, #e5e7eb);
    border-radius: 8px;
}

.schedule-sortable .schedule-row {
    cursor: grab;
    touch-action: none;
    user-select: none;
}

.schedule-sortable .schedule-row:active {
    cursor: grabbing;
}

.schedule-meeting-badge {
    display: inline-flex;
    min-height: 24px;
    align-items: center;
    border-radius: 999px;
    padding: 0 9px;
    color: var(--yc-night-accent, var(--yc-primary-dark));
    background: var(--yc-night-accent-bg, #f5f3ff);
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}

.schedule-meeting-badge.is-hidden,
.schedule-meeting-time.is-hidden {
    display: none;
}

.schedule-meeting-time {
    min-width: 56px;
    color: var(--yc-night-text, #111827);
    font-size: 14px;
    font-weight: 800;
    text-align: right;
    white-space: nowrap;
}

.schedule-row.is-dragging {
    box-sizing: border-box;
    opacity: 0.92;
    border-color: var(--yc-night-border, #cbd5e1);
    box-shadow: 0 12px 28px rgba(17, 24, 39, 0.16);
    transform: scale(1);
    cursor: grabbing;
    overflow: hidden;
    touch-action: none;
    user-select: none;
    pointer-events: none;
}

.schedule-row.is-moving-away {
    opacity: 0;
    transform: translateX(24px);
    transition: opacity 0.24s ease, transform 0.24s ease;
}

.schedule-drag-placeholder {
    box-sizing: border-box;
    border: 1px dashed rgba(124, 58, 237, 0.38);
    border-radius: 8px;
    background: var(--yc-primary-soft);
}

body.is-schedule-dragging {
    cursor: grabbing;
    overflow: hidden;
    touch-action: none;
}

.schedule-row-main {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.schedule-order {
    display: grid;
    width: 12px;
    height: 12px;
    flex: 0 0 auto;
    place-items: center;
    color: #fff;
    border-radius: 999px;
    font-size: 0;
    font-weight: 800;
}

.priority-order-high {
    background: var(--schedule-priority-high, #dc2626);
}

.priority-order-normal {
    background: #334155;
}

.priority-order-low {
    background: #16a34a;
}

.schedule-title {
    min-width: 0;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.schedule-actions {
    display: grid;
    grid-template-columns: repeat(3, 38px);
    gap: 6px;
    justify-content: end;
    align-items: center;
}

.schedule-actions form {
    display: contents;
}

.schedule-actions button,
.button-link {
    border: 1px solid var(--yc-night-border, #d8dde5);
    border-radius: 8px;
    color: var(--yc-night-muted, #374151);
    background: var(--yc-night-surface, #fff);
    font-size: 14px;
    font-weight: 700;
    cursor: default;
}

.button-link {
    display: grid;
    place-items: center;
    text-decoration: none;
}

.schedule-actions .muted-action {
    color: var(--yc-night-muted, #71717a);
    background: var(--yc-night-surface, #f8fafc);
}

.schedule-actions.single-action {
    grid-template-columns: 1fr;
}

.app-icon-btn {
    display: grid;
    width: 38px;
    height: 38px;
    min-width: 38px;
    min-height: 38px;
    place-items: center;
    border: 1px solid var(--yc-night-border, #d8dde5);
    border-radius: 8px;
    color: var(--yc-night-muted, #374151);
    background: var(--yc-night-surface, #fff);
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.schedule-actions .app-icon-btn {
    min-height: 38px;
}

.app-icon-btn svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.app-icon-btn--neutral:hover {
    color: var(--yc-night-text, #111827);
    background: var(--yc-night-soft, #f3f4f6);
    border-color: var(--yc-night-border, #cbd5e1);
}

.app-icon-btn--success:hover {
    color: var(--yc-night-green, #166534);
    background: var(--yc-night-green-bg, #dcfce7);
    border-color: #86efac;
}

.app-icon-btn--edit:hover {
    color: var(--yc-night-blue, #1d4ed8);
    background: var(--yc-night-blue-bg, #dbeafe);
    border-color: #93c5fd;
}

.app-icon-btn--danger {
    color: var(--yc-night-muted, #71717a);
}

.app-icon-btn--danger:hover {
    color: var(--yc-night-accent, #4c1d95);
    background: var(--yc-night-accent-bg, #f5f3ff);
    border-color: var(--yc-night-border, #ddd6fe);
}

.schedule-drag-handle {
    color: var(--yc-night-muted, #64748b);
    background: var(--yc-night-surface, #f8fafc);
    cursor: grab;
    touch-action: none;
    user-select: none;
}

.schedule-drag-handle svg {
    fill: currentColor;
    stroke: none;
    pointer-events: none;
}

.schedule-drag-handle .drag-grip-icon {
    width: 16px;
    height: 16px;
    color: var(--yc-night-muted, #475569);
}

.schedule-drag-handle .drag-grip-icon circle {
    fill: currentColor;
    pointer-events: none;
}

.schedule-drag-handle:hover {
    color: var(--yc-night-text, #111827);
    background: var(--yc-primary-soft);
    border-color: rgba(124, 58, 237, 0.24);
}

.schedule-drag-handle:active {
    cursor: grabbing;
}

.schedule-row.is-dragging .schedule-drag-handle {
    color: var(--yc-night-text, #111827);
    background: var(--yc-primary-soft);
    border-color: rgba(124, 58, 237, 0.38);
    cursor: grabbing;
}

.schedule-completed {
    border-top: 1px solid var(--yc-night-border, #eef0f3);
}

.schedule-completed summary {
    min-height: 48px;
    padding: 14px;
    color: var(--yc-night-muted, #71717a);
    font-size: 14px;
    font-weight: 800;
    text-transform: uppercase;
    cursor: default;
}

.schedule-row.is-completed {
    color: var(--yc-night-muted, #7a7f87);
    background: var(--yc-night-soft, #f1f3f5);
}

.schedule-row.is-completed .schedule-title {
    text-decoration: line-through;
}

.schedule-row.is-completed .schedule-order {
    opacity: 0.58;
}

.empty-state {
    margin: 0;
    padding: 12px;
    color: var(--yc-night-muted, #71717a);
    background: var(--yc-night-surface, #f8fafc);
    border: 1px solid var(--yc-night-border, #e5e7eb);
    border-radius: 8px;
}

.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: var(--yc-z-backdrop);
    display: none;
    place-items: center;
    padding: 20px;
    background: rgba(17, 24, 39, 0.58);
}

.modal-overlay:target {
    display: grid;
}

.modal-overlay.is-open {
    display: grid;
}

.modal {
    position: relative;
    z-index: var(--yc-z-modal);
    width: min(420px, 100%);
    padding: 20px;
    background: var(--yc-night-surface, #fff);
    border-radius: 8px;
    box-shadow: 0 24px 64px rgba(17, 17, 17, 0.22);
}

.modal.work-note-modal,
.work-detail-page .modal.work-task-modal,
.work-page .modal.work-task-modal {
    width: min(900px, calc(100vw - 48px));
    max-width: 900px;
}

@media (max-width: 899px) {
    .modal.work-note-modal,
    .work-detail-page .modal.work-task-modal,
    .work-page .modal.work-task-modal {
        width: calc(100vw - 24px);
        max-width: none;
    }
}

.modal h2 {
    margin: 0 0 18px;
    font-size: 20px;
    line-height: 1.3;
}

.modal p {
    margin: -8px 0 18px;
    color: var(--yc-night-muted, #4b5563);
    line-height: 1.5;
}

.modal-actions {
    display: grid;
    gap: 10px;
}

.modal-field {
    display: grid;
    gap: 8px;
    margin-bottom: 16px;
    color: var(--yc-night-muted, #374151);
    font-size: 14px;
    font-weight: 800;
}

.modal-field textarea {
    width: 100%;
    min-height: 96px;
    resize: vertical;
    border: 1px solid var(--yc-night-border, #d8dde5);
    border-radius: 8px;
    padding: 10px 12px;
    color: var(--yc-night-text, #111827);
    font: inherit;
}

.modal-button {
    display: grid;
    min-height: 44px;
    place-items: center;
    border: 1px solid var(--yc-night-border, #d8dde5);
    border-radius: 8px;
    padding: 0 14px;
    font-weight: 800;
    text-decoration: none;
}

.modal-button.secondary {
    color: var(--yc-night-muted, #374151);
    background: var(--yc-night-surface, #fff);
}

.modal-button.danger {
    width: 100%;
    color: var(--yc-danger);
    background: var(--yc-night-surface, #fff);
    border-color: rgba(220, 38, 38, 0.58);
    box-shadow: none;
}

.modal-button.primary {
    color: #fff;
    background: #111827;
    border-color: #111827;
}

@keyframes day-drop-pulse {
    0% {
        transform: scale(1);
    }

    45% {
        transform: scale(1.07);
        box-shadow: 0 10px 30px rgba(34, 197, 94, 0.32);
    }

    100% {
        transform: scale(1);
    }
}

@media (min-width: 720px) {
    .app-shell {
        padding: 88px 24px 56px;
    }

    .day-switcher {
        margin-right: 0;
        margin-left: 0;
        padding-right: 0;
        padding-left: 0;
    }

    .quick-add {
        grid-template-columns: minmax(0, 1fr) auto auto auto auto;
    }

    .schedule-row {
        grid-template-columns: minmax(0, 1fr) auto auto;
        align-items: center;
    }

    .schedule-actions {
        grid-template-columns: repeat(3, 38px);
    }

    .modal-actions {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 899px) {
    html.is-sidebar-open,
    body.is-sidebar-open {
        overflow: hidden;
    }

    .mobile-topbar {
        position: fixed;
        top: 0;
        right: 0;
        left: 0;
        z-index: 35;
        display: flex !important;
        width: 100%;
        align-items: center;
        justify-content: space-between;
    }

    .mobile-menu-toggle {
        position: static !important;
        flex: 0 0 auto;
    }

    .mobile-topbar-brand {
        display: flex !important;
    }

    html.is-sidebar-collapsed .app-sidebar,
    body.is-sidebar-collapsed .app-sidebar,
    aside.app-sidebar[data-sidebar],
    .app-sidebar {
        position: fixed !important;
        inset: 0 !important;
        display: flex;
        width: 100vw !important;
        max-width: none !important;
        height: 100vh;
        height: 100dvh !important;
        max-height: 100dvh !important;
        flex-direction: column;
        overflow: hidden !important;
        padding: 16px 14px 0;
        z-index: 1000;
        transform: translateX(-100%) !important;
    }

    html.is-sidebar-collapsed .app-shell,
    body.is-sidebar-collapsed .app-shell,
    .app-shell {
        width: 100%;
        margin-left: 0 !important;
        padding: 88px 12px 40px;
    }

    body.is-sidebar-open .app-sidebar {
        transform: translateX(0) !important;
    }

    .sidebar-overlay {
        z-index: 990;
    }

    .sidebar-collapse {
        display: none !important;
    }

    .sidebar-header {
        flex: 0 0 auto;
        margin-bottom: 16px;
    }

    .sidebar-nav {
        flex: 1 1 auto;
        min-height: 0;
        max-height: none;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: calc(32px + env(safe-area-inset-bottom));
    }

    .app-shell.auth-shell {
        width: 100vw !important;
        max-width: none !important;
        min-height: 100vh;
        min-height: 100dvh;
        margin-left: 0 !important;
        padding: 18px !important;
    }
}

@media (min-width: 900px) {
    .mobile-topbar,
    .sidebar-close,
    .sidebar-overlay {
        display: none;
    }

    .app-sidebar {
        right: auto;
        width: var(--yc-sidebar-width, 248px);
        max-width: none;
        height: 100vh;
        height: 100dvh;
        transform: none;
    }

    .sidebar-collapse {
        display: grid;
    }

    .sidebar-collapse svg {
        transition: transform 0.18s ease;
    }

    .app-shell {
        margin-left: var(--yc-sidebar-width, 248px);
        padding: 32px 28px 56px;
        transition: margin-left 0.18s ease;
    }

    html.is-sidebar-collapsed .app-sidebar {
        width: var(--yc-sidebar-collapsed-width, 72px);
        padding-right: 12px;
        padding-left: 12px;
    }

    html.is-sidebar-collapsed .app-shell {
        margin-left: var(--yc-sidebar-collapsed-width, 72px);
    }

    .app-shell.auth-shell,
    html.is-sidebar-collapsed .app-shell.auth-shell {
    width: 100vw !important;
    max-width: none !important;
    min-height: 100vh;
    min-height: 100dvh;
    margin-left: 0 !important;
    align-items: center !important;
    justify-items: center !important;
    place-items: center !important;
    align-content: center !important;
    justify-content: center !important;
    place-content: center !important;
    padding: 24px !important;
}

    html.is-sidebar-collapsed .sidebar-header {
        justify-content: center;
        min-height: 42px;
        margin-bottom: 18px;
    }

    html.is-sidebar-collapsed .sidebar-brand {
        flex: 0 0 28px;
        overflow: hidden;
    }

    html.is-sidebar-collapsed .sidebar-brand-logo {
        height: 28px;
        max-width: none;
        flex: none;
    }

    html.is-sidebar-collapsed .sidebar-section h2,
    html.is-sidebar-collapsed .sidebar-link-text {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
        white-space: nowrap;
    }

    html.is-sidebar-collapsed .sidebar-collapse {
        position: static;
        color: var(--yc-night-accent, var(--yc-primary-dark));
        background: var(--yc-night-surface, #fff);
        box-shadow: 0 10px 24px rgba(124, 58, 237, 0.2);
    }

    html.is-sidebar-collapsed .sidebar-collapse svg {
        transform: rotate(180deg);
    }

    html.is-sidebar-collapsed .sidebar-link {
        justify-content: center;
        padding: 7px;
    }

    html.is-sidebar-collapsed .sidebar-nav {
        margin-right: -12px;
        padding-right: 12px;
    }
}

/* MOBILE SIDEBAR HARD OVERRIDE */
@media (max-width: 899px) {
    html.is-sidebar-collapsed .app-sidebar,
    body.is-sidebar-collapsed .app-sidebar,
    aside.app-sidebar[data-sidebar],
    .app-sidebar {
        position: fixed !important;
        inset: 0 auto 0 0 !important;
        display: flex !important;
        width: 100vw !important;
        max-width: none !important;
        height: 100dvh !important;
        max-height: 100dvh !important;
        flex-direction: column !important;
        transform: translateX(-110%) !important;
        overflow: hidden !important;
        z-index: 9999 !important;
    }

    html.is-sidebar-open .app-sidebar,
    body.is-sidebar-open .app-sidebar,
    body.is-sidebar-open aside.app-sidebar[data-sidebar] {
        transform: translateX(0) !important;
    }

    .app-shell,
    .app-main,
    .app-content,
    main {
        width: 100% !important;
        margin-left: 0 !important;
    }

    .mobile-topbar {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
    }

    .mobile-topbar-brand {
        display: flex !important;
        order: 1;
    }

    .mobile-menu-toggle {
        display: grid !important;
        order: 2;
        width: 60px !important;
        height: 60px !important;
        background: red !important;
        visibility: visible !important;
        opacity: 1 !important;
        pointer-events: auto !important;
    }
}

/* MOBILE TOPBAR TOGGLE OVERRIDE */
@media (max-width: 899px) {
    .mobile-topbar {
        display: flex !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        height: 64px !important;
        align-items: center !important;
        justify-content: space-between !important;
        gap: 12px !important;
        flex-wrap: nowrap !important;
        padding: 10px 14px !important;
        overflow: visible !important;
    }

    .mobile-topbar-brand {
        display: flex !important;
        flex: 1 1 auto !important;
        min-width: 0 !important;
        overflow: hidden !important;
        visibility: visible !important;
        opacity: 1 !important;
    }

    .mobile-menu-toggle[data-sidebar-toggle] {
        display: inline-flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        width: 44px !important;
        height: 44px !important;
        min-width: 44px !important;
        flex: 0 0 44px !important;
        align-items: center !important;
        justify-content: center !important;
        background: var(--yc-primary) !important;
        color: #fff !important;
        border: 0 !important;
        border-radius: 12px !important;
        margin-left: auto !important;
        position: static !important;
        top: auto !important;
        right: auto !important;
        left: auto !important;
        transform: none !important;
        z-index: 10001 !important;
    }

    .mobile-menu-toggle[data-sidebar-toggle] svg {
        display: block !important;
        width: 20px !important;
        height: 20px !important;
        stroke: currentColor !important;
    }
}

/* MOBILE SCHEDULE WIDTH OVERRIDE */
@media (max-width: 899px) {
    html,
    body {
        max-width: 100%;
        overflow-x: hidden;
    }

    .app-shell,
    main,
    .page,
    .schedule-page,
    .schedule-day,
    .schedule-items,
    .schedule-sortable,
    .schedule-row {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    .app-shell {
        margin-left: 0 !important;
        padding: 88px 16px 40px !important;
        justify-items: stretch;
        overflow-x: hidden;
    }

    .schedule-page {
        min-width: 0;
        overflow-x: hidden;
    }

    .day-switcher {
        max-width: 100%;
        margin-right: 0;
        margin-left: 0;
        padding-right: 0;
        padding-left: 0;
        overflow-x: auto;
        overflow-y: visible;
    }

    .schedule-day {
        overflow: hidden;
    }

    .quick-add {
        grid-template-columns: 1fr;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    .quick-add input,
    .priority-picker,
    .priority-picker-trigger,
    .meeting-toggle,
    .meeting-time-input,
    .quick-add > button[type="submit"] {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        box-sizing: border-box;
    }

    .schedule-row {
        grid-template-columns: minmax(0, 1fr) auto;
        min-width: 0;
        overflow: hidden;
    }

    .schedule-row-main {
        grid-column: 1 / 2;
    }

    .schedule-actions {
        grid-column: 2 / 3;
        grid-row: 1 / 2;
    }

    .schedule-meeting-time {
        grid-column: 1 / -1;
        justify-self: start;
        padding-left: 38px;
        text-align: left;
    }

    .schedule-row-main {
        min-width: 0;
        overflow: hidden;
    }

    .schedule-title {
        min-width: 0;
        overflow-wrap: anywhere;
    }

    .schedule-actions {
        grid-template-columns: repeat(3, 30px);
        gap: 4px;
        max-width: 98px;
    }

    .schedule-actions.single-action {
        grid-template-columns: 30px;
    }

    .schedule-actions .app-icon-btn {
        width: 30px;
        min-width: 30px;
        height: 30px;
        min-height: 30px;
    }
}

/* SCHEDULE RESPONSIVE LAYOUT */
@media (max-width: 899px) {
    html,
    body {
        max-width: 100%;
        overflow-x: hidden;
    }

    .schedule-page,
    .schedule-day,
    .schedule-items,
    .schedule-sortable {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        box-sizing: border-box;
    }

    .app-shell {
        width: 100%;
        max-width: 100%;
        margin-left: 0 !important;
        padding: 88px 16px 40px !important;
        justify-items: stretch;
        overflow-x: hidden;
        box-sizing: border-box;
    }

    .schedule-page {
        overflow-x: clip;
    }

    .day-switcher {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        box-sizing: border-box;
    }

    .quick-add {
        grid-template-columns: minmax(0, 1fr) minmax(148px, 0.55fr) !important;
        width: 100%;
        max-width: 100%;
        min-width: 0;
        align-items: stretch;
        box-sizing: border-box;
    }

    .quick-add > input[name="title"] {
        grid-column: 1 / -1;
    }

    .quick-add .priority-picker,
    .quick-add .priority-picker-trigger,
    .quick-add .meeting-toggle,
    .quick-add .meeting-time-input,
    .quick-add > button[type="submit"] {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        box-sizing: border-box;
    }

    .meeting-toggle {
        justify-content: flex-start;
        white-space: nowrap;
    }

    .schedule-row {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 8px;
        overflow: hidden;
        box-sizing: border-box;
    }

    .schedule-row-main {
        grid-column: 1 / 2;
        min-width: 0;
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        overflow: visible;
    }

    .schedule-title {
        min-width: 0;
        max-width: 100%;
        overflow-wrap: anywhere;
    }

    .schedule-meeting-badge {
        flex: 0 0 auto;
    }

    .schedule-meeting-time {
        grid-column: 1 / 2;
        grid-row: 2;
        min-width: 0;
        padding-left: 38px;
        justify-self: start;
        text-align: left;
        white-space: nowrap;
    }

    .schedule-actions {
        grid-column: 2 / 3;
        grid-row: 1 / span 2;
        grid-template-columns: repeat(3, 30px);
        gap: 4px;
        max-width: none;
        align-self: center;
    }

    .schedule-actions.single-action {
        grid-template-columns: 30px;
    }

    .schedule-actions .app-icon-btn {
        width: 30px;
        min-width: 30px;
        min-height: 30px;
    }
}

@media (max-width: 600px) {
    .app-shell {
        padding: 88px 12px 32px !important;
    }

    .quick-add {
        grid-template-columns: 1fr !important;
        padding: 12px;
    }

    .quick-add > input[name="title"],
    .quick-add .priority-picker,
    .quick-add .meeting-toggle,
    .quick-add .meeting-time-input,
    .quick-add > button[type="submit"] {
        grid-column: 1 / -1;
    }

    .meeting-toggle {
        min-height: 44px;
        gap: 8px;
        justify-content: flex-start;
    }

    .meeting-toggle input {
        width: 16px;
        height: 16px;
        margin: 0;
        flex: 0 0 16px;
    }

    .schedule-row {
        grid-template-columns: 1fr;
        align-items: start;
        padding: 8px;
    }

    .schedule-row-main {
        grid-column: 1;
        grid-row: 1;
        padding-right: 0;
    }

    .schedule-meeting-time {
        grid-column: 1;
        grid-row: 2;
        padding-left: 38px;
    }

    .schedule-actions {
        grid-column: 1;
        grid-row: 3;
        grid-template-columns: repeat(3, 30px);
        justify-self: end;
        align-self: start;
    }

    .schedule-actions.single-action {
        grid-template-columns: 30px;
    }
}

/* SCHEDULE FORM AND WIDTH FIX */
.quick-add .meeting-toggle input[type="checkbox"],
.meeting-edit-field .meeting-toggle input[type="checkbox"] {
    width: 16px !important;
    min-width: 16px !important;
    max-width: 16px !important;
    height: 16px !important;
    min-height: 16px !important;
    margin: 0;
    flex: 0 0 16px;
}

.meeting-toggle span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (min-width: 900px) {
    html,
    body {
        max-width: 100%;
        overflow-x: hidden;
    }

    .app-shell {
        width: calc(100vw - var(--yc-sidebar-width, 248px));
        max-width: calc(100vw - var(--yc-sidebar-width, 248px));
        min-width: 0;
        justify-items: stretch;
        overflow-x: hidden;
        box-sizing: border-box;
    }

    html.is-sidebar-collapsed .app-shell {
        width: calc(100vw - var(--yc-sidebar-collapsed-width, 72px));
        max-width: calc(100vw - var(--yc-sidebar-collapsed-width, 72px));
        min-width: 0;
    }

    .app-shell > *,
    .schedule-page,
    .schedule-day,
    .quick-add,
    .schedule-items,
    .schedule-sortable,
    .schedule-row {
        max-width: 100%;
        min-width: 0;
        box-sizing: border-box;
    }

    .schedule-page {
        overflow-x: clip;
    }

    .quick-add {
        grid-template-columns: minmax(0, 1fr) minmax(140px, auto) minmax(112px, auto) minmax(112px, auto) minmax(116px, auto);
    }

    .schedule-row {
        grid-template-columns: minmax(0, 1fr) auto auto;
        overflow: hidden;
    }

    .schedule-row-main,
    .schedule-title {
        min-width: 0;
    }
}

@media (min-width: 601px) and (max-width: 899px) {
    .quick-add {
        grid-template-columns: minmax(0, 1fr) minmax(108px, auto) minmax(112px, 140px) minmax(116px, auto) !important;
        gap: 8px;
    }

    .quick-add > input[name="title"] {
        grid-column: 1 / -1;
    }

    .quick-add .priority-picker {
        grid-column: 1 / 2;
    }

    .quick-add .meeting-toggle {
        grid-column: 2 / 3;
        width: auto;
        min-width: 0;
        padding: 0 10px;
    }

    .quick-add .meeting-time-input {
        grid-column: 3 / 4;
        min-width: 0;
    }

    .quick-add > button[type="submit"] {
        grid-column: 4 / 5;
        min-width: 0;
        padding-right: 14px;
        padding-left: 14px;
        white-space: nowrap;
    }
}

@media (min-width: 601px) and (max-width: 700px) {
    .quick-add {
        grid-template-columns: minmax(0, 1fr) minmax(108px, auto) minmax(112px, 140px) !important;
    }

    .quick-add > button[type="submit"] {
        grid-column: 1 / -1;
    }
}

/* SCHEDULE MODERN UI */
.schedule-page {
    --schedule-ink: #111827;
    --schedule-muted: #6b7280;
    --schedule-line: rgba(148, 163, 184, 0.28);
    --schedule-soft: #f8fafc;
    --schedule-card: rgba(255, 255, 255, 0.92);
    --schedule-shadow: 0 18px 46px rgba(15, 23, 42, 0.08);
    --schedule-shadow-soft: 0 10px 28px rgba(15, 23, 42, 0.06);
    --schedule-priority-high: #dc2626;
    --schedule-priority-high-dark: #991b1b;
    --schedule-priority-high-soft: rgba(220, 38, 38, 0.08);
    --schedule-priority-high-ring: rgba(220, 38, 38, 0.18);
    --schedule-priority-normal: #334155;
    --schedule-priority-low: #16a34a;
    color: var(--schedule-ink);
}

.schedule-page .page-header {
    margin-bottom: 18px;
}

.schedule-page .page-header h1 {
    margin-bottom: 0;
}

.schedule-page .page-header p {
    color: var(--schedule-muted);
}

.schedule-page .day-switcher {
    gap: 10px;
    padding: 2px 2px 12px;
    scroll-behavior: auto;
    scroll-padding-inline: 12px;
}

.schedule-page .day-tab {
    min-width: 92px;
    min-height: 66px;
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 18px;
    color: var(--yc-night-muted, #334155);
    background:
        linear-gradient(180deg, rgba(var(--yc-night-surface-rgb, 255, 255, 255), 0.98), rgba(var(--yc-night-soft-rgb, 248, 250, 252), 0.92));
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.055);
    transition:
        transform 0.18s ease,
        border-color 0.18s ease,
        box-shadow 0.18s ease,
        background 0.18s ease,
        color 0.18s ease;
}

.schedule-page .day-tab:hover,
.schedule-page .day-tab:focus-visible {
    transform: translateY(-2px);
    border-color: rgba(124, 58, 237, 0.28);
    color: var(--yc-night-accent, var(--yc-primary-dark));
    background: var(--yc-night-surface, #fff);
    box-shadow: 0 14px 34px rgba(124, 58, 237, 0.14);
    outline: 0;
}

.schedule-page .day-tab.is-today {
    position: relative;
    border-color: #22c55e;
    color: var(--yc-night-accent, #3b0764);
    background: linear-gradient(135deg, var(--yc-night-green-bg, #f0fdf4) 0%, var(--yc-night-accent-bg, #f5f3ff) 100%);
    box-shadow: 0 10px 26px rgba(34, 197, 94, 0.18), inset 0 0 0 2px rgba(124, 58, 237, 0.18);
    transform: translateY(-1px);
}

.schedule-page .day-tab.is-today .day-tab-date {
    color: var(--yc-night-green, #166534);
}

.schedule-page .day-tab-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    margin-top: 5px;
    border-radius: 999px;
    padding: 3px 8px;
    color: #fff;
    background: #16a34a;
    font-size: 10px;
    font-weight: 900;
    line-height: 1;
    text-transform: uppercase;
}

.schedule-page .day-tab.is-active.is-today {
    border-color: #22c55e;
    color: #fff;
    background: linear-gradient(135deg, #6d28d9 0%, #16a34a 100%);
    box-shadow: 0 14px 30px rgba(34, 197, 94, 0.26), 0 0 0 3px rgba(124, 58, 237, 0.18);
}

.schedule-page .day-tab.is-active.is-today .day-tab-date {
    color: rgba(255, 255, 255, 0.9);
}

.schedule-page .day-tab.is-active.is-today .day-tab-badge {
    color: var(--yc-night-green, #14532d);
    background: var(--yc-night-surface, #fff);
}

.schedule-page .day-tab.is-active {
    border-color: rgba(17, 24, 39, 0.12);
    color: #fff;
    background: var(--yc-primary-gradient);
    box-shadow: none;
    outline: 0;
}

.schedule-page .day-tab.is-active .day-tab-date {
    color: rgba(255, 255, 255, 0.76);
}

.schedule-page .day-tab-label {
    font-size: 13px;
    font-weight: 800;
}

.schedule-page .day-tab-date {
    color: var(--yc-night-muted, #64748b);
    font-size: 12px;
    font-weight: 700;
}

.schedule-page .day-tab.is-day-drop-target,
.schedule-page .day-tab.is-active.is-day-drop-target,
.schedule-page .day-tab.is-day-drop-success,
.schedule-page .day-tab.is-active.is-day-drop-success {
    transform: translateY(-2px) scale(1.04);
    border-color: rgba(22, 163, 74, 0.72);
    color: var(--yc-night-green, #166534);
    background: linear-gradient(180deg, var(--yc-night-green-bg, #ecfdf5), var(--yc-night-green-bg, #dcfce7));
    box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.16), 0 18px 42px rgba(22, 163, 74, 0.22);
}

.schedule-page .day-tab.is-day-drop-target .day-tab-date,
.schedule-page .day-tab.is-active.is-day-drop-target .day-tab-date,
.schedule-page .day-tab.is-day-drop-success .day-tab-date,
.schedule-page .day-tab.is-active.is-day-drop-success .day-tab-date {
    color: var(--yc-night-green, #15803d);
}

.schedule-page .schedule-day {
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 22px;
    background:
        linear-gradient(180deg, rgba(var(--yc-night-surface-rgb, 255, 255, 255), 0.96), rgba(var(--yc-night-surface-rgb, 255, 255, 255), 0.88)),
        radial-gradient(circle at top left, var(--yc-primary-soft), transparent 34%);
    box-shadow: var(--schedule-shadow);
}

.schedule-page .active-day.is-today {
    border-color: #22c55e;
    box-shadow: 0 16px 38px rgba(34, 197, 94, 0.18), 0 0 0 3px rgba(124, 58, 237, 0.1);
}

.schedule-page .active-day.is-today .schedule-day-header {
    background: linear-gradient(135deg, #6d28d9 0%, #16a34a 100%);
}

.schedule-page .schedule-today-badge {
    display: inline-flex;
    align-items: center;
    margin-left: 10px;
    border-radius: 999px;
    padding: 4px 9px;
    color: var(--yc-night-green, #14532d);
    background: var(--yc-night-surface, #fff);
    font-size: 11px;
    font-weight: 900;
    line-height: 1;
    text-transform: uppercase;
    vertical-align: middle;
}

.schedule-page .schedule-day-header {
    min-height: 76px;
    padding: 20px 22px;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    background:
        var(--yc-primary-gradient),
        radial-gradient(circle at 88% 20%, rgba(168, 85, 247, 0.42), transparent 28%);
}

.schedule-page .schedule-day-header span {
    color: rgba(255, 255, 255, 0.78);
    font-size: 13px;
    font-weight: 900;
}

.schedule-page .schedule-day-header .schedule-today-badge {
    color: var(--yc-night-green, #14532d);
    background: var(--yc-night-surface, #fff);
    font-size: 11px;
    font-weight: 900;
}

.schedule-page .schedule-day-header strong {
    color: #fff;
    font-size: 22px;
}

.schedule-page .quick-add {
    gap: 10px;
    padding: 16px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.18);
    background: rgba(var(--yc-night-soft-rgb, 248, 250, 252), 0.76);
}

.schedule-page .quick-add input[type="text"],
.schedule-page .meeting-time-input,
.schedule-page .priority-picker-trigger,
.schedule-page .meeting-toggle {
    min-height: 46px;
    border: 1px solid rgba(148, 163, 184, 0.34);
    border-radius: 14px;
    color: var(--yc-night-text, #111827);
    background: rgba(var(--yc-night-surface-rgb, 255, 255, 255), 0.96);
    box-shadow: 0 1px 0 rgba(15, 23, 42, 0.03);
    transition:
        border-color 0.16s ease,
        box-shadow 0.16s ease,
        background 0.16s ease,
        transform 0.16s ease;
}

.schedule-page .quick-add input[type="text"]:focus,
.schedule-page .meeting-time-input:focus,
.schedule-page .priority-picker-trigger:focus-visible,
.schedule-page .meeting-toggle:focus-within {
    border-color: rgba(124, 58, 237, 0.62);
    background: var(--yc-night-surface, #fff);
    box-shadow: var(--yc-focus-ring);
    outline: 0;
}

.schedule-page .priority-picker-trigger {
    padding: 0 14px;
    font-weight: 800;
}

.schedule-page .priority-picker-menu {
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 16px;
    box-shadow: 0 20px 46px rgba(15, 23, 42, 0.16);
}

.schedule-page .priority-picker-option {
    transition: background 0.14s ease;
}

.schedule-page .priority-picker-option:hover,
.schedule-page .priority-picker-option.is-selected {
    background: var(--yc-night-soft, #f3f4f6);
}

.schedule-page .priority-option-high:hover,
.schedule-page .priority-option-high.is-selected {
    color: var(--schedule-priority-high-dark);
    background: var(--schedule-priority-high-soft);
}

.schedule-page .meeting-toggle {
    padding: 0 14px;
    font-weight: 800;
}

.schedule-page .meeting-toggle input[type="checkbox"] {
    accent-color: var(--yc-primary);
}

.schedule-page .quick-add > button[type="submit"] {
    min-height: 46px;
    border-radius: 14px;
    background: linear-gradient(135deg, #15803d 0%, #22c55e 100%);
    box-shadow: 0 14px 28px rgba(34, 197, 94, 0.2);
    transition:
        transform 0.16s ease,
        box-shadow 0.16s ease,
        filter 0.16s ease;
}

.schedule-page .quick-add > button[type="submit"]:hover,
.schedule-page .quick-add > button[type="submit"]:focus-visible {
    transform: translateY(-1px);
    background: linear-gradient(135deg, #16a34a 0%, #4ade80 100%);
    box-shadow: 0 18px 34px rgba(34, 197, 94, 0.24);
    filter: brightness(1.03);
    outline: 0;
}

.schedule-page .schedule-items {
    gap: 8px;
    padding: 14px;
}

.schedule-page .schedule-empty-drop-zone {
    min-height: 48px;
    display: grid;
    place-items: center;
    border: 1px dashed rgba(148, 163, 184, 0.46);
    border-radius: 14px;
    color: var(--yc-night-muted, #64748b);
    background: rgba(var(--yc-night-soft-rgb, 248, 250, 252), 0.72);
    font-size: 13px;
    font-weight: 800;
}

.schedule-page .schedule-row {
    min-height: 54px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 16px;
    padding: 10px 12px;
    background: var(--schedule-card);
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.045);
    transition:
        transform 0.16s ease,
        border-color 0.16s ease,
        box-shadow 0.16s ease,
        background 0.16s ease,
        opacity 0.16s ease;
}

.schedule-page .schedule-row[data-priority="high"] {
    border-color: rgba(248, 113, 113, 0.28);
    background: linear-gradient(180deg, rgba(var(--yc-night-error-bg-rgb, 254, 242, 242), 0.74), rgba(var(--yc-night-error-bg-rgb, 255, 247, 247), 0.7));
}

.schedule-page .schedule-sortable .schedule-row[data-priority="high"]:hover {
    border-color: rgba(239, 68, 68, 0.32);
    background: linear-gradient(180deg, rgba(var(--yc-night-error-bg-rgb, 254, 242, 242), 0.86), rgba(var(--yc-night-error-bg-rgb, 255, 247, 247), 0.78));
}
.schedule-page .schedule-sortable .schedule-row:hover {
    transform: translateY(-1px);
    border-color: rgba(124, 58, 237, 0.22);
    background: var(--yc-night-surface, #fff);
    box-shadow: 0 16px 34px rgba(15, 23, 42, 0.09);
}

.schedule-page .schedule-row-main {
    gap: 10px;
}

.schedule-page .schedule-order {
    width: 12px;
    height: 12px;
    font-size: 0;
    box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.18), 0 8px 18px rgba(15, 23, 42, 0.13);
}

.schedule-page .priority-order-high {
    background: linear-gradient(135deg, var(--schedule-priority-high-dark), var(--schedule-priority-high));
}

.schedule-page .priority-order-normal {
    background: linear-gradient(135deg, #475569, var(--schedule-priority-normal));
}

.schedule-page .priority-order-low {
    background: linear-gradient(135deg, #22c55e, var(--schedule-priority-low));
}

.schedule-page .schedule-title {
    color: var(--yc-night-text, #111827);
    font-size: 15px;
    font-weight: 760;
}

.schedule-page .schedule-meeting-badge {
    min-height: 24px;
    border: 1px solid rgba(124, 58, 237, 0.18);
    color: var(--yc-night-accent, var(--yc-primary-dark));
    background: linear-gradient(180deg, var(--yc-night-accent-bg, #faf5ff), var(--yc-night-accent-bg, #f5f3ff));
    font-size: 11px;
    letter-spacing: 0;
}

.schedule-page .schedule-meeting-time {
    min-width: 62px;
    border: 1px solid rgba(124, 58, 237, 0.14);
    border-radius: 999px;
    padding: 6px 10px;
    color: var(--yc-night-accent, var(--yc-primary-dark));
    background: var(--yc-primary-soft);
    font-size: 13px;
    line-height: 1;
    text-align: center;
}

.schedule-page .schedule-meeting-time.is-hidden {
    display: none;
}

.schedule-page .schedule-actions {
    gap: 8px;
}

.schedule-page .app-icon-btn {
    border-radius: 12px;
    transition:
        transform 0.14s ease,
        border-color 0.14s ease,
        background 0.14s ease,
        color 0.14s ease,
        box-shadow 0.14s ease;
}

.schedule-page .app-icon-btn:hover,
.schedule-page .app-icon-btn:focus-visible {
    transform: translateY(-1px);
    box-shadow: 0 10px 20px rgba(15, 23, 42, 0.1);
    outline: 0;
}

.schedule-page .schedule-drag-handle {
    color: var(--yc-night-accent, var(--yc-primary-dark));
    background: var(--yc-primary-soft);
}

.schedule-page .schedule-row.is-dragging {
    opacity: 0.92;
    border-color: rgba(124, 58, 237, 0.44);
    background: var(--yc-night-surface, #fff);
    box-shadow: 0 24px 54px rgba(124, 58, 237, 0.2);
    transform: scale(1);
    cursor: grabbing;
    overflow: hidden;
}

.schedule-page .schedule-drag-placeholder {
    box-sizing: border-box;
    border: 1px dashed rgba(124, 58, 237, 0.38);
    border-radius: 16px;
    background: var(--yc-primary-soft);
}

.schedule-page .schedule-completed {
    margin-top: 2px;
    border-top: 1px solid rgba(148, 163, 184, 0.18);
    background: rgba(var(--yc-night-soft-rgb, 248, 250, 252), 0.52);
}

.schedule-page .schedule-completed summary {
    min-height: 52px;
    padding: 15px 18px;
    color: var(--yc-night-muted, #64748b);
    font-weight: 850;
    transition: color 0.16s ease, background 0.16s ease;
}

.schedule-page .schedule-completed summary:hover,
.schedule-page .schedule-completed summary:focus-visible {
    color: var(--yc-night-accent, var(--yc-primary-dark));
    background: var(--yc-primary-soft);
    outline: 0;
}

.schedule-page .schedule-row.is-completed {
    border-color: rgba(148, 163, 184, 0.14);
    color: #94a3b8;
    background: rgba(var(--yc-night-soft-rgb, 241, 245, 249), 0.7);
    box-shadow: none;
}

.schedule-page .schedule-row.is-completed .schedule-title {
    color: var(--yc-night-muted, #64748b);
}

.schedule-page .empty-state {
    color: #94a3b8;
}

@media (max-width: 899px) {
    .schedule-page .day-tab {
        min-width: 86px;
        min-height: 62px;
        border-radius: 16px;
    }

    .schedule-page .schedule-day {
        border-radius: 20px;
    }

    .schedule-page .schedule-day-header {
        min-height: 70px;
        padding: 18px;
    }

    .schedule-page .quick-add {
        padding: 14px;
    }
}

@media (max-width: 600px) {
    .schedule-page .page-header {
        margin-bottom: 14px;
    }

    .schedule-page .day-switcher {
        gap: 8px;
        padding-bottom: 10px;
    }

    .schedule-page .day-tab {
        min-width: 78px;
        min-height: 58px;
        border-radius: 15px;
    }

    .schedule-page .schedule-day-header {
        padding: 16px;
    }

    .schedule-page .quick-add {
        gap: 9px;
        padding: 12px;
    }

    .schedule-page .schedule-items {
        padding: 10px;
    }

    .schedule-page .schedule-row {
        border-radius: 15px;
        padding: 10px;
    }

    .schedule-page .schedule-meeting-time {
        margin-top: 2px;
        padding: 6px 10px;
    }
}

/* SCHEDULE DETAIL UI POLISH */
.schedule-page .quick-add input[type="text"] {
    padding: 0 16px;
    font-size: 15px;
    font-weight: 650;
}

.schedule-page .quick-add input[type="text"]::placeholder {
    color: #94a3b8;
    font-weight: 600;
}

.schedule-page .priority-picker-trigger {
    gap: 9px;
    min-width: 136px;
    white-space: nowrap;
}

.schedule-page .priority-dot {
    width: 9px;
    height: 9px;
    box-shadow: 0 0 0 3px rgba(148, 163, 184, 0.14);
}

.schedule-page .priority-option-high .priority-dot {
    background: var(--schedule-priority-high);
    box-shadow: 0 0 0 3px var(--schedule-priority-high-ring);
}

.schedule-page .priority-option-normal .priority-dot {
    background: var(--schedule-priority-normal);
}

.schedule-page .priority-option-low .priority-dot {
    background: var(--schedule-priority-low);
}

.schedule-page .priority-picker-trigger::after {
    content: "";
    width: 8px;
    height: 8px;
    margin-left: auto;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    opacity: 0.46;
    transform: rotate(45deg) translateY(-2px);
}

.schedule-page .priority-picker.is-open .priority-picker-trigger {
    border-color: rgba(124, 58, 237, 0.6);
    box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.12);
}

.schedule-page .priority-picker-trigger.priority-option-high {
    border-color: var(--schedule-priority-high-ring);
    color: var(--schedule-priority-high-dark);
    background: linear-gradient(180deg, var(--yc-night-surface, #fff), rgba(var(--yc-night-error-bg-rgb, 254, 242, 242), 0.92));
}

.schedule-page .priority-picker.is-open .priority-picker-trigger.priority-option-high,
.schedule-page .priority-picker-trigger.priority-option-high:focus-visible {
    border-color: rgba(220, 38, 38, 0.46);
    box-shadow: 0 0 0 4px var(--schedule-priority-high-ring);
}

.schedule-page .priority-picker-option {
    gap: 9px;
    padding: 0 13px;
    color: var(--yc-night-muted, #334155);
    font-weight: 760;
}

.schedule-page .priority-picker-option.is-selected {
    color: var(--yc-night-accent, var(--yc-primary-dark));
}

.schedule-page .priority-option-high.is-selected {
    color: var(--schedule-priority-high-dark);
}

.schedule-page .priority-native-select option[value="high"] {
    color: var(--schedule-priority-high);
}

.schedule-page .meeting-toggle {
    position: relative;
    cursor: pointer;
}

.schedule-page .meeting-toggle input[type="checkbox"] {
    position: relative;
    width: 34px !important;
    min-width: 34px !important;
    max-width: 34px !important;
    height: 20px !important;
    min-height: 20px !important;
    flex-basis: 34px;
    appearance: none;
    border: 1px solid var(--yc-switch-border, rgba(148, 163, 184, 0.44));
    border-radius: 999px;
    background: var(--yc-switch-track, #e2e8f0);
    cursor: pointer;
    transition: background 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.schedule-page .meeting-toggle input[type="checkbox"]::after {
    content: "";
    position: absolute;
    top: 2px;
    left: 2px;
    width: 14px;
    height: 14px;
    border-radius: 999px;
    background: var(--yc-switch-thumb, #fff);
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.22);
    transition: transform 0.16s ease;
}

.schedule-page .meeting-toggle input[type="checkbox"]:checked {
    border-color: var(--yc-switch-active-border, rgba(124, 58, 237, 0.6));
    background: var(--yc-switch-active, var(--yc-primary-gradient));
}

.schedule-page .meeting-toggle input[type="checkbox"]:checked::after {
    transform: translateX(14px);
}

.schedule-page .meeting-toggle:hover {
    border-color: rgba(124, 58, 237, 0.36);
    background: var(--yc-night-surface, #fff);
}

.schedule-page .meeting-toggle span {
    color: var(--yc-night-muted, #334155);
    font-weight: 800;
}

.schedule-page .meeting-time-input {
    padding: 0 13px;
    color: var(--yc-night-accent, var(--yc-primary-dark));
    font-weight: 800;
}

.schedule-page .quick-add > button[type="submit"]:active,
.schedule-page .modal-button:active,
.schedule-page .app-icon-btn:active {
    transform: translateY(0);
    filter: brightness(0.98);
}

.schedule-page .schedule-row {
    backdrop-filter: blur(10px);
}

.schedule-page .schedule-row-main {
    align-items: center;
}

.schedule-page .schedule-title {
    letter-spacing: 0;
}

.schedule-page .schedule-sortable .schedule-row {
    position: relative;
}

.schedule-page .schedule-sortable .schedule-row::before {
    content: "";
    position: absolute;
    top: 12px;
    bottom: 12px;
    left: 0;
    width: 3px;
    border-radius: 999px;
    background: rgba(124, 58, 237, 0);
    transition: background 0.16s ease;
}

.schedule-page .schedule-sortable .schedule-row:hover::before {
    background: rgba(124, 58, 237, 0.38);
}

.schedule-page .schedule-order {
    flex: 0 0 12px;
}

.schedule-page .schedule-meeting-badge {
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

.schedule-page .schedule-meeting-time::before {
    content: "";
    display: inline-block;
    width: 6px;
    height: 6px;
    margin-right: 6px;
    border-radius: 999px;
    background: var(--yc-primary);
    vertical-align: 2px;
}

.schedule-page .schedule-actions .app-icon-btn {
    width: 38px;
    min-width: 38px;
    height: 38px;
    min-height: 38px;
}

.schedule-page .schedule-actions .app-icon-btn svg {
    width: 18px;
    height: 18px;
}

.schedule-page .app-icon-btn--neutral:hover,
.schedule-page .app-icon-btn--neutral:focus-visible {
    border-color: var(--yc-night-button-hover-border, rgba(124, 58, 237, 0.22));
    color: var(--yc-night-accent, var(--yc-primary-dark));
    background: var(--yc-primary-soft);
}

.schedule-page .app-icon-btn--edit:hover,
.schedule-page .app-icon-btn--edit:focus-visible {
    border-color: var(--yc-night-button-hover-border, #d9ccff);
    color: var(--yc-night-accent, #7c3aed);
    background: var(--yc-night-accent-bg, #f5f0ff);
}

.schedule-page .app-icon-btn--danger:hover,
.schedule-page .app-icon-btn--danger:focus-visible {
    border-color: var(--yc-night-button-danger-hover-border, #fecaca);
    color: var(--yc-night-error, #ef4444);
    background: var(--yc-night-error-bg, #fee2e2);
}

.schedule-page .app-icon-btn--success:hover,
.schedule-page .app-icon-btn--success:focus-visible {
    border-color: rgba(22, 163, 74, 0.36);
    color: var(--yc-night-green, #166534);
    background: var(--yc-night-green-bg, #dcfce7);
}

.schedule-page .modal-overlay {
    padding: 18px;
    background: rgba(15, 23, 42, 0.46);
    backdrop-filter: blur(10px);
}

.schedule-page .modal {
    width: min(460px, 100%);
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: 22px;
    padding: 24px;
    background:
        linear-gradient(180deg, rgba(var(--yc-night-surface-rgb, 255, 255, 255), 0.98), rgba(var(--yc-night-soft-rgb, 248, 250, 252), 0.96));
    box-shadow: 0 28px 70px rgba(15, 23, 42, 0.28);
}

.schedule-page .modal h2 {
    margin: 0 0 8px;
    color: var(--yc-night-text, #111827);
    font-size: 22px;
    line-height: 1.14;
}

.schedule-page .modal p {
    color: var(--yc-night-muted, #64748b);
    line-height: 1.5;
}

.schedule-page .modal-field {
    gap: 8px;
    color: var(--yc-night-muted, #475569);
    font-size: 13px;
    font-weight: 850;
}

.schedule-page .modal-field textarea,
.schedule-page .modal-field select,
.schedule-page .modal-field .priority-picker-trigger,
.schedule-page .modal-field .meeting-time-input {
    border: 1px solid rgba(148, 163, 184, 0.32);
    border-radius: 14px;
    background: var(--yc-night-surface, #fff);
    box-shadow: 0 1px 0 rgba(15, 23, 42, 0.03);
}

.schedule-page .modal-field textarea {
    min-height: 116px;
    padding: 13px 14px;
    resize: vertical;
}

.schedule-page .modal-field textarea:focus,
.schedule-page .modal-field .priority-picker-trigger:focus-visible,
.schedule-page .modal-field .meeting-toggle:focus-within,
.schedule-page .modal-field .meeting-time-input:focus {
    border-color: rgba(124, 58, 237, 0.58);
    box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.12);
    outline: 0;
}

.schedule-page .modal-actions {
    gap: 10px;
    margin-top: 18px;
}

.schedule-page .modal-button {
    min-height: 46px;
    border-radius: 14px;
    font-weight: 850;
    transition: transform 0.14s ease, box-shadow 0.14s ease, background 0.14s ease;
}

.schedule-page .modal-button.secondary {
    border-color: rgba(148, 163, 184, 0.32);
    background: var(--yc-night-surface, #fff);
}

.schedule-page .modal-button.secondary:hover,
.schedule-page .modal-button.secondary:focus-visible {
    background: var(--yc-night-surface, #f8fafc);
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08);
    outline: 0;
}

.schedule-page .modal-button.primary {
    background: var(--yc-primary-gradient);
    box-shadow: 0 8px 18px rgba(124, 58, 237, 0.12);
}

.schedule-page .modal-button.danger {
    color: var(--yc-danger);
    border-color: var(--yc-night-button-danger-border, rgba(220, 38, 38, 0.58));
    background: var(--yc-night-surface, #fff);
    box-shadow: none;
}

.schedule-page .modal-button.yc-btn--success {
    background: linear-gradient(135deg, #166534 0%, #16A34A 100%);
    box-shadow: 0 14px 28px rgba(22, 163, 74, 0.18);
}

.schedule-page .modal-button.primary:hover,
.schedule-page .modal-button.danger:hover,
.schedule-page .modal-button.yc-btn--success:hover,
.schedule-page .modal-button.primary:focus-visible,
.schedule-page .modal-button.danger:focus-visible,
.schedule-page .modal-button.yc-btn--success:focus-visible {
    transform: translateY(-1px);
    outline: 0;
}

.schedule-page .modal-button.yc-btn--success:hover,
.schedule-page .modal-button.yc-btn--success:focus-visible {
    background: linear-gradient(135deg, #15803D 0%, #22C55E 100%);
}

.schedule-page .schedule-completed[open] {
    background: rgba(var(--yc-night-soft-rgb, 248, 250, 252), 0.78);
}

.schedule-page .schedule-completed summary::marker {
    color: var(--yc-night-accent, var(--yc-primary));
}

.schedule-page .schedule-completed .schedule-items {
    padding-top: 4px;
}

.schedule-page .schedule-completed .schedule-row:hover {
    border-color: rgba(148, 163, 184, 0.22);
    background: rgba(var(--yc-night-surface-rgb, 255, 255, 255), 0.86);
}

@media (max-width: 899px) {
    .schedule-page .schedule-actions .app-icon-btn {
        width: 30px;
        min-width: 30px;
        height: 30px;
        min-height: 30px;
    }

    .schedule-page .modal {
        border-radius: 20px;
        padding: 20px;
    }
}

@media (max-width: 600px) {
    .schedule-page .quick-add input[type="text"],
    .schedule-page .meeting-time-input,
    .schedule-page .priority-picker-trigger,
    .schedule-page .meeting-toggle,
    .schedule-page .quick-add > button[type="submit"] {
        min-height: 46px;
    }

    .schedule-page .schedule-actions .app-icon-btn {
        width: 30px;
        min-width: 30px;
        height: 30px;
        min-height: 30px;
    }

    .schedule-page .modal-overlay {
        padding: 12px;
    }

    .schedule-page .modal {
        padding: 18px;
    }

    .schedule-page .modal-actions {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 340px) {
    .schedule-page .modal-actions {
        grid-template-columns: 1fr;
    }
}

/* MOBILE QUICK ADD TWO-COLUMN CONTROLS */
@media (max-width: 600px) {
    .schedule-page .quick-add {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
    }

    .schedule-page .quick-add > input[name="title"],
    .schedule-page .quick-add .meeting-time-input,
    .schedule-page .quick-add > button[type="submit"],
    .schedule-page .schedule-form-error {
        grid-column: 1 / -1;
    }

    .schedule-page .quick-add .priority-picker {
        grid-column: 1 / 2;
        width: 100%;
        min-width: 0;
    }

    .schedule-page .quick-add .meeting-toggle {
        grid-column: 2 / 3;
        width: 100%;
        min-width: 0;
        min-height: 46px;
    }

    .schedule-page .quick-add .priority-picker-trigger {
        width: 100%;
        min-width: 0;
        min-height: 46px;
    }
}

/* SCHEDULE VALIDATION AND MOBILE ACTION MENU */
.schedule-page .schedule-form-error {
    grid-column: 1 / -1;
    margin: 0;
    border: 1px solid rgba(124, 58, 237, 0.18);
    border-radius: 14px;
    padding: 10px 12px;
    color: var(--yc-night-accent, #4c1d95);
    background: var(--yc-night-accent-bg, #faf5ff);
    font-size: 13px;
    font-weight: 800;
}

.schedule-page .schedule-actions-desktop {
    display: contents;
}

.schedule-page .schedule-action-menu {
    display: none;
}

.schedule-page .schedule-more-trigger {
    display: none;
}

.schedule-page .schedule-more-trigger::-webkit-details-marker,
.schedule-page .schedule-more-trigger::marker {
    display: none;
    content: "";
}

.schedule-page .schedule-action-menu-panel {
    display: contents;
}

@media (min-width: 900px) {
    .schedule-page .schedule-actions-desktop {
        display: contents;
    }

    .schedule-page .schedule-action-menu {
        display: none;
    }

    .schedule-page .schedule-more-trigger {
        display: none;
    }

    .schedule-page .schedule-action-menu-panel {
        display: contents;
    }
}

@media (max-width: 899px) {
    .schedule-page .schedule-row {
        min-height: 44px;
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 6px;
        padding: 8px 9px;
    }

    .schedule-page .schedule-row-main {
        grid-column: 1 / 2;
        grid-row: 1;
        gap: 8px;
        flex-wrap: nowrap;
        overflow: hidden;
    }

    .schedule-page .schedule-title {
        display: -webkit-box;
        min-width: 0;
        overflow: hidden;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
        font-size: 14px;
        line-height: 1.25;
    }

    .schedule-page .schedule-meeting-badge {
        min-height: 20px;
        padding: 0 7px;
        font-size: 10px;
    }

    .schedule-page .schedule-meeting-time {
        grid-column: 1 / 2;
        grid-row: 2;
        width: max-content;
        min-width: 0;
        margin-top: 0;
        margin-left: 20px;
        padding: 4px 8px;
        font-size: 12px;
    }

    .schedule-page .schedule-actions {
        position: relative;
        grid-column: 2 / 3;
        grid-row: 1 / span 2;
        display: block;
        align-self: center;
        justify-self: end;
    }

    .schedule-page .schedule-actions-desktop {
        display: none;
    }

    .schedule-page .schedule-action-menu {
        position: relative;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 30px;
        height: 30px;
        min-width: 30px;
        min-height: 30px;
        line-height: 1;
    }

    .schedule-page .schedule-more-trigger {
        display: flex;
        align-items: center;
        justify-content: center;
        list-style: none;
        margin: 0;
    }

    .schedule-page .schedule-action-menu-panel {
        position: absolute;
        top: calc(100% + 8px);
        right: 0;
        z-index: 40;
        display: none;
        grid-template-columns: repeat(3, 30px);
        gap: 8px;
        border: 1px solid rgba(148, 163, 184, 0.24);
        border-radius: 16px;
        padding: 8px;
        background: rgba(var(--yc-night-surface-rgb, 255, 255, 255), 0.98);
        box-shadow: 0 18px 42px rgba(15, 23, 42, 0.18);
    }

    .schedule-page .schedule-action-menu[open] .schedule-action-menu-panel {
        display: grid;
    }

    .schedule-page .schedule-action-menu[open] .schedule-more-trigger {
        color: var(--yc-night-accent, var(--yc-primary-dark));
        background: var(--yc-primary-soft);
        box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.1);
    }

    .schedule-page .schedule-actions.single-action {
        display: grid;
        grid-template-columns: 30px;
    }
}

/* MOBILE FLOATING TASK ACTIONS */
@media (max-width: 899px) {
    .schedule-page .schedule-day,
    .schedule-page .schedule-items,
    .schedule-page .schedule-sortable {
        overflow: visible;
    }

    .schedule-page .schedule-row {
        position: relative;
        overflow: visible;
        z-index: 1;
    }

    .schedule-page .schedule-row.is-action-menu-open {
        z-index: 1200;
    }

    .schedule-page .schedule-actions {
        position: relative;
        z-index: 2;
    }

    .schedule-page .schedule-action-menu {
        position: relative;
        width: 30px;
        height: 30px;
        min-width: 30px;
        min-height: 30px;
        line-height: 1;
    }

    .schedule-page .schedule-action-menu-panel {
        position: absolute;
        top: calc(100% + 8px);
        right: 0;
        z-index: 1300;
        max-width: calc(100vw - 28px);
        transform: translateZ(0);
        pointer-events: auto;
    }

    .schedule-page .schedule-action-menu[open] .schedule-action-menu-panel {
        display: grid;
    }
}

/* SCHEDULE MOBILE LAYERING */
.schedule-page .modal-overlay,
.schedule-page .modal-overlay:target,
.schedule-page .modal-overlay.is-open {
    z-index: 5000;
}

.schedule-page .modal-overlay .modal {
    position: relative;
    z-index: 5010;
}

@media (max-width: 899px) {
    .schedule-page .schedule-row.is-action-menu-open {
        z-index: 1000;
    }

    .schedule-page .schedule-action-menu-panel {
        z-index: 1010;
    }

    .schedule-page .modal-overlay,
    .schedule-page .modal-overlay:target,
    .schedule-page .modal-overlay.is-open {
        z-index: 5000;
    }
}

/* SCHEDULE MOBILE COMPACT ALIGNMENT */
@media (max-width: 899px) {
    .schedule-page .day-tab {
        min-height: 56px;
        padding-block: 8px;
        align-content: center;
    }

    .schedule-page .schedule-row {
        align-items: center;
    }

    .schedule-page .schedule-row-main {
        min-height: 28px;
        align-items: center;
    }

    .schedule-page .schedule-order,
    .schedule-page .priority-dot {
        align-self: center;
    }

    .schedule-page .schedule-title {
        align-self: center;
    }

    .schedule-page .quick-add .meeting-time-input,
    .schedule-page .modal-field .meeting-time-input {
        text-align: center;
        text-align-last: center;
    }
}

@media (max-width: 600px) {
    .schedule-page .day-tab {
        min-width: 74px;
        min-height: 52px;
        padding-block: 7px;
    }

    .schedule-page .day-tab-label {
        font-size: 12px;
    }

    .schedule-page .day-tab-date {
        font-size: 11px;
    }

    .schedule-page .schedule-row {
        min-height: 42px;
        padding-block: 7px;
    }
}

/* SCHEDULE TASK TEXT ALIGNMENT */
.schedule-page .schedule-row {
    align-items: center;
}

.schedule-page .schedule-row-main {
    display: flex;
    align-items: center;
    align-self: center;
    min-height: 100%;
}

.schedule-page .schedule-title {
    align-self: center;
    line-height: 1.3;
}

.schedule-page .schedule-order {
    align-self: center;
}

.schedule-page .schedule-actions {
    align-self: center;
}

.schedule-page .schedule-action-menu {
    align-self: center;
}

@media (max-width: 899px) {
    .schedule-page .schedule-row {
        align-items: center;
    }

    .schedule-page .schedule-row-main {
        align-self: stretch;
        min-height: 100%;
        align-items: center;
    }

    .schedule-page .schedule-title {
        align-self: center;
        line-height: 1.25;
    }

    .schedule-page .schedule-actions {
        align-self: center;
    }
}

/* SCHEDULE MOBILE DENSITY */
@media (max-width: 899px) {
    .schedule-page .schedule-day-header {
        min-height: 58px;
        padding-block: 13px;
    }

    .schedule-page .priority-picker-trigger,
    .schedule-page .meeting-toggle {
        min-height: 40px;
        border-radius: 12px;
    }

    .schedule-page .meeting-toggle {
        align-items: center;
    }

    .schedule-page .quick-add .meeting-toggle,
    .schedule-page .quick-add .priority-picker-trigger {
        min-height: 40px;
    }
}

@media (max-width: 600px) {
    .schedule-page .schedule-day-header {
        min-height: 54px;
        padding-block: 11px;
    }

    .schedule-page .quick-add {
        gap: 8px;
    }

    .schedule-page .priority-picker-trigger,
    .schedule-page .meeting-toggle,
    .schedule-page .quick-add .priority-picker-trigger,
    .schedule-page .quick-add .meeting-toggle {
        min-height: 38px;
    }
}

/* SCHEDULE DYNAMIC TASK CARD HEIGHT */
.schedule-page .schedule-row {
    min-height: 0;
    align-items: center;
    padding-block: 8px;
}

.schedule-page .schedule-row-main {
    min-height: 0;
    align-items: center;
}

.schedule-page .schedule-title {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-height: 1.28;
}

.schedule-page .schedule-order,
.schedule-page .schedule-actions,
.schedule-page .schedule-action-menu,
.schedule-page .schedule-more-trigger {
    align-self: center;
}

@media (max-width: 899px) {
    .schedule-page .schedule-row {
        min-height: 40px;
        padding-block: 6px;
    }

    .schedule-page .schedule-row-main {
        min-height: 0;
        align-self: center;
    }

    .schedule-page .schedule-title {
        line-height: 1.24;
    }

    .schedule-page .schedule-more-trigger {
        min-height: 30px;
    }
}

@media (max-width: 600px) {
    .schedule-page .schedule-row {
        min-height: 40px;
        padding-block: 6px;
    }
}

/* SCHEDULE TASK ITEM FLEX CENTERING */
.schedule-page .schedule-row {
    display: flex !important;
    align-items: center !important;
    min-height: 0;
}

.schedule-page .schedule-row-main {
    flex: 1 1 auto;
    min-width: 0;
    min-height: 0 !important;
    display: flex !important;
    align-items: center !important;
    align-self: center !important;
    margin: 0;
    padding: 0;
}

.schedule-page .schedule-order {
    flex: 0 0 auto;
    align-self: center !important;
}

.schedule-page .schedule-title {
    min-width: 0;
    margin: 0;
    padding: 0;
    align-self: center !important;
    line-height: 1.25;
}

.schedule-page .schedule-actions {
    flex: 0 0 auto;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end;
    align-self: center !important;
}

.schedule-page .schedule-action-menu,
.schedule-page .schedule-more-trigger {
    align-self: center !important;
}

.schedule-page .schedule-more-trigger {
    place-items: center;
}

@media (max-width: 899px) {
    .schedule-page .schedule-row {
        gap: 8px;
    }

    .schedule-page .schedule-title {
        line-height: 1.24;
    }

    .schedule-page .schedule-actions {
        margin-left: auto;
    }
}

/* SCHEDULE QUICK ADD ADVANCED */
.schedule-page .quick-add {
    grid-template-columns: minmax(0, 1fr) minmax(136px, 0.34fr) minmax(120px, 0.22fr) auto;
    align-items: stretch;
}

.schedule-page .quick-add > input[name="title"] {
    grid-column: auto;
}

.schedule-page .schedule-advanced-toggle {
    min-height: 46px;
    justify-content: center;
    gap: 8px;
    white-space: nowrap;
}

.schedule-page .schedule-advanced-toggle__icon {
    width: 16px;
    height: 16px;
    display: inline-block;
    flex: 0 0 auto;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.4;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: transform 0.16s ease;
}

.schedule-page .schedule-advanced-toggle.is-open .schedule-advanced-toggle__icon {
    transform: rotate(180deg);
}

.schedule-page .schedule-advanced-panel {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 14px;
    padding: 10px;
    background: rgba(var(--yc-night-surface-rgb, 255, 255, 255), 0.74);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
}

.schedule-page .quick-add .schedule-advanced-primary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: start;
    gap: 10px;
    width: 100%;
    min-width: 0;
}

.schedule-page .quick-add .schedule-advanced-option {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
    width: 100%;
    min-width: 0;
}

.schedule-page .schedule-advanced-panel[hidden] {
    display: none;
}

.schedule-page .schedule-icon-picker {
    display: contents;
}

.schedule-page .schedule-icon-picker__toggle {
    min-height: 42px;
    justify-content: center;
    gap: 8px;
    white-space: nowrap;
}

.schedule-page .schedule-icon-picker__toggle.is-open .schedule-advanced-toggle__icon {
    transform: rotate(180deg);
}

.schedule-page .schedule-icon-picker__panel {
    grid-column: 1 / -1;
    display: grid;
    gap: 12px;
    padding: 14px;
    border: 1px solid rgba(124, 58, 237, 0.18);
    border-radius: 16px;
    background: rgba(var(--yc-night-surface-rgb, 255, 255, 255), 0.86);
    box-shadow: 0 14px 34px rgba(76, 29, 149, 0.1);
}

.schedule-page .schedule-icon-picker__panel[hidden] {
    display: none;
}

.schedule-page .schedule-icon-picker__title {
    color: var(--yc-night-text, #1f2937);
    font-size: 13px;
    font-weight: 800;
}

.schedule-page .schedule-icon-picker__grid {
    display: grid;
    grid-template-columns: repeat(8, minmax(42px, 1fr));
    gap: 8px;
}

.schedule-page .schedule-icon-picker__option {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    min-height: 42px;
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 12px;
    background: var(--yc-night-surface, #fff);
    color: var(--yc-night-accent, var(--yc-primary));
    cursor: pointer;
    transition: border-color var(--yc-transition), background var(--yc-transition), box-shadow var(--yc-transition), transform var(--yc-transition);
}

.schedule-page .schedule-icon-picker__option:hover,
.schedule-page .schedule-icon-picker__option:focus-visible {
    border-color: rgba(124, 58, 237, 0.46);
    background: rgba(124, 58, 237, 0.06);
    box-shadow: 0 8px 18px rgba(76, 29, 149, 0.1);
    outline: none;
}

.schedule-page .schedule-icon-picker__option.is-selected {
    border-color: var(--yc-primary);
    background: var(--yc-primary-soft);
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.12);
}

.schedule-page .schedule-icon-picker__option svg,
.calendar-modal .schedule-icon-picker__option svg {
    width: 18px;
    height: 18px;
    display: block;
    color: var(--yc-night-accent, var(--yc-primary));
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    opacity: 1;
}

.schedule-page .schedule-icon-picker__clear {
    justify-self: start;
    border: 0;
    background: transparent;
    color: var(--yc-night-muted, #64748b);
    cursor: pointer;
    font-size: 13px;
    font-weight: 700;
    padding: 2px 0;
}

.schedule-page .schedule-icon-picker__clear:hover,
.schedule-page .schedule-icon-picker__clear:focus-visible {
    color: var(--yc-night-accent, var(--yc-primary));
    outline: none;
}

.schedule-page .schedule-contact-fields {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
    width: 100%;
    min-width: 0;
}

.schedule-page .schedule-contact-option {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
    width: 100%;
    min-width: 0;
}

.schedule-page .schedule-contact-toggle {
    width: 100%;
    min-height: 44px;
}

.schedule-page .schedule-contact-field {
    width: 100%;
    min-width: 0;
    margin: 0;
}

.schedule-page .schedule-contact-field .yc-input {
    width: 100%;
    max-width: 100%;
}

.schedule-page .schedule-contact-field[hidden] {
    display: none;
}

.schedule-page .schedule-calendar-event-panel {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: end;
    gap: 12px;
    border: 0;
    padding: 0;
    background: transparent;
}

.schedule-page .schedule-calendar-event-panel[hidden] {
    display: none;
}

.schedule-page .schedule-calendar-event-panel__header {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding-bottom: 2px;
    color: var(--yc-night-text, #1f2937);
}

.schedule-page .schedule-calendar-event-panel__header strong {
    font-size: 13px;
    font-weight: 800;
}

.schedule-page .schedule-calendar-event-panel__header span {
    color: var(--yc-night-muted, #64748b);
    font-size: 11px;
    font-weight: 700;
}

.schedule-page .schedule-calendar-event-panel__description {
    grid-column: 1 / -1;
}

.schedule-page .schedule-calendar-event-panel__toggles {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
    align-items: start;
}

.schedule-page .schedule-calendar-reminder-group {
    display: grid;
    gap: 6px;
    min-width: 0;
}

.schedule-page .schedule-calendar-event-panel .yc-field {
    margin: 0;
    min-width: 0;
}

.schedule-page .schedule-calendar-event-panel [data-calendar-friend-field][hidden] {
    display: none !important;
}

.schedule-page .schedule-calendar-event-panel [data-calendar-reminder-field][hidden] {
    display: none !important;
}

.schedule-page .schedule-calendar-event-panel .yc-label {
    margin-bottom: 4px;
    color: var(--yc-night-muted, #475569);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0;
}

.schedule-page .schedule-calendar-event-panel .yc-input,
.schedule-page .schedule-calendar-event-panel .yc-select,
.schedule-page .schedule-calendar-event-panel .yc-textarea {
    min-height: 38px;
    border-color: rgba(148, 163, 184, 0.24);
    border-radius: 10px;
    padding: 8px 10px;
    background: rgba(var(--yc-night-surface-rgb, 255, 255, 255), 0.96);
    color: var(--yc-night-text, #111827);
    font-size: 13px;
    font-weight: 600;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
}

.schedule-page .schedule-calendar-event-panel .yc-textarea {
    min-height: 110px;
    resize: vertical;
}

.schedule-page .schedule-calendar-event-panel .yc-input:focus,
.schedule-page .schedule-calendar-event-panel .yc-select:focus,
.schedule-page .schedule-calendar-event-panel .yc-textarea:focus {
    border-color: rgba(124, 58, 237, 0.46);
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.12);
}

.schedule-page .schedule-calendar-event-panel .yc-toggle {
    width: 100%;
    min-height: 38px;
    border-color: rgba(148, 163, 184, 0.22);
    border-radius: 10px;
    padding: 8px 10px;
    background: rgba(var(--yc-night-surface-rgb, 255, 255, 255), 0.9);
    color: var(--yc-night-text, #1f2937);
    font-size: 13px;
    font-weight: 800;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
}

.schedule-page .schedule-calendar-event-panel .yc-toggle:hover {
    border-color: rgba(124, 58, 237, 0.32);
    background: rgba(var(--yc-night-surface-rgb, 255, 255, 255), 1);
}

.schedule-page .schedule-calendar-event-panel .yc-select:disabled {
    background: var(--yc-night-soft, #f1f5f9);
    color: #94a3b8;
    cursor: not-allowed;
}

.schedule-page .schedule-task-icon {
    display: inline-flex;
    width: 20px;
    height: 20px;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    color: var(--yc-night-accent, var(--yc-primary));
}

.schedule-page .schedule-task-icon svg {
    width: 18px;
    height: 18px;
    display: block;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.schedule-page .schedule-contact-action {
    color: var(--yc-night-accent, var(--app-accent-dark));
    text-decoration: none;
    transition: background-color .16s ease, box-shadow .16s ease;
}

.schedule-page .schedule-actions-desktop .schedule-contact-action {
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    flex: 0 0 44px;
    margin: 0;
    border-radius: 12px;
}

.schedule-page .schedule-action-menu-panel .schedule-contact-action {
    width: auto;
    height: auto;
    min-width: 0;
    min-height: 40px;
    margin: 0;
    border-radius: 8px;
}

.schedule-page .schedule-contact-action:hover {
    background: rgba(var(--app-accent-rgb), .1);
}

.schedule-page .schedule-contact-action:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(var(--app-accent-rgb), .3);
}

.schedule-page .schedule-calendar-link-icon {
    display: inline-flex;
    width: 22px;
    height: 22px;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(124, 58, 237, 0.22);
    border-radius: 999px;
    color: var(--yc-night-accent, var(--yc-primary-dark));
    background: var(--yc-primary-soft);
}

.schedule-page .schedule-calendar-link-icon svg {
    width: 13px;
    height: 13px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.schedule-page .schedule-edit-form.is-calendar-linked-edit .schedule-calendar-event-panel__title,
.schedule-page .schedule-edit-form.is-calendar-linked-edit .schedule-calendar-event-panel__time {
    display: none;
}

.schedule-page .schedule-edit-form.is-calendar-linked-edit .schedule-calendar-event-panel {
    display: grid;
}

.schedule-page .schedule-calendar-date-display {
    display: block;
}

.schedule-page .schedule-edit-form.is-calendar-linked-edit .schedule-calendar-event-panel__header {
    padding: 0;
}

.schedule-page .schedule-edit-form.is-calendar-linked-edit .schedule-calendar-event-panel__header strong {
    display: none;
}

@media (min-width: 900px) {
    .schedule-page .schedule-calendar-event-panel__description .yc-textarea {
        min-height: 112px;
    }
}

.schedule-page .edit-modal-overlay .modal,
.schedule-page .edit-modal-overlay .yc-modal,
.schedule-page .edit-modal-overlay .schedule-edit-form {
    max-width: 100%;
    overflow-x: hidden;
}

.schedule-page .edit-modal-overlay .schedule-edit-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
}

.schedule-page .edit-modal-overlay .schedule-edit-form > .modal-field,
.schedule-page .edit-modal-overlay .schedule-edit-form > .schedule-icon-picker,
.schedule-page .edit-modal-overlay .schedule-edit-form > .schedule-contact-fields,
.schedule-page .edit-modal-overlay .schedule-edit-form > .modal-actions {
    width: 100%;
    min-width: 0;
    margin: 0;
}

@media (min-width: 900px) {
    .schedule-page .edit-modal-overlay .modal.yc-modal {
        width: min(760px, calc(100vw - 72px));
    }
}

.schedule-page .edit-modal-overlay .schedule-calendar-event-panel {
    width: 100%;
    max-width: 100%;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.schedule-page .edit-modal-overlay .schedule-icon-picker {
    display: grid;
    gap: 10px;
    width: 100%;
}

.schedule-page .edit-modal-overlay .schedule-icon-picker__switch {
    width: 100%;
    min-height: 48px;
}

.schedule-page .edit-modal-overlay .schedule-icon-picker__toggle {
    width: 100%;
    min-height: 38px;
    justify-content: space-between;
    border-color: rgba(148, 163, 184, 0.22);
    border-radius: 10px;
    padding: 8px 10px;
    background: rgba(var(--yc-night-surface-rgb, 255, 255, 255), 0.9);
    color: var(--yc-night-text, #1f2937);
    font-size: 13px;
    font-weight: 800;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
}

.schedule-page .edit-modal-overlay .schedule-icon-picker__toggle:hover,
.schedule-page .edit-modal-overlay .schedule-icon-picker__toggle:focus-visible {
    border-color: rgba(124, 58, 237, 0.32);
    background: var(--yc-night-surface, #fff);
}

@media (max-width: 899px) {
    .schedule-page .edit-modal-overlay .schedule-calendar-event-panel,
    .schedule-page .edit-modal-overlay .schedule-calendar-event-panel__toggles,
    .schedule-page .schedule-calendar-event-panel,
    .schedule-page .schedule-calendar-event-panel__toggles {
        grid-template-columns: minmax(0, 1fr);
    }
}

.schedule-page .schedule-advanced-panel .meeting-toggle,
.schedule-page .schedule-advanced-panel .meeting-time-input {
    grid-column: auto;
    min-height: 42px;
}

@media (max-width: 899px) {
    .schedule-page .quick-add {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    }

    .schedule-page .quick-add > input[name="title"] {
        order: 1;
    }

    .schedule-page .quick-add .priority-picker {
        order: 2;
    }

    .schedule-page .schedule-advanced-toggle {
        order: 3;
    }

    .schedule-page .schedule-advanced-panel {
        order: 4;
    }

    .schedule-page .quick-add > button[type="submit"] {
        order: 5;
    }

    .schedule-page .quick-add > input[name="title"],
    .schedule-page .quick-add > button[type="submit"],
    .schedule-page .schedule-advanced-panel,
    .schedule-page .schedule-form-error {
        grid-column: 1 / -1;
    }

    .schedule-page .quick-add .priority-picker {
        grid-column: 1 / 2;
    }

    .schedule-page .schedule-advanced-toggle {
        grid-column: 2 / 3;
        min-height: 40px;
    }

    .schedule-page .schedule-advanced-panel {
        grid-template-columns: minmax(0, 1fr);
        gap: 8px;
        padding: 9px;
    }

    .schedule-page .quick-add .schedule-advanced-primary {
        grid-template-columns: minmax(0, 1fr);
        gap: 8px;
    }

    .schedule-page .schedule-calendar-event-panel {
        grid-template-columns: minmax(0, 1fr);
        gap: 8px;
        padding: 9px;
    }

    .schedule-page .schedule-icon-picker__toggle {
        min-height: 40px;
        width: 100%;
    }

    .schedule-page .schedule-icon-picker__panel {
        gap: 10px;
        padding: 12px;
        border-radius: 14px;
    }

    .schedule-page .schedule-icon-picker__grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 7px;
    }

    .schedule-page .schedule-icon-picker__option {
        min-height: 40px;
        border-radius: 11px;
    }

    .schedule-page .schedule-calendar-event-panel__header {
        align-items: flex-start;
        flex-direction: column;
        gap: 2px;
    }

    .schedule-page .schedule-calendar-event-panel__title,
    .schedule-page .schedule-calendar-event-panel__description,
    .schedule-page .schedule-calendar-event-panel__toggles {
        grid-column: auto;
    }

    .schedule-page .schedule-calendar-event-panel__toggles {
        grid-template-columns: minmax(0, 1fr);
    }

    .schedule-page .schedule-calendar-event-panel .yc-input,
    .schedule-page .schedule-calendar-event-panel .yc-select,
    .schedule-page .schedule-calendar-event-panel .yc-textarea,
    .schedule-page .schedule-calendar-event-panel .yc-toggle {
        font-size: 12px;
        min-height: 36px;
    }

    .schedule-page .schedule-calendar-event-panel__description .yc-textarea {
        min-height: 110px;
    }

    .schedule-page .schedule-advanced-panel .meeting-toggle,
    .schedule-page .schedule-advanced-panel .meeting-time-input {
        grid-column: auto;
        min-height: 38px;
    }
}

/* SCHEDULE 30-DAY SWITCHER AND MOBILE DRAG HANDLE */
.schedule-page .day-switcher {
    display: flex;
    flex-wrap: nowrap;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin-inline: 0;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-inline: contain;
    scroll-behavior: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}

.schedule-page .day-tab {
    flex: 0 0 auto;
}

.schedule-page .day-switcher.is-positioning {
    visibility: hidden;
}

.schedule-page .schedule-mobile-drag-handle {
    display: none;
}

@media (max-width: 899px) {
    :root {
        --yc-mobile-topbar-height: 64px;
    }

    .schedule-page .schedule-sortable .schedule-row,
    .schedule-page .schedule-row.is-completed {
        touch-action: pan-y;
    }

    .schedule-page .schedule-actions {
        display: flex !important;
        align-items: center !important;
        gap: 6px;
    }

    .schedule-page .schedule-mobile-drag-handle {
        display: flex;
        cursor: grab;
        touch-action: none;
    }

    .schedule-page .schedule-mobile-drag-handle:active {
        cursor: grabbing;
    }

    .schedule-page .schedule-mobile-drag-handle svg {
        width: 16px;
        height: 16px;
    }
}

@media (min-width: 900px) {
    .schedule-page .schedule-mobile-drag-handle {
        display: none !important;
    }

    .schedule-page .day-switcher {
        padding-bottom: 14px;
        scrollbar-width: auto;
        scrollbar-color: rgba(124, 58, 237, 0.55) rgba(124, 58, 237, 0.1);
    }

    .schedule-page .day-switcher::-webkit-scrollbar {
        height: 12px;
    }

    .schedule-page .day-switcher::-webkit-scrollbar-track {
        border-radius: 999px;
        background: rgba(124, 58, 237, 0.1);
    }

    .schedule-page .day-switcher::-webkit-scrollbar-thumb {
        border: 3px solid rgba(255, 255, 255, 0.95);
        border-radius: 999px;
        background: linear-gradient(135deg, rgba(91, 33, 182, 0.72), rgba(124, 58, 237, 0.84));
    }

    .schedule-page .day-switcher::-webkit-scrollbar-thumb:hover {
        background: var(--yc-primary-gradient);
    }
}

@media (max-width: 899px) {
    .schedule-page .quick-add .priority-picker-trigger,
    .schedule-page .schedule-advanced-toggle,
    .schedule-page .quick-add .priority-picker-trigger [data-priority-current],
    .schedule-page .schedule-advanced-toggle span {
        font-size: 13px;
    }

    .schedule-page .schedule-mobile-drag-handle {
        order: 1;
    }

    .schedule-page .schedule-action-menu {
        order: 2;
    }

    .schedule-page .schedule-action-menu-panel {
        width: max-content;
        min-width: 0;
        max-width: none;
        grid-template-columns: repeat(3, 30px);
        gap: 8px;
        padding: 8px;
    }

    .schedule-page .schedule-action-menu-panel .app-icon-btn {
        width: 30px;
        min-width: 30px;
        height: 30px;
        min-height: 30px;
    }
}

@media (max-width: 899px) {
    .schedule-page .schedule-actions .app-icon-btn,
    .schedule-page .schedule-more-trigger,
    .schedule-page .schedule-mobile-drag-handle {
        display: flex;
        align-items: center;
        justify-content: center;
        min-width: 30px;
        height: 30px;
        min-height: 30px;
        width: 30px;
    }

    .schedule-page .schedule-actions .app-icon-btn svg,
    .schedule-page .schedule-more-trigger svg,
    .schedule-page .schedule-mobile-drag-handle svg {
        width: 16px;
        height: 16px;
        flex: 0 0 16px;
    }
}

@media (max-width: 600px) {
    .schedule-page .quick-add .priority-picker-trigger,
    .schedule-page .schedule-advanced-toggle,
    .schedule-page .quick-add .priority-picker-trigger [data-priority-current],
    .schedule-page .schedule-advanced-toggle span {
        font-size: 12.5px;
    }
}

/* CALENDAR MODULE */
.calendar-page {
    display: grid;
    gap: 18px;
    padding: 22px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: var(--yc-radius-xl);
    background: var(--yc-night-surface, #fff);
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.08);
}

.calendar-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-width: 0;
}

.calendar-hero__title,
.calendar-hero__actions,
.calendar-toolbar__nav,
.calendar-toolbar__tools {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.calendar-hero__icon {
    display: inline-flex;
    width: 52px;
    height: 52px;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: #fff;
    background: var(--yc-primary-gradient);
    box-shadow: 0 16px 34px rgba(124, 58, 237, 0.24);
}

.calendar-hero__icon svg,
.calendar-hero__actions svg,
.calendar-toolbar svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.calendar-hero__icon svg {
    width: 24px;
    height: 24px;
}

.calendar-hero h1 {
    margin: 0;
    color: var(--yc-text);
    font-size: 30px;
    line-height: 1.08;
}

.page-title-with-icon {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.page-title-with-icon svg {
    width: 0.9em;
    height: 0.9em;
    flex: 0 0 auto;
    fill: none;
    color: var(--yc-night-accent, var(--yc-primary));
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.calendar-hero p,
.calendar-error {
    margin: 6px 0 0;
    color: var(--yc-muted);
}


.yc-alert,
.calendar-success {
    margin: 6px 0 7px;
    padding: 12px 14px;
    border-radius: var(--yc-radius-md);
    border: 1px solid rgba(148, 163, 184, 0.24);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
    font-size: 14px;
    font-weight: 800;
    transition: opacity 0.22s ease, transform 0.22s ease;
}

.yc-page-header + .yc-alert {
    margin-top: -10px;
    margin-bottom: -6px;
}


.yc-alert--success,
.calendar-success {
    color: var(--yc-night-green, #166534);
    border-color: rgba(22, 163, 74, 0.24);
    background: rgba(var(--yc-night-green-bg-rgb, 240, 253, 244), 0.96);
}

.yc-alert--danger {
    color: var(--yc-night-error, #b91c1c);
    border-color: rgba(239, 68, 68, 0.24);
    background: rgba(var(--yc-night-error-bg-rgb, 254, 242, 242), 0.96);
}

.yc-alert.is-hiding,
.calendar-error.is-hiding,
.calendar-success.is-hiding {
    opacity: 0;
    transform: translateY(-6px);
}
.calendar-error {
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: var(--yc-radius-md);
    padding: 10px 12px;
    color: var(--yc-night-error, #b91c1c);
    background: rgba(239, 68, 68, 0.08);
}


.yc-toast-stack {
    position: fixed;
    top: calc(env(safe-area-inset-top, 0px) + 18px);
    right: 18px;
    z-index: var(--yc-z-toast, 4990);
    display: grid;
    width: min(420px, calc(100vw - 36px));
    max-width: calc(100vw - 36px);
    gap: 10px;
    pointer-events: none;
}

.yc-toast-announcement {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

.yc-toast {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: start;
    gap: 10px;
    padding: 13px 12px 13px 14px;
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: var(--yc-radius-lg);
    background: rgba(var(--yc-night-surface-rgb, 255, 255, 255), 0.97);
    box-shadow: 0 18px 46px rgba(15, 23, 42, 0.16);
    color: var(--yc-text);
    font-size: 14px;
    font-weight: 800;
    line-height: 1.35;
    overflow: hidden;
    pointer-events: none;
    transform: translateY(0);
    transition: opacity 0.14s ease, transform 0.14s ease;
    animation: yc-toast-in 0.18s ease-out;
}

.yc-toast.is-hiding {
    opacity: 0;
    transform: translateY(-4px);
}

.yc-toast__icon {
    display: inline-flex;
    width: 22px;
    height: 22px;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: #fff;
    font-size: 13px;
    line-height: 1;
    flex: 0 0 auto;
}

.yc-toast__body {
    min-width: 0;
    overflow-wrap: anywhere;
}

.yc-toast__close {
    display: inline-flex;
    width: 28px;
    height: 28px;
    align-items: center;
    justify-content: center;
    margin: -4px -3px -4px 0;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: inherit;
    cursor: pointer;
    pointer-events: auto;
    opacity: 0.72;
    transition: background var(--yc-transition), opacity var(--yc-transition);
}

.yc-toast.is-hiding .yc-toast__close {
    pointer-events: none;
}

.yc-toast__close:hover,
.yc-toast__close:focus-visible {
    background: rgba(15, 23, 42, 0.08);
    opacity: 1;
}

.yc-toast__close:focus-visible {
    outline: 2px solid var(--yc-night-accent, var(--app-accent));
}

.yc-toast__close svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.yc-toast--success {
    border-color: rgba(var(--yc-success-rgb), 0.28);
    background: rgba(var(--yc-night-green-bg-rgb, 240, 253, 244), 0.98);
    color: var(--yc-night-green, #14532d);
}

.yc-toast--success .yc-toast__icon {
    background: var(--yc-success);
}

.yc-toast--error {
    border-color: rgba(220, 38, 38, 0.28);
    background: rgba(var(--yc-night-error-bg-rgb, 254, 242, 242), 0.98);
    color: var(--yc-night-error, #991b1b);
}

.yc-toast--error .yc-toast__icon {
    background: var(--yc-danger);
}

.yc-toast--warning {
    border-color: rgba(245, 158, 11, 0.34);
    background: rgba(var(--yc-night-warning-bg-rgb, 255, 251, 235), 0.98);
    color: var(--yc-night-warning, #92400e);
}

.yc-toast--warning .yc-toast__icon {
    background: var(--yc-warning);
}

.yc-toast--info {
    border-color: rgba(var(--app-accent-rgb), 0.24);
    background: rgba(var(--yc-night-surface-rgb, 255, 255, 255), 0.98);
    color: var(--yc-text);
}

.yc-toast--info .yc-toast__icon {
    background: var(--app-accent);
}

.yc-toast-source-hidden {
    display: none !important;
}

@keyframes yc-toast-in {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 640px) {
    .yc-toast-stack {
        top: auto;
        bottom: calc(env(safe-area-inset-bottom, 0px) + 16px);
        right: 12px;
        left: 12px;
        width: auto;
        max-width: none;
    }

    .yc-toast {
        border-radius: 14px;
        padding: 12px;
    }

    body:has(.system-help-button:not([hidden]):not(.is-keyboard-hidden)) .yc-toast-stack {
        bottom: calc(env(safe-area-inset-bottom, 0px) + 80px);
    }
}

@media (prefers-reduced-motion: reduce) {
    .yc-toast {
        animation: none;
        transition: opacity 0.01ms linear;
    }
}
.calendar-shell {
    display: grid;
    gap: 14px;
    min-width: 0;
}

.calendar-event {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    border: 1px solid rgba(124, 58, 237, 0.16);
    border-radius: 10px;
    padding: 8px 9px;
    color: var(--yc-night-accent, var(--yc-primary-dark));
    font-size: 12px;
    font-weight: 700;
    line-height: 1.25;
    background: var(--yc-primary-soft);
}

.calendar-event span {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.calendar-event strong {
    display: -webkit-box;
    overflow: hidden;
    font-size: 12px;
    font-weight: 900;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}


.calendar-event .calendar-event-title-row {
    display: inline-flex;
    width: fit-content;
    max-width: 100%;
    min-width: 0;
    align-items: center;
    justify-content: flex-start;
    justify-self: start;
    gap: 6px;
}

.calendar-event .calendar-event-title-row strong {
    flex: 0 1 auto;
    min-width: 0;
    max-width: calc(100% - 24px);
}

.calendar-grid .calendar-event {
    width: 100%;
    max-width: 100%;
}

.calendar-grid .calendar-event > span {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    flex: 1 1 auto;
}

.calendar-grid .calendar-event .calendar-event-title-row {
    width: 100%;
    max-width: 100%;
}

.calendar-grid .calendar-event .calendar-event-title-row strong {
    flex: 1 1 auto;
    max-width: 100%;
}

.calendar-event .calendar-event-title-row .shared-indicator {
    display: inline-flex;
    flex: 0 0 auto;
    z-index: 20;
}

.calendar-event .calendar-event-title-row .shared-indicator__button {
    display: inline-flex;
    width: 18px;
    height: 18px;
    min-width: 18px;
    border-color: rgba(124, 58, 237, 0.18);
    color: var(--yc-night-accent, #6d28d9);
    background: var(--yc-night-surface, #fff);
    box-shadow: 0 4px 10px rgba(124, 58, 237, 0.12);
}

.calendar-event .calendar-event-title-row .shared-indicator__button svg {
    width: 11px;
    height: 11px;
}

.calendar-event:has(.shared-indicator.is-open),
.calendar-event:hover {
    position: relative;
    z-index: 90;
    overflow: visible;
}

.calendar-event .calendar-event-title-row .shared-indicator__popover {
    display: block;
    z-index: 7200;
}
.calendar-event small {
    overflow: hidden;
    color: currentColor;
    font-size: 11px;
    font-weight: 700;
    opacity: 0.78;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.calendar-event-type-icon {
    width: 16px;
    height: 16px;
    flex: 0 0 auto;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.calendar-event-type-native {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
}

.calendar-event-type-picker {
    position: relative;
    min-width: 0;
}

.calendar-event-type-trigger {
    display: flex;
    width: 100%;
    min-height: 42px;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--yc-border);
    border-radius: var(--yc-radius-md);
    padding: 9px 12px;
    color: var(--yc-text);
    font: inherit;
    font-weight: 700;
    text-align: left;
    background: var(--yc-night-surface, #fff);
    cursor: pointer;
    transition: var(--yc-transition);
}

.calendar-event-type-trigger:hover,
.calendar-event-type-picker.is-open .calendar-event-type-trigger {
    border-color: rgba(124, 58, 237, 0.36);
    box-shadow: var(--yc-focus-ring);
}

.calendar-event-type-picker[data-event-type="meeting"] .calendar-event-type-trigger,
.calendar-event-type-trigger[data-event-type="meeting"],
.calendar-event-type-option[data-value="meeting"] {
    color: var(--yc-night-warning, #b45309);
}

.calendar-event-type-picker[data-event-type="birthday"] .calendar-event-type-trigger,
.calendar-event-type-trigger[data-event-type="birthday"],
.calendar-event-type-option[data-value="birthday"] {
    color: var(--yc-night-error, #be185d);
}

.calendar-event-type-picker[data-event-type="reminder"] .calendar-event-type-trigger,
.calendar-event-type-trigger[data-event-type="reminder"],
.calendar-event-type-option[data-value="reminder"] {
    color: var(--yc-night-blue, #2563eb);
}

.calendar-event-type-picker[data-event-type="personal"] .calendar-event-type-trigger,
.calendar-event-type-trigger[data-event-type="personal"],
.calendar-event-type-option[data-value="personal"] {
    color: var(--yc-night-green, #047857);
}

.calendar-event-type-picker[data-event-type="other"] .calendar-event-type-trigger,
.calendar-event-type-trigger[data-event-type="other"],
.calendar-event-type-option[data-value="other"] {
    color: var(--yc-night-accent, #6d28d9);
}

.calendar-event-type-trigger .calendar-event-type-icon,
.calendar-event-type-option .calendar-event-type-icon {
    border-radius: 999px;
    padding: 4px;
    background: currentColor;
    stroke: #fff;
}

.calendar-event-type-menu {
    position: absolute;
    right: 0;
    left: 0;
    z-index: var(--yc-z-dropdown);
    display: none;
    gap: 4px;
    margin-top: 6px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: var(--yc-radius-md);
    padding: 6px;
    background: var(--yc-night-surface, #fff);
    box-shadow: var(--yc-shadow-md);
}

.calendar-event-type-picker.is-open .calendar-event-type-menu {
    display: grid;
}

.calendar-event-type-option {
    display: flex;
    align-items: center;
    gap: 8px;
    border: 0;
    border-radius: 9px;
    padding: 8px 10px;
    color: var(--yc-text);
    font: inherit;
    font-weight: 700;
    text-align: left;
    background: transparent;
    cursor: pointer;
}

.calendar-event-type-option:hover,
.calendar-event-type-option.is-selected {
    background: var(--yc-primary-soft);
}

.calendar-event-type-option[data-value="meeting"]:hover,
.calendar-event-type-option[data-value="meeting"].is-selected {
    background: rgba(245, 158, 11, 0.13);
}

.calendar-event-type-option[data-value="birthday"]:hover,
.calendar-event-type-option[data-value="birthday"].is-selected {
    background: rgba(236, 72, 153, 0.12);
}

.calendar-event-type-option[data-value="reminder"]:hover,
.calendar-event-type-option[data-value="reminder"].is-selected {
    background: rgba(59, 130, 246, 0.12);
}

.calendar-event-type-option[data-value="personal"]:hover,
.calendar-event-type-option[data-value="personal"].is-selected {
    background: rgba(16, 185, 129, 0.12);
}

.calendar-event-type-option[data-value="other"]:hover,
.calendar-event-type-option[data-value="other"].is-selected {
    background: rgba(124, 58, 237, 0.12);
}

.calendar-day-view {
    display: grid;
    gap: 14px;
    margin: 0 14px;
    padding: 16px;
    border-radius: var(--yc-radius-lg);
}

.calendar-day-view__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.calendar-day-view__header strong {
    color: var(--yc-text);
    font-size: 18px;
    font-weight: 800;
}

.calendar-day-view__empty {
    margin: 0;
    border: 1px dashed rgba(124, 58, 237, 0.24);
    border-radius: var(--yc-radius-md);
    padding: 18px;
    color: var(--yc-muted);
    text-align: center;
    background: rgba(124, 58, 237, 0.04);
}

.calendar-day-view__events {
    display: grid;
    gap: 8px;
}

.calendar-week-view {
    display: grid;
    grid-template-columns: repeat(7, minmax(132px, 1fr));
    gap: 0;
    overflow-x: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(124, 58, 237, 0.48) rgba(124, 58, 237, 0.08);
}

.calendar-week-day {
    display: grid;
    align-content: start;
    gap: 10px;
    min-height: 320px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-right: 0;
    padding: 12px;
    background: var(--yc-night-surface, #fff);
    cursor: pointer;
}

.calendar-week-day:last-child {
    border-right: 1px solid rgba(148, 163, 184, 0.18);
}

.calendar-week-day:nth-child(6),
.calendar-week-day:nth-child(7) {
    background: rgba(var(--yc-night-soft-rgb, 248, 250, 252), 0.72);
}

.calendar-week-day.is-today {
    background: linear-gradient(180deg, rgba(var(--app-accent-rgb), 0.06), var(--yc-night-surface, #fff));
}
.calendar-week-day.is-selected:not(.is-today) {
    border-color: rgba(var(--app-accent-rgb, 124, 58, 237), 0.52);
    background: rgba(var(--app-accent-rgb, 124, 58, 237), 0.08);
    box-shadow: inset 0 0 0 2px rgba(var(--app-accent-rgb, 124, 58, 237), 0.3);
}

.calendar-week-day__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    color: var(--yc-muted);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.calendar-week-day__header strong {
    display: inline-flex;
    width: 30px;
    height: 30px;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: var(--yc-text);
    font-size: 13px;
}

.calendar-week-day.is-today .calendar-week-day__header strong {
    color: #fff;
    background: var(--yc-primary-gradient);
}

.calendar-week-day__events {
    display: grid;
    gap: 8px;
}

.calendar-day-view .calendar-event {
    appearance: none;
    width: 100%;
    border: 1px solid rgba(124, 58, 237, 0.18);
    font: inherit;
    text-align: left;
    cursor: pointer;
    transition: var(--yc-transition);
}

.calendar-day-view .calendar-event:hover {
    border-color: rgba(124, 58, 237, 0.34);
    box-shadow: 0 10px 24px rgba(124, 58, 237, 0.12);
}

.calendar-event--birthday {
    color: var(--yc-night-error, #be185d);
    border-color: rgba(236, 72, 153, 0.18);
    background: rgba(236, 72, 153, 0.1);
}

.calendar-event--reminder {
    color: var(--yc-night-blue, #2563eb);
    border-color: rgba(59, 130, 246, 0.2);
    background: rgba(59, 130, 246, 0.1);
}

.calendar-event--personal {
    color: var(--yc-night-green, #047857);
    border-color: rgba(16, 185, 129, 0.18);
    background: rgba(16, 185, 129, 0.1);
}

.calendar-event--meeting {
    color: var(--yc-night-warning, #b45309);
    border-color: rgba(245, 158, 11, 0.22);
    background: rgba(245, 158, 11, 0.12);
}

.calendar-event--other {
    color: var(--yc-night-accent, #6d28d9);
    border-color: rgba(124, 58, 237, 0.2);
    background: rgba(124, 58, 237, 0.1);
}

.calendar-confirm-backdrop {
    display: grid;
    align-items: center;
    justify-items: center;
    z-index: 5020;
    padding: 20px;
}

.calendar-confirm-backdrop[hidden] {
    display: none;
}

.calendar-confirm-modal {
    z-index: 5030;
    width: min(420px, 100%);
}

.calendar-confirm-modal .yc-modal__title {
    font-size: 20px;
}

.calendar-modal {
    width: min(760px, 100%);
    max-height: calc(100vh - 40px);
    overflow: auto;
}

.calendar-modal [hidden] {
    display: none !important;
}

.calendar-modal .yc-modal__header {
    align-items: center;
}

.calendar-modal-close {
    margin-left: auto;
}

.calendar-form {
    display: grid;
    gap: 12px;
}

.calendar-modal .yc-field {
    margin: 0;
    min-width: 0;
}

.calendar-modal .yc-label {
    margin-bottom: 4px;
    color: var(--yc-night-muted, #475569);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0;
}

.calendar-modal .yc-input,
.calendar-modal .yc-select,
.calendar-modal .yc-textarea {
    min-height: 38px;
    border-color: rgba(148, 163, 184, 0.24);
    border-radius: 10px;
    padding: 8px 10px;
    color: var(--yc-night-text, #111827);
    font-size: 13px;
    font-weight: 600;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
}

.calendar-modal .yc-textarea {
    min-height: 96px;
    max-width: 100%;
    resize: vertical;
}

.calendar-modal .yc-input:focus,
.calendar-modal .yc-select:focus,
.calendar-modal .yc-textarea:focus {
    border-color: rgba(124, 58, 237, 0.46);
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.12);
}

.calendar-options {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
    align-items: start;
}

.calendar-reminder-group {
    display: grid;
    gap: 6px;
    min-width: 0;
}

.calendar-toggle {
    width: 100%;
    min-height: 38px;
    justify-content: flex-start;
    border-color: rgba(148, 163, 184, 0.22);
    border-radius: 10px;
    padding: 8px 10px;
    background: rgba(var(--yc-night-surface-rgb, 255, 255, 255), 0.9);
    color: var(--yc-night-text, #1f2937);
    font-size: 13px;
    font-weight: 800;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
}

.calendar-toggle:hover {
    border-color: rgba(124, 58, 237, 0.32);
    background: var(--yc-night-surface, #fff);
}

.calendar-toggle input[type="checkbox"] {
    position: relative;
    width: 34px !important;
    min-width: 34px !important;
    max-width: 34px !important;
    height: 20px !important;
    min-height: 20px !important;
    flex-basis: 34px;
    appearance: none;
    border: 1px solid var(--yc-switch-border, rgba(148, 163, 184, 0.44));
    border-radius: 999px;
    background: var(--yc-switch-track, #e2e8f0);
    cursor: pointer;
    transition: background 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.calendar-toggle input[type="checkbox"]::after {
    content: "";
    position: absolute;
    top: 2px;
    left: 2px;
    width: 14px;
    height: 14px;
    border-radius: 999px;
    background: var(--yc-switch-thumb, #fff);
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.22);
    transition: transform 0.16s ease;
}

.calendar-toggle input[type="checkbox"]:checked {
    border-color: var(--yc-switch-active-border, rgba(124, 58, 237, 0.6));
    background: var(--yc-switch-active, var(--yc-primary-gradient));
}

.calendar-toggle input[type="checkbox"]:checked::after {
    transform: translateX(14px);
}

.calendar-toggle span {
    color: var(--yc-night-muted, #334155);
    font-weight: 800;
}

.calendar-subpanel {
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: var(--yc-radius-lg);
    padding: 12px;
    background: rgba(var(--yc-night-soft-rgb, 248, 250, 252), 0.82);
}

.calendar-linked-schedule-field {
    grid-column: 1 / -1;
    min-width: 0;
}

.calendar-reminder-panel {
    padding: 8px;
}

.calendar-modal .schedule-icon-picker {
    display: grid;
    gap: 8px;
}

.calendar-modal .schedule-icon-picker__toggle {
    align-items: center;
    background: var(--yc-night-surface, #fff);
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: var(--yc-radius-md);
    color: var(--yc-night-muted, #334155);
    display: flex;
    justify-content: space-between;
    min-height: 38px;
    padding: 8px 12px;
    width: 100%;
}

.calendar-modal .schedule-icon-picker__panel {
    background: var(--yc-night-surface, #fff);
    border: 1px solid rgba(var(--app-accent-rgb), 0.2);
    border-radius: var(--yc-radius-md);
    display: grid;
    gap: 10px;
    padding: 10px;
}

.calendar-modal .schedule-icon-picker__panel[hidden] {
    display: none;
}

.calendar-modal .schedule-icon-picker__grid {
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(8, minmax(44px, 1fr));
    width: 100%;
}

.calendar-modal .schedule-icon-picker__option {
    align-items: center;
    background: var(--yc-night-surface, #fff);
    border: 1px solid rgba(148, 163, 184, 0.26);
    border-radius: var(--yc-radius-md);
    color: var(--yc-night-accent, var(--app-accent));
    display: inline-flex;
    height: 44px;
    justify-content: center;
    padding: 0;
    width: 100%;
    transition:
        background-color 0.16s ease,
        border-color 0.16s ease,
        box-shadow 0.16s ease,
        color 0.16s ease;
}

.calendar-modal .schedule-icon-picker__option:hover {
    background: var(--app-accent-soft);
    border-color: rgba(var(--app-accent-rgb), 0.45);
}

.calendar-modal .schedule-icon-picker__option:focus-visible,
.calendar-modal .schedule-icon-picker__clear:focus-visible {
    outline: 3px solid rgba(var(--app-accent-rgb), 0.24);
    outline-offset: 2px;
}

.calendar-modal .schedule-icon-picker__option.is-selected {
    background: var(--app-accent-soft);
    border-color: var(--app-accent);
    box-shadow: inset 0 0 0 1px var(--app-accent);
    color: var(--yc-night-accent, var(--app-accent-dark));
}

.calendar-modal .schedule-icon-picker__clear {
    justify-self: start;
}

.calendar-modal .schedule-icon-picker__clear.is-selected {
    background: var(--app-accent-soft);
    border-color: var(--app-accent);
    color: var(--yc-night-accent, var(--app-accent-dark));
}

.schedule-page .schedule-icon-picker__clear.is-selected {
    border-radius: 8px;
    padding: 4px 7px;
    color: var(--yc-night-accent, var(--app-accent-dark));
    background: var(--app-accent-soft);
}

@media (max-width: 899px) {
    .calendar-modal .schedule-icon-picker__grid {
        grid-template-columns: repeat(4, minmax(44px, 1fr));
    }
}
.calendar-modal-actions {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

body.is-calendar-modal-open {
    overflow: hidden;
}

/* Shared layout controls */


.settings-user-name,
.settings-user-card-avatar {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.settings-user-admin-form {
    display: grid;
    gap: 14px;
}

.settings-user-admin-form__actions {
    justify-content: flex-end;
}

.finance-form-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.finance-form {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    padding: 14px;
}

.finance-form-actions {
    grid-column: 1 / -1;
    justify-content: flex-end;
}

.finance-form-actions > .yc-btn,
.finance-form-actions > form > .yc-btn {
    align-items: center;
    display: inline-flex;
    min-height: 48px;
}

.finance-form h2 {
    grid-column: 1 / -1;
}

.finance-form [hidden] {
    display: none !important;
}







.finance-amount-input:not(:placeholder-shown),
.finance-amount-input:valid {
    font-weight: 700;
}

.finance-summary-card {
    display: grid;
    gap: 6px;
    padding: 14px;
}

.finance-summary-card span {
    color: var(--yc-muted);
    font-size: 12px;
    font-weight: 800;
}

.finance-summary-card strong {
    color: var(--yc-text);
    font-size: 22px;
}

.finance-amount--income {
    color: var(--yc-night-green, #16a34a);
}

.finance-amount--expense {
    color: var(--yc-night-error, #dc2626);
}

.finance-chart-legend {
    display: flex;
    justify-content: center;
    gap: 14px;
    color: var(--yc-muted);
    font-size: 12px;
    font-weight: 800;
}

.finance-chart-legend span::before {
    content: "";
    display: inline-block;
    width: 9px;
    height: 9px;
    margin-right: 6px;
    border-radius: 999px;
}

.finance-chart-legend .income::before {
    background: #16a34a;
}

.finance-chart-legend .expense::before {
    background: #dc2626;
}

.finance-table td {
    vertical-align: middle;
}

.finance-table {
    table-layout: fixed;
    min-width: 840px;
}

.finance-table__amount {
    width: 128px;
}

.finance-table__actions {
    width: 196px;
}

.finance-table th:nth-child(1),
.finance-table td:nth-child(1) {
    width: 118px;
}

.finance-table th:nth-child(3),
.finance-table td:nth-child(3) {
    width: 48px;
}

.finance-table th:nth-child(4),
.finance-table td:nth-child(4) {
    width: 128px;
    text-align: right;
    white-space: nowrap;
}

.finance-table th:nth-child(5),
.finance-table td:nth-child(5) {
    width: 196px;
    text-align: right;
    white-space: nowrap;
}

.finance-empty {
    margin: 0;
    color: var(--yc-muted);
    font-weight: 700;
}

.finance-statistics-history {
    display: grid;
    gap: 18px;
    margin-bottom: 16px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 14px;
    padding: 24px 26px 20px;
    background: var(--yc-night-surface, #fff);
    box-shadow: 0 12px 34px rgba(15, 23, 42, 0.06);
    overflow: hidden;
}

.finance-statistics-history .finance-card-header {
    align-items: flex-start;
    gap: 18px;
    border-bottom: 0;
    padding-bottom: 0;
}

.finance-stat-card-heading {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.finance-stat-card-heading h2 {
    margin: 0;
    color: var(--yc-night-text, #0f172a);
    font-size: 20px;
    font-weight: 950;
    line-height: 1.15;
}

.finance-statistics-history .finance-stat-card-heading h2 {
    margin: 0;
    color: var(--yc-night-text, #0f172a);
    font-size: 20px;
    font-weight: 950;
    line-height: 1.15;
}

.finance-stat-card-heading p {
    margin: 4px 0 0;
    color: var(--yc-muted);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.35;
}

.finance-stat-card-icon {
    display: inline-grid;
    flex: 0 0 auto;
    width: 44px;
    height: 44px;
    place-items: center;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.14), rgba(124, 58, 237, 0.04));
    color: var(--yc-night-accent, var(--yc-primary));
}

.finance-stat-card-icon svg {
    width: 24px;
    height: 24px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
}

.finance-statistics-badges {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
}

.finance-period-badge {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    border: 0;
    border-radius: 999px;
    padding: 7px 11px;
    background: rgba(var(--yc-night-soft-rgb, 248, 250, 252), 0.86);
    color: var(--yc-night-muted, #334155);
    font-size: 12px;
    font-weight: 850;
    white-space: nowrap;
}

@keyframes financePurposeGrow {
    from {
        transform: scaleX(0);
    }

    to {
        transform: scaleX(1);
    }
}

.finance-history-chart {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(52px, 1fr));
    align-items: end;
    gap: 14px;
    min-height: 300px;
    padding: 8px 4px 14px;
    border-bottom: 1px solid rgba(226, 232, 240, 0.92);
    background: repeating-linear-gradient(to bottom, transparent 0 54px, rgba(148, 163, 184, 0.18) 55px 56px);
    overflow-x: auto;
    scrollbar-width: thin;
}

.finance-history-chart__month {
    display: grid;
    align-items: end;
    gap: 8px;
    min-width: 0;
}

.finance-history-chart__bars {
    display: flex;
    align-items: end;
    justify-content: center;
    gap: 7px;
    height: 240px;
    min-height: 240px;
    border-radius: 12px;
    padding: 10px 6px 0;
    background: transparent;
}

.finance-history-chart__bars span {
    display: block;
    width: 16px;
    min-height: 0;
    border-radius: 999px 999px 0 0;
    transition: filter 0.16s ease, transform 0.16s ease;
}

.finance-history-chart__bars:hover span {
    filter: saturate(1.12);
    transform: translateY(-3px);
}

.finance-history-chart__bars .is-income {
    background: linear-gradient(180deg, #22c55e 0%, #16a34a 100%);
}

.finance-history-chart__bars .is-expense {
    background: linear-gradient(180deg, #ef4444 0%, #dc2626 100%);
}

.finance-history-chart__month small {
    color: var(--yc-muted);
    font-size: 12px;
    font-weight: 850;
    text-align: center;
}

.finance-statistics-history .finance-chart-legend {
    justify-content: center;
    gap: 10px;
    border-bottom: 0;
    padding: 0;
}

.finance-statistics-history .finance-chart-legend span {
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 999px;
    padding: 7px 11px;
    background: var(--yc-night-surface, #fff);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
}

@media (max-width: 700px) {
    .finance-history-chart {
        grid-template-columns: none;
        grid-auto-flow: column;
        grid-auto-columns: 64px;
        justify-content: start;
        min-height: 265px;
        gap: 12px;
        overflow-x: auto;
        overflow-y: hidden;
        padding-bottom: 18px;
        -webkit-overflow-scrolling: touch;
    }

    .finance-history-chart__bars {
        height: 205px;
        min-height: 205px;
        gap: 8px;
    }

    .finance-history-chart__bars span {
        width: 18px;
    }

    .finance-statistics-history {
        padding: 18px;
    }

    .finance-statistics-history .finance-card-header {
        gap: 12px;
    }

    .finance-statistics-badges {
        justify-content: flex-start;
    }

    .finance-history-chart {
        grid-template-columns: none;
        grid-auto-flow: column;
        grid-auto-columns: 64px;
        justify-content: start;
        min-height: 265px;
    }

    .finance-history-chart__bars {
        height: 205px;
        min-height: 205px;
    }
}

.finance-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
}

.finance-card-header {
    justify-content: space-between;
    margin-bottom: 12px;
}

.finance-card-header h2 {
    margin: 0;
}

[data-finance-sortable-row] {
    cursor: grab;
}

[data-finance-sortable-row]:has(a:hover, button:hover, input:hover, select:hover, textarea:hover, details:hover) {
    cursor: auto;
}

@media (max-width: 1100px) {
    .finance-form {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 1200px) {

    .work-filters,
    .work-filters--clients {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .work-filters--projects {
        grid-template-columns: minmax(280px, 320px);
    }

    .work-dashboard-pins-row {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 760px) {
    .work-page {
        gap: 12px;
    }

    .work-hero {
        align-items: center;
    }

    .work-hero__actions .yc-btn {
        min-height: 40px;
        padding-inline: 12px;
        font-size: 13px;
    }

    .work-tabs {
        padding: 10px 12px;
    }

    .work-filters,
    .work-filters--clients,
    .work-filters--projects {
        grid-template-columns: minmax(0, 1fr);
    }

    .work-table-wrap {
        display: none;
    }

    .work-mobile-list {
        display: grid;
    }

    .work-action-menu {
        justify-self: end;
    }

    .work-action-menu-panel {
        width: fit-content;
        min-width: 0;
        padding: 8px;
    }

    .work-form-section__grid {
        grid-template-columns: minmax(0, 1fr);
    }
.work-ares-control {
        flex-direction: column;
    }

    .work-ares-button {
        width: 100%;
    }

    .work-form-section {
        padding: 14px;
    }

    .work-client-dashboard {
        grid-template-columns: minmax(0, 1fr);
        gap: 12px;
    }

    .work-dashboard-card {
        padding: 14px;
        border-radius: 14px;
    }

    .work-dashboard-card dl div,
    .work-recent-job {
        align-items: flex-start;
    }

    .work-dashboard-card__header {
        align-items: flex-start;
        flex-direction: column;
    }

    .work-detail-card {
        padding: 18px;
    }

    .finance-form-actions {
        justify-content: stretch;
    }

    .finance-form-actions .yc-btn {
        flex: 1 1 auto;
    }

    .finance-form {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 899px) {
    .calendar-page {
        box-sizing: border-box;
        width: calc(100vw - 2px);
        max-width: calc(100vw - 2px);
        margin-left: calc(50% - 50vw + 1px);
        margin-right: calc(50% - 50vw + 1px);
        padding: 4px;
        border-radius: var(--yc-radius-lg);
    }

    .calendar-hero {
        align-items: stretch;
        flex-direction: column;
        gap: 12px;
    }

    .calendar-hero__title {
        align-items: flex-start;
    }

    .calendar-hero__icon {
        width: 44px;
        height: 44px;
    }

    .calendar-hero__actions {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .calendar-hero h1 {
        font-size: 24px;
    }

    .calendar-options {
        grid-template-columns: minmax(0, 1fr);
    }

    .calendar-modal-backdrop {
        align-items: end;
        padding: 10px;
    }

    .calendar-modal {
        max-height: calc(100vh - 20px);
    }

    .calendar-day-view {
        padding: 12px;
    }

    .calendar-day-view__header {
        align-items: stretch;
        flex-direction: column;
    }

    .calendar-confirm-backdrop {
        align-items: end;
        padding: 10px;
    }

}


.bank-account-fields {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(88px, 132px);
    gap: 10px;
    align-items: end;
}

.bank-account-fields .yc-field {
    min-width: 0;
}

.bank-account-code-field {
    max-width: 132px;
}

.invoice-email-dialog {
    width: min(780px, calc(100vw - 28px));
    border: 0;
    padding: 28px;
}

.invoice-email-dialog::backdrop {
    background: rgba(15, 23, 42, 0.46);
    backdrop-filter: blur(6px);
}

.invoice-email-form {
    display: grid;
    gap: 16px;
}

.invoice-email-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.invoice-email-header h2 {
    margin: 0;
}

.invoice-email-close-btn {
    display: inline-flex;
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--yc-border);
    border-radius: 999px;
    color: var(--yc-muted);
    background: var(--yc-night-surface, #fff);
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}

.invoice-email-close-btn:hover,
.invoice-email-close-btn:focus-visible {
    color: var(--yc-text);
    border-color: rgba(124, 58, 237, 0.35);
    box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.10);
}

.invoice-email-message {
    min-height: 190px;
    resize: vertical;
}

.invoice-email-attachments {
    display: grid;
    gap: 4px;
    border: 1px solid var(--yc-border);
    border-radius: var(--yc-radius-md);
    padding: 10px 12px;
    color: var(--yc-text);
    background: var(--yc-night-surface, #fff);
}

.invoice-email-attachments span,
.invoice-email-attachment-list {
    color: var(--yc-muted);
    font-size: 13px;
    font-weight: 700;
}

.invoice-email-extra-attachments {
    display: grid;
    gap: 8px;
}

.invoice-email-dropzone {
    min-height: 118px;
}

.invoice-email-dropzone .work-document-dropzone__file {
    white-space: normal;
}

.invoice-email-attachment-list {
    display: grid;
    gap: 6px;
    margin: 0;
    padding-left: 0;
    list-style: none;
}

.invoice-email-attachment-list li {
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, .24);
    border-radius: 12px;
    padding: 8px 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
    background: rgba(var(--yc-night-surface-rgb, 255, 255, 255), .86);
}

.invoice-email-attachment-list:empty {
    display: none;
}

@media (max-width: 520px) {
    .bank-account-fields {
        grid-template-columns: minmax(0, 1fr) minmax(76px, 92px);
        gap: 8px;
    }

    .invoice-email-dialog {
        padding: 18px;
    }

    .invoice-email-message {
        min-height: 150px;
    }

    .invoice-email-dropzone {
        grid-template-columns: 1fr;
        justify-items: center;
        text-align: center;
    }
}
/* SCHEDULE DAY PROGRESS */
.schedule-page .schedule-title {
    font-weight: 500;
}

.schedule-page .schedule-day-title {
    display: inline-flex;
    align-items: baseline;
    gap: 7px;
    min-width: 0;
}

.schedule-page .schedule-day-progress {
    font-size: 0.88em;
    font-weight: 700;
    opacity: 0.86;
    white-space: nowrap;
}

.schedule-page .schedule-day-title > [data-day-name],
.schedule-plus-history-page .schedule-day-title > span:first-child {
    font-size: 22px;
}

/* SCHEDULE DAYS TRUE STICKY WRAPPER */
.app-shell:has(.schedule-page),
.app-shell:has(.schedule-page) .page,
.schedule-page {
    overflow: visible !important;
}

.shopping-page:has(.yc-sticky-tabs) {
    overflow: visible !important;
}

.app-shell:has(.yc-sticky-tabs),
.app-shell:has(.yc-sticky-tabs) .page {
    overflow: visible !important;
}

.yc-sticky-tabs {
    position: sticky;
    top: var(--yc-sticky-tabs-top, 0px);
    align-self: start;
    z-index: 34;
    padding: 0;
    background: var(--yc-tabs-surface, rgba(var(--yc-night-surface-rgb, 244, 245, 247), 0.96));
    backdrop-filter: blur(14px);
    isolation: isolate;
    pointer-events: auto;
}

.yc-sticky-tabs > .yc-panel {
    position: relative;
    z-index: 1;
    pointer-events: auto;
}

.yc-sticky-tabs > .finance-controls {
    padding: 12px 16px;
}

.yc-sticky-tabs.is-tabs-fixed {
    position: fixed;
    right: auto;
    z-index: 34;
    box-sizing: border-box;
    overflow: visible;
}

.yc-sticky-tabs.is-tabs-fixed::before {
    content: "";
    position: absolute;
    top: 0;
    right: -28px;
    bottom: 0;
    left: -28px;
    z-index: 0;
    background: var(--yc-tabs-edge, rgba(var(--yc-night-surface-rgb, 255, 255, 255), 0.98));
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08);
    pointer-events: none;
}

.yc-sticky-tabs.is-tabs-fixed > .finance-controls {
    border-color: transparent;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.yc-sticky-tabs-spacer {
    display: block;
    flex: 0 0 auto;
    pointer-events: none;
}

.schedule-page {
    --schedule-days-sticky-top: 0px;
}

.schedule-page .schedule-days-sticky {
    position: sticky;
    top: var(--schedule-days-sticky-top);
    z-index: 90;
    box-sizing: border-box;
    margin-bottom: 14px;
    padding: 10px 16px 12px;
    background: rgba(var(--yc-night-surface-rgb, 244, 245, 247), 0.96);
    backdrop-filter: blur(14px);
    isolation: isolate;
    pointer-events: auto;
}

.schedule-page .schedule-days-sticky.is-days-fixed {
    position: fixed;
    right: auto;
    z-index: 90;
    box-sizing: border-box;
    margin-bottom: 0;
    padding-right: 16px;
    padding-left: 16px;
    box-shadow: 0 12px 26px rgba(15, 23, 42, 0.08);
}

.schedule-page .schedule-days-fixed-spacer {
    display: block;
    flex: 0 0 auto;
    pointer-events: none;
}

.schedule-page .schedule-days-sticky .day-switcher {
    position: static !important;
    top: auto !important;
    z-index: auto;
    margin-bottom: 0;
    padding-top: 2px;
    padding-right: 0;
    padding-bottom: 12px;
    padding-left: 0;
    scroll-padding-inline: 0;
    background: transparent;
    backdrop-filter: none;
    pointer-events: auto;
}

.schedule-page .schedule-days-sticky .day-tab {
    pointer-events: auto;
}

/* SCHEDULE ACTIVE DROP TARGET */
.schedule-page .schedule-drag-placeholder.is-drop-slot-active,
.schedule-page .schedule-empty-drop-zone.is-drop-slot-active {
    position: relative;
    border-color: #22c55e;
    background: rgba(34, 197, 94, 0.1);
    box-shadow: inset 0 0 0 2px rgba(34, 197, 94, 0.72), 0 10px 26px rgba(34, 197, 94, 0.16);
}

.schedule-page .schedule-drag-placeholder.is-drop-slot-active::after,
.schedule-page .schedule-empty-drop-zone.is-drop-slot-active::after {
    content: "+";
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 25;
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border: 2px solid rgba(255, 255, 255, 0.94);
    border-radius: 999px;
    color: #fff;
    background: #22c55e;
    box-shadow: 0 12px 28px rgba(34, 197, 94, 0.34);
    font-size: 24px;
    font-weight: 900;
    line-height: 1;
    pointer-events: none;
    transform: translate(-50%, -50%);
}

/* SCHEDULE DRAG PREVIEW LAYER */
.schedule-row.is-dragging,
.schedule-page .schedule-row.is-dragging {
    z-index: 99999 !important;
    pointer-events: none;
}

.schedule-drag-preview {
    position: fixed;
    z-index: 999999;
    display: grid;
    width: 68px;
    height: 68px;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.34);
    border-radius: 22px;
    color: #fff;
    background: var(--yc-primary-gradient);
    box-shadow: 0 26px 58px rgba(76, 29, 149, 0.32);
    pointer-events: none;
    user-select: none;
    transform: none;
    backdrop-filter: blur(10px);
}

.schedule-drag-preview::before {
    content: "";
    position: absolute;
    inset: 7px;
    border-radius: inherit;
    background: rgba(var(--yc-night-surface-rgb, 255, 255, 255), 0.12);
    pointer-events: none;
}

.schedule-drag-preview svg {
    position: relative;
    z-index: 1;
    width: 32px;
    height: 32px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.15;
    stroke-linecap: round;
    stroke-linejoin: round;
}

@media (max-width: 899px) {
    .schedule-drag-preview {
        width: 64px;
        height: 64px;
        border-radius: 21px;
    }
}

@media (min-width: 900px) {
    .schedule-page {
        --schedule-days-sticky-top: 0px;
    }

    body > .schedule-row.is-dragging {
        display: flex !important;
        align-items: center !important;
        gap: 8px;
        border: 1px solid rgba(124, 58, 237, 0.44);
        border-radius: 16px;
        padding: 10px 12px;
        color: var(--yc-night-text, #111827);
        background: var(--yc-night-surface, #fff);
        box-shadow: 0 28px 70px rgba(124, 58, 237, 0.22);
        opacity: 0.94;
    }

    body > .schedule-row.is-dragging .schedule-row-main {
        display: flex !important;
        flex: 1 1 auto;
        min-width: 0;
        align-items: center !important;
        gap: 10px;
    }

    body > .schedule-row.is-dragging .schedule-title {
        min-width: 0;
        color: var(--yc-night-text, #111827);
        font-size: 15px;
        font-weight: 500;
        line-height: 1.25;
        overflow-wrap: anywhere;
    }

    body > .schedule-row.is-dragging .schedule-order {
        display: grid;
        width: 12px;
        height: 12px;
        flex: 0 0 auto;
        place-items: center;
        border-radius: 999px;
        color: #fff;
        font-size: 0;
    }

    body > .schedule-row.is-dragging .priority-order-high {
        background: linear-gradient(135deg, #991b1b, #dc2626);
    }

    body > .schedule-row.is-dragging .priority-order-normal {
        background: linear-gradient(135deg, #475569, #334155);
    }

    body > .schedule-row.is-dragging .priority-order-low {
        background: linear-gradient(135deg, #22c55e, #16a34a);
    }

    body > .schedule-row.is-dragging .schedule-meeting-badge {
        display: inline-flex;
        min-height: 24px;
        align-items: center;
        border: 1px solid rgba(124, 58, 237, 0.18);
        border-radius: 999px;
        padding: 0 9px;
        color: var(--yc-night-accent, var(--yc-primary-dark));
        background: linear-gradient(180deg, var(--yc-night-accent-bg, #faf5ff), var(--yc-night-accent-bg, #f5f3ff));
        font-size: 11px;
        font-weight: 800;
        white-space: nowrap;
    }

    body > .schedule-row.is-dragging .schedule-meeting-badge.is-hidden,
    body > .schedule-row.is-dragging .schedule-meeting-time.is-hidden {
        display: none;
    }

    body > .schedule-row.is-dragging .schedule-meeting-time {
        min-width: 62px;
        border: 1px solid rgba(124, 58, 237, 0.14);
        border-radius: 999px;
        padding: 6px 10px;
        color: var(--yc-night-accent, var(--yc-primary-dark));
        background: var(--yc-primary-soft);
        font-size: 13px;
        font-weight: 800;
        line-height: 1;
        text-align: center;
        white-space: nowrap;
    }

    body > .schedule-row.is-dragging .schedule-actions {
        display: flex !important;
        flex: 0 0 auto;
        align-items: center !important;
        justify-content: flex-end;
        gap: 6px;
    }

    body > .schedule-row.is-dragging .schedule-actions-desktop {
        display: contents;
    }

    body > .schedule-row.is-dragging .schedule-action-menu,
    body > .schedule-row.is-dragging .schedule-mobile-drag-handle {
        display: none !important;
    }

    body > .schedule-row.is-dragging .app-icon-btn {
        display: grid;
        width: 30px;
        height: 30px;
        min-width: 30px;
        min-height: 30px;
        place-items: center;
        border: 1px solid rgba(148, 163, 184, 0.26);
        border-radius: 11px;
        color: var(--yc-night-muted, #64748b);
        background: rgba(var(--yc-night-soft-rgb, 248, 250, 252), 0.9);
    }

    body > .schedule-row.is-dragging .app-icon-btn svg {
        width: 16px;
        height: 16px;
        fill: none;
        stroke: currentColor;
        stroke-width: 2;
        stroke-linecap: round;
        stroke-linejoin: round;
    }

    .schedule-page .schedule-days-sticky .day-switcher {
        cursor: grab;
        user-select: none;
    }

    .schedule-page .schedule-days-sticky .day-switcher.is-scroll-dragging {
        cursor: grabbing;
    }
}

@media (max-width: 899px) {
    .schedule-page {
        --schedule-days-sticky-top: var(--yc-mobile-topbar-height, 64px);
    }

    .schedule-page .schedule-days-sticky {
        padding-right: 12px;
        padding-left: 12px;
    }

    .schedule-page .schedule-days-sticky.is-days-fixed {
        right: 0;
        padding-right: 12px;
        padding-left: 12px;
    }
}

.yc-btn--primary,
.yc-btn--success,
.modal-button.primary,
.schedule-page .modal-button.primary,
.schedule-page .modal-button.yc-btn--success {
    color: #fff;
    border-color: transparent;
    background: linear-gradient(135deg, #15803d 0%, #22c55e 100%);
    box-shadow: 0 14px 28px rgba(34, 197, 94, 0.2);
}

.yc-btn--primary:hover,
.yc-btn--primary:focus-visible,
.yc-btn--success:hover,
.yc-btn--success:focus-visible,
.modal-button.primary:hover,
.modal-button.primary:focus-visible,
.schedule-page .modal-button.primary:hover,
.schedule-page .modal-button.primary:focus-visible,
.schedule-page .modal-button.yc-btn--success:hover,
.schedule-page .modal-button.yc-btn--success:focus-visible {
    background: linear-gradient(135deg, #16a34a 0%, #4ade80 100%);
    box-shadow: 0 18px 34px rgba(34, 197, 94, 0.24);
}

.yc-btn--danger,
.modal-button.danger,
.schedule-page .modal-button.danger {
    color: var(--yc-danger);
    border-color: rgba(220, 38, 38, 0.58);
    background: var(--yc-night-surface, #fff);
    box-shadow: none;
}

.yc-btn--danger:hover,
.yc-btn--danger:focus-visible,
.modal-button.danger:hover,
.modal-button.danger:focus-visible,
.schedule-page .modal-button.danger:hover,
.schedule-page .modal-button.danger:focus-visible {
    color: var(--yc-night-error, #b91c1c);
    border-color: var(--yc-night-button-danger-hover-border, rgba(185, 28, 28, 0.72));
    background: rgba(var(--yc-night-error-bg-rgb, 254, 226, 226), 0.58);
    box-shadow: none;
}

.modal-button.secondary,
.schedule-page .modal-button.secondary,
.yc-modal__actions .yc-btn--secondary,
.calendar-modal-actions .yc-btn--secondary,
.calendar-confirm-modal .yc-btn--secondary {
    color: #fff;
    border-color: transparent;
    background: linear-gradient(135deg, #b91c1c 0%, #ef4444 100%);
    box-shadow: 0 8px 18px rgba(239, 68, 68, 0.14);
}

.modal-button.secondary:hover,
.modal-button.secondary:focus-visible,
.schedule-page .modal-button.secondary:hover,
.schedule-page .modal-button.secondary:focus-visible,
.yc-modal__actions .yc-btn--secondary:hover,
.yc-modal__actions .yc-btn--secondary:focus-visible,
.calendar-modal-actions .yc-btn--secondary:hover,
.calendar-modal-actions .yc-btn--secondary:focus-visible,
.calendar-confirm-modal .yc-btn--secondary:hover,
.calendar-confirm-modal .yc-btn--secondary:focus-visible {
    background: linear-gradient(135deg, #dc2626 0%, #f87171 100%);
    box-shadow: 0 10px 22px rgba(239, 68, 68, 0.16);
}

.calendar-modal-actions > .yc-btn--secondary,
.calendar-modal-actions .yc-modal__actions .yc-btn--secondary {
    color: var(--yc-night-muted, #334155);
    border-color: var(--yc-border);
    background: var(--yc-night-surface, #fff);
    box-shadow: none;
}

.calendar-modal-actions > .yc-btn--secondary:hover,
.calendar-modal-actions > .yc-btn--secondary:focus-visible,
.calendar-modal-actions .yc-modal__actions .yc-btn--secondary:hover,
.calendar-modal-actions .yc-modal__actions .yc-btn--secondary:focus-visible {
    color: var(--yc-night-muted, #334155);
    border-color: var(--yc-night-button-hover-border, rgba(148, 163, 184, 0.55));
    background: var(--yc-night-surface, #f8fafc);
    box-shadow: none;
}

.yc-modal__actions,
.modal-actions {
    align-items: center;
}

.calendar-modal-actions {
    align-items: center;
}

.calendar-modal-actions .yc-modal__actions {
    margin-top: 0;
}

.yc-modal-btn--cancel,
.yc-modal-btn--danger,
.yc-modal-btn--success {
    display: inline-flex;
    min-height: 48px;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    padding: 0 18px;
    font-weight: 650;
    line-height: 1.1;
    white-space: nowrap;
}

.yc-modal__actions form,
.modal-actions form,
.calendar-confirm-modal .yc-modal__actions > * {
    display: flex;
    min-width: 0;
}

.calendar-confirm-modal .yc-modal__actions > *,
.schedule-page .modal-actions > * {
    flex: 1 1 0;
}

.calendar-confirm-modal .yc-modal__actions .yc-btn,
.schedule-page .modal-actions .yc-modal-btn--cancel,
.schedule-page .modal-actions form .yc-modal-btn--danger,
.schedule-page .modal-actions form .yc-modal-btn--success {
    width: 100%;
}

.yc-modal-btn--cancel,
.modal-button.yc-modal-btn--cancel,
.schedule-page .modal-button.yc-modal-btn--cancel,
.yc-modal__actions .yc-modal-btn--cancel,
.yc-modal__footer .yc-modal-btn--cancel,
.calendar-modal-actions .yc-modal-btn--cancel,
.calendar-confirm-modal .yc-modal-btn--cancel {
    color: #fff;
    border-color: transparent;
    background: linear-gradient(135deg, #020617 0%, #1f2937 100%);
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.14);
}

.yc-modal-btn--cancel:hover,
.yc-modal-btn--cancel:focus-visible,
.modal-button.yc-modal-btn--cancel:hover,
.modal-button.yc-modal-btn--cancel:focus-visible,
.schedule-page .modal-button.yc-modal-btn--cancel:hover,
.schedule-page .modal-button.yc-modal-btn--cancel:focus-visible,
.yc-modal__actions .yc-modal-btn--cancel:hover,
.yc-modal__actions .yc-modal-btn--cancel:focus-visible,
.yc-modal__footer .yc-modal-btn--cancel:hover,
.yc-modal__footer .yc-modal-btn--cancel:focus-visible,
.calendar-modal-actions .yc-modal-btn--cancel:hover,
.calendar-modal-actions .yc-modal-btn--cancel:focus-visible,
.calendar-confirm-modal .yc-modal-btn--cancel:hover,
.calendar-confirm-modal .yc-modal-btn--cancel:focus-visible {
    color: #fff;
    background: linear-gradient(135deg, #111827 0%, #334155 100%);
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.16);
}

.yc-modal-btn--danger,
.modal-button.yc-modal-btn--danger,
.schedule-page .modal-button.yc-modal-btn--danger,
.yc-modal__actions .yc-modal-btn--danger,
.yc-modal__footer .yc-modal-btn--danger,
.calendar-modal-actions .yc-modal-btn--danger,
.calendar-confirm-modal .yc-modal-btn--danger {
    color: var(--yc-danger);
    border-color: var(--yc-night-button-danger-border, rgba(220, 38, 38, 0.58));
    background: var(--yc-night-surface, #fff);
    box-shadow: none;
}

.yc-modal-btn--danger:hover,
.yc-modal-btn--danger:focus-visible,
.modal-button.yc-modal-btn--danger:hover,
.modal-button.yc-modal-btn--danger:focus-visible,
.schedule-page .modal-button.yc-modal-btn--danger:hover,
.schedule-page .modal-button.yc-modal-btn--danger:focus-visible,
.yc-modal__actions .yc-modal-btn--danger:hover,
.yc-modal__actions .yc-modal-btn--danger:focus-visible,
.yc-modal__footer .yc-modal-btn--danger:hover,
.yc-modal__footer .yc-modal-btn--danger:focus-visible,
.calendar-modal-actions .yc-modal-btn--danger:hover,
.calendar-modal-actions .yc-modal-btn--danger:focus-visible,
.calendar-confirm-modal .yc-modal-btn--danger:hover,
.calendar-confirm-modal .yc-modal-btn--danger:focus-visible {
    color: var(--yc-night-error, #b91c1c);
    border-color: var(--yc-night-button-danger-hover-border, rgba(185, 28, 28, 0.72));
    background: rgba(var(--yc-night-error-bg-rgb, 254, 226, 226), 0.58);
    box-shadow: none;
}

.yc-modal-btn--success,
.modal-button.yc-modal-btn--success,
.schedule-page .modal-button.yc-modal-btn--success,
.yc-modal__actions .yc-modal-btn--success,
.yc-modal__footer .yc-modal-btn--success,
.calendar-modal-actions .yc-modal-btn--success {
    color: #fff;
    border-color: transparent;
    background: linear-gradient(135deg, #15803d 0%, #22c55e 100%);
    box-shadow: 0 8px 18px rgba(34, 197, 94, 0.14);
}

.yc-modal-btn--success:hover,
.yc-modal-btn--success:focus-visible,
.modal-button.yc-modal-btn--success:hover,
.modal-button.yc-modal-btn--success:focus-visible,
.schedule-page .modal-button.yc-modal-btn--success:hover,
.schedule-page .modal-button.yc-modal-btn--success:focus-visible,
.yc-modal__actions .yc-modal-btn--success:hover,
.yc-modal__actions .yc-modal-btn--success:focus-visible,
.yc-modal__footer .yc-modal-btn--success:hover,
.yc-modal__footer .yc-modal-btn--success:focus-visible,
.calendar-modal-actions .yc-modal-btn--success:hover,
.calendar-modal-actions .yc-modal-btn--success:focus-visible {
    background: linear-gradient(135deg, #16a34a 0%, #4ade80 100%);
    box-shadow: 0 10px 22px rgba(34, 197, 94, 0.16);
}

.yc-modal-close,
.calendar-modal-close.yc-modal-close {
    color: var(--yc-night-text, #111827);
    border-color: var(--yc-night-button-border, rgba(148, 163, 184, 0.36));
    background: var(--yc-night-surface, #fff);
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.12);
}

.yc-modal-close:hover,
.yc-modal-close:focus-visible,
.calendar-modal-close.yc-modal-close:hover,
.calendar-modal-close.yc-modal-close:focus-visible {
    color: var(--yc-night-text, #020617);
    background: var(--yc-night-surface, #f8fafc);
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.16);
}

.finance-tabs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 0;
    scrollbar-width: none;
}

.finance-tabs::-webkit-scrollbar {
    display: none;
}

.finance-tabs :is(a, .finance-tab--more) {
    display: inline-flex;
    min-height: 38px;
    align-items: center;
    justify-content: center;
    gap: 7px;
    flex: 0 0 auto;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 999px;
    padding: 0 14px;
    color: var(--yc-night-muted, #475569);
    background: var(--yc-night-surface, #fff);
    font-size: 14px;
    font-weight: 650;
    text-decoration: none;
    transition: border-color var(--yc-transition), background var(--yc-transition), color var(--yc-transition), box-shadow var(--yc-transition);
}

.finance-tabs :is(a, .finance-tab--more):hover,
.finance-tabs :is(a, .finance-tab--more):focus-visible {
    border-color: rgba(124, 58, 237, 0.32);
    color: var(--yc-night-accent, var(--yc-primary));
    box-shadow: none;
    outline: 0;
}

.finance-tabs :is(a, .finance-tab--more).is-active {
    border-color: transparent;
    color: #fff;
    background: var(--yc-primary-gradient);
    box-shadow: none;
    outline: 0;
}

.finance-tabs a.is-active:focus,
.finance-tabs a.is-active:focus-visible {
    box-shadow: none;
    outline: 0;
}

.finance-tabs svg {
    width: 15px;
    height: 15px;
    flex: 0 0 auto;
    color: var(--yc-night-accent, var(--yc-primary));
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.finance-tabs a.is-active svg {
    color: #fff;
}

/* WORK MODULES */
.work-page {
    display: grid;
    gap: 12px;
}

.work-hero {
    gap: 14px;
}

.work-hero__title {
    min-width: 0;
}

.work-hero__icon svg,
.work-card-marker svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.work-tabs {
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 14px;
    padding: 12px 16px;
    background: rgba(var(--yc-night-surface-rgb, 255, 255, 255), 0.98);
    box-shadow: 0 12px 34px rgba(15, 23, 42, 0.06);
}

.work-filter-card,
.work-list-card,
.work-detail-card {
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 14px;
    background: var(--yc-night-surface, #fff);
    box-shadow: 0 12px 34px rgba(15, 23, 42, 0.06);
}

.work-filter-card {
    padding: 16px;
}

.work-filter-form {
    min-width: 0;
}

.work-filters {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.work-filters--projects {
    grid-template-columns: minmax(280px, 1fr) minmax(180px, 220px);
}
.work-documents-content .is-document-drop-target { outline: 3px solid var(--app-accent-dark); outline-offset: 3px; background: rgba(var(--app-accent-rgb), .1); }

.work-filters--clients {
    grid-template-columns: minmax(280px, 25%) minmax(180px, 220px);
    justify-content: flex-start;
}

.work-filters--jobs {
    grid-template-columns: minmax(280px, 25%) minmax(180px, 220px);
    justify-content: flex-start;
}

.work-filter-search {
    min-width: 0;
}

.work-filter-reset-row {
    display: flex;
    justify-content: center;
    margin-top: 10px;
}

.work-filter-reset {
    min-height: 32px;
    padding-inline: 10px;
    font-size: 13px;
}

.work-list-card {
    padding: 0;
    overflow: visible;
}

.work-completed-group {
    margin-top: 16px;
    border-top: 1px solid rgba(var(--app-accent-rgb), .16);
}

.work-completed-group__summary {
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    color: var(--yc-night-accent, var(--app-accent-dark));
    font-weight: 700;
    cursor: pointer;
    list-style: none;
}

.work-completed-group__summary::-webkit-details-marker {
    display: none;
}

.work-completed-group__summary svg {
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
    transition: transform .18s ease;
}

.work-completed-group[open] > .work-completed-group__summary svg {
    transform: rotate(180deg);
}

.work-completed-group__summary:focus-visible {
    outline: 3px solid rgba(var(--app-accent-rgb), .3);
    outline-offset: 2px;
    border-radius: 6px;
}

.work-completed-group__panel {
    min-width: 0;
}

.work-completed-group:not([open]) > .work-completed-group__panel {
    display: none;
}

.work-table-wrap {
    overflow-x: auto;
}

.work-table {
    min-width: 760px;
}

.work-row-title,
.work-mobile-title {
    color: var(--yc-night-text, #0f172a);
    font-weight: 900;
    text-decoration: none;
}

.work-row-title:hover,
.work-mobile-title:hover {
    color: var(--yc-night-accent, var(--yc-primary));
}
[data-row-href] {
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.work-mobile-card,
.yc-dropdown,
.yc-dropdown__trigger {
    -webkit-tap-highlight-color: transparent;
}

[data-row-href]:focus-visible {
    outline: 3px solid rgba(124, 58, 237, 0.28);
    outline-offset: -3px;
}

.work-table th:first-child,
.work-table td:first-child {
    width: auto;
}

.work-table th.work-table-icon-cell,
.work-table td.work-table-icon-cell,
.invoice-table th.work-table-icon-cell,
.invoice-table td.work-table-icon-cell {
    width: 52px;
    min-width: 52px;
    max-width: 52px;
    padding-right: 10px;
    text-align: center;
    vertical-align: middle;
}

.work-table-row-icon {
    display: inline-flex;
    width: 30px;
    height: 30px;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    color: var(--yc-night-accent, var(--yc-primary));
    background: rgba(124, 58, 237, 0.1);
}

.work-table-row-icon svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.work-table .finance-table__actions {
    width: 140px;
}

.work-table--projects,
.work-table--clients,
.work-table--jobs {
    table-layout: fixed;
}

.work-table-col--icon {
    width: 52px;
}

.work-table-col--name {
    width: auto;
}

.work-table--projects .work-table-col--status,
.work-table--jobs .work-table-col--status {
    width: 140px;
}

.work-table--clients .work-table-col--jobs {
    width: 140px;
}

.work-table--clients .work-table-col--amount,
.work-table--jobs .work-table-col--amount {
    width: 170px;
}

.work-table--jobs .work-table-col--client {
    width: 200px;
}

.work-table-col--actions {
    width: 112px;
}

.work-desktop-actions,
.work-action-menu-panel {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.work-mobile-list {
    display: none;
}

.work-mobile-card {
    position: relative;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid rgba(226, 232, 240, 0.92);
    padding: 14px 16px;
}

.work-mobile-card:last-child {
    border-bottom: 0;
}

.work-mobile-title {
    display: block;
    min-width: 0;
    color: var(--yc-night-text, #0f172a);
    font-size: 15px;
    font-weight: 900;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.work-mobile-card__body {
    min-width: 0;
}

.work-title-with-share,
.work-document-title-row,
.work-folder-card__identity {
    display: inline-flex;
    max-width: 100%;
    min-width: 0;
    align-items: center;
    gap: 8px;
    vertical-align: middle;
}

.work-title-with-share .work-row-title,
.work-title-with-share .work-mobile-title,
.work-document-title-row strong,
.work-folder-card__identity h3 {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.work-title-with-share .shared-indicator,
.work-document-title-row .shared-indicator,
.work-folder-card__identity .shared-indicator {
    flex: 0 0 auto;
    z-index: 20;
}

.work-folder-card__identity {
    display: flex;
    grid-column: 1;
    grid-row: 1;
}

.work-folder-card__identity .work-folder-card__link {
    flex: 0 1 auto;
    max-width: calc(100% - 28px);
}

.work-document-title-row {
    display: flex;
    width: fit-content;
    max-width: 100%;
}

.documents-page .work-document-title-row strong,
.documents-page .work-folder-card__identity h3,
.work-detail-card--documents .work-document-title-row strong,
.work-detail-card--documents .work-folder-card__identity h3 {
    flex: 0 1 auto;
}

.documents-page .work-document-title-row .shared-indicator__button,
.documents-page .work-folder-card__identity .shared-indicator__button,
.work-detail-card--documents .work-document-title-row .shared-indicator__button,
.work-detail-card--documents .work-folder-card__identity .shared-indicator__button {
    width: 18px;
    height: 18px;
    min-width: 18px;
    border-color: rgba(124, 58, 237, 0.16);
    color: var(--yc-night-accent, #6d28d9);
    background: rgba(124, 58, 237, 0.08);
    box-shadow: none;
}

.documents-page .work-document-title-row .shared-indicator__button svg,
.documents-page .work-folder-card__identity .shared-indicator__button svg,
.work-detail-card--documents .work-document-title-row .shared-indicator__button svg,
.work-detail-card--documents .work-folder-card__identity .shared-indicator__button svg {
    width: 11px;
    height: 11px;
}
.work-mobile-card small,
.work-mobile-card em {
    display: block;
    margin-top: 4px;
    color: var(--yc-muted);
    font-size: 12px;
    font-style: normal;
    font-weight: 700;
}

.work-card-marker {
    display: inline-grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 10px;
    background: rgba(124, 58, 237, 0.08);
    color: var(--yc-night-accent, var(--yc-primary));
}

.work-status-badge {
    width: fit-content;
    border-radius: 999px;
    padding: 4px 8px;
    background: rgba(124, 58, 237, 0.08);
    color: var(--yc-night-accent, var(--yc-primary)) !important;
    font-size: 11px !important;
    font-weight: 850 !important;
}

.work-empty {
    display: grid;
    justify-items: center;
    gap: 10px;
    padding: 32px 18px;
    color: var(--yc-muted);
    text-align: center;
}

.work-empty p {
    margin: 0;
    font-weight: 800;
}

.work-empty__icon {
    display: inline-grid;
    width: 46px;
    height: 46px;
    place-items: center;
    border-radius: 14px;
    background: rgba(124, 58, 237, 0.08);
    color: var(--yc-night-accent, var(--yc-primary));
}

.work-empty__icon svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.work-detail-page {
    grid-template-columns: minmax(0, 1fr);
}

.work-detail-sections {
    display: grid;
    min-width: 0;
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
}

.work-client-form > h2,
.work-client-form > .finance-form-actions,
.work-job-form > h2,
.work-job-form > .finance-form-actions {
    grid-column: 1 / -1;
}

.work-form-section {
    display: grid;
    grid-column: 1 / -1;
    gap: 14px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 14px;
    padding: 16px;
    background: rgba(var(--yc-night-soft-rgb, 248, 250, 252), 0.72);
}

.work-form-section h3 {
    margin: 0;
    color: var(--yc-night-text, #0f172a);
    font-size: 15px;
    font-weight: 900;
}

.work-form-section__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
    gap: 12px;
}

.work-form-section__wide {
    grid-column: 1 / -1;
}

.work-client-dashboard {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.work-dashboard-pins-row {
    display: grid;
    grid-column: 1 / -1;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    min-width: 0;
}

.work-dashboard-card {
    display: grid;
    gap: 14px;
    padding: 18px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 18px;
    background: rgba(var(--yc-night-surface-rgb, 255, 255, 255), 0.82);
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.06);
}

.work-dashboard-card--wide {
    grid-column: 1 / -1;
}

.work-dashboard-card--pins {
    align-content: start;
    align-items: stretch;
}

.work-dashboard-card h3 {
    margin: 0;
    color: var(--yc-night-text, #0f172a);
    font-size: 1rem;
    font-weight: 700;
}

.work-dashboard-card dl {
    display: grid;
    gap: 10px;
    margin: 0;
}

.work-dashboard-card dl div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.14);
}

.work-dashboard-card dl div:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.work-dashboard-card dt {
    color: var(--yc-night-muted, #64748b);
    font-size: 0.82rem;
    font-weight: 700;
}

.work-dashboard-card dd {
    margin: 0;
    color: var(--yc-night-text, #111827);
    font-weight: 700;
    text-align: right;
    overflow-wrap: anywhere;
}

.work-dashboard-link {
    color: var(--yc-night-accent, #6d28d9);
    font-weight: 850;
    text-decoration: none;
}

.work-dashboard-link:hover,
.work-dashboard-link:focus-visible {
    color: var(--yc-night-accent, #7c3aed);
    text-decoration: underline;
}

.work-dashboard-card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.work-dashboard-pin-list {
    display: grid;
    align-content: start;
    align-items: start;
    gap: 10px;
}

.work-dashboard-pin-item {
    display: grid;
    gap: 7px;
    padding: 12px 14px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 14px;
    background: rgba(var(--yc-night-soft-rgb, 248, 250, 252), 0.84);
}

.work-dashboard-pin-item__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    min-width: 0;
}

.work-dashboard-pin-item strong {
    min-width: 0;
    color: var(--yc-night-text, #0f172a);
    font-weight: 800;
    overflow-wrap: anywhere;
}

.work-dashboard-pin-item small {
    color: var(--yc-night-muted, #64748b);
    font-size: 0.82rem;
    font-weight: 700;
}

.work-dashboard-pin-item p {
    margin: 0;
    color: var(--yc-night-muted, #334155);
    font-size: 0.9rem;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.work-recent-jobs {
    display: grid;
    gap: 10px;
}

.work-recent-job {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 12px 14px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 14px;
    color: inherit;
    text-decoration: none;
    background: rgba(var(--yc-night-soft-rgb, 248, 250, 252), 0.84);
}

.work-recent-job span {
    display: grid;
    gap: 4px;
}

.work-recent-job strong {
    color: var(--yc-night-text, #111827);
}

.work-recent-job small {
    color: var(--yc-night-muted, #64748b);
    font-weight: 700;
}

.work-recent-job b {
    color: var(--yc-night-accent, #6d28d9);
    white-space: nowrap;
}

.work-ares-panel {
    border: 1px solid rgba(22, 163, 74, 0.24);
    background: linear-gradient(135deg, rgba(var(--yc-night-green-bg-rgb, 240, 253, 244), 0.96), rgba(var(--yc-night-surface-rgb, 255, 255, 255), 0.98));
}

.work-ares-panel__header {
    display: grid;
    gap: 6px;
}

.work-ares-panel__header h3,
.work-ares-panel__header p {
    margin: 0;
}

.work-ares-panel__header p {
    color: var(--yc-muted);
    font-size: 14px;
    font-weight: 700;
}
.work-ares-control {
    display: flex;
    min-width: 0;
    gap: 8px;
}

.work-ares-control .yc-input {
    min-width: 0;
}

.work-ares-button {
    flex: 0 0 auto;
    min-height: 44px;
    white-space: nowrap;
}

.work-ares-message {
    display: block;
    color: var(--yc-muted);
    font-size: 12px;
    font-weight: 800;
}

.work-ares-message:empty {
    display: none;
}

.work-ares-message[data-state="success"] {
    color: var(--yc-night-green, #15803d);
}

.work-ares-message[data-state="error"] {
    color: var(--yc-night-error, #b91c1c);
}

.work-detail-card {
    display: grid;
    gap: 14px;
    padding: 22px;
}

.work-detail-card h2 {
    margin: 0;
    color: var(--yc-night-text, #0f172a);
    font-size: 20px;
    font-weight: 950;
}

.work-detail-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.work-detail-summary span {
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 999px;
    padding: 7px 10px;
    color: var(--yc-night-muted, #334155);
    background: rgba(var(--yc-night-soft-rgb, 248, 250, 252), 0.92);
    font-size: 12px;
    font-weight: 800;
}

.work-placeholder {
    margin: 0;
    color: var(--yc-muted);
    font-size: 14px;
    line-height: 1.55;
}

.sidebar-link {
    position: relative;
}

.sidebar-link-badge {
    display: inline-flex;
    min-width: 24px;
    height: 18px;
    align-items: center;
    justify-content: center;
    margin-left: auto;
    border-radius: 999px;
    padding: 0 6px;
    color: var(--yc-night-green, #166534);
    background: var(--yc-night-green-bg, #dcfce7);
    font-size: 10px;
    font-weight: 950;
    line-height: 1;
    box-shadow: 0 8px 18px rgba(34, 197, 94, 0.18);
}

.finance-filter-toggle {
    display: none;
    justify-self: center;
}

.finance-filter-panel {
    display: block;
}

.finance-filter-box {
    display: grid;
    gap: 12px;
}

.finance-search-control {
    position: relative;
    display: block;
}

.finance-search-control .yc-input {
    width: 100%;
    padding-right: 46px;
}

.finance-search-submit {
    position: absolute;
    top: 1px;
    right: 1px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: calc(100% - 2px);
    border: 0;
    border-left: 1px solid var(--yc-night-button-border, rgba(226, 232, 240, 0.95));
    border-radius: 0 calc(var(--yc-radius-md) - 1px) calc(var(--yc-radius-md) - 1px) 0;
    color: var(--yc-night-accent, #6d28d9);
    background: rgba(124, 58, 237, 0.06);
    cursor: pointer;
}

.finance-search-submit svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.finance-search-submit:hover,
.finance-search-submit:focus-visible {
    color: var(--yc-night-accent, #581c87);
    border-left-color: var(--yc-night-button-hover-border, rgba(226, 232, 240, 0.95));
    background: rgba(124, 58, 237, 0.11);
    outline: 0;
}

.finance-table tr.is-finance-dragging {
    opacity: 0;
}

.finance-table .yc-drag-placeholder.is-drop-slot-active::after {
    content: none !important;
    display: none !important;
}

.finance-table .yc-drag-placeholder .yc-drag-placeholder-cell {
    width: 100%;
    box-sizing: border-box;
}

.shopping-page {
    display: grid;
    gap: 16px;
}

.shopping-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: var(--yc-radius-lg);
    background: var(--yc-night-surface, #fff);
    box-shadow: var(--yc-shadow-sm);
}

.shopping-hero__title {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.shopping-hero__icon {
    display: inline-flex;
    width: 48px;
    height: 48px;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: #fff;
    background: var(--yc-gradient-primary);
    box-shadow: 0 16px 34px rgba(124, 58, 237, 0.24);
}

.shopping-hero__icon svg {
    width: 24px;
    height: 24px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.shopping-hero__actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.shopping-hero__actions svg,
.shopping-tabs svg,
.shopping-card h2 svg,
.shopping-product-category svg,
.shopping-list-dashboard-icon svg,
.shopping-feature-grid svg,
.shopping-create-empty svg,
.shopping-autocomplete-menu svg,
.shopping-product-actions svg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.shopping-hero p {
    margin: 4px 0 0;
    color: var(--yc-muted);
    font-weight: 700;
}

.shopping-tabs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 0;
    border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}

.shopping-tabs a {
    display: inline-flex;
    min-height: 38px;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 0 14px 12px;
    border-bottom: 2px solid transparent;
    color: var(--yc-muted);
    font-size: 13px;
    font-weight: 900;
    text-decoration: none;
    white-space: nowrap;
}

.shopping-tabs a:hover,
.shopping-tabs a:focus-visible {
    color: var(--yc-night-accent, var(--yc-primary));
}

.shopping-tabs a.is-active {
    color: var(--yc-night-accent, var(--yc-primary));
    border-color: var(--yc-primary);
}

.shopping-overview-grid,
.shopping-section-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.shopping-card {
    border: 1px solid rgba(148, 163, 184, 0.18);
    box-shadow: var(--yc-shadow-sm);
}

.shopping-card--wide {
    grid-column: span 1;
}

.shopping-card h2 {
    margin: 0 0 14px;
    color: var(--yc-text);
    font-size: 16px;
    font-weight: 950;
}

.shopping-form,
.shopping-add-item {
    display: grid;
    gap: 10px;
}

.shopping-add-item {
    grid-template-columns: minmax(0, 1fr) auto;
    margin-bottom: 14px;
}

.shopping-table-list,
.shopping-list-stack,
.shopping-items-list,
.shopping-checklist {
    display: grid;
    gap: 10px;
}

.shopping-row,
.shopping-list-tile,
.shopping-item-editor,
.shopping-check-row {
    display: grid;
    align-items: center;
    gap: 10px;
    min-width: 0;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: var(--yc-radius-md);
    background: var(--yc-night-surface, #fff);
}

.shopping-row {
    grid-template-columns: minmax(0, 1.3fr) minmax(110px, 0.8fr) auto auto;
    padding: 10px 12px;
}

.shopping-list-tile {
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 12px;
    color: var(--yc-text);
    text-decoration: none;
}

.shopping-list-tile-main {
    min-width: 0;
    color: inherit;
    text-decoration: none;
}

.shopping-list-tile-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    justify-self: end;
}

.shopping-list-tile.is-active {
    border-color: rgba(124, 58, 237, 0.32);
    background: rgba(124, 58, 237, 0.07);
}

.shopping-list-tile-main span,
.shopping-check-row .shopping-list-item-main {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.shopping-list-tile-main small,
.shopping-check-row small,
.shopping-row small {
    color: var(--yc-muted);
    font-size: 12px;
    font-weight: 700;
}

.shopping-list-tile b,
.shopping-row b {
    color: var(--yc-night-accent, var(--yc-primary));
    font-weight: 950;
}

.shopping-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.shopping-suggestions span {
    display: inline-flex;
    min-height: 34px;
    align-items: center;
    padding: 0 12px;
    border-radius: 999px;
    color: var(--yc-night-accent, var(--yc-primary-dark));
    background: var(--yc-primary-soft);
    font-size: 13px;
    font-weight: 900;
}

.shopping-item-editor {
    grid-template-columns: minmax(140px, 1fr) minmax(140px, 0.8fr) auto auto auto auto;
    padding: 10px;
}

.shopping-check-row {
    grid-template-columns: auto minmax(0, 1fr) auto;
    padding: 10px;
}

.shopping-check-actions {
    display: inline-flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 8px;
    justify-self: end;
}

.shopping-check-actions form {
    display: inline-flex;
    margin: 0;
}

.shopping-list-drag-handle {
    cursor: grab;
    touch-action: none;
}

.shopping-list-drag-handle:active {
    cursor: grabbing;
}

.shopping-list-drag-handle svg {
    width: 16px;
    height: 16px;
}

.shopping-list-drag-placeholder {
    min-height: 50px;
    border: 1px dashed rgba(124, 58, 237, 0.42);
    border-radius: 16px;
    background: rgba(124, 58, 237, 0.08);
}

.shopping-check-row.is-shopping-dragging {
    opacity: 0.35;
}

.shopping-drag-preview {
    position: fixed;
    z-index: 1200;
    pointer-events: none;
    transform: rotate(-0.35deg);
    box-shadow: 0 20px 45px rgba(15, 23, 42, 0.16);
}

.shopping-check-row.is-checked {
    opacity: 0.68;
}

.shopping-check-row.is-checked strong {
    text-decoration: line-through;
}

.shopping-list-edit-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: end;
    margin: 0 0 14px;
    padding: 12px;
    border: 1px solid rgba(124, 58, 237, 0.18);
    border-radius: var(--yc-radius-md);
    background: rgba(124, 58, 237, 0.04);
}

.shopping-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.shopping-stats span {
    display: grid;
    gap: 6px;
    padding: 14px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: var(--yc-radius-md);
    color: var(--yc-muted);
    font-weight: 800;
}

.shopping-stats b {
    color: var(--yc-text);
    font-size: 24px;
    font-weight: 950;
}

.shopping-frequency-chart {
    display: grid;
    gap: 9px;
}

.shopping-frequency-chart span {
    position: relative;
    display: flex;
    min-height: 34px;
    align-items: center;
    overflow: hidden;
    border-radius: var(--yc-radius-md);
    background: rgba(124, 58, 237, 0.08);
}

.shopping-frequency-chart span::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: var(--value);
    background: rgba(124, 58, 237, 0.18);
}

.shopping-frequency-chart b {
    position: relative;
    padding: 0 12px;
}

.shopping-empty {
    margin: 0;
    color: var(--yc-muted);
    font-weight: 700;
}

.shopping-overview-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(340px, 0.95fr);
    gap: 16px;
    align-items: start;
}

.shopping-overview-main,
.shopping-overview-side {
    display: grid;
    gap: 16px;
    min-width: 0;
}

.shopping-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.shopping-card-head p,
.shopping-suggestion-card p {
    margin: 4px 0 0;
    color: var(--yc-muted);
    font-size: 13px;
    font-weight: 700;
}

.shopping-category-filter {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--yc-muted);
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}

.shopping-category-filter .yc-select {
    min-height: 38px;
    min-width: 190px;
    font-size: 12px;
}

.shopping-products-table {
    display: grid;
    border-top: 1px solid rgba(148, 163, 184, 0.18);
}

.shopping-products-header,
.shopping-product-row {
    display: grid;
    grid-template-columns: minmax(150px, 1.2fr) minmax(140px, 1fr) 110px 110px 76px;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.shopping-products-header {
    min-height: 38px;
    color: var(--yc-muted);
    font-size: 12px;
    font-weight: 900;
}

.shopping-product-row {
    min-height: 47px;
    border-top: 1px solid rgba(148, 163, 184, 0.16);
    color: var(--yc-text);
    font-size: 13px;
}

.shopping-product-name,
.shopping-product-category,
.shopping-product-actions {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
}

.shopping-product-name i {
    width: 8px;
    height: 8px;
    flex: 0 0 auto;
    border-radius: 999px;
    background: var(--dot);
}

.shopping-product-category {
    color: var(--yc-muted);
    font-weight: 700;
}

.shopping-product-category svg {
    color: var(--yc-night-accent, var(--yc-primary));
}

.shopping-product-row b {
    color: var(--yc-night-green, #15803d);
}

.shopping-product-row small {
    color: var(--yc-muted);
    font-weight: 700;
}

.shopping-product-actions {
    justify-content: flex-end;
}

.shopping-list-dashboard-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto minmax(92px, 120px) auto;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: var(--yc-radius-md);
    color: var(--yc-text);
    text-decoration: none;
    background: var(--yc-night-surface, #fff);
}

.shopping-list-dashboard-icon {
    display: inline-flex;
    width: 38px;
    height: 38px;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    color: var(--yc-night-accent, var(--yc-primary));
    background: var(--yc-primary-soft);
}

.shopping-list-dashboard-main {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.shopping-list-dashboard-main small {
    color: var(--yc-muted);
    font-size: 12px;
    font-weight: 700;
}

.shopping-avatars {
    display: flex;
    align-items: center;
}

.shopping-avatars i {
    display: inline-flex;
    width: 24px;
    height: 24px;
    align-items: center;
    justify-content: center;
    margin-left: -6px;
    border: 2px solid #fff;
    border-radius: 999px;
    color: #fff;
    background: linear-gradient(135deg, #7c3aed 0%, #16a34a 100%);
    font-size: 11px;
    font-style: normal;
    font-weight: 900;
}

.shopping-avatars i:first-child {
    margin-left: 0;
}

.shopping-list-dashboard-progress {
    display: grid;
    gap: 6px;
    color: var(--yc-text);
    font-size: 12px;
    font-weight: 900;
}

.shopping-list-dashboard-progress em {
    display: block;
    height: 7px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.18);
}

.shopping-list-dashboard-progress i {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(135deg, #15803d 0%, #22c55e 100%);
}

.shopping-list-dashboard-percent {
    color: var(--yc-night-green, #15803d);
    font-size: 13px;
    white-space: nowrap;
}

.shopping-create-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(220px, 0.62fr);
    gap: 10px 12px;
}

.shopping-create-form .yc-btn {
    min-height: 44px;
}

.shopping-autocomplete-demo {
    position: relative;
    z-index: 2;
}

.shopping-autocomplete-menu {
    position: absolute;
    z-index: 4;
    top: calc(100% + 5px);
    left: 0;
    right: 0;
    display: grid;
    gap: 1px;
    padding: 6px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: var(--yc-radius-md);
    background: var(--yc-night-surface, #fff);
    box-shadow: 0 18px 36px rgba(31, 41, 55, 0.14);
}

.shopping-autocomplete-menu span {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    min-height: 34px;
    padding: 0 8px;
    border-radius: 8px;
    color: var(--yc-text);
    font-size: 13px;
    font-weight: 800;
}

.shopping-autocomplete-menu small {
    color: var(--yc-muted);
    font-size: 11px;
}

.shopping-autocomplete-menu b {
    color: var(--yc-muted);
    font-size: 12px;
}

.shopping-autocomplete-field {
    position: relative;
    z-index: 6;
}

.shopping-autocomplete-results {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 6px);
    z-index: 1200;
    display: grid;
    max-height: 320px;
    overflow-y: auto;
    padding: 6px;
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 14px;
    background: var(--yc-night-surface, #fff);
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.16);
}

.shopping-autocomplete-results[hidden] {
    display: none;
}

.shopping-autocomplete-option {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 9px;
    min-height: 38px;
    padding: 6px 8px;
    border: 0;
    border-radius: 10px;
    color: var(--yc-night-text, #0f172a);
    background: transparent;
    font: inherit;
    font-size: 13px;
    font-weight: 850;
    text-align: left;
    cursor: pointer;
}

.shopping-autocomplete-option:not(.has-thumb) {
    grid-template-columns: minmax(0, 1fr);
}

.shopping-autocomplete-option:hover,
.shopping-autocomplete-option:focus-visible {
    background: rgba(124, 58, 237, 0.08);
    outline: none;
}

.shopping-autocomplete-option span:last-child {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.shopping-autocomplete-thumb {
    display: inline-flex;
    width: 30px;
    height: 30px;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 9px;
    background: rgba(var(--yc-night-soft-rgb, 248, 250, 252), 0.9);
}

.shopping-autocomplete-thumb img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.shopping-create-empty {
    display: grid;
    justify-items: center;
    gap: 7px;
    margin-top: 72px;
    padding: 20px;
    color: var(--yc-muted);
    text-align: center;
}

.shopping-create-empty span {
    display: inline-flex;
    width: 52px;
    height: 52px;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 999px;
    color: var(--yc-muted);
    background: var(--yc-night-surface, #f8fafc);
}

.shopping-create-empty strong {
    color: var(--yc-text);
}

.shopping-suggestion-card h2 {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.shopping-suggestion-card h2 svg {
    color: var(--yc-night-warning, #f59e0b);
}

.shopping-avatars--large {
    margin: 6px 0 7px;
}

.shopping-avatars--large i {
    width: 30px;
    height: 30px;
}

.shopping-member-list {
    display: grid;
    border-top: 1px solid rgba(148, 163, 184, 0.16);
}

.shopping-member-list div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 12px 0;
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.shopping-member-list span {
    display: grid;
    gap: 3px;
}

.shopping-member-list small {
    color: var(--yc-muted);
    font-size: 12px;
    font-weight: 700;
}

.shopping-member-list b {
    color: var(--yc-text);
    font-size: 13px;
}

.shopping-feature-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.shopping-feature-grid article {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 4px 12px;
    align-items: center;
    padding: 16px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: var(--yc-radius-lg);
    background: var(--yc-night-surface, #fff);
    box-shadow: var(--yc-shadow-sm);
}

.shopping-feature-grid span {
    display: inline-flex;
    width: 36px;
    height: 36px;
    grid-row: span 2;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    color: var(--yc-night-accent, var(--yc-primary));
    background: var(--yc-primary-soft);
}

.shopping-feature-grid strong {
    color: var(--yc-text);
    font-size: 14px;
    font-weight: 950;
}

.shopping-feature-grid p {
    margin: 0;
    color: var(--yc-muted);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.35;
}

@media (max-width: 760px) {
    .shopping-page {
        gap: 12px;
    }

    .shopping-hero {
        align-items: stretch;
        flex-direction: column;
        padding: 14px;
    }

    .shopping-hero__icon {
        width: 42px;
        height: 42px;
    }

    .shopping-hero__icon svg {
        width: 21px;
        height: 21px;
    }

    .shopping-tabs {
        gap: 6px;
        padding: 5px;
    }

    .shopping-tabs a {
        min-height: 36px;
        padding: 0 12px;
        font-size: 12px;
    }

    .shopping-overview-grid,
    .shopping-section-grid,
    .shopping-overview-layout,
    .shopping-feature-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 12px;
    }

    .shopping-add-item,
    .shopping-item-editor,
    .shopping-row,
    .shopping-products-header,
    .shopping-product-row,
    .shopping-create-form,
    .shopping-list-dashboard-card {
        grid-template-columns: minmax(0, 1fr);
    }

    .shopping-card-head,
    .shopping-hero__actions {
        align-items: stretch;
        flex-direction: column;
    }

    .shopping-category-filter {
        align-items: stretch;
        flex-direction: column;
    }

    .shopping-category-filter .yc-select {
        min-width: 0;
    }

    .shopping-products-header {
        display: none;
    }

    .shopping-product-row {
        padding: 12px 0;
    }

    .shopping-product-actions {
        justify-content: flex-start;
    }

    .shopping-autocomplete-menu {
        position: static;
        margin-top: 6px;
    }

    .shopping-create-empty {
        margin-top: 12px;
    }

    .shopping-member-list div {
        align-items: flex-start;
        flex-direction: column;
    }

    .shopping-check-row {
        grid-template-columns: auto minmax(0, 1fr) auto;
    }

    .shopping-stats {
        grid-template-columns: minmax(0, 1fr);
    }
}





@media (max-width: 899px) {
    .finance-filter-toggle {
        display: inline-flex;
        width: 100%;
        justify-self: stretch;
        justify-content: center;
    }

    .finance-filter-panel {
        display: none;
    }

    .finance-filter-panel.is-open {
        display: block;
    }

    .finance-tabs {
        margin-right: -14px;
        margin-left: -14px;
        padding: 0 14px;
    }

    .shopping-page {
        --yc-sticky-tabs-top: var(--yc-mobile-topbar-height, 64px);
    }

    .yc-sticky-tabs.is-tabs-fixed::before {
        right: -16px;
        left: -16px;
    }

}

@media (min-width: 900px) {
    .schedule-page .schedule-days-sticky .day-switcher {
        padding-bottom: 18px;
    }

    .finance-filter-toggle {
        display: none !important;
    }

    .finance-filter-panel {
        display: block !important;
    }

    .consumption-filter.finance-filter-panel {
        display: grid !important;
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    html.is-sidebar-collapsed .sidebar-link-badge {
        position: absolute;
        top: 4px;
        right: 4px;
        min-width: 17px;
        height: 17px;
        padding: 0 4px;
        font-size: 8px;
    }
}



@media (max-width: 999px) {
    .yc-table-wrap {
        overflow-x: auto;
    }

    .finance-table {
        min-width: 840px;
    }

    .finance-table th,
    .finance-table td {
        white-space: nowrap;
    }
}



.yc-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-direction: row;
    gap: 14px;
    width: 100%;
    margin: 0 0 6px;
    padding: 14px 16px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: var(--yc-radius-lg);
    background: var(--yc-night-surface, #fff);
    box-shadow: var(--yc-shadow-sm);
    text-align: left;
}

.yc-page-header__title {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    flex: 1 1 auto;
}

.yc-page-header__icon {
    display: inline-flex;
    width: 48px;
    height: 48px;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: #fff;
    background: var(--yc-primary-gradient, var(--yc-gradient-primary));
    box-shadow: 0 16px 34px rgba(124, 58, 237, 0.24);
}

.yc-page-header__icon svg {
    width: 23px;
    height: 23px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.yc-page-header .yc-page-title {
    margin: 0;
    color: var(--yc-text);
    font-size: 28px;
    line-height: 1.12;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.yc-page-header p {
    display: none;
}

.yc-page-header__actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
    flex: 0 0 auto;
    min-width: 0;
}

.invoice-filters {
    display: grid;
    grid-template-columns: minmax(220px, 1.4fr) repeat(5, minmax(150px, 1fr));
    gap: 12px;
    align-items: end;
}

.invoice-stat-filters {
    display: grid;
    grid-template-columns: repeat(2, minmax(180px, 1fr)) auto;
    gap: 12px;
    align-items: end;
}

.invoice-stat-filters__actions {
    display: flex;
    justify-content: flex-end;
}

.invoice-statistics-grid {
    display: grid;
    grid-template-columns: minmax(260px, 0.32fr) minmax(0, 1fr);
    gap: 14px;
    align-items: stretch;
}

.invoice-stat-total-card {
    display: grid;
    align-content: start;
    gap: 14px;
    padding: 24px 26px;
}

.invoice-stat-total-card strong {
    color: var(--yc-night-accent, var(--yc-primary));
    font-size: clamp(28px, 3vw, 42px);
    font-weight: 950;
    line-height: 1;
}

.invoice-stat-total-card span {
    color: var(--yc-muted);
    font-size: 13px;
    font-weight: 800;
    line-height: 1.45;
}

.invoice-statistics-history {
    margin-bottom: 0;
}

.invoice-history-chart {
    grid-template-columns: repeat(auto-fit, minmax(58px, 1fr));
}

.invoice-history-chart .finance-history-chart__bars span {
    width: 24px;
}

.invoice-history-chart .finance-history-chart__bars .is-invoice {
    background: linear-gradient(180deg, #a855f7 0%, #7c3aed 100%);
}

.invoice-chart-legend .invoice::before {
    background: #8b5cf6;
}

.invoice-item-row {
    display: grid;
    grid-template-columns: minmax(220px, 2fr) minmax(110px, 0.6fr) minmax(90px, 0.45fr) minmax(130px, 0.75fr) minmax(130px, 0.75fr) auto;
    gap: 12px;
    align-items: end;
    padding: 12px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: var(--yc-radius-md);
    background: var(--yc-night-surface, #fff);
}

.invoice-items {
    display: grid;
    gap: 10px;
}

.invoice-items-add {
    display: flex;
    justify-content: flex-end;
    margin-top: 12px;
}

.invoice-item-row__total {
    display: grid;
    gap: 8px;
    min-height: 44px;
    align-content: end;
    color: var(--yc-text);
}

.invoice-item-row__total strong {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    font-weight: 800;
    white-space: nowrap;
}

.invoice-item-row__remove {
    align-self: end;
}

.invoice-summary {
    display: grid;
    justify-content: end;
    gap: 8px;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid rgba(148, 163, 184, 0.22);
}

.invoice-total-line {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 18px;
    color: var(--yc-muted);
    font-weight: 700;
}

.invoice-total-line strong {
    min-width: 150px;
    text-align: right;
    color: var(--yc-text);
    font-size: 16px;
}

.invoice-total-line--grand strong {
    color: var(--yc-night-accent, var(--yc-primary));
    font-size: 20px;
}

.invoice-payment-total {
    color: var(--yc-night-accent, var(--yc-primary));
    font-size: 22px;
    font-weight: 800;
}

.invoice-pdf-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.invoice-pdf-meta {
    margin: 16px 0 0;
    color: var(--yc-muted);
    font-weight: 700;
}

.invoice-detail-hero {
    align-items: center;
}

.invoice-detail-title {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.invoice-status-chip {
    flex: 0 0 auto;
}

.invoice-detail-actions {
    align-items: center;
    gap: 8px;
}

.invoice-detail-actions .invoice-action-form {
    display: inline-flex;
}

.invoice-detail-actions--mobile {
    display: none;
}

.invoice-overview-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.invoice-overview-card {
    display: grid;
    align-content: start;
    gap: 14px;
    padding: 18px;
}

.invoice-overview-card h2,
.invoice-pdf-card h2 {
    margin: 0;
    font-size: 18px;
}

.invoice-overview-list {
    display: grid;
    gap: 12px;
    margin: 0;
}

.invoice-overview-list div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.16);
}

.invoice-overview-list dt {
    color: var(--yc-muted);
    font-size: 13px;
    font-weight: 800;
}

.invoice-overview-list dd {
    margin: 0;
    text-align: right;
    font-weight: 900;
}

.invoice-overview-link {
    color: var(--yc-night-accent, var(--yc-primary));
    font-weight: 900;
    text-decoration: none;
}

.invoice-overview-link:hover,
.invoice-overview-link:focus-visible {
    text-decoration: underline;
    outline: 0;
}

.invoice-overview-total {
    color: var(--yc-night-accent, var(--yc-primary));
    font-size: 22px;
}

.invoice-overdue-alert {
    width: fit-content;
    margin: 0;
    border-radius: 999px;
    padding: 7px 10px;
    color: var(--yc-night-error, #dc2626);
    background: rgba(var(--yc-night-error-bg-rgb, 254, 226, 226), 0.7);
    font-size: 12px;
    font-weight: 900;
}

.invoice-overview-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
    gap: 8px;
}

.invoice-overview-actions > *,
.invoice-overview-actions .yc-btn,
.invoice-overview-actions form,
.invoice-overview-actions form .yc-btn {
    display: flex;
    min-width: 0;
    width: 100%;
    align-items: center;
    justify-content: center;
}

.invoice-overview-actions form {
    margin: 0;
}

.invoice-overview-actions .yc-btn {
    flex: 1 1 auto;
    min-height: 46px;
    height: 46px;
    box-sizing: border-box;
    border-radius: var(--yc-radius-md);
    padding-right: 16px;
    padding-left: 16px;
    text-align: center;
}

.invoice-pdf-preview-layout {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
    gap: 14px;
    align-items: start;
}

.invoice-pdf-preview-card,
.invoice-pdf-actions-card {
    min-width: 0;
    padding: 18px;
}

.invoice-pdf-preview-card {
    display: grid;
    gap: 14px;
}

.invoice-pdf-actions-card {
    display: grid;
    align-content: start;
    gap: 14px;
}

.invoice-pdf-actions-card h2 {
    margin: 0;
    font-size: 18px;
}

.invoice-preview-image {
    display: block;
    width: auto;
    max-width: 100%;
    height: auto;
    margin: 0 auto;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 14px;
    background: var(--yc-night-surface, #fff);
    box-shadow: 0 18px 48px rgba(15, 23, 42, 0.08);
}

.invoice-info-box {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    border: 1px solid rgba(59, 130, 246, 0.22);
    border-radius: var(--yc-radius-md);
    padding: 11px 14px;
    color: var(--yc-night-blue, #1d4ed8);
    background: rgba(var(--yc-night-blue-bg-rgb, 239, 246, 255), 0.78);
    font-weight: 800;
}

.invoice-info-box svg {
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
}

.invoice-accordion-list {
    display: grid;
    grid-column: 1 / -1;
    width: 100%;
    gap: 14px;
}

.invoice-accordion-columns {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    align-items: start;
}

.invoice-accordion-column {
    display: grid;
    gap: 14px;
    min-width: 0;
    width: 100%;
}

.invoice-accordion {
    overflow: clip;
    width: 100%;
    min-width: 0;
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: var(--yc-radius-lg);
    background: var(--yc-night-surface, #fff);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.04);
}

.invoice-accordion summary {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    min-height: 60px;
    padding: 0 20px;
    cursor: pointer;
    list-style: none;
    font-weight: 900;
}

.invoice-accordion summary::-webkit-details-marker,
.invoice-accordion summary::marker {
    display: none;
    content: "";
}

.invoice-accordion summary em {
    min-width: 0;
    overflow: hidden;
    color: var(--yc-muted);
    font-size: 12px;
    font-style: normal;
    font-weight: 700;
    text-align: right;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.invoice-accordion summary svg {
    width: 18px;
    height: 18px;
    transition: transform 160ms ease;
}

.invoice-accordion[open] summary svg {
    transform: rotate(180deg);
}

.invoice-accordion__content {
    padding: 20px;
    border-top: 1px solid rgba(148, 163, 184, 0.18);
    background: rgba(var(--yc-night-soft-rgb, 248, 250, 252), 0.54);
}

.invoice-page .invoice-form:not(.invoice-form--items) {
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
    max-width: none;
}

.invoice-page .invoice-form:not(.invoice-form--items) > .invoice-accordion-list {
    grid-column: 1 / -1;
}

.invoice-page .invoice-form:not(.invoice-form--items) .invoice-accordion-list > .invoice-accordion:first-child .invoice-accordion__content {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.invoice-items-heading {
    margin-bottom: 12px;
}

.invoice-items-heading .yc-btn {
    width: auto;
}

.invoice-items-table {
    display: grid;
    gap: 0;
    overflow-x: auto;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: var(--yc-radius-md);
    background: var(--yc-night-surface, #fff);
}

.invoice-items-table__head,
.invoice-items-table__row {
    display: grid;
    grid-template-columns: minmax(180px, 1.45fr) minmax(90px, 0.5fr) minmax(88px, 0.45fr) minmax(120px, 0.7fr) minmax(86px, 0.45fr) minmax(118px, 0.72fr) minmax(104px, 0.62fr) minmax(128px, 0.75fr) 72px;
    gap: 8px;
    align-items: center;
    min-width: 1080px;
}

.invoice-items-table__head {
    padding: 10px 12px;
    color: var(--yc-muted);
    background: rgba(var(--yc-night-soft-rgb, 248, 250, 252), 0.82);
    font-size: 12px;
    font-weight: 900;
}
.invoice-form--no-vat .invoice-items-table__head,
.invoice-form--no-vat .invoice-items-table__row {
    grid-template-columns: minmax(180px, 1.55fr) minmax(90px, 0.55fr) minmax(88px, 0.5fr) minmax(120px, 0.75fr) minmax(128px, 0.8fr) 72px;
    min-width: 760px;
}

.invoice-vat-mode-field small,
.invoice-vat-note {
    color: var(--yc-muted);
    font-size: 12px;
    line-height: 1.4;
}

.invoice-vat-mode-field--locked strong {
    color: var(--yc-text);
    font-size: 14px;
}

.invoice-items-table__head span:nth-child(5),
.invoice-items-table__head span:nth-child(6) {
    font-weight: 600;
}

.invoice-items-table__row {
    border: 0;
    border-top: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 0;
    padding: 10px 12px;
    background: var(--yc-night-surface, #fff);
}

.invoice-items-table__row .yc-label {
    display: none;
}

.invoice-item-row__unit-price-input {
    min-height: 52px;
    border-color: rgba(124, 58, 237, 0.34);
    background: linear-gradient(180deg, var(--yc-night-surface, #fff), rgba(124, 58, 237, 0.035));
    font-size: 16px;
    font-weight: 650;
    box-shadow: inset 0 0 0 1px rgba(124, 58, 237, 0.05);
}

.invoice-item-row__unit-price-input:focus {
    border-color: rgba(124, 58, 237, 0.62);
    box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.12);
}

.invoice-item-row__vat {
    color: var(--yc-text);
    font-weight: 600;
}

.invoice-item-row__subtotal .yc-label,
.invoice-item-row__subtotal strong {
    font-weight: 600;
}

.invoice-items-table__row .invoice-item-row__total {
    min-height: 0;
    align-content: center;
}

.invoice-items-table__row .invoice-item-row__total strong {
    min-height: 42px;
    align-items: center;
}

.invoice-items-table__row .invoice-item-row__remove {
    justify-self: end;
}

.invoice-templates-layout {
    display: grid;
    gap: 22px;
    width: 100%;
    min-width: 0;
}

.invoice-template-create-card,
.invoice-template-list-card {
    width: 100%;
    min-width: 0;
    overflow: visible;
    padding: 16px;
}

.invoice-template-create-card > .work-dashboard-card__header,
.invoice-template-list-card > .work-dashboard-card__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin: 0 0 22px;
    padding-bottom: 18px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}

.invoice-template-create-card > .work-dashboard-card__header h2,
.invoice-template-list-card > .work-dashboard-card__header h2 {
    margin: 0;
}

.invoice-template-create-card .work-subsection-hint {
    max-width: 820px;
    margin: 7px 0 0;
    color: var(--yc-muted);
    font-size: 13px;
    line-height: 1.5;
}

.invoice-template-form {
    display: grid;
    gap: 22px;
}

.invoice-template-form-boxes {
    display: grid;
    gap: 14px;
    width: 100%;
    min-width: 0;
}

.invoice-template-basic-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    align-items: end;
}

.invoice-template-name-field {
    max-width: none;
}
.invoice-template-items-section {
    display: grid;
    gap: 12px;
    margin: 2px 0 0;
    padding: 14px 16px;
    background: rgba(var(--yc-night-soft-rgb, 248, 250, 252), 0.56);
}

.invoice-template-items-section .invoice-items-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin: 0 0 12px;
}

.invoice-template-items-section .invoice-items-heading h3 {
    margin: 0;
}

.invoice-template-items-section .invoice-items-heading .yc-btn {
    flex: 0 0 auto;
}

.invoice-template-items.invoice-items-table {
    width: 100%;
    min-width: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.invoice-template-items .invoice-items-table__head,
.invoice-template-items .invoice-template-item-row {
    display: grid;
    grid-template-columns: minmax(180px, 1.55fr) minmax(90px, 0.55fr) minmax(88px, 0.5fr) minmax(120px, 0.75fr) minmax(128px, 0.8fr) 72px;
    gap: 8px;
    align-items: center;
    min-width: 760px;
}

.invoice-template-items .invoice-items-table__head {
    padding: 10px 12px;
    color: var(--yc-muted);
    background: rgba(var(--yc-night-soft-rgb, 248, 250, 252), 0.82);
    font-size: 12px;
    font-weight: 900;
}

.invoice-template-items .invoice-template-item-row {
    border: 0;
    border-top: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 0;
    padding: 10px 12px;
    background: var(--yc-night-surface, #fff);
    box-shadow: none;
}

.invoice-template-items .invoice-template-item-row .yc-label {
    display: none;
}


.invoice-template-items .invoice-template-item-row .invoice-item-row__remove {
    justify-self: end;
    align-self: center;
    margin: 0;
}

.invoice-template-list {
    display: grid;
    gap: 12px;
}

.invoice-template-card {
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
}

.invoice-template-card > .work-card-marker {
    grid-column: 1;
}

.invoice-template-card > .work-mobile-card__body {
    grid-column: 2;
}

.invoice-template-card-actions {
    grid-column: 3;
    display: inline-flex;
    align-items: center;
    justify-self: end;
    gap: 12px;
}

.invoice-template-edit-trigger {
    min-height: 38px;
    padding: 0 12px;
    gap: 6px;
    white-space: nowrap;
}

.invoice-template-edit-trigger svg {
    width: 16px;
    height: 16px;
}

.invoice-template-actions {
    display: flex;
    flex-direction: row-reverse;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    margin-top: 4px;
    padding-top: 2px;
}

.invoice-template-list-card .work-empty {
    min-height: 150px;
    padding: 42px 20px;
}

.invoice-template-picker-box {
    margin-bottom: 16px;
}

.invoice-template-picker-field {
    max-width: 420px;
}

@media (max-width: 920px) {
    .invoice-templates-layout {
        gap: 16px;
    }

    .invoice-template-create-card,
    .invoice-template-list-card {
        padding: 16px;
    }

    .invoice-template-create-card > .work-dashboard-card__header,
    .invoice-template-list-card > .work-dashboard-card__header {
        display: grid;
        gap: 8px;
        margin-bottom: 16px;
        padding-bottom: 14px;
    }

    .invoice-template-form {
        gap: 16px;
    }




    .invoice-template-actions {
        flex-wrap: wrap;
    }

    .invoice-template-card-actions {
        gap: 10px;
    }

    .invoice-template-items-section .invoice-items-heading {
        display: grid;
        justify-items: stretch;
        margin-bottom: 10px;
    }

    .invoice-template-items-section .invoice-items-heading .yc-btn {
        width: 100%;
    }

    .invoice-template-items.invoice-items-table {
        overflow-x: visible;
        border: 0;
        background: transparent;
        gap: 12px;
    }

    .invoice-template-items .invoice-items-table__head {
        display: none;
    }

    .invoice-template-items .invoice-template-item-row {
        grid-template-columns: minmax(0, 1fr);
        min-width: 0;
        gap: 12px;
        padding: 14px;
        border: 1px solid rgba(148, 163, 184, 0.22);
        border-radius: var(--yc-radius-md);
        box-shadow: 0 10px 24px rgba(15, 23, 42, 0.04);
    }

    .invoice-template-items .invoice-template-item-row .yc-label {
        display: block;
    }

    .invoice-template-items .invoice-template-item-row .invoice-item-row__remove {
        justify-self: end;
    }
}
.invoice-pdf-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.invoice-pdf-file {
    display: flex;
    align-items: center;
    gap: 18px;
    min-width: 0;
}

.invoice-pdf-file__icon {
    display: inline-flex;
    width: 64px;
    height: 64px;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 12px;
    color: var(--yc-night-accent, var(--yc-primary));
    background: var(--yc-night-surface, #f8fafc);
}

.invoice-pdf-file__icon svg {
    width: 32px;
    height: 32px;
}

.invoice-pdf-file p {
    margin: 6px 0 0;
    color: var(--yc-muted);
    font-weight: 700;
}

.invoice-pdf-state {
    color: var(--yc-night-muted, #64748b);
}

.invoice-pdf-state.is-ready {
    color: var(--yc-night-green, #16a34a);
}

.invoice-header-menu {
    margin-left: auto;
}

.invoice-header-menu__panel {
    grid-template-columns: minmax(190px, 1fr);
}

.invoice-header-menu__panel .yc-btn,
.invoice-header-menu__panel form,
.invoice-header-menu__panel form .yc-btn {
    width: 100%;
    justify-content: center;
}

@media (max-width: 1200px) {
    .invoice-filters {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .invoice-statistics-grid {
        grid-template-columns: 1fr;
    }

    .invoice-overview-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .invoice-pdf-preview-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .invoice-accordion-columns {
        grid-template-columns: minmax(0, 1fr);
    }

    .invoice-item-row:not(.invoice-items-table__row) {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .invoice-item-row:not(.invoice-items-table__row) .invoice-item-row__name,
    .invoice-item-row:not(.invoice-items-table__row) .invoice-item-row__total {
        grid-column: 1 / -1;
    }
}

@media (max-width: 760px) {
    .invoice-filters,
    .invoice-stat-filters,
    .invoice-item-row:not(.invoice-items-table__row) {
        grid-template-columns: 1fr;
    }

    .invoice-overview-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .invoice-pdf-preview-card {
        padding: 12px;
    }

    .invoice-stat-filters__actions,
    .invoice-stat-filters__actions .yc-btn {
        width: 100%;
    }

    .invoice-stat-total-card {
        padding: 20px;
    }

    .invoice-summary {
        justify-content: stretch;
    }

    .invoice-total-line {
        justify-content: space-between;
    }

    .invoice-total-line strong {
        min-width: 0;
    }
}

.home .yc-page-header {
    margin-bottom: 0;
}

.schedule-page .schedule-days-sticky {
    padding-top: 10px;
    padding-bottom: 12px;
    margin-bottom: 12px;
}

.calendar-page,
.shopping-page {
    display: grid;
    gap: 6px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.calendar-main,
.finance-controls,
.finance-filter-box,
.shopping-tabs-panel {
    min-width: 0;
}

.calendar-main {
    display: grid;
    gap: 14px;
}

.finance-controls {
    display: grid;
    gap: 12px;
}

.shopping-tabs-panel {
    padding: 8px 12px 0;
}

@media (max-width: 760px) {
    .yc-page-header {
        gap: 8px;
        margin-bottom: 6px;
        padding: 10px 12px;
        border-radius: var(--yc-radius-md);
        flex-direction: row;
        flex-wrap: nowrap;
    }

    .yc-page-header__title {
        gap: 10px;
    }

    .yc-page-header__icon {
        width: 40px;
        height: 40px;
    }

    .yc-page-header__icon svg {
        width: 20px;
        height: 20px;
    }

    .yc-page-header .yc-page-title {
        font-size: 22px;
    }

    .yc-page-header__actions {
        width: auto;
        max-width: 58%;
        justify-content: flex-end;
        flex-wrap: nowrap;
        overflow-x: auto;
        scrollbar-width: none;
    }

    .yc-page-header__actions::-webkit-scrollbar {
        display: none;
    }

    .yc-page-header__actions .yc-btn {
        min-height: 38px;
        padding-right: 12px;
        padding-left: 12px;
        white-space: nowrap;
    }
}

/* Work + invoices responsive polish */
.work-page,
.invoice-page,
.invoices-page {
    max-width: 100%;
    overflow-x: clip;
}

.work-page .yc-page-header__title,
.invoice-page .yc-page-header__title,
.invoices-page .yc-page-header__title {
    min-width: 0;
}

.work-page .yc-page-header__actions,
.invoice-page .yc-page-header__actions,
.invoices-page .yc-page-header__actions {
    max-width: 100%;
}

.work-page .finance-tabs,
.invoice-page .finance-tabs,
.invoices-page .finance-tabs {
    min-width: 0;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
}

.work-page .finance-tabs::-webkit-scrollbar,
.invoice-page .finance-tabs::-webkit-scrollbar,
.invoices-page .finance-tabs::-webkit-scrollbar {
    display: none;
}

.work-page .finance-tab,
.invoice-page .finance-tab,
.invoices-page .finance-tab {
    flex: 0 0 auto;
}

.work-table,
.invoice-table {
    width: 100%;
    table-layout: auto;
    min-width: 0;
}

.work-table th,
.work-table td,
.invoice-table th,
.invoice-table td {
    min-width: 0;
}

.work-table .finance-table__amount,
.invoice-table .finance-table__amount,
.work-table .finance-table__actions,
.invoice-table .finance-table__actions {
    white-space: nowrap;
}

.work-table .finance-table__actions,
.invoice-table .finance-table__actions {
    width: 132px;
    text-align: right;
}

.work-table-wrap {
    overflow-x: visible;
}

.work-mobile-list {
    position: relative;
    z-index: 1;
}

.work-mobile-card,
.work-mobile-card__body {
    min-width: 0;
}


.work-mobile-card__body {
    display: grid;
    gap: 4px;
}

.work-action-menu {
    position: relative;
}

.work-action-menu summary::-webkit-details-marker,
.work-action-menu summary::marker {
    display: none;
    content: "";
}

.work-action-menu-panel {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 90;
    display: none;
    grid-template-columns: repeat(2, 34px);
    width: fit-content;
    min-width: 0;
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 16px;
    padding: 8px;
    background: rgba(var(--yc-night-surface-rgb, 255, 255, 255), 0.98);
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.18);
}

.work-action-menu[open] .work-action-menu-panel {
    display: grid;
}

.invoices-page .work-action-menu-panel {
    grid-template-columns: repeat(3, 34px);
}

.invoice-item-row,
.invoice-summary,
.invoice-pdf-actions {
    min-width: 0;
}

.work-detail-page .work-detail-card {
    padding: 16px;
}

.work-detail-page .work-client-form,
.invoice-page .invoice-form {
    min-width: 0;
}

.work-detail-page .work-client-form {
    padding: 0;
}

.invoice-page .invoice-form {
    padding: 16px;
}

.work-detail-page .work-form-section,
.invoice-page .work-form-section {
    padding: 14px 16px;
    background: rgba(var(--yc-night-soft-rgb, 248, 250, 252), 0.56);
}

.work-detail-page .yc-field,
.work-detail-page .yc-toggle,
.invoice-page .yc-field,
.invoice-page .yc-toggle {
    min-width: 0;
}

.work-detail-page .yc-input,
.work-detail-page .yc-select,
.work-detail-page .yc-textarea,
.invoice-page .yc-input,
.invoice-page .yc-select,
.invoice-page .yc-textarea {
    width: 100%;
    min-width: 0;
}

@media (min-width: 1000px) {
    .work-table th:last-child,
    .work-table td:last-child {
        width: 112px;
    }

    .invoice-table {
        table-layout: fixed;
    }

    .invoice-table th:nth-child(2),
    .invoice-table td:nth-child(2) {
        width: 11%;
    }

    .invoice-table th:nth-child(3),
    .invoice-table td:nth-child(3) {
        width: 13%;
    }

    .invoice-table th:nth-child(4),
    .invoice-table td:nth-child(4) {
        width: 20%;
    }

    .invoice-table th:nth-child(5),
    .invoice-table td:nth-child(5),
    .invoice-table th:nth-child(6),
    .invoice-table td:nth-child(6) {
        width: 13%;
    }

    .invoice-table th:nth-child(7),
    .invoice-table td:nth-child(7) {
        width: 13%;
    }

    .invoice-table th:nth-child(8),
    .invoice-table td:nth-child(8) {
        width: 7%;
    }

    .invoice-table th:nth-child(9),
    .invoice-table td:nth-child(9) {
        width: 10%;
    }
}

@media (max-width: 999px) {
    .work-table-wrap {
        display: none;
    }

    .work-mobile-list {
        display: grid;
    }

    .work-page .finance-tabs,
    .invoice-page .finance-tabs,
    .invoices-page .finance-tabs {
        margin-right: -14px;
        margin-left: -14px;
        padding-right: 24px;
        padding-left: 14px;
    }
}

@media (max-width: 768px) {
    .work-page,
    .invoice-page,
    .invoices-page {
        min-width: 0;
    }

    .work-page .yc-page-header,
    .invoice-page .yc-page-header,
    .invoices-page .yc-page-header {
        align-items: stretch;
        flex-direction: column;
        gap: 12px;
        padding: 12px;
    }

    .work-page .yc-page-header__title,
    .invoice-page .yc-page-header__title,
    .invoices-page .yc-page-header__title {
        align-items: flex-start;
        width: 100%;
    }

    .work-page .yc-page-header .yc-page-title,
    .invoice-page .yc-page-header .yc-page-title,
    .invoices-page .yc-page-header .yc-page-title {
        overflow: visible;
        font-size: 23px;
        line-height: 1.18;
        text-overflow: clip;
        white-space: normal;
        word-break: normal;
        overflow-wrap: anywhere;
    }

    .work-detail-page:not(.invoice-page) .work-hero__title {
        align-items: center;
    }

    .work-detail-page:not(.invoice-page) .work-hero__title > div {
        display: flex;
        min-width: 0;
        align-items: center;
    }

    .work-detail-page:not(.invoice-page) .work-hero__title .yc-page-title {
        margin: 0;
        line-height: 1.1;
    }

    .work-page .yc-page-header__icon,
    .invoice-page .yc-page-header__icon,
    .invoices-page .yc-page-header__icon {
        width: 42px;
        height: 42px;
    }

    .work-page .yc-page-header__actions,
    .invoice-page .yc-page-header__actions,
    .invoices-page .yc-page-header__actions {
        justify-content: stretch;
        width: 100%;
        max-width: 100%;
        overflow-x: visible;
        flex-wrap: wrap;
    }

    .invoice-page .invoice-detail-actions--desktop {
        display: none;
    }

    .invoice-page .invoice-detail-actions--mobile {
        display: flex;
        justify-content: flex-end;
        width: auto;
        margin-left: auto;
    }

    .invoice-page .invoice-detail-actions--mobile .yc-btn {
        flex: 0 0 auto;
        white-space: nowrap;
    }

    .invoice-page .invoice-detail-hero {
        align-items: center;
        flex-direction: row;
        flex-wrap: nowrap;
    }

    .invoice-page .invoice-detail-title {
        flex-wrap: wrap;
    }

    .invoice-page .invoice-detail-actions {
        justify-content: flex-end;
        width: auto;
        margin-left: auto;
    }

    .work-page .yc-page-header__actions .yc-btn,
    .invoice-page .yc-page-header__actions .yc-btn,
    .invoices-page .yc-page-header__actions .yc-btn {
        flex: 1 1 min(100%, 150px);
        justify-content: center;
        min-width: 0;
        white-space: normal;
    }

    .work-page--projects .yc-page-header,
    .work-page--clients .yc-page-header,
    .work-page--jobs .yc-page-header,
    .invoices-page .yc-page-header,
    .documents-page .yc-page-header,
    .password-page .yc-page-header,
    .settings-page .yc-page-header {
        align-items: center;
        flex-direction: row;
        flex-wrap: nowrap;
        gap: 10px;
    }

    .work-page--projects .yc-page-header__title,
    .work-page--clients .yc-page-header__title,
    .work-page--jobs .yc-page-header__title,
    .invoices-page .yc-page-header__title,
    .documents-page .yc-page-header__title,
    .password-page .yc-page-header__title,
    .settings-page .yc-page-header__title {
        align-items: center;
        width: auto;
        min-width: 0;
    }

    .work-page--projects .yc-page-header .yc-page-title,
    .work-page--clients .yc-page-header .yc-page-title,
    .work-page--jobs .yc-page-header .yc-page-title,
    .invoices-page .yc-page-header .yc-page-title,
    .documents-page .yc-page-header .yc-page-title,
    .password-page .yc-page-header .yc-page-title,
    .settings-page .yc-page-header .yc-page-title {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        overflow-wrap: normal;
    }

    .work-page--projects .yc-page-header__actions,
    .work-page--clients .yc-page-header__actions,
    .work-page--jobs .yc-page-header__actions,
    .invoices-page .yc-page-header__actions,
    .documents-page .yc-page-header__actions,
    .password-page .yc-page-header__actions,
    .settings-page .yc-page-header__actions {
        flex: 0 0 auto;
        justify-content: flex-end;
        width: auto;
        margin-left: auto;
        flex-wrap: nowrap;
    }

    .work-page--projects .yc-page-header__actions .yc-btn,
    .work-page--clients .yc-page-header__actions .yc-btn,
    .work-page--jobs .yc-page-header__actions .yc-btn,
    .invoices-page .yc-page-header__actions .yc-btn,
    .documents-page .yc-page-header__actions .yc-btn,
    .password-page .yc-page-header__actions .yc-btn,
    .settings-page .yc-page-header__actions .yc-btn {
        flex: 0 0 auto;
        min-width: 96px;
        white-space: nowrap;
    }

    .documents-page .yc-page-header__actions {
        max-width: none;
        gap: 8px;
        overflow-x: visible;
    }

    .documents-page .yc-page-header__actions .yc-btn {
        min-width: 0;
        padding-right: 10px;
        padding-left: 10px;
    }

.invoice-page .invoice-detail-actions .yc-btn {
    flex: 0 0 auto;
    width: auto;
    white-space: nowrap;
}

    .invoice-page .invoice-detail-actions--mobile .yc-btn {
        flex: 0 0 auto;
        width: 100%;
        white-space: nowrap;
    }

    .work-client-dashboard {
        grid-template-columns: minmax(0, 1fr) !important;
        gap: 12px;
    }

    .work-dashboard-pins-row {
        grid-template-columns: minmax(0, 1fr);
        gap: 12px;
    }

    .work-dashboard-card,
    .work-dashboard-card--wide {
        grid-column: 1 / -1;
        min-width: 0;
    }

    .work-dashboard-card dl div {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: 4px;
    }

    .work-dashboard-card dt,
    .work-dashboard-card dd {
        min-width: 0;
        text-align: left;
        overflow-wrap: anywhere;
        word-break: normal;
    }

    .work-dashboard-card__header {
        align-items: stretch;
    }

    .work-dashboard-card__header .yc-btn {
        justify-content: center;
        width: 100%;
    }

    .work-mobile-card {
        grid-template-columns: auto minmax(0, 1fr) auto;
        align-items: start;
        padding: 12px 14px;
    }

    .work-mobile-title {
        overflow: visible;
        text-overflow: clip;
        white-space: normal;
        overflow-wrap: anywhere;
    }

    .work-mobile-card small,
    .work-mobile-card em {
        overflow-wrap: anywhere;
    }

    .work-filter-card {
        padding: 12px;
    }

    .work-filter-form,
    .invoice-filters,
    .work-filters,
    .work-filters--clients,
    .work-filters--projects {
        grid-template-columns: minmax(0, 1fr) !important;
        min-width: 0;
    }

    .work-filter-form .yc-field,
    .invoice-filters .yc-field,
    .work-filters .yc-field,
    .work-filter-search,
    .finance-search-control {
        width: 100%;
        min-width: 0;
    }

    .work-detail-page .work-detail-card,
    .invoice-page .invoice-form {
        padding: 12px;
    }

    .work-detail-page .work-client-form {
        padding: 0;
    }

    .work-detail-page .finance-form,
    .invoice-page .finance-form,
    .work-detail-page .work-form-section__grid,
    .invoice-page .work-form-section__grid {
        grid-template-columns: minmax(0, 1fr) !important;
    }

    .work-detail-page .work-form-section,
    .invoice-page .work-form-section {
        padding: 12px;
        gap: 12px;
    }

    .work-detail-page .work-form-section__wide,
    .invoice-page .work-form-section__wide,
    .work-detail-page .finance-form > *,
    .invoice-page .finance-form > *,
    .work-detail-page .work-form-section__grid > *,
    .invoice-page .work-form-section__grid > * {
        grid-column: 1 / -1;
        min-width: 0;
    }

    .work-detail-page .calendar-toggle,
    .invoice-page .calendar-toggle {
        width: 100%;
        min-width: 0;
    }

    .invoice-items-add {
        justify-content: stretch;
    }

    .invoice-items-add .yc-btn {
        width: 100%;
        justify-content: center;
    }

    .invoice-item-row:not(.invoice-items-table__row) {
        grid-template-columns: minmax(0, 1fr) !important;
        padding: 12px;
        border-radius: 14px;
    }

    .invoice-item-row:not(.invoice-items-table__row) > *,
    .invoice-item-row:not(.invoice-items-table__row) .invoice-item-row__name,
    .invoice-item-row:not(.invoice-items-table__row) .invoice-item-row__total {
        grid-column: 1 / -1;
        min-width: 0;
    }

    .invoice-item-row:not(.invoice-items-table__row) .invoice-item-row__remove {
        justify-self: end;
    }

    .invoice-accordion summary {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .invoice-accordion summary em {
        grid-column: 1 / -1;
        text-align: left;
    }

    .invoice-pdf-card {
        display: grid;
    }

    .invoice-pdf-file {
        align-items: flex-start;
    }

    .invoice-summary {
        justify-content: stretch;
    }

    .invoice-total-line {
        align-items: flex-start;
        flex-direction: column;
        gap: 4px;
    }

    .invoice-total-line strong {
        width: 100%;
        text-align: left;
    }

    .invoice-pdf-actions {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
    }

    .invoice-pdf-actions .yc-btn,
    .invoice-pdf-actions form,
    .invoice-pdf-actions form .yc-btn {
        width: 100%;
        justify-content: center;
    }
}

/* Shopping module: align with CRM work/finance layout */
.shopping-page {
    gap: 12px;
    max-width: 100%;
    overflow-x: clip;
}

.shopping-hero {
    min-width: 0;
    padding: 14px 16px;
    border-color: rgba(148, 163, 184, 0.18);
    border-radius: var(--yc-radius-lg);
    background: var(--yc-night-surface, #fff);
    box-shadow: var(--yc-shadow-sm);
}

.shopping-hero__title {
    min-width: 0;
}

.shopping-hero__actions {
    max-width: 100%;
}

.shopping-hero__actions .yc-btn {
    min-height: 48px;
    border-radius: 12px;
    padding-inline: 18px;
    font-size: 14px;
    font-weight: 650;
}

.shopping-tabs-panel {
    padding: 12px 16px;
    border-color: rgba(148, 163, 184, 0.18);
    border-radius: var(--yc-radius-lg);
    background: var(--yc-night-surface, #fff);
    box-shadow: var(--yc-shadow-sm);
}

.shopping-page .yc-sticky-tabs {
    z-index: 90;
}

.shopping-tabs {
    min-width: 0;
    gap: 8px;
    overflow-x: auto;
    padding: 0;
    border-bottom: 0;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
}

.shopping-tabs::-webkit-scrollbar {
    display: none;
}

.shopping-tabs .finance-tab {
    min-height: 38px;
    flex: 0 0 auto;
    gap: 7px;
    padding: 0 14px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 999px;
    color: var(--yc-night-muted, #475569);
    background: var(--yc-night-surface, #fff);
    box-shadow: none;
}

.shopping-tabs .finance-tab:hover,
.shopping-tabs .finance-tab:focus-visible {
    color: var(--yc-night-accent, var(--yc-primary));
    border-color: rgba(124, 58, 237, 0.28);
    background: rgba(124, 58, 237, 0.06);
}

.shopping-tabs .finance-tab.is-active {
    color: #fff !important;
    border-color: transparent !important;
    background: var(--yc-primary-gradient) !important;
    box-shadow: none !important;
}

.shopping-inner-tabs {
    width: fit-content;
    max-width: 100%;
    padding: 8px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 18px;
    background: var(--yc-night-surface, #fff);
    box-shadow: var(--yc-shadow-sm);
}

.shopping-overview-layout,
.shopping-overview-main,
.shopping-overview-side,
.shopping-overview-grid,
.shopping-section-grid,
.shopping-feature-grid {
    gap: 14px;
    min-width: 0;
}

.shopping-overview-layout {
    grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.9fr);
}

.shopping-section-grid {
    grid-template-columns: minmax(300px, 0.42fr) minmax(0, 1fr);
    align-items: start;
}

.shopping-section-grid--lists {
    grid-template-columns: minmax(360px, 420px) minmax(0, 1fr);
}

.shopping-section-grid--items-areas {
    grid-template-columns: minmax(0, 1fr);
}

.shopping-overview-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.shopping-card {
    display: grid;
    gap: 14px;
    min-width: 0;
    padding: 18px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 18px;
    background: linear-gradient(180deg, var(--yc-night-surface, #fff) 0%, var(--yc-night-surface, #fbfdff) 100%);
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.06);
}

.shopping-card h2 {
    margin: 0;
    color: var(--yc-night-text, #0f172a);
    font-size: 18px;
    font-weight: 850;
    letter-spacing: 0;
}

.shopping-card-head {
    margin-bottom: 0;
    align-items: center;
}

.shopping-card-head p,
.shopping-suggestion-card p,
.shopping-feature-grid p {
    color: var(--yc-night-muted, #64748b);
    font-weight: 650;
}

.shopping-form,
.shopping-add-item,
.shopping-create-form {
    gap: 12px;
}

.shopping-form {
    align-content: start;
}

.shopping-form .yc-btn,
.shopping-add-item .yc-btn,
.shopping-create-form .yc-btn {
    justify-content: center;
}

.shopping-item-create-line {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: end;
    gap: 10px;
}

.shopping-item-create-line .shopping-thumb-picker {
    align-self: end;
}

.shopping-item-create-name {
    min-width: 0;
}

.shopping-create-card {
    align-content: start;
}

.shopping-create-form {
    grid-template-columns: minmax(0, 1fr) minmax(220px, 0.64fr);
}

.shopping-autocomplete-menu {
    display: none;
}

.shopping-create-empty {
    margin-top: 4px;
    border: 1px dashed rgba(148, 163, 184, 0.34);
    border-radius: 16px;
    background: rgba(var(--yc-night-surface-rgb, 255, 255, 255), 0.72);
}

.shopping-products-table {
    gap: 8px;
    border-top: 0;
}

.shopping-table-list,
.shopping-items-list,
.shopping-checklist,
.shopping-list-stack {
    min-width: 0;
}

.shopping-products-header,
.shopping-product-row {
    grid-template-columns: minmax(180px, 1.35fr) minmax(130px, 0.9fr) 100px 112px 74px;
}

.shopping-products-header {
    min-height: 34px;
    padding: 0 12px;
    color: var(--yc-night-muted, #64748b);
}

.shopping-product-row,
.shopping-row,
.shopping-list-tile,
.shopping-item-editor,
.shopping-check-row,
.shopping-list-dashboard-card {
    border-color: rgba(148, 163, 184, 0.2);
    border-radius: 16px;
    background: var(--yc-night-surface, #fff);
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.04);
}

.shopping-product-row {
    min-height: 58px;
    padding: 10px 12px;
    border-top: 0;
}

.shopping-row {
    min-height: 48px;
}

.shopping-list-tile {
    min-height: 56px;
}

.shopping-item-editor {
    min-height: 56px;
}

.shopping-product-name strong,
.shopping-list-dashboard-main strong,
.shopping-list-tile strong,
.shopping-check-row strong,
.shopping-row strong {
    overflow: hidden;
    color: var(--yc-night-text, #0f172a);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.shopping-product-category {
    min-height: 30px;
    width: fit-content;
    max-width: 100%;
    padding: 0 10px;
    border-radius: 999px;
    color: var(--yc-night-accent, #6d28d9);
    background: rgba(124, 58, 237, 0.08);
}

.shopping-product-row b,
.shopping-row b,
.shopping-list-tile b {
    color: var(--yc-night-accent, #6d28d9);
}

.shopping-list-dashboard-card {
    grid-template-columns: auto minmax(0, 1fr) auto minmax(96px, 120px) auto;
    padding: 12px;
}

.shopping-list-dashboard-icon,
.shopping-feature-grid span,
.shopping-create-empty span {
    color: var(--yc-night-accent, #6d28d9);
    background: rgba(124, 58, 237, 0.1);
}

.shopping-list-dashboard-progress em {
    background: rgba(148, 163, 184, 0.18);
}

.shopping-list-dashboard-progress i {
    background: linear-gradient(90deg, #7c3aed, #22c55e);
}

.shopping-list-dashboard-percent {
    color: var(--yc-night-green, #16a34a);
}

.shopping-list-tile.is-active {
    border-color: rgba(124, 58, 237, 0.34);
    background: rgba(124, 58, 237, 0.08);
    box-shadow: inset 0 0 0 1px rgba(124, 58, 237, 0.08), 0 12px 28px rgba(124, 58, 237, 0.08);
}

.shopping-suggestion-card {
    align-content: start;
}

.shopping-suggestions span {
    min-height: 32px;
    color: var(--yc-night-accent, #6d28d9);
    background: rgba(124, 58, 237, 0.08);
}

.shopping-member-list {
    border-top-color: rgba(148, 163, 184, 0.18);
}

.shopping-feature-grid article {
    min-width: 0;
    padding: 16px;
    border-color: rgba(148, 163, 184, 0.2);
    border-radius: 18px;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.05);
}

.shopping-items-list,
.shopping-list-stack,
.shopping-checklist,
.shopping-table-list {
    gap: 10px;
}

.shopping-category-create {
    grid-template-columns: minmax(0, 1fr) minmax(190px, 0.6fr) auto;
    margin-top: 12px;
}

.shopping-category-manager {
    display: grid;
    gap: 10px;
    margin-top: 14px;
}

.shopping-category-row {
    display: grid;
    gap: 12px;
    padding: 12px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 16px;
    background: var(--yc-night-surface, #fff);
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.04);
}

.shopping-category-row__summary {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    min-width: 0;
}

.shopping-category-row__main {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.shopping-category-row__main strong {
    overflow: hidden;
    color: var(--yc-night-text, #0f172a);
    font-size: 15px;
    font-weight: 850;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.shopping-category-row__main small {
    color: var(--yc-night-muted, #64748b);
    font-size: 12px;
    font-weight: 800;
}

.shopping-category-row__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.shopping-category-action {
    position: relative;
}

.shopping-category-action > summary {
    display: inline-flex;
    min-height: 36px;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 0 14px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 999px;
    background: var(--yc-night-surface, #fff);
    color: var(--yc-night-accent, #6d28d9);
    font-size: 13px;
    font-weight: 800;
    list-style: none;
    cursor: pointer;
}

.shopping-category-action > summary::-webkit-details-marker {
    display: none;
}

.shopping-category-action--delete > summary {
    color: var(--yc-night-error, #dc2626);
    border-color: rgba(220, 38, 38, 0.22);
    background: rgba(var(--yc-night-error-bg-rgb, 254, 242, 242), 0.82);
}

.shopping-category-action[open] > summary {
    border-color: rgba(124, 58, 237, 0.28);
    background: rgba(124, 58, 237, 0.08);
}

.shopping-category-row__rename,
.shopping-category-row__delete {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 40;
    width: min(520px, calc(100vw - 48px));
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    padding: 12px;
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 16px;
    background: var(--yc-night-surface, #fff);
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.16);
}

.shopping-category-row__delete {
    grid-template-columns: minmax(0, 1fr) auto;
}

.shopping-category-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.shopping-category-row__rename .shopping-category-form-actions,
.shopping-category-row__delete .shopping-category-form-actions {
    justify-self: end;
}

.shopping-item-editor {
    grid-template-columns: 52px minmax(220px, 1fr) auto;
}

.shopping-editor-header,
.shopping-category-editor-row,
.shopping-category-editor,
.shopping-category-delete-inline {
    display: grid;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.shopping-editor-header {
    min-height: 34px;
    padding: 0 12px;
    color: var(--yc-night-muted, #64748b);
    font-size: 12px;
    font-weight: 900;
}

.shopping-editor-header--items {
    grid-template-columns: 52px minmax(220px, 1fr) auto;
}

.shopping-editor-header--categories,
.shopping-category-editor-row {
    grid-template-columns: minmax(320px, 1fr) auto;
}

.shopping-admin-row {
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 16px;
    background: var(--yc-night-surface, #fff);
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.04);
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.shopping-item-editor.shopping-admin-row,
.shopping-category-editor-row.shopping-admin-row {
    padding: 10px;
}

.shopping-admin-row:hover {
    border-color: rgba(124, 58, 237, 0.28);
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.06);
}

.shopping-category-editor {
    grid-template-columns: 52px minmax(220px, 1fr);
}

.shopping-category-delete-inline {
    grid-template-columns: auto;
    justify-content: end;
}

.shopping-editor-actions {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    min-width: 0;
}

.shopping-editor-actions form {
    display: inline-flex;
    margin: 0;
}

.shopping-thumb {
    display: inline-flex;
    width: 42px;
    height: 42px;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 1px solid rgba(124, 58, 237, 0.16);
    border-radius: 14px;
    color: var(--yc-night-accent, #7c3aed);
    background: rgba(124, 58, 237, 0.08);
}

.shopping-thumb--picker {
    position: relative;
    cursor: pointer;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.shopping-thumb--picker:hover,
.shopping-thumb--picker:focus-within {
    border-color: rgba(124, 58, 237, 0.42);
    box-shadow: 0 10px 24px rgba(124, 58, 237, 0.14);
    transform: translateY(-1px);
}

.shopping-thumb-input {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
}

.shopping-thumb-picker {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.shopping-thumb-picker--compact {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.shopping-thumb-picker small {
    color: var(--yc-night-muted, #64748b);
    font-size: 12px;
    font-weight: 750;
}

.shopping-thumb-preview {
    display: inline-flex;
    position: relative;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
}

.shopping-thumb--empty .shopping-thumb-preview svg {
    display: none;
}

.shopping-thumb--empty .shopping-thumb-preview::before {
    content: "+";
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--yc-night-accent, #7c3aed);
    font-size: 22px;
    font-weight: 850;
    line-height: 1;
}

.shopping-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.shopping-thumb svg {
    width: 20px;
    height: 20px;
}

.shopping-thumb-picker--compact .shopping-thumb,
.shopping-thumb-picker--compact .mobile-camera-upload__button {
    width: 42px;
    height: 42px;
    min-height: 42px;
    flex: 0 0 42px;
    padding: 0;
    border-radius: 14px;
}

.shopping-thumb-picker--compact .mobile-camera-upload__button {
    border-color: rgba(124, 58, 237, 0.16);
    color: var(--yc-night-accent, #7c3aed);
    background: rgba(124, 58, 237, 0.08);
    box-shadow: none;
}

.shopping-thumb-picker--compact .mobile-camera-upload__button svg {
    width: 20px;
    height: 20px;
}

.shopping-file-input {
    font-size: 12px;
}

.shopping-item-editor > span:not(.shopping-editor-actions),
.shopping-item-editor > small {
    color: var(--yc-night-muted, #64748b);
    font-size: 12px;
    font-weight: 800;
}

.shopping-check-row {
    grid-template-columns: auto minmax(0, 1fr) auto;
    padding: 12px;
}

.shopping-check-row.has-thumbnail {
    grid-template-columns: auto auto minmax(0, 1fr) auto;
}

.shopping-check-row form:last-child {
    justify-self: end;
}

.shopping-stats span {
    border-color: rgba(148, 163, 184, 0.2);
    border-radius: 16px;
    background: var(--yc-night-surface, #fff);
}

.shopping-frequency-chart span {
    min-height: 40px;
    border-radius: 14px;
}

.shopping-frequency-chart span::before {
    background: linear-gradient(90deg, rgba(124, 58, 237, 0.22), rgba(34, 197, 94, 0.18));
}

.shopping-empty {
    border: 1px dashed rgba(148, 163, 184, 0.38);
    border-radius: 16px;
    padding: 18px;
    background: rgba(var(--yc-night-surface-rgb, 255, 255, 255), 0.74);
    text-align: center;
}

.shopping-workspace-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.8fr);
    gap: 14px;
    align-items: start;
}

.shopping-workspace-side,
.shopping-side-list,
.shopping-current-list,
.shopping-management-list,
.shopping-list-workflow {
    display: grid;
    gap: 12px;
    min-width: 0;
}

.shopping-history { overflow: visible; min-width: 0; }
.shopping-history h3 { margin: 14px 0 8px; font-size: 14px; }
.shopping-history__search { position: relative; }
.shopping-history__search > svg {
    position: absolute;
    inset-inline-start: 12px;
    top: 50%;
    width: 18px;
    height: 18px;
    transform: translateY(-50%);
    color: var(--yc-muted);
    pointer-events: none;
}
.shopping-history__search .yc-input { width: 100%; min-height: 44px; padding-inline-start: 38px; }
.shopping-history__search .shopping-autocomplete-option { min-height: 44px; overflow-wrap: anywhere; }
.shopping-history__search [aria-selected="true"] { background: var(--yc-surface-muted, #f1eff8); color: var(--yc-night-accent, var(--app-accent)); }
.shopping-history__status { margin: 8px 0 0; font-size: 13px; color: var(--yc-text); }
.shopping-history__status:empty { margin: 0; }
.shopping-history__top { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.shopping-history__top .shopping-empty { grid-column: 1 / -1; }
.shopping-history__item.yc-btn {
    display: flex;
    justify-content: space-between;
    gap: 6px;
    min-height: 44px;
    min-width: 0;
    padding-inline: 10px;
    text-align: start;
    white-space: normal;
}
.shopping-history__item span { min-width: 0; overflow-wrap: anywhere; }
.shopping-history__item small { flex: none; color: var(--yc-muted); font-weight: 500; }

.shopping-list-workflow {
    grid-template-columns: minmax(300px, 0.38fr) minmax(0, 1fr);
    align-items: start;
}

.shopping-mobile-create-toggle {
    display: none;
}

@media (max-width: 899px) {
    .shopping-mobile-create-toggle {
        display: grid;
    }

    .shopping-list-workflow > .shopping-mobile-create-toggle {
        display: none;
    }

    .shopping-mobile-create-toggle .finance-filter-toggle {
        display: inline-flex;
        width: 100%;
        justify-content: center;
    }

    .shopping-list-workflow > .shopping-list-create-card.finance-filter-panel {
        display: block;
    }

    .shopping-section-grid--items-products > .shopping-card.finance-filter-panel {
        display: none;
    }

    .shopping-section-grid--items-products > .shopping-card.finance-filter-panel.is-open {
        display: block;
    }
}

.shopping-kicker {
    color: var(--yc-night-accent, #7c3aed);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.shopping-current-head,
.shopping-card-head,
.shopping-list-manager-head,
.shopping-current-footer,
.shopping-management-card,
.shopping-current-item {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.shopping-current-head,
.shopping-list-manager-head {
    justify-content: space-between;
}

.shopping-current-head h2,
.shopping-list-create-card h2 {
    margin: 2px 0 0;
}

.shopping-progress-summary {
    display: grid;
    justify-items: end;
    gap: 3px;
    color: var(--yc-night-muted, #64748b);
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}

.shopping-progress-summary strong {
    color: var(--yc-night-green, #16a34a);
    font-size: 20px;
    font-weight: 950;
}

.shopping-progress-bar,
.shopping-management-card__main span {
    display: block;
    height: 8px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.18);
}

.shopping-progress-bar span,
.shopping-management-card__main span i {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #7c3aed, #22c55e);
}

.shopping-quick-add {
    position: relative;
    z-index: 5;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(110px, 150px) auto;
    gap: 10px;
    align-items: end;
    overflow: visible;
    padding: 12px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 16px;
    background: rgba(var(--yc-night-soft-rgb, 248, 250, 252), 0.8);
}

.shopping-quick-add .yc-btn {
    min-width: 118px;
}

.shopping-quick-add .shopping-quick-add-submit {
    width: 44px;
    min-width: 44px;
    height: 44px;
    min-height: 44px;
    padding: 0;
    border-color: #16a34a;
    border-radius: 12px;
    color: #fff;
    background: linear-gradient(135deg, #15803d 0%, #22c55e 100%);
    box-shadow: 0 10px 22px rgba(34, 197, 94, 0.16);
}

.shopping-quick-add .shopping-quick-add-submit svg {
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.shopping-quantity-stepper {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 28px;
    min-width: 0;
}

.shopping-quantity-stepper .yc-input {
    min-width: 0;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    text-align: center;
}

.shopping-quantity-stepper__controls {
    display: grid;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.32);
    border-left: 0;
    border-radius: 0 14px 14px 0;
    background: var(--yc-night-surface, #fff);
}

.shopping-quantity-stepper__btn {
    display: inline-flex;
    width: 28px;
    min-width: 28px;
    height: 50%;
    min-height: 18px;
    align-items: center;
    justify-content: center;
    border: 0;
    border-bottom: 1px solid rgba(148, 163, 184, 0.22);
    background: rgba(var(--yc-night-soft-rgb, 248, 250, 252), 0.92);
    color: var(--yc-night-muted, #475569);
    font: inherit;
    font-size: 12px;
    font-weight: 900;
    line-height: 1;
    cursor: pointer;
}

.shopping-quantity-stepper__btn:last-child {
    border-bottom: 0;
}

.shopping-quantity-stepper__btn:hover,
.shopping-quantity-stepper__btn:focus-visible {
    background: rgba(124, 58, 237, 0.1);
    color: var(--yc-night-accent, #6d28d9);
}

.shopping-current-item,
.shopping-management-card,
.shopping-side-list-card {
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 16px;
    background: var(--yc-night-surface, #fff);
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.04);
}

.shopping-current-item {
    min-height: 64px;
    padding: 10px 12px;
}

.shopping-current-card,
.shopping-list-manager-card {
    overflow: visible;
}

.shopping-current-card {
    position: relative;
    z-index: 3;
}

.shopping-list-manager-card {
    position: relative;
    z-index: 2;
}

.shopping-list-detail {
    position: relative;
    display: grid;
    gap: 12px;
    margin-top: 10px;
    padding-bottom: 18px;
    overflow: visible;
}

.shopping-list-detail::after {
    content: "";
    display: block;
    height: 1px;
    margin-top: 8px;
    background: rgba(148, 163, 184, 0.28);
}

.shopping-list-detail__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-width: 0;
}

.shopping-list-detail__head h3 {
    margin: 2px 0 0;
}

[data-shopping-list-sortable-row] {
    cursor: grab;
}

.shopping-check-toggle {
    display: inline-flex;
    width: 28px;
    min-width: 28px;
    height: 28px;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(34, 197, 94, 0.42);
    border-radius: 999px;
    background: var(--yc-night-surface, #fff);
    color: var(--yc-night-green, #16a34a);
    cursor: pointer;
    transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.shopping-check-toggle svg {
    width: 15px;
    height: 15px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.shopping-check-toggle:hover {
    border-color: rgba(22, 163, 74, 0.72);
    background: rgba(var(--yc-night-green-bg-rgb, 240, 253, 244), 0.72);
}

.shopping-check-row[aria-busy="true"] .shopping-check-toggle {
    transition: none;
}

.shopping-current-item.is-checked {
    color: #94a3b8;
    background: rgba(var(--yc-night-soft-rgb, 248, 250, 252), 0.72);
}

.shopping-current-item.is-checked .shopping-check-toggle,
.shopping-check-row.is-checked .shopping-check-toggle {
    border-color: #22c55e;
    background: #22c55e;
    color: #fff;
}

.shopping-current-item.is-checked .shopping-current-item__main strong {
    color: #94a3b8;
    text-decoration: line-through;
}

.shopping-current-item.is-shopping-dragging {
    opacity: 0.35;
}

.shopping-check-row,
.shopping-current-item {
    align-items: center;
}

.shopping-current-item__main {
    display: grid;
    flex: 1 1 auto;
    min-width: 0;
    gap: 4px;
}

.shopping-current-item__main strong,
.shopping-side-list-card strong,
.shopping-management-card strong {
    overflow: hidden;
    color: var(--yc-night-text, #0f172a);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.shopping-current-item__main span {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    color: var(--yc-night-muted, #64748b);
    font-size: 12px;
    font-weight: 800;
}

.shopping-list-item-thumb {
    display: inline-flex;
    width: 36px;
    min-width: 36px;
    height: 36px;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 10px;
    background: rgba(var(--yc-night-soft-rgb, 248, 250, 252), 0.9);
}

.shopping-list-item-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.shopping-current-item__main em {
    display: inline-flex;
    min-height: 24px;
    align-items: center;
    padding: 0 9px;
    border-radius: 999px;
    background: rgba(124, 58, 237, 0.08);
    color: var(--yc-night-accent, #6d28d9);
    font-style: normal;
}

.shopping-current-item__actions,
.shopping-management-card__actions {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.shopping-current-list .shopping-list-drag-handle {
    display: inline-flex;
}

.shopping-inline-edit {
    position: relative;
}

.shopping-inline-edit > summary {
    list-style: none;
    cursor: pointer;
}

.shopping-inline-edit > summary::-webkit-details-marker {
    display: none;
}

.shopping-inline-edit form {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    z-index: 60;
    display: grid;
    grid-template-columns: minmax(180px, 1fr) 90px auto;
    gap: 8px;
    width: min(420px, calc(100vw - 48px));
    padding: 10px;
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 14px;
    background: var(--yc-night-surface, #fff);
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.16);
}

.shopping-inline-edit--list form {
    grid-template-columns: minmax(220px, 1fr) auto;
}

.shopping-current-footer {
    justify-content: flex-end;
}

.shopping-complete-btn {
    min-width: 180px;
}

.shopping-current-empty {
    display: grid;
    justify-items: center;
    gap: 10px;
    min-height: 320px;
    align-content: center;
    text-align: center;
}

.shopping-current-empty span {
    display: inline-flex;
    width: 58px;
    height: 58px;
    align-items: center;
    justify-content: center;
    border-radius: 18px;
    background: rgba(124, 58, 237, 0.1);
    color: var(--yc-night-accent, #7c3aed);
}

.shopping-current-empty svg {
    width: 28px;
    height: 28px;
}

.shopping-side-list-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 12px;
    color: inherit;
    text-decoration: none;
}

.shopping-list-dashboard-card,
.shopping-management-card,
.shopping-side-list-card {
    border-color: rgba(124, 58, 237, 0.28);
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.12), rgba(168, 85, 247, 0.07));
    box-shadow: 0 12px 30px rgba(124, 58, 237, 0.08);
}

.shopping-list-dashboard-card:hover,
.shopping-side-list-card:hover,
.shopping-management-card:hover,
.shopping-side-list-card.is-active,
.shopping-management-card.is-active {
    border-color: rgba(124, 58, 237, 0.46);
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.16), rgba(168, 85, 247, 0.1));
    box-shadow: 0 14px 34px rgba(124, 58, 237, 0.12);
}

.shopping-side-list-card span,
.shopping-management-card__content {
    display: grid;
    min-width: 0;
    gap: 4px;
}

.shopping-management-card__main {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    min-width: 0;
    gap: 12px;
}

.shopping-side-list-card small,
.shopping-management-card small {
    color: var(--yc-night-muted, #64748b);
    font-size: 12px;
    font-weight: 800;
}

.shopping-side-list-card b,
.shopping-management-card__meta b {
    color: var(--yc-night-green, #16a34a);
    font-weight: 950;
    white-space: nowrap;
}

.shopping-list-create-form {
    display: grid;
    gap: 12px;
}

.shopping-list-create-form .yc-btn {
    justify-content: center;
}

.shopping-list-manager-card {
    align-content: start;
}

.shopping-list-manager-card .shopping-management-list {
    gap: 20px;
}

.shopping-list-switch {
    display: inline-flex;
    gap: 6px;
    padding: 5px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 999px;
    background: var(--yc-night-surface, #fff);
}

.shopping-list-switch a {
    display: inline-flex;
    min-height: 34px;
    align-items: center;
    justify-content: center;
    padding: 0 14px;
    border-radius: 999px;
    color: var(--yc-night-muted, #475569);
    font-size: 13px;
    font-weight: 850;
    text-decoration: none;
}

.shopping-list-switch a.is-active {
    color: #fff;
    background: #8b1fd1;
}

.shopping-management-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    padding: 12px;
}

.shopping-management-card__main {
    color: inherit;
    text-decoration: none;
}

.shopping-list-card-icon {
    display: inline-flex;
    width: 38px;
    height: 38px;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    color: var(--yc-night-accent, var(--yc-primary));
    background: rgba(124, 58, 237, 0.12);
    flex: 0 0 38px;
}

.shopping-list-card-icon svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.3;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.shopping-management-card__main span {
    margin-top: 3px;
}

.shopping-management-card__meta {
    display: grid;
    justify-items: end;
    gap: 3px;
}

.shopping-management-card--done {
    opacity: 0.92;
}

@media (max-width: 1100px) {
    .shopping-workspace-layout,
    .shopping-list-workflow {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 760px) {
    .shopping-workspace-layout,
    .shopping-list-workflow,
    .shopping-management-card {
        grid-template-columns: minmax(0, 1fr);
    }

    .shopping-quick-add {
        grid-template-columns: minmax(0, 1fr) clamp(76px, 24vw, 96px);
        gap: 10px 8px;
    }

    .shopping-quick-add .shopping-autocomplete-field,
    .shopping-quick-add .shopping-quantity-field {
        min-width: 0;
    }

    .shopping-quick-add .yc-btn {
        grid-column: 1 / -1;
        width: 100%;
        min-width: 0;
        justify-content: center;
    }

    .shopping-current-head,
    .shopping-list-manager-head,
    .shopping-list-detail__head {
        align-items: stretch;
        flex-direction: column;
    }

    .shopping-progress-summary,
    .shopping-management-card__meta {
        justify-items: start;
    }

    .shopping-list-switch {
        width: 100%;
        overflow-x: auto;
    }

    .shopping-list-switch a {
        flex: 1 0 auto;
    }

    .shopping-current-item {
        display: grid;
        grid-template-columns: auto minmax(0, 1fr) auto;
        align-items: center;
        padding: 12px;
        cursor: default;
    }

    .shopping-current-item__main {
        gap: 3px;
    }

    .shopping-current-item__main span {
        gap: 4px;
    }

    .shopping-current-item__main em {
        min-height: auto;
        padding: 0;
        background: transparent;
        color: var(--yc-night-muted, #64748b);
    }

    .shopping-current-item__actions {
        width: auto;
        justify-content: flex-end;
    }

    .shopping-current-list .shopping-list-drag-handle {
        display: inline-flex;
    }

    .shopping-inline-edit form {
        position: static;
        width: 100%;
        margin-top: 8px;
        grid-template-columns: minmax(0, 1fr);
    }

    .shopping-complete-btn,
    .shopping-list-create-form .yc-btn {
        width: 100%;
    }
}

.settings-invoice-branding {
    display: grid;
    gap: 12px;
}

.settings-logo-upload {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    padding: 16px;
    border: 1px dashed rgba(124, 58, 237, 0.36);
    border-radius: 16px;
    background: rgba(124, 58, 237, 0.04);
    cursor: pointer;
}

.settings-logo-upload__icon {
    display: inline-flex;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    color: var(--yc-night-accent, #7c3aed);
    background: rgba(124, 58, 237, 0.12);
}

.settings-logo-upload__icon svg {
    width: 21px;
    height: 21px;
}

.settings-logo-upload__preview {
    display: inline-flex;
    width: 52px;
    height: 52px;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 14px;
    background: var(--yc-night-surface, #fff);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.settings-logo-upload__preview img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 6px;
}

.settings-logo-upload strong {
    display: block;
    color: var(--yc-night-text, #111827);
    font-size: 15px;
    font-weight: 800;
}

.settings-logo-upload small {
    display: block;
    margin-top: 3px;
    color: var(--yc-night-muted, #64748b);
    font-size: 13px;
    font-weight: 700;
}

.settings-logo-upload input {
    max-width: 260px;
    min-width: 0;
    color: var(--yc-night-muted, #475569);
    font-size: 13px;
}

.settings-invoice-palette {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 10px;
}

.settings-color-option {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 46px;
    padding: 10px 12px;
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 14px;
    background: var(--yc-night-surface, #fff);
    color: var(--yc-night-muted, #334155);
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.settings-color-option:hover,
.settings-color-option:has(input:checked) {
    border-color: var(--invoice-color);
    background: color-mix(in srgb, var(--invoice-color) 9%, var(--yc-night-surface, #fff));
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--invoice-color) 16%, transparent), 0 14px 30px rgba(15, 23, 42, 0.08);
    transform: translateY(-1px);
}

.settings-color-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.settings-color-option span {
    width: 30px;
    height: 30px;
    flex: 0 0 auto;
    border-radius: 999px;
    background: var(--invoice-color);
    box-shadow: inset 0 0 0 4px rgba(255, 255, 255, 0.64);
}

.settings-color-option em {
    font-style: normal;
}

.settings-field-help {
    color: var(--yc-muted);
    font-size: 12px;
    font-weight: 700;
    line-height: 1.45;
}

.settings-color-option:has(input:checked)::after {
    content: none;
    display: none;
}

.yc-save-toast {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 1200;
    max-width: min(360px, calc(100vw - 28px));
    padding: 12px 16px;
    border: 1px solid rgba(22, 163, 74, 0.22);
    border-radius: 16px;
    background: rgba(var(--yc-night-green-bg-rgb, 240, 253, 244), 0.96);
    color: var(--yc-night-green, #166534);
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.16);
    font-size: 14px;
    font-weight: 800;
    opacity: 0;
    pointer-events: none;
    transform: translateY(12px);
    transition: opacity 0.22s ease, transform 0.22s ease;
}

.yc-save-toast.is-visible {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 760px) {
    .yc-save-toast {
        right: 14px;
        bottom: 14px;
        left: 14px;
    }
}

@media (max-width: 1100px) {
    .shopping-overview-layout,
    .shopping-overview-grid,
    .shopping-feature-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .shopping-overview-main,
    .shopping-overview-side {
        grid-column: 1 / -1;
    }

    .shopping-products-table,
    .shopping-items-list {
        overflow-x: auto;
        padding-bottom: 2px;
    }

    .shopping-products-header,
    .shopping-product-row {
        min-width: 760px;
    }

    .shopping-item-editor,
    .shopping-editor-header--items {
        min-width: 760px;
    }

    .shopping-category-editor-row,
    .shopping-editor-header--categories {
        min-width: 840px;
    }
}

@media (max-width: 760px) {
    .shopping-page {
        gap: 10px;
    }

    .shopping-hero {
        align-items: center;
        flex-direction: row;
        flex-wrap: nowrap;
        gap: 10px;
        padding: 10px 12px;
    }

    .shopping-hero__title {
        align-items: center;
        width: auto;
        min-width: 0;
    }

    .shopping-hero .yc-page-title {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .shopping-hero__actions {
        flex: 0 0 auto;
        align-items: center;
        flex-direction: row;
        justify-content: flex-end;
        width: auto;
        max-width: none;
        margin-left: auto;
        flex-wrap: nowrap;
    }

    .shopping-hero__actions .yc-btn {
        width: auto;
        flex: 0 0 auto;
        min-width: 96px;
        min-height: 38px;
        padding-right: 12px;
        padding-left: 12px;
        white-space: nowrap;
    }

    .shopping-tabs-panel,
    .shopping-card {
        padding: 12px;
        border-radius: 16px;
    }

    .shopping-tabs {
        margin-right: -14px;
        margin-left: -14px;
        padding: 0 14px;
    }

    .shopping-tabs .finance-tab {
        min-height: 36px;
        padding: 0 12px;
        font-size: 12px;
    }

    .shopping-inner-tabs {
        width: 100%;
    }

    .shopping-overview-layout,
    .shopping-overview-grid,
    .shopping-section-grid,
    .shopping-feature-grid,
    .shopping-create-form,
    .shopping-add-item,
    .shopping-category-create,
    .shopping-category-row,
    .shopping-category-row__rename,
    .shopping-category-row__delete,
    .shopping-category-editor-row,
    .shopping-category-editor,
    .shopping-category-delete-inline,
    .shopping-editor-header,
    .shopping-editor-header--items,
    .shopping-editor-header--categories {
        grid-template-columns: minmax(0, 1fr);
    }

    .shopping-card-head {
        align-items: stretch;
        flex-direction: column;
    }

    .shopping-products-table,
    .shopping-items-list {
        overflow-x: visible;
    }

    .shopping-section-grid--items-products,
    .shopping-section-grid--items-categories {
        grid-template-columns: minmax(0, 1fr);
    }

    .shopping-section-grid--items-products .shopping-form .yc-btn,
    .shopping-section-grid--items-categories .shopping-form .yc-btn {
        width: 100%;
    }

    .shopping-section-grid--items-products .shopping-form .shopping-thumb-picker,
    .shopping-section-grid--items-categories .shopping-form .shopping-thumb-picker {
        display: grid;
        grid-template-columns: 44px minmax(0, 1fr);
        align-items: center;
        gap: 10px;
    }

    .shopping-section-grid--items-products .shopping-form .shopping-thumb-picker--compact,
    .shopping-section-grid--items-categories .shopping-form .shopping-thumb-picker--compact {
        display: inline-flex;
        grid-template-columns: none;
        width: auto;
        gap: 8px;
    }

    .shopping-section-grid--items-products .shopping-form .shopping-thumb,
    .shopping-section-grid--items-categories .shopping-form .shopping-thumb,
    .shopping-item-editor .shopping-thumb,
    .shopping-category-editor .shopping-thumb {
        width: 44px;
        height: 44px;
        border-radius: 14px;
    }

    .shopping-item-editor,
    .shopping-editor-header--items,
    .shopping-category-editor-row,
    .shopping-editor-header--categories {
        min-width: 0;
    }

    .shopping-item-editor {
        grid-template-columns: 44px minmax(0, 1fr);
        align-items: center;
        gap: 10px;
        padding: 12px;
        border-radius: 16px;
    }

    .shopping-item-editor > .shopping-thumb {
        grid-column: 1;
        grid-row: 1;
    }

    .shopping-item-editor > .yc-input {
        grid-column: 2;
        grid-row: 1;
        min-width: 0;
    }

    .shopping-item-editor > .yc-select {
        grid-column: 1 / -1;
        grid-row: 2;
        width: 100%;
        min-width: 0;
    }

    .shopping-item-editor > .shopping-editor-actions {
        grid-column: 1 / -1;
        grid-row: 3;
        display: inline-flex;
        width: 100%;
        justify-content: flex-end;
    }

    .shopping-category-editor-row {
        grid-template-columns: minmax(0, 1fr);
        gap: 10px;
        padding: 12px;
        border-radius: 16px;
    }

    .shopping-category-editor {
        grid-template-columns: 44px minmax(0, 1fr);
        gap: 10px;
        width: 100%;
    }

    .shopping-category-editor > .yc-input {
        min-width: 0;
    }

    .shopping-category-editor-actions {
        display: inline-flex;
        width: auto;
        justify-content: flex-end;
        gap: 8px;
    }

    .shopping-category-delete-inline {
        display: inline-flex;
        width: auto;
        justify-content: flex-end;
    }

    .shopping-list-edit-form {
        grid-template-columns: minmax(0, 1fr);
    }

    .shopping-products-header {
        display: none;
    }

    .shopping-product-row,
    .shopping-item-editor,
    .shopping-list-dashboard-card,
    .shopping-row,
    .shopping-category-row__summary {
        min-width: 0;
        grid-template-columns: minmax(0, 1fr);
        gap: 8px;
    }

    .shopping-category-row__actions,
    .shopping-editor-actions {
        justify-content: stretch;
    }

    .shopping-item-editor {
        grid-template-columns: 44px minmax(0, 1fr) auto;
        grid-template-rows: auto auto;
        align-items: center;
        column-gap: 10px;
    }

    .shopping-item-editor > .shopping-thumb {
        grid-column: 1;
        grid-row: 1 / span 2;
    }

    .shopping-item-editor > .yc-input {
        grid-column: 2;
        grid-row: 1;
        min-width: 0;
    }

    .shopping-item-editor > .yc-select {
        grid-column: 2;
        grid-row: 2;
        min-width: 0;
    }

    .shopping-item-editor > .shopping-editor-actions {
        grid-column: 3;
        grid-row: 1 / span 2;
        align-self: center;
        justify-self: end;
        display: inline-flex;
        width: auto;
        flex-wrap: nowrap;
        justify-content: flex-end;
    }

    .shopping-category-editor-row {
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
    }

    .shopping-category-editor {
        grid-template-columns: 44px minmax(0, 1fr);
        align-items: center;
    }

    .shopping-category-editor-actions {
        align-self: center;
        justify-self: end;
        flex-wrap: nowrap;
        width: auto;
        justify-content: flex-end;
    }

    .shopping-category-action > summary {
        width: 100%;
    }

    .shopping-item-editor {
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: auto auto;
        gap: 10px;
        align-items: stretch;
    }

    .shopping-item-editor > .shopping-thumb {
        position: absolute;
        width: 1px;
        height: 1px;
        min-height: 1px;
        overflow: hidden;
        opacity: 0;
        pointer-events: none;
    }

    .shopping-item-editor > .yc-input {
        grid-column: 1;
        grid-row: 1;
        width: 100%;
    }

    .shopping-item-editor > .yc-select {
        grid-column: 1;
        grid-row: 2;
        width: 100%;
    }

    .shopping-item-editor > .shopping-editor-actions {
        grid-column: 1;
        grid-row: 2;
        justify-self: stretch;
        display: inline-flex;
        width: 100%;
        align-items: center;
        justify-content: flex-end;
        gap: 8px;
        flex-wrap: nowrap;
    }

    .shopping-category-editor-row {
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: auto auto;
        align-items: stretch;
        gap: 10px;
    }

    .shopping-category-editor {
        grid-template-columns: minmax(0, 1fr);
        width: 100%;
    }

    .shopping-category-editor > .shopping-thumb {
        position: absolute;
        width: 1px;
        height: 1px;
        min-height: 1px;
        overflow: hidden;
        opacity: 0;
        pointer-events: none;
    }

    .shopping-category-editor > .yc-input {
        grid-column: 1;
        width: 100%;
    }

    .shopping-category-editor-actions {
        justify-self: stretch;
        display: inline-flex;
        width: 100%;
        align-items: center;
        justify-content: flex-end;
        gap: 8px;
        flex-wrap: nowrap;
    }

    .shopping-editor-actions .shopping-thumb-camera-button {
        position: static;
        display: inline-flex;
        width: 42px;
        height: 42px;
        min-height: 42px;
        flex: 0 0 42px;
        padding: 0;
        border-radius: 14px;
        font-size: 0;
    }

    .shopping-editor-actions .shopping-thumb-camera-button svg {
        width: 20px;
        height: 20px;
    }

    .shopping-item-editor.shopping-admin-row {
        display: flex;
        flex-wrap: nowrap;
        align-items: center;
        gap: 8px;
        padding: 10px;
    }

    .shopping-item-editor > .shopping-thumb,
    .shopping-item-editor > .shopping-thumb-camera-button {
        position: relative;
        width: 42px;
        height: 42px;
        min-width: 42px;
        min-height: 42px;
        flex: 0 0 42px;
        opacity: 1;
        pointer-events: auto;
    }

    .shopping-item-editor > .shopping-thumb-camera-button {
        display: inline-flex;
        padding: 0;
        border-radius: 14px;
        font-size: 0;
    }

    .shopping-item-editor.has-thumbnail > .shopping-thumb-camera-button {
        display: none;
    }

    .shopping-item-editor > .yc-input {
        flex: 1 1 auto;
        min-width: 0;
        width: auto;
    }

    .shopping-item-editor > .shopping-editor-actions {
        flex: 0 0 auto;
        width: auto;
        justify-self: auto;
        justify-content: flex-end;
    }

    .shopping-category-row__rename,
    .shopping-category-row__delete {
        position: static;
        width: 100%;
        margin-top: 8px;
    }

    .shopping-editor-header {
        display: none;
    }

    .shopping-product-category {
        width: 100%;
        justify-content: center;
    }

    .shopping-product-actions {
        justify-content: flex-end;
    }

    .shopping-item-editor .yc-btn {
        width: 100%;
        justify-content: center;
    }

    .shopping-row,
    .shopping-list-tile,
    .shopping-check-row {
        padding: 12px;
    }

    .shopping-stats {
        grid-template-columns: minmax(0, 1fr);
    }

    .shopping-list-dashboard-progress {
        width: 100%;
    }
}

/* Unified action button sizing */
.yc-btn,
.modal-button {
    display: inline-flex;
    min-width: 112px;
    min-height: 48px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 12px;
    padding-inline: 18px;
    font-size: 14px;
    font-weight: 650;
    line-height: 1;
}

.yc-btn--sm {
    min-height: 48px;
    border-radius: 12px;
    padding-inline: 18px;
    font-size: 14px;
}

.yc-btn-icon--add,
.yc-page-header__actions .yc-btn--primary,
.work-hero__actions .yc-btn--primary,
.shopping-hero__actions .yc-btn--primary {
    min-width: 140px;
}

@media (max-width: 760px) {
    .shopping-hero__actions .yc-btn--primary {
        min-width: 96px;
        min-height: 38px;
        padding-right: 12px;
        padding-left: 12px;
    }
}

.yc-btn:not(.yc-btn--icon):not(.yc-btn--full),
.modal-button {
    width: auto;
    flex: 0 0 auto;
}

.yc-btn:not(.yc-btn--icon)::before,
.modal-button::before {
    display: none;
}

.yc-icon-btn,
.yc-btn--icon,
.app-icon-btn {
    width: 38px;
    min-width: 38px;
    height: 38px;
    min-height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 1px solid var(--yc-night-border, #dce2ea);
    border-radius: 12px;
    background: var(--yc-night-surface, #fff);
    color: var(--yc-night-muted, #64748b);
    box-shadow: none;
    line-height: 1;
    font-size: 0;
}

.documents-page .yc-page-header__actions .yc-btn--primary,
.password-page .yc-page-header__actions .yc-btn--primary {
    min-width: 0;
}

.documents-page__action-icons {
    display: none;
}

@media (max-width: 640px) {
    .documents-page .yc-page-header,
    .password-page .yc-page-header {
        display: flex;
        flex-direction: row;
        flex-wrap: nowrap;
        gap: 8px;
        align-items: center;
        min-width: 0;
    }

    .documents-page .yc-page-header__actions,
    .password-page .yc-page-header__actions {
        display: flex;
        flex: 0 0 auto;
        gap: 8px;
        width: auto;
        max-width: none;
        min-width: 0;
        margin-left: auto;
        overflow: visible;
    }

    .documents-page .yc-page-header__actions .yc-btn,
    .password-page .yc-page-header__actions .yc-btn {
        width: 30px;
        min-width: 30px;
        max-width: 30px;
        height: 30px;
        min-height: 30px;
        padding: 0;
        border-radius: 12px;
        overflow: visible;
    }

    .documents-page__action-text {
        display: none;
    }

    .documents-page__action-icons {
        position: relative;
        display: inline-grid;
        place-items: center;
        width: 18px;
        height: 18px;
        color: #fff;
    }

    .documents-page__action-icons svg {
        fill: none;
        stroke: #fff;
    }

    .documents-page__action-main {
        width: 16px;
        height: 16px;
        stroke-width: 2.1;
    }

    .documents-page__action-plus {
        position: absolute;
        top: -2px;
        right: -3px;
        width: 10px;
        height: 10px;
        padding: 1px;
        border-radius: 999px;
        stroke-width: 2.6;
    }

    .documents-page .work-folder-card .work-sub-card__header,
    .password-page .work-folder-card .work-sub-card__header {
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
        gap: 10px;
        width: 100%;
        min-width: 0;
    }

    .documents-page .work-folder-card .work-folder-card__link,
    .password-page .work-folder-card .work-folder-card__link {
        min-width: 0;
    }

    .documents-page .work-folder-card h3,
    .password-page .work-folder-card h3 {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .documents-page .work-folder-card .work-sub-actions--header,
    .password-page .work-folder-card .work-sub-actions--header {
        grid-column: 2;
        grid-row: 1;
        align-self: center;
        justify-content: flex-end;
        flex-wrap: nowrap;
        width: auto;
        min-width: 0;
        margin-left: auto;
    }

    .documents-page .work-folder-card .work-sub-actions--header > *,
    .password-page .work-folder-card .work-sub-actions--header > * {
        flex: 0 0 auto;
    }
}

.yc-icon-btn svg,
.yc-btn--icon svg,
.app-icon-btn svg {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.yc-btn--success,
.yc-modal-btn--success,
.modal-button.yc-modal-btn--success {
    color: #fff;
    border-color: transparent;
    background: linear-gradient(135deg, #15803d 0%, #22c55e 100%);
    box-shadow: 0 10px 22px rgba(34, 197, 94, 0.16);
}

.yc-btn--danger,
.yc-modal-btn--danger,
.modal-button.yc-modal-btn--danger {
    color: var(--yc-danger);
    border-color: var(--yc-night-button-danger-border, rgba(220, 38, 38, 0.58));
    background: var(--yc-night-surface, #fff);
    box-shadow: none;
}

.yc-icon-btn--neutral,
.yc-icon-btn--drag,
.yc-icon-btn--more,
.app-icon-btn.app-icon-btn--neutral,
.app-icon-btn.app-icon-btn--move,
.app-icon-btn.app-icon-btn--more,
.app-icon-btn.app-icon-btn--file,
.schedule-more-trigger {
    color: var(--yc-night-muted, #64748b);
    border-color: var(--yc-night-border, #dce2ea);
    background: var(--yc-night-surface, #fff);
    box-shadow: none;
}

.app-icon-btn.app-icon-btn--edit,
.work-inline-edit > summary.app-icon-btn {
    color: var(--yc-night-accent, #7c3aed);
    border-color: var(--yc-night-button-border, #d9ccff);
    background: var(--yc-night-surface, #fff);
    box-shadow: none;
}

.work-inline-edit > summary {
    width: 38px;
    min-width: 38px;
    height: 38px;
    min-height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    padding: 0;
    font-size: 0;
    line-height: 1;
}

.yc-icon-btn--danger,
.yc-btn--icon.yc-btn--danger,
.app-icon-btn.app-icon-btn--danger {
    color: var(--yc-night-error, #ef4444);
    border-color: var(--yc-night-button-danger-border, #fecaca);
    background: var(--yc-night-error-bg, #fef2f2);
    box-shadow: none;
}
.yc-icon-btn--warning,
.yc-btn--icon.yc-btn--warning,
.app-icon-btn.app-icon-btn--warning {
    color: var(--yc-night-warning, #f97316);
    border-color: var(--yc-night-button-warning-border, #fed7aa);
    background: var(--yc-night-warning-bg, #fff7ed);
    box-shadow: none;
}

.yc-icon-btn--success,
.yc-btn--icon.yc-btn--success,
.app-icon-btn.app-icon-btn--success {
    color: var(--yc-night-green, #16a34a);
    border-color: var(--yc-night-button-success-border, #b7eac8);
    background: var(--yc-night-green-bg, #ecfdf3);
    box-shadow: none;
}

.app-icon-btn.app-icon-btn--recurring-add {
    color: #fff;
    border-color: #22c55e;
    background: #22c55e;
    box-shadow: none;
}

.yc-icon-btn--neutral:hover,
.yc-icon-btn--neutral:focus-visible,
.yc-icon-btn--drag:hover,
.yc-icon-btn--drag:focus-visible,
.yc-icon-btn--more:hover,
.yc-icon-btn--more:focus-visible,
.app-icon-btn.app-icon-btn--neutral:hover,
.app-icon-btn.app-icon-btn--neutral:focus-visible,
.app-icon-btn.app-icon-btn--move:hover,
.app-icon-btn.app-icon-btn--move:focus-visible,
.app-icon-btn.app-icon-btn--more:hover,
.app-icon-btn.app-icon-btn--more:focus-visible,
.app-icon-btn.app-icon-btn--file:hover,
.app-icon-btn.app-icon-btn--file:focus-visible,
.schedule-more-trigger:hover,
.schedule-more-trigger:focus-visible {
    color: var(--yc-night-muted, #64748b);
    border-color: var(--yc-night-button-hover-border, var(--yc-night-border, #cbd5e1));
    background: var(--yc-night-surface, #f8fafc);
    box-shadow: none;
}

.app-icon-btn.app-icon-btn--edit:hover,
.app-icon-btn.app-icon-btn--edit:focus-visible,
.work-inline-edit > summary.app-icon-btn:hover,
.work-inline-edit > summary.app-icon-btn:focus-visible {
    color: var(--yc-night-accent, #6d28d9);
    border-color: var(--yc-night-button-hover-border, #c4b5fd);
    background: var(--yc-night-accent-bg, #f5f0ff);
    box-shadow: none;
}

.yc-icon-btn--danger:hover,
.yc-icon-btn--danger:focus-visible,
.yc-btn--icon.yc-btn--danger:hover,
.yc-btn--icon.yc-btn--danger:focus-visible,
.app-icon-btn.app-icon-btn--danger:hover,
.app-icon-btn.app-icon-btn--danger:focus-visible {
    color: var(--yc-night-error, #ef4444);
    border-color: var(--yc-night-button-danger-hover-border, #fecaca);
    background: var(--yc-night-error-bg, #fee2e2);
    box-shadow: none;
}
.yc-icon-btn--warning:hover,
.yc-icon-btn--warning:focus-visible,
.yc-btn--icon.yc-btn--warning:hover,
.yc-btn--icon.yc-btn--warning:focus-visible,
.app-icon-btn.app-icon-btn--warning:hover,
.app-icon-btn.app-icon-btn--warning:focus-visible {
    color: var(--yc-night-warning, #ea580c);
    border-color: var(--yc-night-button-warning-border, #fdba74);
    background: var(--yc-night-warning-bg, #ffedd5);
    box-shadow: none;
}

.yc-icon-btn--success:hover,
.yc-icon-btn--success:focus-visible,
.yc-btn--icon.yc-btn--success:hover,
.yc-btn--icon.yc-btn--success:focus-visible,
.app-icon-btn.app-icon-btn--success:hover,
.app-icon-btn.app-icon-btn--success:focus-visible {
    color: var(--yc-night-green, #15803d);
    border-color: var(--yc-night-button-success-border, #86efac);
    background: var(--yc-night-green-bg, #dcfce7);
    box-shadow: none;
}

.app-icon-btn.app-icon-btn--recurring-add:hover,
.app-icon-btn.app-icon-btn--recurring-add:focus-visible {
    color: #fff;
    border-color: #16a34a;
    background: #16a34a;
    box-shadow: none;
}
.app-icon-btn:disabled,
.yc-dropdown__item:disabled {
    opacity: 0.52;
    cursor: not-allowed;
    transform: none;
}

@media (max-width: 760px) {
    .yc-icon-btn,
    .yc-btn--icon,
    .app-icon-btn,
    .work-inline-edit > summary {
        width: 30px;
        min-width: 30px;
        height: 30px;
        min-height: 30px;
    }

    .yc-icon-btn svg,
    .yc-btn--icon svg,
    .app-icon-btn svg {
        width: 16px;
        height: 16px;
        flex-basis: 16px;
    }
}

.yc-modal-btn--cancel,
.yc-modal-btn--danger,
.yc-modal-btn--success {
    min-width: 112px;
    min-height: 48px;
    border-radius: 12px;
    padding-inline: 18px;
}

.yc-modal__actions,
.yc-modal__footer,
.modal-actions {
    gap: 12px;
    flex-wrap: wrap;
}

.yc-modal__actions form,
.yc-modal__footer form,
.modal-actions form {
    flex: 0 0 auto;
}

.yc-modal__actions .yc-modal-btn--cancel,
.yc-modal__actions .yc-modal-btn--danger,
.yc-modal__actions .yc-modal-btn--success,
.yc-modal__footer .yc-modal-btn--cancel,
.yc-modal__footer .yc-modal-btn--danger,
.yc-modal__footer .yc-modal-btn--success,
.modal-actions .yc-modal-btn--cancel,
.modal-actions .yc-modal-btn--danger,
.modal-actions .yc-modal-btn--success,
.modal-button.primary,
.modal-button.secondary,
.modal-button.danger {
    width: 140px;
    min-width: 140px;
    max-width: 100%;
}

/* Schedule and calendar form typography */
.schedule-page .quick-add .yc-input,
.schedule-page .quick-add .yc-select,
.schedule-page .quick-add input[type="text"],
.schedule-page .quick-add .meeting-time-input,
.schedule-page .priority-picker-trigger,
.schedule-page .priority-picker-trigger [data-priority-current],
.schedule-page .priority-picker-option,
.schedule-page .meeting-toggle,
.schedule-page .meeting-toggle span,
.schedule-page .schedule-advanced-toggle,
.schedule-page .schedule-advanced-toggle span,
.schedule-page .schedule-icon-picker__toggle,
.schedule-page .schedule-icon-picker__toggle span,
.schedule-page .modal-field .yc-input,
.schedule-page .modal-field .yc-select,
.schedule-page .modal-field .yc-textarea,
.schedule-page .modal-field .priority-picker-trigger,
.schedule-page .modal-field .meeting-time-input,
.schedule-page .modal-field .meeting-toggle,
.schedule-page .schedule-calendar-event-panel .yc-input,
.schedule-page .schedule-calendar-event-panel .yc-select,
.schedule-page .schedule-calendar-event-panel .yc-textarea,
.schedule-page .schedule-calendar-event-panel .yc-toggle,
.calendar-modal .yc-input,
.calendar-modal .yc-select,
.calendar-modal .yc-textarea,
.calendar-modal .calendar-toggle,
.calendar-modal .calendar-toggle span,
.calendar-event-type-trigger,
.calendar-event-type-trigger span,
.calendar-event-type-option,
.calendar-event-type-option span {
    font-size: 15px;
    line-height: 1.35;
    text-align: left;
    text-align-last: left;
}

.schedule-page .quick-add .yc-input,
.schedule-page .quick-add .yc-select,
.schedule-page .quick-add input[type="text"],
.schedule-page .quick-add .meeting-time-input,
.schedule-page .priority-picker-trigger,
.schedule-page .priority-picker-trigger [data-priority-current],
.schedule-page .priority-picker-option,
.schedule-page .schedule-advanced-toggle,
.schedule-page .schedule-advanced-toggle span,
.schedule-page .schedule-icon-picker__toggle,
.schedule-page .schedule-icon-picker__toggle span,
.schedule-page .modal-field .yc-input,
.schedule-page .modal-field .yc-select,
.schedule-page .modal-field .yc-textarea,
.schedule-page .modal-field .priority-picker-trigger,
.schedule-page .modal-field .meeting-time-input,
.schedule-page .schedule-calendar-event-panel .yc-input,
.schedule-page .schedule-calendar-event-panel .yc-select,
.schedule-page .schedule-calendar-event-panel .yc-textarea,
.calendar-modal .yc-input,
.calendar-modal .yc-select,
.calendar-modal .yc-textarea,
.calendar-event-type-trigger,
.calendar-event-type-trigger span,
.calendar-event-type-option,
.calendar-event-type-option span {
    font-weight: 600;
}

.schedule-page .meeting-toggle,
.schedule-page .meeting-toggle span,
.schedule-page .modal-field .meeting-toggle,
.schedule-page .schedule-calendar-event-panel .yc-toggle,
.calendar-modal .calendar-toggle,
.calendar-modal .calendar-toggle span {
    justify-content: flex-start;
    font-weight: 600;
}

.schedule-page .quick-add .yc-input,
.schedule-page .quick-add .yc-select,
.schedule-page .quick-add input[type="text"],
.schedule-page .quick-add .meeting-time-input,
.schedule-page .priority-picker-trigger,
.schedule-page .priority-picker-option,
.schedule-page .schedule-advanced-toggle,
.schedule-page .schedule-icon-picker__toggle,
.schedule-page .modal-field .yc-input,
.schedule-page .modal-field .yc-select,
.schedule-page .modal-field .yc-textarea,
.schedule-page .modal-field .priority-picker-trigger,
.schedule-page .modal-field .meeting-time-input,
.schedule-page .schedule-calendar-event-panel .yc-input,
.schedule-page .schedule-calendar-event-panel .yc-select,
.schedule-page .schedule-calendar-event-panel .yc-textarea,
.calendar-modal .yc-input,
.calendar-modal .yc-select,
.calendar-modal .yc-textarea,
.calendar-event-type-trigger,
.calendar-event-type-option {
    padding-left: 14px;
    padding-right: 14px;
}

.schedule-page .quick-add .yc-textarea,
.schedule-page .modal-field .yc-textarea,
.schedule-page .schedule-calendar-event-panel .yc-textarea,
.calendar-modal .yc-textarea {
    font-family: inherit;
}

.schedule-page .quick-add input[type="text"]::placeholder,
.schedule-page .quick-add .yc-input::placeholder,
.schedule-page .modal-field .yc-input::placeholder,
.schedule-page .modal-field .yc-textarea::placeholder,
.schedule-page .schedule-calendar-event-panel .yc-input::placeholder,
.schedule-page .schedule-calendar-event-panel .yc-textarea::placeholder,
.calendar-modal .yc-input::placeholder,
.calendar-modal .yc-textarea::placeholder {
    color: #94A3B8;
    font-weight: 500;
}

/* Schedule quick-add form field alignment */
.schedule-page .quick-add {
    --schedule-quick-field-height: 46px;
    --schedule-quick-field-padding-x: 14px;
    --schedule-quick-field-radius: 14px;
    --schedule-quick-field-border: 1px solid rgba(148, 163, 184, 0.34);
}

.schedule-page .quick-add > input[name="title"],
.schedule-page .quick-add .priority-picker-trigger,
.schedule-page .quick-add .meeting-time-input,
.schedule-page .quick-add .meeting-toggle,
.schedule-page .quick-add .schedule-advanced-toggle,
.schedule-page .quick-add .schedule-icon-picker__toggle {
    display: flex;
    min-height: var(--schedule-quick-field-height);
    align-items: center;
    justify-content: flex-start;
    border: var(--schedule-quick-field-border);
    border-radius: var(--schedule-quick-field-radius);
    padding: 0 var(--schedule-quick-field-padding-x);
    background: rgba(var(--yc-night-surface-rgb, 255, 255, 255), 0.96);
    color: var(--yc-night-text, #111827);
    font-size: 15px;
    font-weight: 600;
    line-height: 1.35;
    text-align: left;
    text-align-last: left;
    box-shadow: 0 1px 0 rgba(15, 23, 42, 0.03);
}

.schedule-page .quick-add > input[name="title"] {
    display: block;
}

.schedule-page .quick-add > input[name="title"]::placeholder {
    color: #94A3B8;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.35;
}

.schedule-page .quick-add .priority-picker-trigger [data-priority-current],
.schedule-page .quick-add .meeting-toggle span,
.schedule-page .quick-add .schedule-advanced-toggle span,
.schedule-page .quick-add .schedule-icon-picker__toggle span {
    min-width: 0;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.35;
    text-align: left;
}

.schedule-page .quick-add .priority-picker-trigger::after,
.schedule-page .quick-add .schedule-advanced-toggle__icon {
    margin-left: auto;
}

.schedule-page .quick-add .schedule-advanced-toggle__icon {
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
}

.schedule-page .quick-add .meeting-time-input[hidden] {
    display: none !important;
}

/* Invoice detail layout guards */
.invoice-page .invoice-overview-actions > *,
.invoice-page .invoice-overview-actions > form,
.invoice-page .invoice-overview-actions .yc-btn,
.invoice-page .invoice-overview-actions form > .yc-btn {
    display: flex;
    width: 100%;
    min-width: 0;
    min-height: 46px;
    height: 46px;
    flex: 1 1 auto;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    border-radius: var(--yc-radius-md);
    padding-right: 16px;
    padding-left: 16px;
}

.invoice-page .invoice-overview-actions {
    width: 100%;
}

.invoice-page .invoice-overview-actions > a.yc-btn,
.invoice-page .invoice-overview-actions > form {
    width: 100%;
    max-width: 100%;
    flex: 0 0 100%;
}

.invoice-page .invoice-overview-actions > form {
    display: flex;
    height: auto;
    min-height: 0;
    align-items: stretch;
    padding: 0;
    border-radius: 0;
}

.invoice-page .invoice-overview-actions > form > .yc-btn {
    width: 100%;
    max-width: 100%;
}

.invoice-page .invoice-overview-actions .yc-btn svg {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
}

.invoice-page .invoice-status-autosave-form .yc-field {
    width: 100%;
}

.invoice-page .invoice-status-autosave-form .yc-select {
    width: 100%;
    height: 46px;
    min-height: 46px;
    padding: 11px 42px 11px 13px;
    font-size: 15px;
    line-height: 22px;
}

.invoice-page .invoice-pdf-tab-actions .yc-btn,
.invoice-page .invoice-pdf-tab-actions form > .yc-btn {
    justify-content: flex-start;
    gap: 10px;
    text-align: left;
}

.invoice-page .invoice-pdf-tab-actions .yc-btn svg {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    color: var(--yc-night-accent, var(--yc-primary));
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
}

.invoice-page .invoice-pdf-tab-actions .yc-btn span {
    min-width: 0;
}

.invoice-page .invoice-pdf-tab-actions .yc-btn:disabled {
    cursor: not-allowed;
}

.invoice-page .invoice-form:not(.invoice-form--items) {
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
    max-width: none;
}

.invoice-page .invoice-form:not(.invoice-form--items) > .invoice-accordion-list,
.invoice-page .invoice-form:not(.invoice-form--items) .invoice-accordion-columns,
.invoice-page .invoice-form:not(.invoice-form--items) .invoice-accordion-column,
.invoice-page .invoice-form:not(.invoice-form--items) .invoice-accordion {
    width: 100%;
    min-width: 0;
}

.invoice-page .invoice-form:not(.invoice-form--items) > .invoice-accordion-list {
    grid-column: 1 / -1;
}

.invoice-page .invoice-form:not(.invoice-form--items) .invoice-accordion-columns {
    grid-template-columns: minmax(0, 1fr);
}

.invoice-page .invoice-form:not(.invoice-form--items) .invoice-accordion-list > .invoice-accordion:first-child .invoice-accordion__content {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

@media (max-width: 1200px) {
    .invoice-page .invoice-form:not(.invoice-form--items) .invoice-accordion-list > .invoice-accordion:first-child .invoice-accordion__content {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .invoice-page .invoice-form:not(.invoice-form--items) .invoice-accordion-columns,
    .invoice-page .invoice-form:not(.invoice-form--items) .invoice-accordion-list > .invoice-accordion:first-child .invoice-accordion__content {
        grid-template-columns: minmax(0, 1fr);
    }
}

.invoice-page .invoice-basic-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    grid-auto-flow: row;
}

.invoice-client-picker {
    display: grid;
    grid-column: 1 / 2;
    grid-row: 1;
    grid-template-columns: minmax(0, 1fr) 42px;
    gap: 10px;
    align-items: end;
    min-width: 0;
}

.invoice-client-picker .yc-field {
    min-width: 0;
}

.invoice-client-create {
    width: 42px;
    min-width: 42px;
    height: 42px;
    min-height: 42px;
}

.invoice-job-field {
    grid-column: 2 / 3;
    grid-row: 1;
}

.invoice-issue-date-field {
    grid-column: 1 / 2;
    grid-row: 2;
}

.invoice-taxable-supply-date-field {
    grid-column: 1 / 2;
    grid-row: 3;
}

.invoice-due-days-field {
    grid-column: 2 / 3;
    grid-row: 3;
}

.invoice-due-date-field {
    grid-column: 2 / 3;
    grid-row: 2;
}

.invoice-number-field {
    grid-column: 1 / 2;
    grid-row: 4;
}

.invoice-status-field {
    grid-column: 2 / 3;
    grid-row: 4;
}

.invoice-company-info {
    grid-column: 1 / -1;
    margin: 0;
    color: var(--yc-muted);
    font-size: 13px;
    font-weight: 700;
}

.invoice-form-boxes {
    display: grid;
    grid-column: 1 / -1;
    gap: 14px;
    width: 100%;
    min-width: 0;
}

.invoice-form-box {
    display: grid;
    gap: 16px;
    width: 100%;
    min-width: 0;
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: var(--yc-radius-lg);
    padding: 20px;
    background: var(--yc-night-surface, #fff);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.04);
}

.invoice-form-box h3 {
    margin: 0;
    font-size: 17px;
    font-weight: 900;
}

.invoice-items-intro-textarea {
    min-height: 74px;
    resize: vertical;
}

.invoice-payment-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    padding: 0;
    border-top: 0;
    background: transparent;
}

@media (max-width: 760px) {
    .invoice-page .invoice-basic-grid {
        grid-template-columns: minmax(0, 1fr) !important;
    }

    .invoice-client-picker,
    .invoice-job-field,
    .invoice-issue-date-field,
    .invoice-taxable-supply-date-field,
    .invoice-due-days-field,
    .invoice-due-date-field,
    .invoice-number-field,
    .invoice-status-field {
        grid-column: 1 / -1;
        grid-row: auto;
    }

    .invoice-payment-grid {
        grid-template-columns: minmax(0, 1fr) !important;
    }
}

/* Shared submenu spacing: keep every sticky tabs page aligned with Finance. */
.work-page:has(.yc-sticky-tabs),
.shopping-page:has(.yc-sticky-tabs),
.consumption-page:has(.yc-sticky-tabs),
.settings-page:has(.yc-sticky-tabs) {
    gap: 6px;
}

/* Drag handles are mobile-only; desktop drag starts from the whole row/card. */
.schedule-drag-handle,
.shopping-list-drag-handle,
.work-document-drag-handle,
.work-note-drag-handle {
    display: none !important;
}

@media (max-width: 899px) {
    .work-detail-page .work-task-row {
        gap: 10px;
    }

    .work-detail-page .work-task-actions {
        flex: 0 0 auto;
    }

    .work-detail-page .work-task-drag-handle {
        display: inline-flex !important;
        width: 38px !important;
        min-width: 38px !important;
        max-width: 38px !important;
        height: 38px !important;
        min-height: 38px !important;
        max-height: 38px !important;
        flex: 0 0 38px !important;
        align-items: center !important;
        justify-content: center !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .schedule-drag-handle,
    .shopping-list-drag-handle,
    .work-document-drag-handle,
    .work-note-drag-handle {
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
    }
}


/* Keep mobile pointer drag alive; otherwise browsers can cancel it as a scroll gesture. */
.schedule-drag-handle,
.schedule-mobile-drag-handle,
.shopping-list-drag-handle,
.work-task-drag-handle,
.work-document-drag-handle,
.work-folder-drag-handle,
.work-note-drag-handle,
.job-work-item-drag-handle,
.password-group-drag-handle,
.password-entry-drag-handle {
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
}
/* Mobile card action menus share the Documents interaction pattern. */
.work-card-action-menu {
    display: none !important;
}

.yc-dropdown__form {
    margin: 0;
}

@media (min-width: 900px) {
    .work-detail-page .work-card-action-menu,
    .password-page .work-card-action-menu,
    .work-detail-page .work-note-drag-handle,
    .work-detail-page .job-work-item-drag-handle,
    .password-page .password-group-drag-handle,
    .password-page .password-entry-drag-handle {
        display: none !important;
    }
}

@media (max-width: 899px) {
    .work-detail-page .work-task-card,
    .work-detail-page .work-note-card,
    .work-detail-page .job-work-item-card,
    .password-page .password-group-card,
    .password-page .password-entry-card {
        overflow: visible;
    }

    .work-detail-page .work-task-card:has(.work-card-action-menu[open]),
    .work-detail-page .work-note-card:has(.work-card-action-menu[open]),
    .work-detail-page .job-work-item-card:has(.work-card-action-menu[open]),
    .password-page .work-sub-card:has(.work-card-action-menu[open]) {
        position: relative;
        z-index: 7000;
    }

    .work-detail-page .work-task-actions,
    .work-detail-page .work-note-actions,
    .work-detail-page .job-work-item-actions,
    .password-page .work-sub-actions--header {
        position: relative;
        z-index: 6;
        display: flex;
        flex: 0 0 auto;
        align-items: center;
        justify-content: flex-end;
        flex-wrap: nowrap;
        gap: 8px;
        width: auto;
        min-width: max-content;
        margin-left: auto;
        overflow: visible;
    }

    .work-detail-page .work-task-actions > a,
    .work-detail-page .work-task-actions > form,
    .work-detail-page .work-task-actions > button:not(.work-task-drag-handle),
    .work-detail-page .work-note-actions > a,
    .work-detail-page .work-note-actions > form,
    .work-detail-page .work-note-actions > button:not(.work-note-drag-handle),
    .work-detail-page .job-work-item-actions > a,
    .work-detail-page .job-work-item-actions > form,
    .work-detail-page .job-work-item-actions > button:not(.job-work-item-drag-handle),
    .password-page .work-sub-actions--header > a,
    .password-page .work-sub-actions--header > button:not(.password-group-drag-handle):not(.password-entry-drag-handle) {
        display: none !important;
    }

    .work-detail-page .work-note-drag-handle,
    .work-detail-page .job-work-item-drag-handle,
    .password-page .password-group-drag-handle,
    .password-page .password-entry-drag-handle,
    .work-detail-page .work-card-action-menu,
    .password-page .work-card-action-menu,
    .work-detail-page .work-card-action-menu .schedule-more-trigger,
    .password-page .work-card-action-menu .schedule-more-trigger {
        width: 38px !important;
        min-width: 38px !important;
        max-width: 38px !important;
        height: 38px !important;
        min-height: 38px !important;
        max-height: 38px !important;
        flex: 0 0 38px !important;
        align-self: center !important;
        align-items: center !important;
        justify-content: center !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .work-detail-page .work-note-drag-handle,
    .work-detail-page .job-work-item-drag-handle,
    .password-page .password-group-drag-handle,
    .password-page .password-entry-drag-handle,
    .work-detail-page .work-card-action-menu,
    .password-page .work-card-action-menu {
        display: inline-flex !important;
    }

    .work-detail-page .work-card-action-menu,
    .password-page .work-card-action-menu {
        position: relative;
        z-index: 30;
        order: 2;
        overflow: visible;
    }

    .work-detail-page .work-card-action-menu[open],
    .password-page .work-card-action-menu[open] {
        z-index: 7300;
    }

    .work-detail-page .work-note-drag-handle,
    .work-detail-page .job-work-item-drag-handle,
    .password-page .password-group-drag-handle,
    .password-page .password-entry-drag-handle {
        order: 1;
    }

    .work-detail-page .work-card-action-menu-panel,
    .password-page .work-card-action-menu-panel {
        position: absolute;
        top: calc(100% + 8px);
        right: 0;
        left: auto;
        z-index: 7400;
        display: none !important;
        width: max-content;
        min-width: 176px;
        max-width: calc(100vw - 28px);
        grid-template-columns: minmax(0, 1fr) !important;
        grid-auto-flow: row !important;
        gap: 0;
        border: 1px solid rgba(148, 163, 184, 0.22);
        border-radius: 16px;
        padding: 6px;
        background: var(--yc-night-surface, #fff);
        box-shadow: 0 18px 46px rgba(15, 23, 42, 0.22);
        transform: translateZ(0);
    }

    .work-detail-page .work-card-action-menu[open] .work-card-action-menu-panel,
    .password-page .work-card-action-menu[open] .work-card-action-menu-panel {
        display: grid !important;
    }

    .work-detail-page .work-card-action-menu-panel .yc-dropdown__item,
    .password-page .work-card-action-menu-panel .yc-dropdown__item {
        display: flex !important;
        width: 100% !important;
        min-width: 0 !important;
        max-width: none !important;
        height: 36px !important;
        min-height: 36px !important;
        flex: 0 0 auto !important;
        align-items: center !important;
        justify-content: flex-start !important;
        gap: 10px;
        border: 0 !important;
        border-radius: 10px;
        padding: 0 10px !important;
        color: var(--yc-night-muted, #334155);
        background: transparent !important;
        box-shadow: none !important;
        font-size: 14px;
        font-weight: 600;
        line-height: 1;
        text-align: left;
        text-decoration: none;
        white-space: nowrap;
    }

    .work-detail-page .work-card-action-menu-panel .yc-dropdown__item svg,
    .password-page .work-card-action-menu-panel .yc-dropdown__item svg {
        width: 16px !important;
        height: 16px !important;
        flex: 0 0 16px !important;
        color: var(--yc-night-accent, var(--yc-primary));
        stroke: var(--yc-primary);
    }

    .work-detail-page .work-card-action-menu-panel .yc-dropdown__item span,
    .password-page .work-card-action-menu-panel .yc-dropdown__item span {
        min-width: 0;
        overflow: hidden;
        color: var(--yc-night-text, #111827);
        font-weight: 600;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .work-document-drag-preview .work-sub-actions--header > a,
    .work-document-drag-preview .work-sub-actions--header > form,
    .work-document-drag-preview .work-sub-actions--header > button:not(.work-document-drag-handle):not(.work-folder-drag-handle):not(.work-note-drag-handle):not(.job-work-item-drag-handle):not(.password-group-drag-handle):not(.password-entry-drag-handle),
    .work-folder-drag-preview .work-sub-actions--header > a,
    .work-folder-drag-preview .work-sub-actions--header > form,
    .work-folder-drag-preview .work-sub-actions--header > button:not(.work-document-drag-handle):not(.work-folder-drag-handle):not(.password-group-drag-handle) {
        display: none !important;
    }

    .work-document-drag-preview .work-card-action-menu,
    .work-folder-drag-preview .work-card-action-menu,
    .work-document-drag-preview .work-document-action-menu,
    .work-folder-drag-preview .work-document-action-menu,
    .work-document-drag-preview .work-note-drag-handle,
    .work-document-drag-preview .job-work-item-drag-handle,
    .work-document-drag-preview .password-entry-drag-handle,
    .work-folder-drag-preview .password-group-drag-handle {
        display: inline-flex !important;
        width: 30px !important;
        min-width: 30px !important;
        max-width: 30px !important;
        height: 30px !important;
        min-height: 30px !important;
        max-height: 30px !important;
        flex: 0 0 30px !important;
        align-self: center !important;
        align-items: center !important;
        justify-content: center !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .work-document-drag-preview .work-card-action-menu[open] .work-card-action-menu-panel,
    .work-folder-drag-preview .work-card-action-menu[open] .work-card-action-menu-panel {
        display: none !important;
    }
}

/* Global responsive layout rule: multi-column content stacks below 1200px. */
@media (max-width: 1199px) {
    .yc-grid--2,
    .yc-grid--3,
    .yc-grid--4,
    .yc-form-grid,
    .consumption-filter,
    .consumption-kpis,
    .consumption-stat-layout,
    .consumption-reading-cards,
    .work-subsection-grid,
    .work-notes-grid,
    .work-documents-grid,
    .work-documents-grid--folders,
    .work-documents-grid--folder-documents,
    .work-document-preview-layout,
    .work-form-section__grid,
    .work-client-dashboard,
    .work-filters,
    .work-filters--projects,
    .work-filters--clients,
    .work-filters--jobs,
    .finance-form,
    .shopping-overview-layout,
    .shopping-overview-grid,
    .shopping-section-grid,
    .shopping-section-grid--lists,
    .shopping-workspace-layout,
    .shopping-list-workflow,
    .shopping-feature-grid,
    .shopping-create-form,
    .shopping-category-create,
    .invoice-filters,
    .invoice-stat-filters,
    .invoice-statistics-grid,
    .invoice-overview-grid,
    .invoice-accordion-columns,
    .invoice-page .invoice-form:not(.invoice-form--items) .invoice-accordion-list > .invoice-accordion:first-child .invoice-accordion__content,
    .invoice-item-row:not(.invoice-items-table__row),
    .invoice-page .invoice-basic-grid,
    .invoice-basic-grid,
    .invoice-page .invoice-payment-grid,
    .invoice-payment-grid {
        grid-template-columns: minmax(0, 1fr) !important;
    }

    .finance-form-actions,
    .work-filter-search,
    .work-filter-reset-row,
    .invoice-item-row:not(.invoice-items-table__row) .invoice-item-row__name,
    .invoice-item-row:not(.invoice-items-table__row) .invoice-item-row__total {
        grid-column: 1 / -1;
    }
}

.documents-page .work-documents-grid--folder-documents,
.password-page .work-documents-grid--folder-documents {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.password-page .work-documents-grid--folder-documents {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (max-width: 1100px) {
    .documents-page .work-documents-grid--folder-documents,
    .password-page .work-documents-grid--folder-documents,
    .password-page .password-items-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .documents-page .work-documents-grid--folder-documents,
    .password-page .work-documents-grid--folder-documents,
    .password-page .password-items-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .documents-page__card,
    .password-page__card {
        padding: 12px;
    }

    .documents-page .work-documents-grid,
    .password-page__content {
        padding: 0;
    }

    .documents-page .work-documents-grid,
    .password-page .password-items-grid {
        gap: 12px;
        width: 100%;
    }

    .documents-page .work-sub-card,
    .password-page .work-sub-card {
        width: 100%;
    }
}

@media (max-width: 760px) {
    .documents-page .work-documents-grid .work-sub-actions--header,
    .password-page .work-documents-grid .work-sub-actions--header {
        flex: 0 0 auto;
        flex-wrap: nowrap;
        align-items: center;
        gap: 8px;
    }

    .documents-page .work-documents-grid .work-document-action--overflowable,
    .work-detail-card--documents .work-documents-grid .work-document-action--overflowable,
    .work-note-attachment-card .work-document-action--overflowable {
        display: none;
    }

    .documents-page .work-documents-grid .work-document-action-menu,
    .work-detail-card--documents .work-documents-grid .work-document-action-menu,
    .work-note-attachment-card .work-document-action-menu {
        display: inline-block;
        flex: 0 0 auto;
        order: 2;
    }

    .documents-page .work-documents-grid .work-document-drag-handle,
    .documents-page .work-documents-grid .work-folder-drag-handle,
    .work-detail-card--documents .work-documents-grid .work-document-drag-handle,
    .work-detail-card--documents .work-documents-grid .work-folder-drag-handle {
        order: 1;
    }

    .documents-page .work-documents-grid .work-sub-actions--header .app-icon-btn,
    .password-page .work-documents-grid .work-sub-actions--header .app-icon-btn {
        display: inline-flex;
        width: 30px;
        min-width: 30px;
        height: 30px;
        min-height: 30px;
        flex: 0 0 30px;
        align-items: center;
        justify-content: center;
        padding: 0;
    }

    .documents-page .work-documents-grid .work-sub-actions--header .app-icon-btn svg,
    .password-page .work-documents-grid .work-sub-actions--header .app-icon-btn svg {
        width: 16px;
        height: 16px;
        flex: 0 0 16px;
    }
}

@media (max-width: 760px) {
    .work-note-actions,
    .work-note-attachment-card .work-document-actions {
        flex: 0 0 auto;
        flex-wrap: nowrap;
        align-items: center;
        gap: 8px;
    }

    .work-note-actions > *,
    .work-note-actions form,
    .work-note-attachment-card .work-document-actions > * {
        flex: 0 0 auto;
    }

    .work-note-actions .app-icon-btn,
    .work-note-attachment-card .work-document-actions .app-icon-btn {
        display: inline-flex;
        width: 30px;
        min-width: 30px;
        max-width: 30px;
        height: 30px;
        min-height: 30px;
        max-height: 30px;
        flex: 0 0 30px;
        align-items: center;
        justify-content: center;
        padding: 0;
    }

    .work-note-actions .app-icon-btn svg,
    .work-note-attachment-card .work-document-actions .app-icon-btn svg {
        width: 16px;
        height: 16px;
        flex: 0 0 16px;
    }

    .work-note-attachment-card {
        min-height: 52px;
    }
}

.work-detail-card--documents > .work-subsection {
    gap: 0;
}

.work-detail-card--documents .work-documents-content {
    border: 0;
    border-radius: 0;
    padding: 0;
    background: transparent;
    box-shadow: none;
}

.work-detail-card--documents,
.work-detail-card--documents .work-subsection,
.work-detail-card--documents .work-documents-content,
.work-detail-card--documents .work-documents-grid,
.work-detail-card--documents .work-sub-card {
    min-width: 0;
}

.work-detail-card--documents .work-documents-grid--folders,
.work-detail-card--documents .work-documents-grid--folder-documents {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}

@media (max-width: 1100px) {
    .work-detail-card--documents .work-documents-grid--folders,
    .work-detail-card--documents .work-documents-grid--folder-documents {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 640px) {
    .work-detail-card--documents .work-documents-header {
        display: flex;
        flex-direction: row;
        flex-wrap: nowrap;
        gap: 8px;
        align-items: center;
        min-width: 0;
    }

    .work-detail-card--documents .work-documents-header h2 {
        flex: 1 1 auto;
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .work-detail-card--documents .work-documents-actions {
        display: flex;
        flex: 0 0 auto;
        gap: 8px;
        width: auto;
        max-width: none;
        min-width: 0;
        margin-left: auto;
        overflow: visible;
    }

    .work-detail-card--documents .work-documents-actions .yc-btn {
        width: 30px;
        min-width: 30px;
        max-width: 30px;
        height: 30px;
        min-height: 30px;
        padding: 0;
        border-radius: 12px;
        overflow: visible;
    }

    .work-detail-card--documents .documents-page__action-text {
        display: none;
    }

    .work-detail-card--documents .documents-page__action-icons {
        position: relative;
        display: inline-grid;
        place-items: center;
        width: 18px;
        height: 18px;
        color: #fff;
    }

    .work-detail-card--documents .documents-page__action-icons svg {
        fill: none;
        stroke: #fff;
    }

    .work-detail-card--documents .documents-page__action-main {
        width: 16px;
        height: 16px;
        stroke-width: 2.1;
    }

    .work-detail-card--documents .documents-page__action-plus {
        position: absolute;
        top: -2px;
        right: -3px;
        width: 10px;
        height: 10px;
        padding: 1px;
        border-radius: 999px;
        stroke-width: 2.6;
    }

    .work-detail-card--documents .work-documents-grid--folders,
    .work-detail-card--documents .work-documents-grid--folder-documents {
        grid-template-columns: minmax(0, 1fr) !important;
    }
}

@media (max-width: 760px) {
    .work-detail-card--documents .work-documents-grid .work-sub-actions--header {
        flex: 0 0 auto;
        flex-wrap: nowrap;
        align-items: center;
        gap: 8px;
    }

    .work-detail-card--documents .work-documents-grid .work-sub-actions--header .app-icon-btn {
        display: inline-flex;
        width: 30px;
        min-width: 30px;
        height: 30px;
        min-height: 30px;
        flex: 0 0 30px;
        align-items: center;
        justify-content: center;
        padding: 0;
    }

    .work-detail-card--documents .work-documents-grid .work-sub-actions--header .app-icon-btn svg {
        width: 16px;
        height: 16px;
        flex: 0 0 16px;
    }
}

@media (max-width: 760px) {
    .work-task-card .work-task-actions {
        flex: 0 0 auto;
        flex-wrap: nowrap;
        align-items: center;
        gap: 8px;
    }

    .work-task-card .work-task-actions > *,
    .work-task-card .work-task-actions form {
        flex: 0 0 auto;
    }

    .work-task-card .work-task-actions .app-icon-btn {
        display: inline-flex;
        width: 30px;
        min-width: 30px;
        max-width: 30px;
        height: 30px;
        min-height: 30px;
        max-height: 30px;
        flex: 0 0 30px;
        align-items: center;
        justify-content: center;
        padding: 0;
    }

    .work-task-card .work-task-actions .app-icon-btn svg {
        width: 16px;
        height: 16px;
        flex: 0 0 16px;
    }
}

.work-detail-documents-actions .yc-btn--primary {
    min-width: 140px;
}

@media (max-width: 640px) {
    .work-detail-page .work-hero--documents {
        align-items: center;
        flex-direction: row;
        flex-wrap: nowrap;
        gap: 8px;
        min-width: 0;
    }

    .work-detail-page .work-hero--documents .yc-page-header__title {
        width: auto;
        min-width: 0;
    }

    .work-detail-page .work-hero--documents .yc-page-title {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        overflow-wrap: normal;
    }

    .work-detail-page .work-detail-documents-actions {
        display: flex;
        flex: 0 0 auto;
        gap: 8px;
        width: auto;
        max-width: none;
        min-width: 0;
        margin-left: auto;
        overflow: visible;
    }

    .work-detail-page .work-detail-documents-actions .yc-btn {
        width: 30px;
        min-width: 30px;
        max-width: 30px;
        height: 30px;
        min-height: 30px;
        flex: 0 0 30px;
        padding: 0;
        border-radius: 12px;
        overflow: visible;
    }

    .work-detail-page .work-detail-documents-actions .documents-page__action-text {
        display: none;
    }

    .work-detail-page .work-detail-documents-actions .documents-page__action-icons {
        position: relative;
        display: inline-grid;
        place-items: center;
        width: 18px;
        height: 18px;
        color: #fff;
    }

    .work-detail-page .work-detail-documents-actions .documents-page__action-icons svg {
        fill: none;
        stroke: #fff;
    }

    .work-detail-page .work-detail-documents-actions .documents-page__action-main {
        width: 16px;
        height: 16px;
        stroke-width: 2.1;
    }

    .work-detail-page .work-detail-documents-actions .documents-page__action-plus {
        position: absolute;
        top: -2px;
        right: -3px;
        width: 10px;
        height: 10px;
        padding: 1px;
        border-radius: 999px;
        stroke-width: 2.6;
    }
}

@media (max-width: 760px) {
    .documents-page .work-documents-grid,
    .work-detail-card--documents .work-documents-grid,
    .documents-page__card,
    .documents-page .work-documents-content,
    .work-detail-card--documents,
    .work-detail-card--documents .work-documents-content,
    .documents-page .work-documents-grid > .work-sub-card,
    .work-detail-card--documents .work-documents-grid > .work-sub-card,
    .work-note-attachment-card {
        overflow: visible;
    }

    .documents-page .work-documents-grid > .work-sub-card:has(.work-document-action-menu[open]),
    .work-detail-card--documents .work-documents-grid > .work-sub-card:has(.work-document-action-menu[open]),
    .work-note-attachment-card:has(.work-document-action-menu[open]) {
        position: relative;
        z-index: 7000;
    }

    .documents-page .work-documents-grid .work-sub-card__header,
    .work-detail-card--documents .work-documents-grid .work-sub-card__header,
    .work-note-attachment-card .work-sub-card__header {
        display: flex;
        width: 100%;
        min-width: 0;
        align-items: center;
        flex-wrap: nowrap;
        gap: 10px;
        overflow: visible;
    }

    .documents-page .work-documents-grid .work-sub-card__main,
    .work-detail-card--documents .work-documents-grid .work-sub-card__main,
    .work-note-attachment-card .work-sub-card__main,
    .documents-page .work-documents-grid .work-folder-card__link,
    .work-detail-card--documents .work-documents-grid .work-folder-card__link {
        display: flex;
        flex: 1 1 auto;
        align-items: center;
        gap: 10px;
        width: auto;
        min-width: 0;
        max-width: 100%;
    }    .documents-page .work-documents-grid .work-folder-card__identity .work-folder-card__link,
    .work-detail-card--documents .work-documents-grid .work-folder-card__identity .work-folder-card__link {
        flex: 0 1 auto;
        max-width: calc(100% - 28px);
    }


    .documents-page .work-documents-grid .work-sub-card__main > div,
    .work-detail-card--documents .work-documents-grid .work-sub-card__main > div,
    .work-note-attachment-card .work-sub-card__main > div {
        flex: 1 1 auto;
        min-width: 0;
        max-width: 100%;
    }

    .documents-page .work-documents-grid .work-folder-card__icon,
    .work-detail-card--documents .work-documents-grid .work-folder-card__icon,
    .documents-page .work-documents-grid .work-document-icon,
    .work-detail-card--documents .work-documents-grid .work-document-icon,
    .work-note-attachment-card .work-document-icon {
        flex: 0 0 auto;
    }

    .documents-page .work-documents-grid .work-folder-card__link h3,
    .work-detail-card--documents .work-documents-grid .work-folder-card__link h3,
    .documents-page .work-documents-grid .work-sub-card__main strong,
    .work-detail-card--documents .work-documents-grid .work-sub-card__main strong,
    .work-note-attachment-card .work-sub-card__main strong,
    .documents-page .work-documents-grid .work-sub-card__main small,
    .work-detail-card--documents .work-documents-grid .work-sub-card__main small,
    .work-note-attachment-card .work-sub-card__main small {
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .documents-page .work-documents-grid .work-sub-actions--header,
    .work-detail-card--documents .work-documents-grid .work-sub-actions--header,
    .work-note-attachment-card .work-document-actions {
        position: relative;
        z-index: 6;
        display: flex;
        flex: 0 0 auto;
        align-items: center;
        justify-content: flex-end;
        flex-wrap: nowrap;
        gap: 8px;
        width: auto;
        min-width: max-content;
        margin-left: auto;
        overflow: visible;
    }

    .documents-page .work-documents-grid .work-document-action--overflowable,
    .work-detail-card--documents .work-documents-grid .work-document-action--overflowable,
    .work-note-attachment-card .work-document-action--overflowable {
        display: none !important;
    }

    .documents-page .work-documents-grid .work-document-action-menu,
    .work-detail-card--documents .work-documents-grid .work-document-action-menu,
    .work-note-attachment-card .work-document-action-menu {
        position: relative;
        z-index: 20;
        display: inline-block !important;
        flex: 0 0 30px;
        width: 30px;
        min-width: 30px;
        order: 2;
        overflow: visible;
    }

    .documents-page .work-documents-grid .work-document-action-menu[open],
    .work-detail-card--documents .work-documents-grid .work-document-action-menu[open],
    .work-note-attachment-card .work-document-action-menu[open] {
        z-index: 7100;
    }

    .documents-page .work-documents-grid .work-document-drag-handle,
    .documents-page .work-documents-grid .work-folder-drag-handle,
    .work-detail-card--documents .work-documents-grid .work-document-drag-handle,
    .work-detail-card--documents .work-documents-grid .work-folder-drag-handle {
        flex: 0 0 30px;
        order: 1;
    }

    .documents-page .work-documents-grid .work-document-action-menu-panel,
    .work-detail-card--documents .work-documents-grid .work-document-action-menu-panel,
    .work-note-attachment-card .work-document-action-menu-panel {
        right: 0;
        left: auto;
        z-index: 7200;
        min-width: 176px;
        border-color: rgba(148, 163, 184, 0.22);
        padding: 6px;
        background: var(--yc-night-surface, #fff);
        box-shadow: 0 18px 42px rgba(15, 23, 42, 0.18);
    }

    .documents-page .work-documents-grid .work-document-action-menu-panel .yc-dropdown__item,
    .work-detail-card--documents .work-documents-grid .work-document-action-menu-panel .yc-dropdown__item,
    .work-note-attachment-card .work-document-action-menu-panel .yc-dropdown__item {
        display: flex;
        width: 100%;
        min-height: 36px;
        align-items: center;
        justify-content: flex-start;
        gap: 10px;
        padding: 0 10px;
        font-size: 14px;
        font-weight: 650;
        line-height: 1;
    }

    .documents-page .work-documents-grid .work-document-action-menu-panel .yc-dropdown__item svg,
    .work-detail-card--documents .work-documents-grid .work-document-action-menu-panel .yc-dropdown__item svg,
    .work-note-attachment-card .work-document-action-menu-panel .yc-dropdown__item svg {
        width: 16px;
        height: 16px;
        flex: 0 0 16px;
        color: var(--yc-night-accent, var(--yc-primary));
        stroke: var(--yc-primary);
    }

    .documents-page .work-documents-grid .work-document-action-menu-panel .yc-dropdown__item span,
    .work-detail-card--documents .work-documents-grid .work-document-action-menu-panel .yc-dropdown__item span,
    .work-note-attachment-card .work-document-action-menu-panel .yc-dropdown__item span {
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
}

@media (max-width: 999px) {
    .work-action-menu-panel .app-icon-btn svg,
    .invoice-table .work-action-menu-panel .app-icon-btn svg,
    .work-table .work-action-menu-panel .app-icon-btn svg {
        color: var(--yc-night-accent, var(--yc-primary));
        stroke: var(--yc-primary);
    }
}

.work-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
}

.yc-modal .work-modal-close + .yc-modal__title {
    padding-right: 40px;
}





/* Harmonogram: meeting status is represented by icon/time, not a text badge. */
.schedule-page .schedule-meeting-badge {
    display: none !important;
}

/* Harmonogram follows the mobile document-card action pattern. */
@media (min-width: 900px) {
    .schedule-page .schedule-action-menu,
    .schedule-page .schedule-mobile-drag-handle,
    .schedule-page .schedule-drag-handle {
        display: none !important;
    }
}

@media (max-width: 899px) {
    .schedule-page .schedule-actions-desktop {
        display: none !important;
    }

    .schedule-page .schedule-actions {
        display: flex !important;
        align-items: center !important;
        justify-content: flex-end;
        gap: 6px;
        overflow: visible;
    }

    .schedule-page .schedule-mobile-drag-handle,
    .schedule-page .schedule-action-menu,
    .schedule-page .schedule-more-trigger {
        width: 30px !important;
        min-width: 30px !important;
        max-width: 30px !important;
        height: 30px !important;
        min-height: 30px !important;
        max-height: 30px !important;
        flex: 0 0 30px !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 0 !important;
    }

    .schedule-page .schedule-mobile-drag-handle,
    .schedule-page .schedule-action-menu {
        display: inline-flex !important;
    }

    .schedule-page .schedule-action-menu {
        position: relative;
        z-index: 30;
        order: 2;
        overflow: visible;
    }

    .schedule-page .schedule-action-menu[open] {
        z-index: 7300;
    }

    .schedule-page .schedule-mobile-drag-handle {
        order: 1;
    }

    .schedule-page .schedule-action-menu-panel {
        position: absolute;
        top: calc(100% + 8px);
        right: 0;
        left: auto;
        z-index: 7400;
        display: none !important;
        width: max-content;
        min-width: 168px;
        max-width: calc(100vw - 28px);
        grid-template-columns: minmax(0, 1fr) !important;
        gap: 0;
        border: 1px solid rgba(148, 163, 184, 0.22);
        border-radius: 16px;
        padding: 6px;
        background: var(--yc-night-surface, #fff);
        box-shadow: 0 18px 42px rgba(15, 23, 42, 0.18);
        transform: translateZ(0);
        pointer-events: auto;
    }

    .schedule-page .schedule-action-menu[open] .schedule-action-menu-panel {
        display: grid !important;
    }

    .schedule-page .schedule-action-menu-panel .app-icon-btn,
    .schedule-page .schedule-action-menu-panel .schedule-action-menu-item {
        display: flex !important;
        width: 100% !important;
        min-width: 0 !important;
        max-width: none !important;
        height: 36px !important;
        min-height: 36px !important;
        max-height: none !important;
        flex: 0 0 auto !important;
        align-items: center !important;
        justify-content: flex-start !important;
        gap: 10px;
        border: 0;
        border-radius: 10px;
        padding: 0 10px !important;
        color: var(--yc-night-muted, #334155);
        background: transparent;
        box-shadow: none;
        font-size: 14px;
        font-weight: 650;
        line-height: 1;
        white-space: nowrap;
    }

    .schedule-page .schedule-action-menu-panel .yc-btn--icon {
        font-size: 14px !important;
    }

    .schedule-page .schedule-action-menu-panel .app-icon-btn::after {
        content: none !important;
        display: none !important;
    }

    .schedule-page .schedule-action-menu-panel .app-icon-btn span,
    .schedule-page .schedule-action-menu-panel .schedule-action-menu-item span {
        display: inline-block !important;
        position: static !important;
        width: auto !important;
        height: auto !important;
        max-width: none !important;
        opacity: 1 !important;
        visibility: visible !important;
        min-width: 0;
        overflow: hidden;
        color: var(--yc-night-text, #111827);
        font-size: 14px !important;
        font-weight: 650 !important;
        line-height: 1.2 !important;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .schedule-page .schedule-action-menu-panel .schedule-action-menu-item::after {
        content: none !important;
        display: none !important;
    }

    .schedule-page .schedule-action-menu-panel .app-icon-btn:hover,
    .schedule-page .schedule-action-menu-panel .app-icon-btn:focus-visible,
    .schedule-page .schedule-action-menu-panel .schedule-action-menu-item:hover,
    .schedule-page .schedule-action-menu-panel .schedule-action-menu-item:focus-visible {
        background: rgba(124, 58, 237, 0.08);
    }

    .schedule-page .schedule-action-menu-panel .app-icon-btn svg,
    .schedule-page .schedule-action-menu-panel .schedule-action-menu-item svg {
        width: 16px !important;
        height: 16px !important;
        flex: 0 0 16px !important;
        color: var(--yc-night-accent, var(--yc-primary)) !important;
        fill: none !important;
        stroke: var(--yc-primary) !important;
        stroke-width: 2 !important;
        stroke-linecap: round !important;
        stroke-linejoin: round !important;
    }

    .schedule-page .schedule-action-menu-panel .app-icon-btn svg *,
    .schedule-page .schedule-action-menu-panel .schedule-action-menu-item svg * {
        color: var(--yc-night-accent, var(--yc-primary)) !important;
        fill: none !important;
        stroke: var(--yc-primary) !important;
    }

    body.is-schedule-dragging > .schedule-row.is-dragging .schedule-actions-desktop {
        display: none !important;
    }

    body.is-schedule-dragging > .schedule-row.is-dragging .schedule-action-menu,
    body.is-schedule-dragging > .schedule-row.is-dragging .schedule-mobile-drag-handle {
        display: inline-flex !important;
    }
}

/* Mobile list cards in Work and Invoices use the same dropdown menu as Documents. */
@media (max-width: 999px) {
    .work-page .work-mobile-card {
        position: relative;
        overflow: visible;
    }

    .work-page .work-mobile-card:has(.work-action-menu[open]) {
        z-index: 7000;
    }

    .work-page .work-action-menu,
    .work-page .work-action-menu .schedule-more-trigger {
        width: 38px !important;
        min-width: 38px !important;
        max-width: 38px !important;
        height: 38px !important;
        min-height: 38px !important;
        max-height: 38px !important;
        flex: 0 0 38px !important;
        align-items: center !important;
        justify-content: center !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .work-page .work-action-menu {
        position: relative;
        z-index: 30;
        display: inline-flex;
        overflow: visible;
    }

    .work-page .work-action-menu[open] {
        z-index: 7300;
    }

    .work-page .work-action-menu-panel {
        position: absolute;
        top: calc(100% + 8px);
        right: 0;
        left: auto;
        z-index: 7400;
        display: none !important;
        width: max-content;
        min-width: 168px;
        max-width: calc(100vw - 28px);
        grid-template-columns: minmax(0, 1fr) !important;
        grid-auto-flow: row !important;
        gap: 0;
        border: 1px solid rgba(148, 163, 184, 0.22);
        border-radius: 16px;
        padding: 6px;
        background: var(--yc-night-surface, #fff);
        box-shadow: 0 18px 46px rgba(15, 23, 42, 0.22);
        transform: translateZ(0);
    }

    .work-page .work-action-menu[open] .work-action-menu-panel {
        display: grid !important;
    }

    .work-page .work-action-menu-panel .yc-dropdown__item {
        display: flex !important;
        width: 100% !important;
        min-width: 0 !important;
        max-width: none !important;
        height: 36px !important;
        min-height: 36px !important;
        flex: 0 0 auto !important;
        align-items: center !important;
        justify-content: flex-start !important;
        gap: 10px;
        border: 0 !important;
        border-radius: 10px;
        padding: 0 10px !important;
        color: var(--yc-night-muted, #334155);
        background: transparent !important;
        box-shadow: none !important;
        font-size: 14px;
        font-weight: 600;
        line-height: 1;
        text-align: left;
        text-decoration: none;
        white-space: nowrap;
    }

    .work-page .work-action-menu-panel .yc-dropdown__item svg {
        width: 16px !important;
        height: 16px !important;
        flex: 0 0 16px !important;
        color: var(--yc-night-accent, var(--yc-primary));
        fill: none;
        stroke: var(--yc-primary);
        stroke-width: 2;
        stroke-linecap: round;
        stroke-linejoin: round;
    }

    .work-page .work-action-menu-panel .yc-dropdown__item span {
        min-width: 0;
        overflow: hidden;
        color: var(--yc-night-text, #111827);
        font-weight: 600;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
}

@media (max-width: 899px) {

    body.is-card-dragging .work-card-action-menu[open] .work-card-action-menu-panel,
    body.is-card-dragging .work-document-action-menu[open] .yc-dropdown__menu {
        display: none !important;
    }
}

.yc-drag-preview.yc-drag-preview {
    position: fixed;
    z-index: 999999;
    display: grid;
    width: 68px !important;
    max-width: 68px !important;
    min-width: 68px !important;
    height: 68px !important;
    min-height: 68px;
    box-sizing: border-box;
    place-items: center;
    margin: 0;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.34);
    border-radius: 18px;
    color: #fff;
    background: var(--yc-primary-gradient);
    box-shadow: 0 26px 58px rgba(76, 29, 149, 0.32);
    line-height: 1;
    overflow: hidden;
    pointer-events: none;
    user-select: none;
    cursor: grabbing;
    opacity: 0.98;
    backdrop-filter: blur(10px);
    transform: none !important;
}

.yc-drag-preview.yc-drag-preview::before {
    content: "";
    position: absolute;
    inset: 7px;
    border-radius: 11px;
    background: rgba(var(--yc-night-surface-rgb, 255, 255, 255), 0.18);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.28);
}

.yc-drag-preview.yc-drag-preview svg {
    position: relative;
    z-index: 1;
    width: 32px;
    height: 32px;
    color: currentColor;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.yc-drag-placeholder.yc-drag-placeholder {
    position: relative;
    min-height: 56px;
    border: 1.5px dashed rgba(124, 58, 237, 0.32) !important;
    border-radius: 16px !important;
    background: rgba(124, 58, 237, 0.07) !important;
    box-shadow: inset 0 0 0 1px rgba(124, 58, 237, 0.08) !important;
}

.yc-drag-placeholder.yc-drag-placeholder.is-drop-slot-active {
    border-color: rgba(34, 197, 94, 0.72) !important;
    background: rgba(34, 197, 94, 0.12) !important;
    box-shadow: inset 0 0 0 1px rgba(34, 197, 94, 0.2), 0 14px 32px rgba(34, 197, 94, 0.16) !important;
}

.yc-drag-placeholder.yc-drag-placeholder.is-drop-slot-active::after,
.finance-table .yc-drag-placeholder.is-drop-slot-active .yc-drag-placeholder-cell::after {
    content: "+";
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 25;
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border: 2px solid rgba(255, 255, 255, 0.94);
    border-radius: 999px;
    color: #fff;
    background: #22c55e;
    box-shadow: 0 12px 28px rgba(34, 197, 94, 0.34);
    font-size: 24px;
    font-weight: 900;
    line-height: 1;
    pointer-events: none;
    transform: translate(-50%, -50%);
}

.finance-table .yc-drag-placeholder .yc-drag-placeholder-cell {
    position: relative;
    height: 56px;
    border: 1.5px dashed rgba(124, 58, 237, 0.32) !important;
    border-radius: 16px !important;
    background: rgba(124, 58, 237, 0.07) !important;
    box-shadow: inset 0 0 0 1px rgba(124, 58, 237, 0.08) !important;
}

.finance-table .yc-drag-placeholder.is-drop-slot-active .yc-drag-placeholder-cell {
    border-color: rgba(34, 197, 94, 0.72) !important;
    background: rgba(34, 197, 94, 0.12) !important;
    box-shadow: inset 0 0 0 1px rgba(34, 197, 94, 0.2), 0 14px 32px rgba(34, 197, 94, 0.16) !important;
}

@media (max-width: 899px) {
    .yc-drag-preview.yc-drag-preview {
        width: 64px !important;
        max-width: 64px !important;
        min-width: 64px !important;
        height: 64px !important;
        min-height: 64px;
        border-radius: 16px;
    }

    .yc-drag-preview.yc-drag-preview::before {
        inset: 7px;
        border-radius: 10px;
    }

    .yc-drag-preview.yc-drag-preview svg {
        width: 30px;
        height: 30px;
    }
}

.schedule-page .schedule-days-sticky .day-switcher {
    padding-bottom: 14px;
}

@media (max-width: 899px) {
    .schedule-page .schedule-days-sticky .day-switcher {
        padding-bottom: 10px;
    }
}

@media (max-width: 899px) {
    .work-action-menu,
    .work-action-menu > .schedule-more-trigger,
    .work-card-action-menu,
    .work-card-action-menu > .schedule-more-trigger,
    .work-document-action-menu,
    .work-document-action-menu > .schedule-more-trigger,
    .documents-page .work-documents-grid .work-sub-actions--header .app-icon-btn,
    .documents-page .work-documents-grid .work-document-drag-handle,
    .documents-page .work-documents-grid .work-folder-drag-handle,
    .work-detail-card--documents .work-documents-grid .work-sub-actions--header .app-icon-btn,
    .work-detail-card--documents .work-documents-grid .work-document-drag-handle,
    .work-detail-card--documents .work-documents-grid .work-folder-drag-handle,
    .work-note-actions .app-icon-btn,
    .work-note-attachment-card .work-document-actions .app-icon-btn,
    .work-task-card .work-task-actions .app-icon-btn,
    .work-detail-card--documents .work-documents-actions .yc-btn,
    .work-detail-page .work-detail-documents-actions .yc-btn,
    .documents-page .work-documents-actions .yc-btn,
    .password-page .work-documents-grid .work-sub-actions--header .app-icon-btn,
    .password-group-drag-handle,
    .password-entry-drag-handle,
    .job-work-item-drag-handle,
    .shopping-list-drag-handle,
    .mobile-camera-upload__button.app-icon-btn {
        display: inline-flex !important;
        width: 38px !important;
        min-width: 38px !important;
        max-width: 38px !important;
        height: 38px !important;
        min-height: 38px !important;
        max-height: 38px !important;
        flex: 0 0 38px !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 0 !important;
    }

    .work-action-menu > .schedule-more-trigger svg,
    .work-card-action-menu > .schedule-more-trigger svg,
    .work-document-action-menu > .schedule-more-trigger svg,
    .documents-page .work-documents-grid .work-sub-actions--header .app-icon-btn svg,
    .documents-page .work-documents-grid .work-document-drag-handle svg,
    .documents-page .work-documents-grid .work-folder-drag-handle svg,
    .work-detail-card--documents .work-documents-grid .work-sub-actions--header .app-icon-btn svg,
    .work-detail-card--documents .work-documents-grid .work-document-drag-handle svg,
    .work-detail-card--documents .work-documents-grid .work-folder-drag-handle svg,
    .work-note-actions .app-icon-btn svg,
    .work-note-attachment-card .work-document-actions .app-icon-btn svg,
    .work-task-card .work-task-actions .app-icon-btn svg,
    .work-detail-card--documents .work-documents-actions .yc-btn svg,
    .work-detail-page .work-detail-documents-actions .yc-btn svg,
    .documents-page .work-documents-actions .yc-btn svg,
    .password-page .work-documents-grid .work-sub-actions--header .app-icon-btn svg,
    .password-group-drag-handle svg,
    .password-entry-drag-handle svg,
    .job-work-item-drag-handle svg,
    .shopping-list-drag-handle svg,
    .mobile-camera-upload__button.app-icon-btn svg {
        width: 18px !important;
        height: 18px !important;
        min-width: 18px !important;
        min-height: 18px !important;
    }

    .schedule-page .schedule-actions .app-icon-btn,
    .schedule-page .schedule-mobile-drag-handle,
    .schedule-page .schedule-action-menu,
    .schedule-page .schedule-action-menu > .schedule-more-trigger,
    body.is-schedule-dragging > .schedule-row.is-dragging .app-icon-btn,
    body.is-schedule-dragging > .schedule-row.is-dragging .schedule-action-menu,
    body.is-schedule-dragging > .schedule-row.is-dragging .schedule-mobile-drag-handle {
        width: 30px !important;
        min-width: 30px !important;
        max-width: 30px !important;
        height: 30px !important;
        min-height: 30px !important;
        max-height: 30px !important;
        flex: 0 0 30px !important;
    }

    .schedule-page .schedule-actions .app-icon-btn svg,
    .schedule-page .schedule-mobile-drag-handle svg,
    .schedule-page .schedule-action-menu > .schedule-more-trigger svg,
    body.is-schedule-dragging > .schedule-row.is-dragging .app-icon-btn svg,
    body.is-schedule-dragging > .schedule-row.is-dragging .schedule-mobile-drag-handle svg {
        width: 16px !important;
        height: 16px !important;
        min-width: 16px !important;
        min-height: 16px !important;
    }
}

@media (max-width: 899px) {
    .work-detail-page .work-task-actions > a.app-icon-btn,
    .work-detail-page .work-task-actions > form,
    .work-detail-page .work-task-actions > button.app-icon-btn:not(.work-task-drag-handle),
    .work-detail-card--documents .work-documents-grid .work-document-action--overflowable {
        display: none !important;
    }
}

@media (max-width: 899px) {
    .work-detail-page .work-note-card,
    .work-detail-page .work-note-attachments,
    .work-detail-page .work-note-attachments__list {
        overflow: visible;
    }

    .work-detail-page .work-note-actions > .work-card-action-menu {
        display: none !important;
    }

    .work-detail-page .work-note-actions > a.app-icon-btn,
    .work-detail-page .work-note-actions > button.app-icon-btn,
    .work-detail-page .work-note-actions > form,
    .work-detail-page .work-note-actions > form .app-icon-btn {
        display: inline-flex !important;
    }

    .work-detail-page .work-note-actions > .work-note-drag-handle {
        order: 1;
    }

    .work-detail-page .work-note-actions > a.app-icon-btn {
        order: 2;
    }

    .work-detail-page .work-note-actions > button.app-icon-btn:not(.work-note-drag-handle),
    .work-detail-page .work-note-actions > form {
        order: 3;
    }

    .work-note-attachment-card .work-document-actions > .work-document-action--overflowable {
        display: none !important;
    }

    .work-note-attachment-card:has(.work-document-action-menu[open]) {
        z-index: 9000 !important;
        overflow: visible;
    }

    .work-note-attachment-card .work-document-action-menu[open] {
        z-index: 9100 !important;
    }

    .work-note-attachment-card .work-document-action-menu-panel {
        z-index: 9200 !important;
    }
}

@media (max-width: 899px) {
    .documents-page .work-documents-grid .work-document-action--overflowable,
    .work-detail-card--documents .work-documents-grid .work-document-action--overflowable,
    .work-note-attachment-card .work-document-action--overflowable {
        display: none !important;
    }
}

@media (max-width: 899px) {
    .password-page .work-documents-grid .work-sub-actions--header > a.app-icon-btn,
    .password-page .work-documents-grid .work-sub-actions--header > button.app-icon-btn:not(.password-group-drag-handle):not(.password-entry-drag-handle) {
        display: none !important;
    }

    .password-page .work-documents-grid .work-sub-actions--header > .password-group-drag-handle,
    .password-page .work-documents-grid .work-sub-actions--header > .password-entry-drag-handle,
    .password-page .work-documents-grid .work-sub-actions--header > .work-card-action-menu,
    .password-page .work-documents-grid .work-sub-actions--header > .work-card-action-menu > .schedule-more-trigger {
        display: inline-flex !important;
    }
}

@media (max-width: 899px) {
    .work-detail-card--documents .work-documents-grid .work-sub-actions--header > .work-document-action--overflowable {
        display: none !important;
    }

    .work-detail-card--documents .work-documents-grid .work-sub-actions--header > .work-document-drag-handle,
    .work-detail-card--documents .work-documents-grid .work-sub-actions--header > .work-folder-drag-handle,
    .work-detail-card--documents .work-documents-grid .work-sub-actions--header > .work-document-action-menu,
    .work-detail-card--documents .work-documents-grid .work-sub-actions--header > .work-document-action-menu > .schedule-more-trigger {
        display: inline-flex !important;
    }
}

@media (max-width: 899px) {
    .documents-page .work-documents-grid .work-sub-actions--header > .work-document-action--overflowable.app-icon-btn {
        display: none !important;
    }

    .documents-page .work-documents-grid .work-sub-actions--header > .work-document-drag-handle,
    .documents-page .work-documents-grid .work-sub-actions--header > .work-folder-drag-handle,
    .documents-page .work-documents-grid .work-sub-actions--header > .work-document-action-menu,
    .documents-page .work-documents-grid .work-sub-actions--header > .work-document-action-menu > .schedule-more-trigger {
        display: inline-flex !important;
    }
}

/* Targeted fixes: schedule priority, finance summary icons, invoice items actions, document previews. */
.schedule-page .quick-add,
.schedule-page .modal-field,
.schedule-page .priority-picker {
    overflow: visible;
}

.schedule-page .priority-picker {
    z-index: 20;
}

.schedule-page .priority-picker.is-open {
    z-index: 30;
}

.schedule-page .priority-picker-menu {
    z-index: 31;
    max-height: min(280px, calc(100vh - 120px));
    overflow-y: auto;
}

.schedule-page .quick-add .priority-picker-trigger,
.schedule-page .modal-field .priority-picker-trigger,
.schedule-page .quick-add .priority-native-select,
.schedule-page .modal-field .priority-native-select {
    min-height: 46px;
    height: auto;
    line-height: 1.35;
}

@media (max-width: 899px) {
    .schedule-page .quick-add .priority-native-select,
    .schedule-page .modal-field .priority-native-select {
        position: absolute;
        width: 1px;
        height: 1px;
        opacity: 0;
        pointer-events: none;
    }

    .schedule-page .quick-add .priority-picker {
        order: 2;
        grid-column: 1 / 2;
    }

    .schedule-page .quick-add .priority-picker,
    .schedule-page .modal-field .priority-picker {
        display: block !important;
        position: relative;
        z-index: 20;
        width: 100%;
        min-width: 0;
    }

    .schedule-page .quick-add .priority-picker-trigger,
    .schedule-page .modal-field .priority-picker-trigger {
        width: 100%;
        min-width: 0;
        min-height: 44px;
        pointer-events: auto;
    }

    .schedule-page .priority-picker.is-open {
        z-index: 30;
    }

    .schedule-page .priority-picker-menu {
        width: 100%;
        min-width: 0;
        max-width: calc(100vw - 48px);
    }
}

.finance-summary-card__label {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-width: 0;
    color: var(--yc-muted);
    font-size: 12px;
    font-weight: 800;
}

.finance-summary-card__label svg {
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.finance-summary-card .finance-summary-card__label,
.finance-summary-card .finance-summary-card__label span {
    color: currentColor;
}

@media (max-width: 899px) {
    .invoice-page .invoice-form--items > .finance-form-actions {
        justify-content: center;
        padding-bottom: 18px;
    }

    .invoice-page .invoice-form--items > .finance-form-actions .yc-btn {
        flex: 0 1 auto;
        min-width: min(220px, 100%);
    }
}

.work-document-preview-frame {
    align-items: start;
    max-height: calc(100vh - 220px);
}

.work-document-preview-page,
.work-document-preview-page :is(.work-document-preview-layout, .work-document-preview-frame, .work-document-viewer) {
    min-width: 0;
    max-width: 100%;
}

.work-document-preview-page > .work-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    min-width: 0;
}

.work-document-preview-page .work-hero__title > div { min-width: 0; }
.work-document-preview-page > .work-hero .work-hero__title .yc-page-title { white-space: normal; overflow-wrap: anywhere; }
.work-document-preview-page > .yc-page-header.work-hero .work-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    min-width: 0;
    max-width: 100%;
    width: auto;
    overflow: visible;
}

.work-document-preview-card__head { flex-wrap: wrap; }
.work-document-preview-card__head span { max-width: 100%; }
.work-document-viewer { display: grid; gap: 8px; }
.work-document-viewer__toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.work-document-viewer__toolbar[hidden], .work-document-viewer__status :is(p, progress)[hidden] { display: none; }
.work-document-viewer__toolbar .app-icon-btn { min-width: 36px; min-height: 36px; }
.work-document-viewer__toolbar [data-document-zoom="out"] span { font-size: 21px; line-height: 1; }
.work-document-viewer__toolbar button[data-document-zoom="fit"] { min-width: 64px; }
.work-document-viewer__status p { margin: 0; color: var(--yc-muted); overflow-wrap: anywhere; }
.work-document-viewer__status p[role="alert"] { color: var(--yc-danger); }
.work-document-viewer__status progress { width: 100%; accent-color: var(--app-accent); }
.work-document-viewer .work-document-viewer__viewport {
    display: block;
    min-height: 0;
    max-height: none;
    overflow-x: auto;
}
.work-document-viewer__media { margin-inline: auto; }
.work-document-viewer[data-document-viewer="image"] .work-document-viewer__media { margin-block: 6px; }
.work-document-viewer .work-document-preview__image { width: 100%; height: auto; max-height: none; }
.work-document-viewer[data-document-viewer="pdf"] .work-document-viewer__media {
    display: grid;
    gap: 10px;
    width: calc(100% - 16px);
    margin-block: 8px;
}
.work-document-pdf-page {
    position: relative;
    aspect-ratio: var(--document-pdf-ratio, 595 / 842);
    min-width: 0;
    width: 100%;
    background: var(--yc-night-soft, #f3f5f9);
}
.work-document-pdf-page canvas { position: absolute; inset: 0; display: block; width: 100%; height: 100%; }
.work-document-pdf-page canvas[hidden] { display: none; }
.work-document-pdf-page p { margin: 0; padding: 10px; color: var(--yc-danger); overflow-wrap: anywhere; }
.work-document-pdf-more { height: 1px; }

@media (max-width: 640px) {
    .work-document-preview-page > .work-hero { grid-template-columns: minmax(0, 1fr); }
    .work-document-preview-page > .yc-page-header.work-hero .work-hero__actions { justify-content: flex-start; margin-left: 0; }
    .work-document-preview-page .work-hero__actions .yc-btn { flex: 0 0 auto; width: auto; }
    .work-document-preview-page > .work-hero .work-hero__title .yc-page-title {
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
        overflow: hidden;
    }
}

@media (max-width: 400px) {
    .work-document-preview-page :is(.work-document-preview-card, .work-document-preview-meta) { padding: 10px; }
}

.work-document-preview__iframe {
    min-height: min(78vh, 860px);
}

@media (max-width: 899px) {
    .work-document-preview-frame {
        max-height: calc(100vh - 170px);
    }

    .work-document-preview__iframe {
        min-height: 68vh;
    }
}
body .schedule-page .priority-picker.is-open .priority-picker-menu {
    display: grid !important;
}

html.is-sidebar-collapsed .sidebar-user-meta {
    display: none;
}
/* Compact permission-aware sidebar */
.sidebar-nav {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 10px;
}

.sidebar-user {
    min-height: 56px;
    max-height: 72px;
    gap: 9px;
    border-radius: 12px;
    padding: 7px 10px;
}

.sidebar-user-avatar {
    width: 30px;
    height: 30px;
    border-radius: 10px;
    font-size: 14px;
}

.sidebar-user-meta {
    gap: 1px;
    line-height: 1.15;
}

.sidebar-user-name {
    font-size: 13px;
}

.sidebar-user-role {
    font-size: 10px;
}

.sidebar-section {
    gap: 5px;
    padding-bottom: 8px;
}

.sidebar-items {
    gap: 4px;
}

.sidebar-link {
    min-height: 42px;
    border-radius: 13px;
    padding: 6px 12px 6px 9px;
}

.sidebar-link-icon {
    width: 30px;
    height: 30px;
    border-radius: 10px;
}

@media (min-width: 900px) {
    html.is-sidebar-collapsed .sidebar-user {
        min-height: 44px;
        justify-content: center;
        padding: 7px;
    }

    html.is-sidebar-collapsed .sidebar-user-avatar {
        width: 32px;
        height: 32px;
    }
}
.shopping-owner-filter {
    display: flex;
    align-items: end;
    gap: 10px;
    flex-wrap: wrap;
    padding-top: 2px;
}

.shopping-owner-filter__field {
    width: min(100%, 320px);
    margin: 0;
}

.shopping-owner-filter .yc-select {
    min-height: 42px;
}

.shopping-owner-filter .yc-btn {
    min-height: 42px;
}

.shopping-owner-badge {
    color: var(--yc-night-accent, #6d28d9) !important;
    font-size: 11px !important;
    font-weight: 850 !important;
    overflow-wrap: anywhere;
}

@media (max-width: 760px) {
    .shopping-owner-filter {
        align-items: stretch;
        gap: 8px;
    }

    .shopping-owner-filter__field {
        width: 100%;
    }

    .shopping-owner-filter .yc-btn {
        width: 100%;
        justify-content: center;
    }
}
.shopping-create-share,
.shopping-share-panel__body {
    display: grid;
    gap: 10px;
}

.shopping-create-share {
    padding: 10px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 12px;
    background: rgba(var(--yc-night-soft-rgb, 248, 250, 252), 0.74);
}

.shopping-create-share__row,
.shopping-share-form,
.shopping-share-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(120px, 180px) auto;
    gap: 10px;
    align-items: end;
}

.shopping-share-trigger {
    margin: 0;
}

.shopping-share-dialog {
    width: min(680px, calc(100vw - 28px));
    max-height: min(760px, calc(100vh - 28px));
    padding: 14px;
    border: 1px solid rgba(124, 58, 237, 0.18);
    border-radius: 12px;
    background: var(--yc-night-surface, #fff);
    box-shadow: 0 24px 80px rgba(15, 23, 42, 0.28);
}

.shopping-share-dialog.has-floating-select {
    overflow: visible;
}

.work-share-dialog,
.work-share-dialog .shopping-share-panel__body,
.work-share-dialog .shopping-share-form,
.work-share-dialog .shopping-share-select {
    overflow: visible;
}

.work-share-dialog .shopping-share-select {
    position: relative;
    z-index: 5;
}

.work-share-dialog .shopping-share-select__menu {
    position: absolute;
    inset: calc(100% + 6px) 0 auto 0;
    width: 100%;
    min-width: 100%;
    z-index: 10001;
}

.shopping-share-dialog::backdrop {
    background: rgba(15, 23, 42, 0.34);
    backdrop-filter: blur(3px);
}

.shopping-share-panel__head {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 12px;
}

.shopping-share-panel__head span,
.shopping-share-row span {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.shopping-share-panel__head small,
.shopping-share-row small {
    color: var(--yc-night-muted, #64748b);
    font-size: 12px;
    font-weight: 750;
}

.shopping-share-list {
    display: grid;
    gap: 8px;
}

.shopping-share-row {
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 9px 10px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 10px;
    background: var(--yc-night-surface, #fff);
}
.shopping-share-row__actions {
    display: flex;
    align-items: stretch;
    justify-content: flex-end;
    gap: 8px;
    min-width: 0;
}

.shopping-share-permission-field {
    display: flex;
    min-width: 144px;
    margin: 0;
}

.shopping-share-permission-select {
    height: 48px;
    min-height: 48px;
    padding-top: 7px;
    padding-bottom: 7px;
}

.shopping-share-row__actions .yc-btn {
    height: 48px;
    min-height: 48px;
}

.shopping-share-row-status {
    min-height: 13px;
    color: var(--yc-night-green, #15803d);
    font-size: 11px;
    font-weight: 800;
    line-height: 1.2;
}

.shopping-share-row-status.is-error {
    color: var(--yc-night-error, #dc2626);
}

@media (max-width: 760px) {
    .shopping-create-share__row,
    .shopping-share-form,
    .shopping-share-row {
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .shopping-share-trigger .yc-btn,
    .shopping-share-form .yc-btn,
    .shopping-share-row .yc-btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 760px) {
    .shopping-share-row__actions,
    .shopping-share-permission-field,
    .shopping-share-permission-select,
    .shopping-share-selected-row .shopping-share-row__actions,
    .shopping-share-selected-row .shopping-share-permission-field,
    .shopping-share-selected-row .shopping-share-permission-select {
        width: 100%;
    }

    .shopping-share-row__actions,
    .shopping-share-selected-row .shopping-share-row__actions {
        display: grid;
        justify-content: stretch;
    }
}

.shopping-create-share[hidden] {
    display: none;
}

.shopping-create-share-toggle {
    width: 100%;
    justify-content: flex-start;
}

.shopping-share-autocomplete {
    position: relative;
}

.shopping-share-autocomplete-results {
    position: absolute;
    z-index: 30;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    display: grid;
    gap: 4px;
    padding: 8px;
    border: 1px solid rgba(124, 58, 237, 0.18);
    border-radius: 12px;
    background: var(--yc-night-surface, #fff);
    box-shadow: 0 18px 50px rgba(15, 23, 42, 0.16);
}

.shopping-share-autocomplete-results[hidden] {
    display: none;
}

.shopping-share-autocomplete-option {
    display: grid;
    width: 100%;
    gap: 2px;
    padding: 9px 10px;
    border: 0;
    border-radius: 9px;
    color: var(--yc-night-text, #111827);
    background: transparent;
    font: inherit;
    font-weight: 850;
    text-align: left;
    cursor: pointer;
}

.shopping-share-autocomplete-option:hover,
.shopping-share-autocomplete-option:focus-visible {
    background: rgba(124, 58, 237, 0.09);
    outline: none;
}

.shopping-share-autocomplete-option small,
.shopping-share-selected-row small {
    color: var(--yc-night-muted, #64748b);
    font-size: 12px;
    font-weight: 750;
}

.shopping-share-selected-list {
    display: grid;
    gap: 8px;
}

.shopping-share-selected-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    padding: 9px 10px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 10px;
    background: var(--yc-night-surface, #fff);
}

.shopping-share-selected-row span {
    display: grid;
    min-width: 0;
    gap: 2px;
}

.shopping-share-selected-row .shopping-share-person {
    display: flex;
    align-items: center;
    gap: 10px;
}

.shopping-share-selected-row .shopping-share-person > span:not(.user-avatar) {
    display: grid;
    min-width: 0;
    gap: 2px;
}


.work-project-share-modal {
    width: min(720px, calc(100vw - 32px));
}

.work-project-share-modal .shopping-share-form-row {
    grid-template-columns: minmax(0, 1fr) 180px;
    align-items: end;
}

.work-project-share-modal .shopping-share-selected-row {
    grid-template-columns: minmax(0, 1fr) 160px auto;
}

.work-project-share-modal .shopping-share-selected-row .yc-select,
.work-project-share-modal .shopping-share-selected-row .yc-btn {
    min-height: 44px;
}

@media (max-width: 760px) {
    .work-project-share-modal {
        width: min(100%, calc(100vw - 24px));
    }

    .work-project-share-modal .shopping-share-form-row,
    .work-project-share-modal .shopping-share-selected-row {
        grid-template-columns: minmax(0, 1fr);
    }
}
.shopping-share-confirm-dialog {
    width: min(420px, calc(100vw - 28px));
    padding: 0;
    border: 0;
    border-radius: 14px;
    background: transparent;
}

.shopping-share-confirm-dialog::backdrop {
    background: rgba(15, 23, 42, 0.34);
    backdrop-filter: blur(3px);
}

.shopping-share-confirm-dialog__body {
    display: grid;
    gap: 12px;
    padding: 16px;
    border: 1px solid rgba(124, 58, 237, 0.18);
    border-radius: 14px;
    background: var(--yc-night-surface, #fff);
    box-shadow: 0 24px 80px rgba(15, 23, 42, 0.24);
}

.shopping-share-confirm-dialog__body strong {
    color: var(--yc-night-text, #111827);
    font-size: 18px;
    font-weight: 900;
}

.shopping-share-confirm-dialog__body p {
    margin: 0;
    color: var(--yc-night-muted, #475569);
    font-size: 14px;
    font-weight: 700;
    line-height: 1.45;
}

.shopping-share-confirm-dialog__actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

@media (max-width: 760px) {
    .shopping-create-share-toggle {
        width: 100%;
    }

    .shopping-share-selected-row,
    .shopping-share-confirm-dialog__actions {
        grid-template-columns: 1fr;
    }

    .shopping-share-confirm-dialog__actions {
        display: grid;
    }

    .shopping-share-selected-row .yc-btn,
    .shopping-share-confirm-dialog__actions .yc-btn {
        width: 100%;
        justify-content: center;
    }
}

.shopping-owner-filter-box {
    align-items: stretch;
}

.shopping-owner-filter.finance-filter-panel {
    display: flex;
}

@media (max-width: 899px) {
    .shopping-owner-filter.finance-filter-panel {
        display: none;
    }

    .shopping-owner-filter.finance-filter-panel.is-open {
        display: flex;
    }
}

.yc-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
}

.yc-modal .yc-modal-close + .yc-modal__title,
.yc-modal__header .yc-modal__title {
    padding-right: 44px;
}
.friends-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.friends-card,
.friends-dashboard-alert {
    display: grid;
    gap: 12px;
    overflow: visible;
}

.friends-card--wide,
.friends-dashboard-alert {
    grid-column: 1 / -1;
}

.friends-request-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: end;
}

.friends-search-field {
    position: relative;
    z-index: 20;
}

.friends-search-results {
    position: absolute;
    z-index: 120;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    display: grid;
    gap: 4px;
    padding: 8px;
    border: 1px solid rgba(124, 58, 237, 0.18);
    border-radius: 12px;
    background: var(--yc-night-surface, #fff);
    box-shadow: 0 18px 50px rgba(15, 23, 42, 0.16);
}

.friends-search-results[hidden] {
    display: none;
}

.friends-search-option {
    display: grid;
    width: 100%;
    gap: 2px;
    padding: 9px 10px;
    border: 0;
    border-radius: 9px;
    color: var(--yc-night-text, #111827);
    background: transparent;
    font: inherit;
    font-weight: 850;
    text-align: left;
    cursor: pointer;
}

.friends-search-option:hover,
.friends-search-option:focus-visible {
    background: rgba(124, 58, 237, 0.09);
    outline: none;
}

.friends-search-option small,
.friends-row small {
    color: var(--yc-night-muted, #64748b);
    font-size: 12px;
    font-weight: 750;
}

.friends-list {
    display: grid;
    gap: 8px;
}

.friends-list--grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.friends-list--grid > .shopping-empty {
    grid-column: 1 / -1;
    width: 100%;
}

.friends-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    padding: 10px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 10px;
    background: var(--yc-night-surface, #fff);
}

.friends-row span {
    display: grid;
    min-width: 0;
    gap: 2px;
}

.friends-row__actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.friends-success {
    border-color: rgba(34, 197, 94, 0.22);
    background: rgba(var(--yc-night-green-bg-rgb, 240, 253, 244), 0.9);
    color: var(--yc-night-green, #166534);
}

@media (max-width: 900px) {
    .friends-grid,
    .friends-list--grid,
    .friends-request-form,
    .friends-row {
        grid-template-columns: 1fr;
    }

    .friends-row__actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .friends-row__actions .yc-btn,
    .friends-request-form .yc-btn,
    .friends-row form,
    .friends-row form .yc-btn {
        width: 100%;
        justify-content: center;
    }
}
.settings-permission-toggle.is-required {
    opacity: 0.9;
}

.settings-permission-toggle.is-required small {
    display: inline-flex;
    margin-left: 6px;
    color: var(--yc-muted);
    font-size: 11px;
    font-weight: 800;
}

.sidebar-link-badge--warning {
    color: var(--yc-night-warning, #92400e);
    background: var(--yc-night-warning-bg, #fef3c7);
    box-shadow: 0 8px 18px rgba(245, 158, 11, 0.22);
}

.shopping-share-trigger.is-shared {
    border-color: rgba(34, 197, 94, 0.45);
    background: rgba(var(--yc-night-green-bg-rgb, 240, 253, 244), 0.96);
    color: var(--yc-night-green, #16a34a);
    box-shadow: 0 10px 24px rgba(34, 197, 94, 0.16);
}

.settings-security-page .calendar-error,
.settings-security-page .calendar-success {
    max-width: none;
}

.settings-security-card {
    display: grid;
    gap: 18px;
    padding: 22px;
}

.settings-security-card__head {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
}

.settings-security-card__head h2,
.settings-security-card__head p,
.settings-security-panel h3,
.settings-security-panel p {
    margin: 0;
}

.settings-security-card__head h2,
.settings-security-panel h3 {
    color: var(--yc-text);
    font-size: 20px;
    font-weight: 950;
}

.settings-security-card__head p,
.settings-security-panel p,
.settings-security-account span {
    color: var(--yc-muted);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.45;
}

.settings-security-card__icon {
    display: inline-flex;
    width: 42px;
    height: 42px;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    color: var(--yc-night-accent, #7c3aed);
    background: rgba(124, 58, 237, 0.1);
}

.settings-security-card__icon svg {
    width: 21px;
    height: 21px;
}

.settings-security-badge {
    display: inline-flex;
    min-width: 96px;
    justify-content: center;
    border-radius: 999px;
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 950;
}

.settings-security-badge.is-enabled {
    color: var(--yc-night-green, #166534);
    background: var(--yc-night-green-bg, #dcfce7);
}

.settings-security-badge.is-disabled {
    color: var(--yc-night-warning, #92400e);
    background: var(--yc-night-warning-bg, #fef3c7);
}

.settings-security-account {
    display: flex;
    width: fit-content;
    max-width: 100%;
    align-items: center;
    gap: 10px;
    border: 1px solid rgba(124, 58, 237, 0.16);
    border-radius: 12px;
    padding: 10px 12px;
    background: rgba(var(--yc-night-soft-rgb, 248, 245, 255), 0.82);
}

.settings-security-account strong {
    color: var(--yc-text);
    font-size: 14px;
    font-weight: 900;
}

.settings-security-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
    gap: 16px;
    align-items: stretch;
}

.settings-security-grid--enabled {
    grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
}

.settings-security-panel {
    display: grid;
    align-content: start;
    gap: 12px;
    min-width: 0;
    border: 1px solid rgba(124, 58, 237, 0.16);
    border-radius: 14px;
    padding: 16px;
    background: linear-gradient(135deg, rgba(var(--yc-night-soft-rgb, 248, 245, 255), 0.9), rgba(var(--yc-night-surface-rgb, 255, 255, 255), 0.96));
}

.settings-security-panel--action {
    align-content: end;
}

.settings-security-panel--action .yc-btn {
    width: 100%;
    min-height: 46px;
}

.settings-security-panel .yc-field {
    min-width: 0;
}

.settings-security-panel .yc-textarea {
    min-height: 108px;
    resize: vertical;
}

.settings-security-codes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
}

.settings-security-codes code {
    display: flex;
    min-height: 42px;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(124, 58, 237, 0.18);
    border-radius: 12px;
    padding: 10px;
    color: var(--yc-text);
    background: rgba(var(--yc-night-soft-rgb, 248, 245, 255), 0.9);
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 13px;
    font-weight: 900;
}

.settings-security-methods {
    display: grid;
    gap: 12px;
}

.settings-security-card--method .settings-security-methods {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: stretch;
}

.settings-security-method {
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid rgba(124, 58, 237, 0.16);
    border-radius: 14px;
    padding: 13px 14px;
    background: rgba(var(--yc-night-surface-rgb, 255, 255, 255), 0.92);
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.settings-security-method.is-active,
.settings-security-method:has(input:checked) {
    border-color: rgba(124, 58, 237, 0.58);
    background: linear-gradient(135deg, rgba(var(--yc-night-soft-rgb, 248, 245, 255), 0.96), rgba(var(--yc-night-surface-rgb, 255, 255, 255), 0.98));
    box-shadow: 0 16px 36px rgba(124, 58, 237, 0.12);
}

.settings-security-method input {
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
    accent-color: #7c3aed;
}

.settings-security-method span {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.settings-security-method strong {
    color: var(--yc-text);
    font-size: 14px;
    font-weight: 900;
}

.settings-security-method small,
.settings-security-empty,
.settings-passkey-row small,
.settings-passkey-status,
.auth-passkey-status,
.auth-passkey-copy {
    color: var(--yc-muted);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.4;
}

.settings-security-method.is-disabled {
    opacity: 0.62;
}

.settings-security-methods > .yc-btn {
    justify-self: start;
    min-height: 44px;
}

.settings-security-card--method .settings-security-methods > .yc-btn {
    grid-column: 1 / -1;
}

.settings-security-panel-card[hidden] {
    display: none !important;
}

.settings-passkey-guide {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.settings-passkey-guide__card {
    display: grid;
    gap: 8px;
    border: 1px solid rgba(124, 58, 237, 0.16);
    border-radius: 14px;
    padding: 14px;
    background: rgba(var(--yc-night-soft-rgb, 248, 245, 255), 0.72);
}

.settings-passkey-guide__card h3 {
    margin: 0;
    color: var(--yc-text);
    font-size: 15px;
    font-weight: 900;
}

.settings-passkey-guide__card ol {
    display: grid;
    gap: 6px;
    margin: 0;
    padding-left: 20px;
    color: var(--yc-muted);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.45;
}
.settings-passkey-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: end;
}

.settings-passkey-actions .yc-btn {
    min-height: 46px;
}

.settings-passkey-status,
.auth-passkey-status {
    min-height: 18px;
    margin: 0;
}

.settings-passkey-status.is-error,
.auth-passkey-status.is-error {
    color: var(--yc-night-error, #dc2626);
}

.settings-passkey-status.is-success,
.auth-passkey-status.is-success {
    color: var(--yc-night-green, #16a34a);
}

.settings-passkey-list {
    display: grid;
    gap: 10px;
}

.settings-passkey-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    border: 1px solid rgba(124, 58, 237, 0.16);
    border-radius: 14px;
    padding: 13px 14px;
    background: rgba(var(--yc-night-surface-rgb, 255, 255, 255), 0.92);
}

.settings-passkey-row > div {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.settings-passkey-row strong {
    color: var(--yc-text);
    font-size: 14px;
    font-weight: 900;
}

.settings-passkey-row form {
    flex: 0 0 auto;
}

.auth-passkey-box {
    display: grid;
    gap: 12px;
}

.auth-passkey-copy {
    margin: 0;
}
@media (max-width: 900px) {
    .settings-security-card {
        padding: 16px;
    }

    .settings-security-card__head,
    .settings-security-grid,
    .settings-security-grid--enabled {
        grid-template-columns: 1fr;
    }

    .settings-security-card__icon,
    .settings-security-badge {
        justify-self: start;
    }

    .settings-security-account {
        width: 100%;
    }
    .settings-security-card--method .settings-security-methods,
    .settings-passkey-guide,
    .settings-passkey-actions,
    .settings-passkey-row {
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .settings-passkey-row {
        display: grid;
    }

    .settings-passkey-row .yc-btn,
    .settings-passkey-actions .yc-btn {
        width: 100%;
    }
}
/* User avatars and friend/share pickers */
.user-avatar {
    display: inline-flex;
    width: 38px;
    height: 38px;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 12px;
    color: var(--yc-night-accent, #6d28d9);
    font-size: 15px;
    font-weight: 900;
    background: rgba(124, 58, 237, 0.1);
    box-shadow: inset 0 0 0 1px rgba(124, 58, 237, 0.16);
}

.user-avatar--sm {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    font-size: 13px;
}

.user-avatar--xl {
    width: 82px;
    height: 82px;
    border-radius: 22px;
    font-size: 28px;
}

.user-avatar img,
.sidebar-user-avatar img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: inherit;
}

.settings-account-profile {
    display: grid;
    gap: 16px;
}

.settings-account-avatar-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px;
    border: 1px solid rgba(124, 58, 237, 0.14);
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.08), rgba(var(--yc-night-surface-rgb, 255, 255, 255), 0.96));
}

.settings-account-avatar-card__body {
    display: grid;
    min-width: 0;
    gap: 8px;
}

.settings-account-avatar-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.shopping-share-picker {
    position: relative;
    min-width: 0;
}

.shopping-share-picker-results {
    position: absolute;
    z-index: 160;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    display: grid;
    gap: 4px;
    max-height: min(280px, 50vh);
    overflow: auto;
    padding: 8px;
    border: 1px solid rgba(124, 58, 237, 0.18);
    border-radius: 12px;
    background: var(--yc-night-surface, #fff);
    box-shadow: 0 18px 50px rgba(15, 23, 42, 0.16);
}

.shopping-share-picker-results[hidden],
.shopping-share-picked[hidden] {
    display: none;
}

.shopping-share-picker-option {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    padding: 9px 10px;
    border: 0;
    border-radius: 9px;
    color: var(--yc-night-text, #111827);
    background: transparent;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.shopping-share-picker-option:hover,
.shopping-share-picker-option:focus-visible {
    background: rgba(124, 58, 237, 0.09);
    outline: none;
}

.shopping-share-picker-option.is-disabled,
.shopping-share-picker-option.is-disabled:hover,
.shopping-share-picker-option.is-disabled:focus-visible {
    color: var(--yc-night-muted, #64748b);
    background: transparent;
    cursor: default;
}

.shopping-share-person,
.friends-person {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 10px;
}

.shopping-share-person > span:not(.user-avatar),
.friends-person > span:not(.user-avatar) {
    display: grid;
    min-width: 0;
    gap: 2px;
}

.shopping-share-person strong,
.friends-person strong {
    overflow-wrap: anywhere;
}

.shopping-share-picked {
    margin-top: 8px;
    padding: 8px 10px;
    border: 1px solid rgba(124, 58, 237, 0.14);
    border-radius: 10px;
    background: rgba(124, 58, 237, 0.07);
}

.shopping-share-row,
.shopping-share-selected-row {
    align-items: center;
}

.friends-card,
.friends-list,
.friends-list--grid,
.friends-row {
    min-width: 0;
    width: 100%;
}

.friends-row > .friends-person {
    min-width: 0;
}

.friends-search-option {
    display: flex;
    align-items: center;
    gap: 10px;
}

.friends-dashboard-alert {
    border-color: rgba(124, 58, 237, 0.18);
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.08), rgba(var(--yc-night-surface-rgb, 255, 255, 255), 0.98));
}

.friends-alert-row {
    border-color: rgba(124, 58, 237, 0.2);
    background: rgba(var(--yc-night-surface-rgb, 255, 255, 255), 0.92);
}

@media (max-width: 760px) {
    .settings-account-avatar-card,
    .shopping-share-person,
    .friends-person {
        align-items: flex-start;
    }

    .shopping-share-picker-results {
        max-height: 240px;
    }
}
.shopping-current-card,
.shopping-current-card .shopping-management-list,
.shopping-management-card--current,
.shopping-list-detail,
.shopping-quick-add,
.shopping-autocomplete-field {
    overflow: visible;
}

.shopping-current-card .shopping-autocomplete-results {
    z-index: 220;
}
/* Account avatar upload and dashboard friend alert polish */
.settings-account-avatar-card {
    align-items: stretch;
}

.settings-account-avatar-dropzone {
    display: flex;
    width: 100%;
    min-width: 0;
    align-items: center;
    gap: 14px;
    padding: 12px;
    border: 1px dashed rgba(124, 58, 237, 0.28);
    border-radius: 14px;
    background: rgba(var(--yc-night-surface-rgb, 255, 255, 255), 0.72);
    cursor: pointer;
    transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.settings-account-avatar-dropzone:hover,
.settings-account-avatar-dropzone:focus-visible,
.settings-account-avatar-card.is-dragover .settings-account-avatar-dropzone {
    border-color: rgba(124, 58, 237, 0.7);
    background: rgba(var(--yc-night-soft-rgb, 250, 245, 255), 0.94);
    box-shadow: 0 14px 34px rgba(124, 58, 237, 0.14);
    outline: none;
}

.settings-account-avatar-card.is-uploading {
    opacity: 0.78;
    pointer-events: none;
}

.settings-account-avatar-input {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    opacity: 0;
}

.settings-account-avatar-status {
    margin: 0;
    color: var(--yc-night-green, #166534);
    font-size: 13px;
    font-weight: 800;
}

.settings-account-avatar-status.is-error {
    color: var(--yc-night-error, #dc2626);
}

.friends-dashboard-alert {
    gap: 12px;
    padding: 16px;
    border: 1px solid rgba(245, 158, 11, 0.28);
    background: linear-gradient(135deg, rgba(var(--yc-night-warning-bg-rgb, 255, 251, 235), 0.96), rgba(var(--yc-night-blue-bg-rgb, 239, 246, 255), 0.96));
    box-shadow: 0 18px 55px rgba(15, 23, 42, 0.08);
}

.friends-dashboard-alert .work-dashboard-card__header {
    padding: 0;
    text-align: left;
}

.friends-dashboard-alert .work-dashboard-card__header h3 {
    margin: 0;
    color: var(--yc-night-text, #111827);
    text-align: left;
}

.friends-dashboard-alert .friends-list {
    gap: 10px;
}

.friends-dashboard-alert .friends-row {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    text-align: left;
}

.friends-dashboard-alert .friends-person,
.friends-dashboard-alert .friends-person span,
.friends-dashboard-alert .friends-person small {
    text-align: left;
}

@media (max-width: 760px) {
    .settings-account-avatar-dropzone {
        align-items: flex-start;
    }

    .friends-dashboard-alert .friends-row {
        grid-template-columns: 1fr;
    }
}
.friends-list--grid .friends-row--compact {
    grid-template-columns: minmax(0, 1fr) auto;
}

.friends-remove-form {
    justify-self: end;
}

.friends-remove-form .app-icon-btn {
    margin: 0;
}

@media (max-width: 900px) {
    .friends-list--grid .friends-row--compact {
        grid-template-columns: minmax(0, 1fr) auto;
    }
}
/* Settings media upload actions */
.settings-account-profile__grid {
    display: grid;
    gap: 14px;
}

.settings-account-avatar-card,
.settings-logo-card {
    margin-bottom: 14px;
}

.settings-account-avatar-actions,
.settings-logo-actions {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.settings-account-avatar-actions .app-icon-btn,
.settings-logo-actions .app-icon-btn,
.settings-media-action {
    width: 44px;
    height: 44px;
    min-width: 44px;
    padding: 0;
}

.settings-account-avatar-actions .settings-account-avatar-action {
    min-height: 44px;
}

.settings-account-avatar-action svg {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
}

.settings-logo-card {
    align-items: stretch;
}

.settings-logo-upload {
    width: 100%;
    min-width: 0;
}

.settings-logo-actions label.app-icon-btn {
    cursor: pointer;
}

.settings-logo-actions input[type="file"] {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    opacity: 0;
}

@media (max-width: 760px) {
    .settings-account-avatar-card,
    .settings-logo-card {
        display: grid;
    }

    .settings-account-avatar-actions,
    .settings-logo-actions {
        justify-content: flex-start;
    }
}
/* Account avatar and friends header alignment fixes */
.settings-account-page .settings-account-avatar-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px 16px;
    margin: 0;
    padding: 0 0 12px;
    border: 0;
    border-bottom: 1px solid var(--yc-border);
    border-radius: 0;
    background: none;
    box-shadow: none;
}

.settings-account-page .settings-account-avatar-dropzone {
    width: auto;
    align-items: center;
    gap: 10px;
    padding: 4px;
    border: 1px solid transparent;
    border-radius: 8px;
    background: transparent;
}

.settings-account-page .settings-account-avatar-dropzone:is(:hover, :focus-visible),
.settings-account-page .settings-account-avatar-card.is-dragover .settings-account-avatar-dropzone {
    background: var(--yc-night-soft, #f7f8fc);
    border-color: var(--yc-border);
    box-shadow: none;
}

.settings-account-page .settings-account-avatar-dropzone:focus-visible {
    outline: 2px solid var(--app-accent);
}

.settings-account-page .settings-account-avatar-card__body strong {
    overflow-wrap: anywhere;
}

.settings-account-page .settings-account-avatar-dropzone .user-avatar--xl {
    width: 64px;
    height: 64px;
    border-radius: 16px;
}

.settings-account-page .settings-account-avatar-card__body {
    gap: 4px;
}

.settings-account-page .settings-account-avatar-card__body small {
    color: var(--yc-muted, #64748b);
    line-height: 1.4;
}

.settings-account-page .settings-account-avatar-actions {
    flex: 0 1 auto;
    min-width: 0;
    justify-content: flex-start;
    flex-wrap: wrap;
}

.settings-account-page .settings-account-avatar-action svg {
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.settings-account-page .settings-account-avatar-status,
.settings-account-page .settings-account-avatar-progress {
    grid-column: 1 / -1;
}

@media (max-width: 767px) {
    .settings-account-page .settings-account-avatar-card { grid-template-columns: minmax(0, 1fr); }
}

.friends-page .yc-page-header__title {
    align-items: center;
}

.friends-page .yc-page-header .yc-page-title {
    line-height: 1.1;
}

@media (max-width: 768px) {
    .friends-page .yc-page-header {
        align-items: center;
        flex-direction: row;
    }

    .friends-page .yc-page-header__title {
        align-items: center;
    }
}

@media (max-width: 760px) {
    .settings-account-page .settings-account-avatar-dropzone,
    .settings-account-page .settings-account-avatar-actions {
        flex-basis: 100%;
    }

    .settings-account-page .settings-account-avatar-action {
        gap: 6px;
        padding-inline: 10px;
    }

    .settings-account-page [data-account-avatar-delete] {
        width: 44px;
        min-width: 44px;
        padding-inline: 0;
    }

    .settings-account-page [data-account-avatar-delete] span {
        display: none;
    }
}
/* Invoice logo preview matches account avatar preview */
.settings-logo-upload__preview,
.settings-logo-upload__icon {
    width: 82px;
    height: 82px;
    border-radius: 22px;
    flex: 0 0 82px;
}

.settings-logo-upload__icon svg {
    width: 30px;
    height: 30px;
}

.settings-logo-upload__preview img {
    padding: 0;
}
/* Shopping share friend select */
.shopping-share-select {
    position: relative;
}

.shopping-share-select__button {
    display: flex;
    width: 100%;
    min-height: 48px;
    align-items: center;
    justify-content: flex-start;
    text-align: left;
    cursor: pointer;
}

.shopping-share-select__button > span {
    display: block;
    min-width: 0;
    width: 100%;
}

.shopping-share-select__button .shopping-share-person {
    width: 100%;
}

.shopping-share-select__menu {
    position: absolute;
    z-index: 180;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    display: grid;
    gap: 4px;
    max-height: min(320px, 52vh);
    overflow: auto;
    padding: 8px;
    border: 1px solid rgba(124, 58, 237, 0.18);
    border-radius: 12px;
    background: var(--yc-night-surface, #fff);
    box-shadow: 0 18px 50px rgba(15, 23, 42, 0.16);
}

.shopping-share-select__menu.is-floating {
    position: fixed;
    right: auto;
    z-index: 10000;
}

.shopping-share-select__menu[hidden] {
    display: none;
}

.shopping-share-select__option {
    min-height: 52px;
}

.shopping-share-select__option .shopping-share-person {
    width: 100%;
}

.shopping-share-select__option[aria-selected="true"] {
    background: rgba(124, 58, 237, 0.1);
}

.shopping-create-share > [data-shopping-share-add] {
    width: 100%;
    justify-content: center;
}
@media (max-width: 899px) {
    .documents-page .work-documents-grid .work-sub-actions--header > .shopping-share-trigger--standalone,
    .work-detail-card--documents .work-documents-grid .work-sub-actions--header > .shopping-share-trigger--standalone {
        display: none !important;
    }
}
/* Sidebar visual polish */
.app-sidebar {
    padding: 18px 14px;
    background: linear-gradient(180deg, #3b0764 0%, #5b21b6 48%, #8b1ab1 100%) !important;
}

.sidebar-header {
    margin-bottom: 14px;
    padding: 0 2px;
}

.sidebar-brand {
    gap: 10px;
}

.sidebar-nav {
    gap: 9px;
    padding: 4px 10px 28px 0;
}

.sidebar-user {
    min-height: 54px;
    margin: 0 0 4px;
    padding: 8px 10px;
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: 13px;
    background: rgba(var(--yc-night-surface-rgb, 255, 255, 255), 0.105);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.sidebar-user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 11px;
}

.sidebar-user-name {
    color: #fff;
    font-size: 13px;
    font-weight: 800;
}

.sidebar-user-role {
    color: rgba(255, 255, 255, 0.58);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.04em;
}

.sidebar-section {
    gap: 6px;
    padding: 8px 0 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.13);
}

.sidebar-section:first-of-type {
    padding-top: 4px;
}

.sidebar-section:last-child {
    border-bottom: 0;
}

.sidebar-section h2 {
    margin: 0;
    padding: 0 10px 1px;
    color: rgba(255, 255, 255, 0.62);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.11em;
    line-height: 1.35;
    text-transform: uppercase;
    text-shadow: none;
}

.sidebar-items {
    gap: 3px;
}

.sidebar-link {
    position: relative;
    min-height: 40px;
    width: 100%;
    gap: 9px;
    padding: 5px 9px 5px 8px;
    border-radius: 13px;
    color: rgba(255, 255, 255, 0.78);
    font-weight: 400;
    line-height: 1.2;
}

.sidebar-link:hover {
    color: rgba(255, 255, 255, 0.95);
    background: rgba(var(--yc-night-surface-rgb, 255, 255, 255), 0.09);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.09);
    transform: none;
}

.sidebar-link.is-active {
    color: #fff;
    font-weight: 600;
    background: rgba(var(--yc-night-surface-rgb, 255, 255, 255), 0.18);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18), 0 10px 24px rgba(15, 23, 42, 0.14);
}

.sidebar-link-icon {
    width: 30px;
    height: 30px;
    flex-basis: 30px;
    border-radius: 10px;
    color: rgba(255, 255, 255, 0.82);
    background: rgba(var(--yc-night-surface-rgb, 255, 255, 255), 0.10);
}

.sidebar-link-icon svg {
    width: 18px;
    height: 18px;
    stroke-width: 2.15;
}

.sidebar-link:hover .sidebar-link-icon {
    color: #fff;
    background: rgba(var(--yc-night-surface-rgb, 255, 255, 255), 0.14);
}

.sidebar-link.is-active .sidebar-link-icon {
    color: #fff;
    background: rgba(var(--yc-night-surface-rgb, 255, 255, 255), 0.17);
}

.sidebar-link-text {
    min-width: 0;
    flex: 1 1 auto;
    color: inherit;
    font-size: 15px;
    font-weight: 400;
    letter-spacing: 0;
}

.sidebar-link.is-active .sidebar-link-text {
    font-weight: 600;
}

.sidebar-link-badge {
    margin-left: auto;
    min-width: 23px;
    min-height: 19px;
    padding: 2px 7px;
    border: 1px solid rgba(255, 255, 255, 0.30);
    border-radius: 999px;
    background: var(--yc-night-green-bg, #dcfce7);
    color: var(--yc-night-green, #166534);
    font-size: 11px;
    font-weight: 900;
    line-height: 1.2;
    box-shadow: 0 6px 15px rgba(22, 163, 74, 0.16);
}

.sidebar-link-badge--warning {
    background: var(--yc-night-warning-bg, #fef3c7);
    color: var(--yc-night-warning, #92400e);
}

@media (min-width: 900px) {
    html.is-sidebar-collapsed .sidebar-header {
        justify-content: center;
        padding: 0;
    }

    html.is-sidebar-collapsed .sidebar-user {
        min-height: 42px;
        justify-content: center;
        margin-right: 0;
        margin-left: 0;
        padding: 6px;
    }

    html.is-sidebar-collapsed .sidebar-section {
        padding: 8px 0;
    }

    html.is-sidebar-collapsed .sidebar-link {
        width: 42px;
        min-height: 42px;
        justify-content: center;
        gap: 0;
        padding: 6px;
        margin: 0 auto;
    }

    html.is-sidebar-collapsed .sidebar-link-icon {
        width: 30px;
        height: 30px;
        flex-basis: 30px;
    }

    html.is-sidebar-collapsed .sidebar-link-badge {
        position: absolute;
        top: 1px;
        right: -4px;
        min-width: 16px;
        min-height: 16px;
        padding: 0 4px;
        font-size: 9px;
    }
}

@media (max-width: 899px) {
    .app-sidebar {
        padding: 16px 14px;
    }

    .sidebar-nav {
        padding-bottom: 34px;
    }

    .sidebar-link {
        min-height: 42px;
    }
}
/* Sidebar compact typography pass */
:root {
    --yc-sidebar-width: 248px;
    --yc-sidebar-collapsed-width: 72px;
}

@media (min-width: 900px) {
    .app-sidebar {
        width: var(--yc-sidebar-width);
        padding: 16px 12px;
    }

    .app-shell {
        margin-left: var(--yc-sidebar-width);
    }

    html.is-sidebar-collapsed .app-sidebar {
        width: var(--yc-sidebar-collapsed-width);
        padding-right: 10px;
        padding-left: 10px;
    }

    html.is-sidebar-collapsed .app-shell {
        margin-left: var(--yc-sidebar-collapsed-width);
    }
}

.sidebar-header {
    margin-bottom: 12px;
    padding: 0 1px;
}

.sidebar-collapse {
    width: 36px;
    height: 36px;
    border-radius: 11px;
}

.sidebar-nav {
    gap: 7px;
    padding: 3px 8px 26px 0;
}

.sidebar-user {
    min-height: 50px;
    gap: 8px;
    margin-bottom: 2px;
    padding: 7px 9px;
    border-radius: 12px;
}

.sidebar-user-avatar {
    width: 30px;
    height: 30px;
    border-radius: 10px;
}

.sidebar-user-name {
    font-size: 13px;
    font-weight: 600;
}

.sidebar-user-role {
    font-size: 10px;
    font-weight: 600;
}

.sidebar-section {
    gap: 5px;
    padding: 7px 0 9px;
}

.sidebar-section h2 {
    padding: 0 9px;
    color: rgba(255, 255, 255, 0.58);
    font-size: 9.5px;
    font-weight: 500;
    letter-spacing: 0.12em;
}

.sidebar-items {
    gap: 4px;
}

.sidebar-link {
    min-height: 38px;
    gap: 12px;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 400;
    line-height: 20px;
}

.sidebar-link.is-active {
    font-weight: 500;
}

.sidebar-link-icon {
    width: 28px;
    height: 28px;
    flex-basis: 28px;
    border-radius: 9px;
}

.sidebar-link-icon svg {
    width: 18px;
    height: 18px;
    stroke-width: 2;
}

.sidebar-link-text {
    font-size: 14px;
    font-weight: 400;
    line-height: 20px;
}

.sidebar-link.is-active .sidebar-link-text {
    font-weight: 500;
}

.sidebar-link-badge {
    min-width: 21px;
    min-height: 18px;
    padding: 1px 6px;
    font-size: 11px;
    font-weight: 800;
}

@media (min-width: 900px) {
    html.is-sidebar-collapsed .sidebar-header {
        margin-bottom: 12px;
        margin-inline: -8px;
        gap: 4px;
    }

    html.is-sidebar-collapsed .sidebar-user {
        min-height: 40px;
        padding: 5px;
    }

    html.is-sidebar-collapsed .sidebar-link {
        width: 40px;
        min-height: 40px;
        padding: 6px;
    }

    html.is-sidebar-collapsed .sidebar-link-icon {
        width: 28px;
        height: 28px;
        flex-basis: 28px;
    }
}

@media (max-width: 899px) {
    .sidebar-link {
        min-height: 40px;
        font-size: 14px;
    }
}
/* Document share modal alignment */
.work-share-dialog .shopping-share-close {
    width: 38px;
    height: 38px;
    min-width: 38px;
}

.work-share-dialog .shopping-share-form .shopping-share-select__button,
.work-share-dialog .shopping-share-form .yc-select,
.work-share-dialog .shopping-share-form .yc-btn {
    height: 48px;
    min-height: 48px;
}

.work-share-dialog .shopping-share-form .yc-btn {
    align-self: end;
    padding-top: 0;
    padding-bottom: 0;
}

/* Global content width guard after sidebar resize */
@media (min-width: 900px) {
    .app-shell,
    .app-shell > *,
    .page,
    .yc-card,
    .yc-panel {
        min-width: 0;
        box-sizing: border-box;
    }

    .yc-table-wrap,
    .work-table-wrap {
        width: 100%;
        max-width: 100%;
        overflow-x: auto;
        overflow-y: hidden;
    }

    .work-page,
    .invoice-page,
    .invoices-page {
        overflow-x: visible;
    }

    .work-table .finance-table__actions,
    .invoice-table .finance-table__actions {
        width: 164px;
        min-width: 164px;
        padding-right: 16px;
    }

    .work-table-col--actions {
        width: 164px;
    }

    .work-desktop-actions {
        min-width: max-content;
    }
}
/* Invoices table must fit the available content width without horizontal scroll */
@media (min-width: 1000px) {
    .invoices-page .work-list-card {
        overflow: hidden;
    }

    .invoices-page .work-table-wrap,
    .invoices-page .yc-table-wrap {
        overflow-x: hidden;
        overflow-y: hidden;
    }

    .invoices-page .invoice-table {
        width: 100%;
        min-width: 0 !important;
        table-layout: fixed;
    }

    .invoices-page .invoice-table th,
    .invoices-page .invoice-table td {
        overflow: hidden;
        padding-right: 8px;
        padding-left: 8px;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .invoices-page .invoice-table th:nth-child(1),
    .invoices-page .invoice-table td:nth-child(1) {
        width: 42px;
        min-width: 42px;
        max-width: 42px;
    }

    .invoices-page .invoice-table th:nth-child(2),
    .invoices-page .invoice-table td:nth-child(2) {
        width: 10%;
    }

    .invoices-page .invoice-table th:nth-child(3),
    .invoices-page .invoice-table td:nth-child(3) {
        width: 15%;
    }

    .invoices-page .invoice-table th:nth-child(4),
    .invoices-page .invoice-table td:nth-child(4) {
        width: 12%;
    }

    .invoices-page .invoice-table th:nth-child(5),
    .invoices-page .invoice-table td:nth-child(5),
    .invoices-page .invoice-table th:nth-child(6),
    .invoices-page .invoice-table td:nth-child(6) {
        width: 10%;
    }

    .invoices-page .invoice-table th:nth-child(7),
    .invoices-page .invoice-table td:nth-child(7) {
        width: 12%;
    }

    .invoices-page .invoice-table th:nth-child(8),
    .invoices-page .invoice-table td:nth-child(8) {
        width: 10%;
    }

    .invoices-page .invoice-table th:nth-child(9),
    .invoices-page .invoice-table td:nth-child(9),
    .invoices-page .invoice-table .finance-table__actions {
        width: 124px;
        min-width: 124px;
        max-width: 124px;
        padding-right: 10px;
    }

    .invoices-page .invoice-table .work-desktop-actions {
        min-width: 0;
        gap: 6px;
        justify-content: flex-end;
    }

    .invoices-page .invoice-table .app-icon-btn {
        width: 34px;
        min-width: 34px;
        height: 34px;
        min-height: 34px;
        border-radius: 10px;
    }

    .invoices-page .invoice-table .app-icon-btn svg {
        width: 16px;
        height: 16px;
    }
}
/* Keep invoice row actions fully inside the visible table area */
@media (min-width: 1000px) {
    .invoices-page .invoice-table th:nth-child(9),
    .invoices-page .invoice-table td:nth-child(9),
    .invoices-page .invoice-table .finance-table__actions {
        width: 132px;
        min-width: 132px;
        max-width: 132px;
        padding-right: 6px;
        padding-left: 6px;
    }

    .invoices-page .invoice-table .work-desktop-actions {
        gap: 4px;
    }

    .invoices-page .invoice-table .app-icon-btn {
        width: 32px;
        min-width: 32px;
        height: 32px;
        min-height: 32px;
    }
}
/* Harmonogram must not expose calendar friend sharing controls. */
.schedule-page .schedule-calendar-event-panel [name="calendar_share_with_friend"],
.schedule-page .schedule-calendar-event-panel [data-calendar-share-toggle],
.schedule-page .schedule-calendar-event-panel [data-calendar-friend-field],
.schedule-page .schedule-calendar-event-panel .yc-toggle:has(input[name="calendar_share_with_friend"]) {
    display: none !important;
}

/* Main dashboard MVP */
.dashboard-page {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.dashboard-hero {
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.dashboard-muted {
    margin: 4px 0 0;
    color: var(--yc-night-muted, #64748b);
    font-size: 0.95rem;
    font-weight: 500;
}

.dashboard-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
}

.dashboard-attention {
    display: grid;
    grid-template-columns: minmax(220px, 0.8fr) minmax(0, 2fr);
    gap: 16px;
    align-items: center;
    padding: 16px;
}

.dashboard-attention.has-items {
    border-color: rgba(239, 68, 68, 0.2);
    background: linear-gradient(135deg, rgba(var(--yc-night-error-bg-rgb, 254, 242, 242), 0.92), var(--yc-night-surface, #fff));
}

.dashboard-attention.is-calm {
    border-color: rgba(34, 197, 94, 0.2);
    background: linear-gradient(135deg, rgba(var(--yc-night-green-bg-rgb, 240, 253, 244), 0.92), var(--yc-night-surface, #fff));
}

.dashboard-section-heading {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.dashboard-section-heading h2 {
    margin: 0;
    color: var(--yc-night-text, #0f172a);
    font-size: 1.05rem;
    line-height: 1.2;
}

.dashboard-section-heading p {
    margin: 3px 0 0;
    color: var(--yc-night-muted, #64748b);
    font-size: 0.86rem;
    font-weight: 600;
}

.dashboard-card-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    color: var(--yc-night-accent, #7c3aed);
    background: var(--yc-night-accent-bg, #f1e8ff);
}

.dashboard-card-icon svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
}

.dashboard-attention-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
}

.dashboard-attention-item,
.dashboard-attention-empty {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    min-width: 0;
    border: 1px solid var(--yc-night-border, #e2e8f0);
    border-radius: 14px;
    padding: 12px 14px;
    color: var(--yc-night-text, #0f172a);
    background: rgba(var(--yc-night-surface-rgb, 255, 255, 255), 0.82);
    text-decoration: none;
}

.dashboard-attention-item strong,
.dashboard-attention-item span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dashboard-attention-item span {
    color: var(--yc-night-muted, #64748b);
    font-weight: 700;
}

.dashboard-attention-item:hover,
.dashboard-attention-item:focus-visible {
    border-color: #c4b5fd;
    box-shadow: 0 14px 30px rgba(124, 58, 237, 0.12);
}

.dashboard-attention-empty {
    grid-column: 1 / -1;
    color: var(--yc-night-green, #166534);
    font-weight: 700;
}

.dashboard-kpis {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.dashboard-kpi {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 6px 12px;
    align-items: center;
    padding: 16px;
}

.dashboard-kpi .dashboard-card-icon {
    grid-row: span 2;
}

.dashboard-kpi small {
    color: var(--yc-night-muted, #64748b);
    font-weight: 700;
}

.dashboard-kpi strong {
    color: var(--yc-night-text, #0f172a);
    font-size: 1.25rem;
    line-height: 1.2;
}

.dashboard-kpi.is-positive strong {
    color: var(--yc-night-green, #15803d);
}

.dashboard-kpi.is-negative strong {
    color: var(--yc-night-error, #dc2626);
}

.dashboard-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.9fr);
    gap: 16px;
}

.dashboard-panel {
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-width: 0;
    padding: 16px;
}

.dashboard-panel--wide {
    min-height: 100%;
}

.dashboard-panel-link {
    margin-left: auto;
    color: var(--yc-night-accent, #7c3aed);
    font-size: 0.86rem;
    font-weight: 800;
    text-decoration: none;
}

.dashboard-panel-link:hover,
.dashboard-panel-link:focus-visible {
    text-decoration: underline;
}

.dashboard-panel-summary {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    border-radius: 14px;
    padding: 14px;
    background: var(--yc-night-surface, #f8fafc);
}

.dashboard-panel-summary strong {
    color: var(--yc-night-text, #0f172a);
    font-size: 1.2rem;
}

.dashboard-panel-summary span {
    color: var(--yc-night-error, #ef4444);
    font-weight: 800;
}

.dashboard-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.dashboard-list--compact {
    gap: 8px;
}

.dashboard-row,
.dashboard-shopping-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    border: 1px solid var(--yc-night-border, #e2e8f0);
    border-radius: 14px;
    padding: 12px;
    color: var(--yc-night-text, #0f172a);
    background: var(--yc-night-surface, #fff);
    text-decoration: none;
}

.dashboard-shopping-row {
    grid-template-columns: minmax(0, 1fr);
}

.dashboard-row:hover,
.dashboard-row:focus-visible,
.dashboard-shopping-row:hover,
.dashboard-shopping-row:focus-visible {
    border-color: #c4b5fd;
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.08);
}

.dashboard-row strong,
.dashboard-shopping-row strong {
    display: block;
    overflow: hidden;
    color: var(--yc-night-text, #0f172a);
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dashboard-row small,
.dashboard-shopping-row small {
    display: block;
    overflow: hidden;
    color: var(--yc-night-muted, #64748b);
    font-size: 0.82rem;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dashboard-row-date,
.dashboard-pill {
    border-radius: 999px;
    padding: 7px 10px;
    color: var(--yc-night-accent, #6d28d9);
    background: var(--yc-night-accent-bg, #f3e8ff);
    font-size: 0.78rem;
    font-weight: 800;
    white-space: nowrap;
}

.dashboard-row-side {
    text-align: right;
}

.dashboard-row-side strong {
    font-size: 0.9rem;
}

.dashboard-shopping-row em {
    display: block;
    overflow: hidden;
    height: 7px;
    margin-top: 10px;
    border-radius: 999px;
    background: var(--yc-night-soft, #e2e8f0);
}

.dashboard-shopping-row i {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #8b5cf6, #22c55e);
}

.dashboard-empty {
    border: 1px dashed var(--yc-night-border, #cbd5e1);
    border-radius: 14px;
    padding: 16px;
    color: var(--yc-night-muted, #64748b);
    background: var(--yc-night-surface, #f8fafc);
    font-weight: 700;
    text-align: center;
}

.dashboard-friends-list .friends-row {
    border: 1px solid var(--yc-night-border, #e2e8f0);
    border-radius: 14px;
    padding: 12px;
    background: var(--yc-night-surface, #fff);
}

@media (max-width: 1180px) {
    .dashboard-kpis {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dashboard-grid,
    .dashboard-attention {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .dashboard-hero {
        align-items: stretch;
    }

    .dashboard-actions {
        justify-content: flex-start;
    }

    .dashboard-actions .yc-btn {
        flex: 1 1 140px;
    }

    .dashboard-kpis {
        grid-template-columns: 1fr;
    }

    .dashboard-row {
        grid-template-columns: minmax(0, 1fr);
    }

    .dashboard-row-date,
    .dashboard-pill,
    .dashboard-row-side {
        justify-self: start;
        text-align: left;
    }
}
/* Product dashboard visual pass */
.dashboard-page--product {
    gap: 16px;
    padding-bottom: 28px;
}

.dashboard-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    border: 1px solid var(--yc-night-border, #e5e7eb);
    border-radius: 18px;
    padding: 20px 24px;
    background: rgba(var(--yc-night-surface-rgb, 255, 255, 255), 0.96);
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.07);
}

.dashboard-title-lockup {
    display: flex;
    align-items: center;
    min-width: 0;
    gap: 16px;
}

.dashboard-title-lockup h1 {
    margin: 0;
    color: var(--yc-night-text, #0f172a);
    font-size: 1.95rem;
    font-weight: 800;
    letter-spacing: 0;
}

.dashboard-title-lockup p {
    margin: 3px 0 0;
    color: var(--yc-night-muted, #475569);
    font-size: 0.98rem;
    font-weight: 500;
}

.dashboard-main-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 58px;
    width: 58px;
    height: 58px;
    border-radius: 18px;
    color: #fff;
    background: linear-gradient(145deg, #8b5cf6, #4c1d95);
    box-shadow: 0 18px 32px rgba(109, 40, 217, 0.24);
}

.dashboard-main-icon svg,
.dashboard-icon-button svg,
.dashboard-new-menu svg,
.dashboard-ribbon-title svg,
.dashboard-product-card h2 svg,
.dashboard-kpi-card svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.dashboard-top-actions {
    display: flex;
    align-items: center;
    gap: 14px;
}

.dashboard-icon-button {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 14px;
    color: var(--yc-night-muted, #334155);
    background: transparent;
    text-decoration: none;
}

.dashboard-icon-button:hover,
.dashboard-icon-button:focus-visible {
    color: var(--yc-night-accent, #6d28d9);
    background: var(--yc-night-accent-bg, #f5f3ff);
}

.dashboard-icon-button span {
    position: absolute;
    top: 2px;
    right: 1px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    border: 2px solid #fff;
    border-radius: 999px;
    padding: 0 4px;
    color: #fff;
    background: #6d28d9;
    font-size: 0.68rem;
    font-weight: 800;
}

.dashboard-new-menu {
    position: relative;
}

.dashboard-new-menu summary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-width: 132px;
    min-height: 48px;
    border-radius: 14px;
    padding: 0 18px;
    color: #fff;
    background: linear-gradient(135deg, #7c3aed, #4c1d95);
    box-shadow: 0 14px 28px rgba(109, 40, 217, 0.28);
    font-weight: 800;
    cursor: pointer;
    list-style: none;
}

.dashboard-new-menu summary::-webkit-details-marker {
    display: none;
}

.dashboard-new-menu summary svg {
    width: 18px;
    height: 18px;
}

.dashboard-new-menu[open] summary {
    box-shadow: 0 12px 24px rgba(109, 40, 217, 0.2);
}

.dashboard-new-menu div {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    z-index: 20;
    display: grid;
    min-width: 210px;
    border: 1px solid var(--yc-night-border, #e5e7eb);
    border-radius: 14px;
    padding: 8px;
    background: var(--yc-night-surface, #fff);
    box-shadow: 0 22px 45px rgba(15, 23, 42, 0.16);
}

.dashboard-new-menu a {
    border-radius: 10px;
    padding: 10px 12px;
    color: var(--yc-night-muted, #334155);
    font-size: 0.92rem;
    font-weight: 700;
    text-decoration: none;
}

.dashboard-new-menu a:hover,
.dashboard-new-menu a:focus-visible {
    color: var(--yc-night-accent, #6d28d9);
    background: var(--yc-night-accent-bg, #f5f3ff);
}

.dashboard-attention-ribbon {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 18px;
    align-items: stretch;
    border: 1px solid #fed7aa;
    border-radius: 14px;
    padding: 16px 18px;
    background: linear-gradient(90deg, var(--yc-night-warning-bg, #fff7ed), var(--yc-night-soft, #fffaf5));
    box-shadow: 0 16px 35px rgba(251, 146, 60, 0.08);
}

.dashboard-ribbon-title {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--yc-night-text, #0f172a);
    font-size: 1.04rem;
    font-weight: 800;
    white-space: nowrap;
}

.dashboard-ribbon-title i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border: 1px solid #fdba74;
    border-radius: 12px;
    color: var(--yc-night-warning, #f97316);
    background: var(--yc-night-warning-bg, #fff7ed);
}

.dashboard-ribbon-title svg {
    width: 20px;
    height: 20px;
}

.dashboard-ribbon-items {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    align-items: center;
}

.dashboard-ribbon-items a {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    min-height: 48px;
    border-left: 1px solid #fed7aa;
    padding: 0 16px;
    color: var(--yc-night-text, #0f172a);
    text-decoration: none;
}

.dashboard-ribbon-items a:first-child {
    border-left: 0;
}

.dashboard-ribbon-items i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 999px;
    color: var(--yc-night-warning, #f97316);
    background: var(--yc-night-warning-bg, #ffedd5);
}

.dashboard-ribbon-items i svg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.dashboard-ribbon-items strong,
.dashboard-ribbon-items em {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dashboard-ribbon-items strong {
    font-size: 0.88rem;
    font-weight: 800;
}

.dashboard-ribbon-items em {
    color: var(--yc-night-muted, #334155);
    font-size: 0.82rem;
    font-style: normal;
    font-weight: 700;
}

.dashboard-ribbon-items span {
    color: var(--yc-night-accent, #6d28d9);
    font-size: 0.82rem;
    font-weight: 800;
    text-decoration: underline;
    text-underline-offset: 2px;
    white-space: nowrap;
}

.dashboard-ribbon-empty {
    display: flex;
    align-items: center;
    min-height: 48px;
    border-radius: 12px;
    padding: 0 14px;
    color: var(--yc-night-green, #15803d);
    background: var(--yc-night-green-bg, #ecfdf5);
    font-weight: 800;
}

.dashboard-kpis--product {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.dashboard-kpi-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 16px;
    align-items: center;
    border: 1px solid var(--yc-night-border, #e5e7eb);
    border-radius: 14px;
    padding: 20px;
    background: rgba(var(--yc-night-surface-rgb, 255, 255, 255), 0.96);
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.07);
}

.dashboard-kpi-card i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 58px;
    height: 58px;
    border-radius: 16px;
    color: var(--yc-night-accent, #6d28d9);
    background: var(--yc-night-accent-bg, #ede9fe);
}

.dashboard-kpi-card--expense i {
    color: var(--yc-night-error, #ef4444);
    background: var(--yc-night-error-bg, #fee2e2);
}

.dashboard-kpi-card--balance i {
    color: var(--yc-night-green, #059669);
    background: var(--yc-night-green-bg, #d1fae5);
}

.dashboard-kpi-card--todo i {
    color: var(--yc-night-accent, #6d28d9);
    background: var(--yc-night-accent-bg, #eef2ff);
}

.dashboard-kpi-card small,
.dashboard-kpi-card em {
    display: block;
    color: var(--yc-night-muted, #64748b);
    font-style: normal;
    font-weight: 600;
}

.dashboard-kpi-card strong {
    display: block;
    margin: 3px 0;
    color: var(--yc-night-text, #0f172a);
    font-size: 1.55rem;
    font-weight: 850;
    line-height: 1.1;
}

.dashboard-kpi-card.is-positive strong {
    color: var(--yc-night-green, #059669);
}

.dashboard-kpi-card.is-negative strong {
    color: var(--yc-night-error, #ef4444);
}

.dashboard-product-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(360px, 0.9fr);
    gap: 16px;
    align-items: start;
}

.dashboard-product-card,
.dashboard-side-stack {
    min-width: 0;
}

.dashboard-product-card {
    border: 1px solid var(--yc-night-border, #e5e7eb);
    border-radius: 16px;
    padding: 18px;
    background: rgba(var(--yc-night-surface-rgb, 255, 255, 255), 0.97);
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.07);
}

.dashboard-product-card + .dashboard-product-card,
.dashboard-side-stack .dashboard-product-card + .dashboard-product-card {
    margin-top: 16px;
}

.dashboard-product-card > header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.dashboard-product-card h2 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    color: var(--yc-night-text, #0f172a);
    font-size: 1.05rem;
    font-weight: 850;
}

.dashboard-product-card h2 svg {
    width: 19px;
    height: 19px;
    color: var(--yc-night-accent, #6d28d9);
}

.dashboard-product-card > header > a,
.dashboard-product-card footer a {
    color: var(--yc-night-accent, #6d28d9);
    font-size: 0.86rem;
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
}

.dashboard-product-card > header > a:hover,
.dashboard-product-card footer a:hover,
.dashboard-product-card > header > a:focus-visible,
.dashboard-product-card footer a:focus-visible {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.dashboard-timeline {
    display: grid;
    gap: 0;
}

.dashboard-timeline-row {
    display: grid;
    grid-template-columns: 74px minmax(0, 1fr) auto auto;
    gap: 14px;
    align-items: center;
    border-bottom: 1px solid var(--yc-night-border, #eef2f7);
    padding: 12px 0;
}

.dashboard-timeline-row:first-child {
    padding-top: 4px;
}

.dashboard-timeline-row:last-child {
    border-bottom: 0;
}

.dashboard-timeline-time {
    color: var(--yc-night-accent, #6d28d9);
    font-size: 1rem;
    font-weight: 850;
}

.dashboard-timeline-date {
    display: block;
    color: var(--yc-night-muted, #64748b);
    font-size: 0.78rem;
    font-weight: 700;
}

.dashboard-timeline-dot {
    position: relative;
    justify-self: center;
    width: 14px;
    height: 14px;
    border: 3px solid #fff;
    border-radius: 999px;
    background: #94a3b8;
    box-shadow: 0 0 0 1px #cbd5e1;
}

.dashboard-timeline-dot.is-hot {
    background: #6d28d9;
    box-shadow: 0 0 0 1px #8b5cf6;
}

.dashboard-timeline-row span strong,
.dashboard-work-main strong,
.dashboard-shopping-main strong,
.dashboard-share-request strong {
    display: block;
    overflow: hidden;
    color: var(--yc-night-text, #0f172a);
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dashboard-timeline-row span small,
.dashboard-work-main small,
.dashboard-shopping-main small,
.dashboard-share-request small {
    display: block;
    overflow: hidden;
    color: var(--yc-night-muted, #64748b);
    font-size: 0.84rem;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dashboard-timeline-row .dashboard-pill {
    justify-self: end;
    min-width: 84px;
    text-align: center;
}

.dashboard-dots {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    color: var(--yc-night-muted, #475569);
}

.dashboard-dots:hover,
.dashboard-dots:focus-visible {
    color: var(--yc-night-accent, #6d28d9);
    background: var(--yc-night-accent-bg, #f5f3ff);
}

.dashboard-invoice-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 10px;
}

.dashboard-invoice-stat {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border: 1px solid #fed7aa;
    border-radius: 10px;
    padding: 10px 12px;
    color: var(--yc-night-warning, #ea580c);
    background: var(--yc-night-warning-bg, #fff7ed);
    font-weight: 800;
}

.dashboard-invoice-stat.is-danger {
    border-color: #fecaca;
    color: var(--yc-night-error, #ef4444);
    background: var(--yc-night-error-bg, #fef2f2);
}

.dashboard-invoice-stat strong {
    color: var(--yc-night-text, #0f172a);
    font-size: 1.25rem;
}

.dashboard-invoice-list {
    display: grid;
}

.dashboard-invoice-row {
    display: grid;
    grid-template-columns: minmax(98px, 0.72fr) minmax(0, 1fr) auto auto auto;
    gap: 10px;
    align-items: center;
    border-bottom: 1px solid var(--yc-night-border, #eef2f7);
    padding: 11px 0;
    color: var(--yc-night-text, #0f172a);
    text-decoration: none;
}

.dashboard-invoice-row:last-child {
    border-bottom: 0;
}

.dashboard-invoice-row strong {
    color: var(--yc-night-error, #ef4444);
    font-weight: 850;
    white-space: nowrap;
}

.dashboard-invoice-row small {
    color: var(--yc-night-muted, #64748b);
    font-size: 0.8rem;
    font-weight: 700;
    white-space: nowrap;
}

.dashboard-invoice-row .dashboard-pill {
    color: var(--yc-night-warning, #ea580c);
    background: var(--yc-night-warning-bg, #ffedd5);
}

.dashboard-work-list {
    display: grid;
}

.dashboard-work-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) minmax(130px, 0.34fr) 54px auto auto;
    gap: 12px;
    align-items: center;
    border-bottom: 1px solid var(--yc-night-border, #eef2f7);
    padding: 12px 0;
    color: var(--yc-night-text, #0f172a);
    text-decoration: none;
}

.dashboard-work-row:last-child {
    border-bottom: 0;
}

.dashboard-work-badge {
    min-width: 70px;
    border-radius: 8px;
    padding: 7px 10px;
    color: var(--yc-night-blue, #0369a1);
    background: var(--yc-night-blue-bg, #dbeafe);
    font-size: 0.82rem;
    font-weight: 850;
    text-align: center;
}

.dashboard-work-badge--project {
    color: var(--yc-night-green, #15803d);
    background: var(--yc-night-green-bg, #dcfce7);
}

.dashboard-work-badge--job {
    color: var(--yc-night-blue, #0369a1);
    background: var(--yc-night-blue-bg, #dbeafe);
}

.dashboard-work-progress {
    overflow: hidden;
    height: 7px;
    border-radius: 999px;
    background: var(--yc-night-soft, #e2e8f0);
}

.dashboard-work-progress i {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #8b5cf6, #4c1d95);
}

.dashboard-work-percent {
    color: var(--yc-night-muted, #334155);
    font-size: 0.84rem;
    font-weight: 800;
    text-align: right;
}

.dashboard-work-date {
    color: var(--yc-night-muted, #475569);
    font-size: 0.84rem;
    font-weight: 700;
    white-space: nowrap;
}

.dashboard-side-stack {
    display: block;
}

.dashboard-shopping-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
}

.dashboard-shopping-main strong {
    margin-bottom: 8px;
}

.dashboard-shopping-main em {
    display: block;
    overflow: hidden;
    height: 7px;
    margin: 6px 0 8px;
    border-radius: 999px;
    background: var(--yc-night-soft, #e5e7eb);
}

.dashboard-shopping-main i {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #a78bfa, #6d28d9);
}

.dashboard-shopping-card > span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 999px;
    color: var(--yc-night-accent, #6d28d9);
    background: var(--yc-night-accent-bg, #f5f3ff);
    font-size: 1.35rem;
    font-weight: 700;
}

.dashboard-share-card {
    display: grid;
    gap: 10px;
}

.dashboard-share-request {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 10px;
    align-items: center;
    border-bottom: 1px solid var(--yc-night-border, #eef2f7);
    padding-bottom: 12px;
}

.dashboard-share-request > div:first-child {
    display: flex;
    align-items: center;
    min-width: 0;
    gap: 10px;
}

.dashboard-share-request .avatar,
.dashboard-share-request .avatar-fallback {
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
}

.dashboard-share-request form {
    margin: 0;
}

.dashboard-shared-note {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    color: var(--yc-night-muted, #334155);
    font-weight: 700;
    text-decoration: none;
}

.dashboard-shared-note svg {
    width: 20px;
    height: 20px;
    color: var(--yc-night-accent, #6d28d9);
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.dashboard-product-card .dashboard-empty {
    border-color: #d8b4fe;
    background: var(--yc-night-accent-bg, #faf5ff);
    color: var(--yc-night-muted, #64748b);
}

@media (max-width: 1280px) {
    .dashboard-ribbon-items {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .dashboard-ribbon-items a {
        border: 1px solid #fed7aa;
        border-radius: 12px;
        padding: 10px;
    }

    .dashboard-ribbon-items a:first-child {
        border-left: 1px solid #fed7aa;
    }

    .dashboard-kpis--product {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dashboard-product-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-side-stack {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
    }

    .dashboard-side-stack .dashboard-product-card + .dashboard-product-card {
        margin-top: 0;
    }
}

@media (max-width: 860px) {
    .dashboard-topbar,
    .dashboard-attention-ribbon {
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .dashboard-topbar {
        flex-direction: column;
    }

    .dashboard-top-actions {
        width: 100%;
        justify-content: space-between;
    }

    .dashboard-new-menu {
        flex: 1 1 auto;
    }

    .dashboard-new-menu summary {
        width: 100%;
    }

    .dashboard-new-menu div {
        left: 0;
        right: auto;
        width: 100%;
    }

    .dashboard-ribbon-items,
    .dashboard-kpis--product,
    .dashboard-side-stack {
        grid-template-columns: 1fr;
    }

    .dashboard-timeline-row,
    .dashboard-work-row,
    .dashboard-invoice-row,
    .dashboard-share-request {
        grid-template-columns: minmax(0, 1fr);
    }

    .dashboard-timeline-time,
    .dashboard-timeline-row .dashboard-pill,
    .dashboard-work-percent,
    .dashboard-work-date {
        justify-self: start;
        text-align: left;
    }

    .dashboard-timeline-dot,
    .dashboard-dots {
        display: none;
    }

    .dashboard-share-request form {
        width: 100%;
    }

    .dashboard-share-request button {
        width: 100%;
    }
}

@media (max-width: 560px) {
    .dashboard-topbar,
    .dashboard-product-card,
    .dashboard-attention-ribbon,
    .dashboard-kpi-card {
        border-radius: 14px;
        padding: 16px;
    }

    .dashboard-title-lockup {
        align-items: flex-start;
    }

    .dashboard-main-icon {
        width: 48px;
        height: 48px;
        flex-basis: 48px;
        border-radius: 15px;
    }

    .dashboard-title-lockup h1 {
        font-size: 1.55rem;
    }

    .dashboard-kpi-card strong {
        font-size: 1.32rem;
    }

    .dashboard-invoice-stats {
        grid-template-columns: 1fr;
    }
}
/* Dashboard final polish pass */
.dashboard-page--product {
    width: 100%;
    max-width: none;
    gap: 18px;
}

.dashboard-page--product a {
    text-decoration: none;
}

.dashboard-page--product a:focus-visible,
.dashboard-page--product button:focus-visible,
.dashboard-page--product summary:focus-visible {
    outline: 3px solid rgba(124, 58, 237, 0.24);
    outline-offset: 3px;
}

.dashboard-topbar,
.dashboard-attention-ribbon,
.dashboard-kpi-card,
.dashboard-product-card {
    border-color: rgba(148, 163, 184, 0.28);
    background: rgba(var(--yc-night-surface-rgb, 255, 255, 255), 0.96);
    box-shadow: 0 18px 48px rgba(15, 23, 42, 0.08);
}

.dashboard-topbar {
    min-height: 88px;
}

.dashboard-main-icon {
    border-radius: 20px;
    background: radial-gradient(circle at 35% 25%, #a78bfa, #6d28d9 58%, #4c1d95 100%);
}

.dashboard-icon-button {
    border: 1px solid transparent;
}

.dashboard-icon-button:hover,
.dashboard-icon-button:focus-visible {
    border-color: var(--yc-night-border, #e9d5ff);
}

.dashboard-new-menu summary:hover,
.dashboard-new-menu summary:focus-visible {
    transform: translateY(-1px);
}

.dashboard-attention-ribbon {
    position: relative;
    overflow: hidden;
    border-color: #fdba74;
    background: linear-gradient(120deg, var(--yc-night-warning-bg, #fff7ed) 0%, var(--yc-night-surface, #fff) 58%, var(--yc-night-warning-bg, #fff7ed) 100%);
}

.dashboard-attention-ribbon::before {
    position: absolute;
    top: 14px;
    bottom: 14px;
    left: 0;
    width: 4px;
    border-radius: 999px;
    background: #f97316;
    content: "";
}

.dashboard-attention-ribbon.is-calm {
    border-color: #bbf7d0;
    background: linear-gradient(120deg, var(--yc-night-green-bg, #f0fdf4) 0%, var(--yc-night-surface, #fff) 62%, var(--yc-night-green-bg, #ecfdf5) 100%);
}

.dashboard-attention-ribbon.is-calm::before {
    background: #22c55e;
}

.dashboard-ribbon-title span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    border: 1px solid #fdba74;
    border-radius: 14px;
    color: var(--yc-night-warning, #f97316);
    background: var(--yc-night-warning-bg, #fff7ed);
}

.dashboard-attention-ribbon.is-calm .dashboard-ribbon-title span {
    border-color: #bbf7d0;
    color: var(--yc-night-green, #16a34a);
    background: var(--yc-night-green-bg, #ecfdf5);
}

.dashboard-ribbon-items {
    gap: 10px;
}

.dashboard-ribbon-items a {
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-areas:
        "icon title cta"
        "icon amount cta";
    border: 1px solid rgba(251, 146, 60, 0.28);
    border-radius: 14px;
    padding: 11px 12px;
    background: rgba(var(--yc-night-surface-rgb, 255, 255, 255), 0.72);
    transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.dashboard-ribbon-items a:first-child {
    border-left: 1px solid rgba(251, 146, 60, 0.28);
}

.dashboard-ribbon-items a:hover,
.dashboard-ribbon-items a:focus-visible {
    border-color: #c084fc;
    box-shadow: 0 16px 34px rgba(124, 58, 237, 0.12);
    transform: translateY(-1px);
}

.dashboard-ribbon-items a i {
    grid-area: icon;
}

.dashboard-ribbon-items a strong {
    grid-area: title;
}

.dashboard-ribbon-items a em {
    grid-area: amount;
}

.dashboard-ribbon-items a span {
    grid-area: cta;
    align-self: center;
    border-radius: 999px;
    padding: 7px 10px;
    color: var(--yc-night-accent, #6d28d9);
    background: var(--yc-night-accent-bg, #f5f3ff);
    text-decoration: none;
}

.dashboard-ribbon-empty {
    display: grid;
    gap: 2px;
    min-height: 58px;
    border: 1px solid #bbf7d0;
    padding: 12px 14px;
    background: rgba(var(--yc-night-green-bg-rgb, 240, 253, 244), 0.82);
}

.dashboard-ribbon-empty::after {
    color: var(--yc-night-muted, #64748b);
    font-size: 0.86rem;
    font-weight: 600;
    content: "Nemas zadne urgentni polozky k reseni.";
}

.dashboard-kpis--product {
    align-items: stretch;
}

.dashboard-kpi-card {
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-areas:
        "icon label"
        "icon value"
        "icon meta";
    min-height: 116px;
    padding: 18px 20px;
    transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.dashboard-kpi-card:hover {
    border-color: var(--yc-night-border, #ddd6fe);
    box-shadow: 0 20px 44px rgba(124, 58, 237, 0.1);
    transform: translateY(-1px);
}

.dashboard-kpi-card > span:first-child {
    grid-area: icon;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    align-self: center;
    width: 58px;
    height: 58px;
    border-radius: 18px;
    color: var(--yc-night-accent, #6d28d9);
    background: var(--yc-night-accent-bg, #ede9fe);
}

.dashboard-kpi-card--income > span:first-child {
    color: var(--yc-night-accent, #6d28d9);
    background: var(--yc-night-accent-bg, #f3e8ff);
}

.dashboard-kpi-card--expense > span:first-child {
    color: var(--yc-night-error, #ef4444);
    background: var(--yc-night-error-bg, #fee2e2);
}

.dashboard-kpi-card--balance > span:first-child {
    color: var(--yc-night-green, #059669);
    background: var(--yc-night-green-bg, #d1fae5);
}

.dashboard-kpi-card--todo > span:first-child {
    color: var(--yc-night-accent, #7c3aed);
    background: var(--yc-night-accent-bg, #eef2ff);
}

.dashboard-kpi-card small {
    grid-area: label;
    align-self: end;
    min-width: 0;
    font-size: 0.82rem;
}

.dashboard-kpi-card strong {
    grid-area: value;
    min-width: 0;
    overflow: hidden;
    font-size: clamp(1.25rem, 1.5vw, 1.62rem);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dashboard-kpi-card em {
    grid-area: meta;
    align-self: start;
    min-width: 0;
    overflow: hidden;
    font-size: 0.84rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dashboard-product-grid {
    grid-template-columns: minmax(0, 1.18fr) minmax(340px, 0.82fr);
    align-items: start;
    gap: 18px;
}

.dashboard-product-card {
    padding: 18px 20px;
}

.dashboard-product-card > header {
    min-height: 32px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(226, 232, 240, 0.74);
}

.dashboard-product-card > header > a {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    border-radius: 999px;
    padding: 7px 10px;
    text-decoration: none;
}

.dashboard-product-card > header > a:hover,
.dashboard-product-card > header > a:focus-visible {
    background: var(--yc-night-accent-bg, #f5f3ff);
    text-decoration: none;
}

.dashboard-timeline {
    position: relative;
    padding-left: 8px;
}

.dashboard-timeline::before {
    position: absolute;
    top: 18px;
    bottom: 18px;
    left: 15px;
    width: 2px;
    border-radius: 999px;
    background: var(--yc-night-soft, #e2e8f0);
    content: "";
}

.dashboard-timeline-row {
    position: relative;
    grid-template-columns: 28px minmax(78px, 0.16fr) minmax(0, 1fr) auto;
    min-height: 66px;
    border-radius: 14px;
    border-bottom: 0;
    padding: 10px 12px 10px 0;
    color: var(--yc-night-text, #0f172a);
    transition: background 0.16s ease, transform 0.16s ease;
}

.dashboard-timeline-row:hover,
.dashboard-timeline-row:focus-visible {
    background: var(--yc-night-accent-bg, #faf5ff);
    transform: translateX(2px);
}

.dashboard-timeline-dot {
    z-index: 1;
}

.dashboard-timeline-row time {
    justify-self: start;
    border-radius: 999px;
    padding: 7px 10px;
    color: var(--yc-night-accent, #6d28d9);
    background: var(--yc-night-accent-bg, #f5f3ff);
    font-size: 0.82rem;
    font-weight: 850;
    white-space: nowrap;
}

.dashboard-timeline-row span {
    min-width: 0;
}

.dashboard-timeline-row em {
    justify-self: end;
    border-radius: 999px;
    padding: 7px 11px;
    color: var(--yc-night-accent, #6d28d9);
    background: var(--yc-night-accent-bg, #ede9fe);
    font-size: 0.78rem;
    font-style: normal;
    font-weight: 850;
    white-space: nowrap;
}

.dashboard-invoice-stats > span {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    border: 1px solid #fed7aa;
    border-radius: 13px;
    padding: 10px 12px;
    background: var(--yc-night-warning-bg, #fff7ed);
}

.dashboard-invoice-stats > span.is-danger {
    border-color: #fecaca;
    background: var(--yc-night-error-bg, #fef2f2);
}

.dashboard-invoice-stats > span small {
    color: var(--yc-night-error, #ef4444);
    font-size: 0.82rem;
    font-weight: 850;
}

.dashboard-invoice-stats > span.is-warning small {
    color: var(--yc-night-warning, #ea580c);
}

.dashboard-invoice-stats > span strong {
    color: var(--yc-night-text, #0f172a);
    font-size: 1.18rem;
    font-weight: 900;
    white-space: nowrap;
}

.dashboard-invoice-list {
    gap: 4px;
}

.dashboard-invoice-list a {
    display: grid;
    grid-template-columns: minmax(104px, 0.68fr) minmax(0, 1fr) auto auto;
    gap: 10px;
    align-items: center;
    border-radius: 12px;
    padding: 11px 10px;
    color: var(--yc-night-text, #0f172a);
    transition: background 0.16s ease, transform 0.16s ease;
}

.dashboard-invoice-list a + a {
    border-top: 1px solid var(--yc-night-border, #eef2f7);
}

.dashboard-invoice-list a:hover,
.dashboard-invoice-list a:focus-visible {
    background: var(--yc-night-surface, #f8fafc);
    transform: translateX(2px);
}

.dashboard-invoice-list a > strong,
.dashboard-invoice-list a > span,
.dashboard-invoice-list a > em,
.dashboard-invoice-list a > small {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dashboard-invoice-list a > strong {
    color: var(--yc-night-muted, #334155);
    font-weight: 850;
}

.dashboard-invoice-list a > span {
    color: var(--yc-night-muted, #334155);
    font-weight: 700;
}

.dashboard-invoice-list a > em {
    color: var(--yc-night-error, #ef4444);
    font-style: normal;
    font-weight: 900;
    text-align: right;
}

.dashboard-invoice-list a > small {
    border-radius: 999px;
    padding: 6px 9px;
    color: var(--yc-night-warning, #7c2d12);
    background: var(--yc-night-warning-bg, #ffedd5);
    font-size: 0.74rem;
    font-weight: 850;
    text-align: center;
}

.dashboard-work-list {
    gap: 2px;
}

.dashboard-work-row {
    grid-template-columns: auto minmax(0, 1fr) minmax(110px, 0.24fr) 52px;
    border-radius: 13px;
    border-bottom: 0;
    padding: 12px 10px;
    transition: background 0.16s ease, transform 0.16s ease;
}

.dashboard-work-row + .dashboard-work-row {
    border-top: 1px solid var(--yc-night-border, #eef2f7);
}

.dashboard-work-row:hover,
.dashboard-work-row:focus-visible {
    background: var(--yc-night-surface, #f8fafc);
    transform: translateX(2px);
}

.dashboard-work-row > span:nth-child(2) {
    min-width: 0;
}

.dashboard-work-row > span:nth-child(2) strong,
.dashboard-work-row > span:nth-child(2) small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dashboard-work-row > span:nth-child(2) strong {
    color: var(--yc-night-text, #0f172a);
    font-weight: 850;
}

.dashboard-work-row > span:nth-child(2) small {
    color: var(--yc-night-muted, #64748b);
    font-size: 0.84rem;
    font-weight: 600;
}

.dashboard-work-row > em {
    display: block;
    overflow: hidden;
    height: 7px;
    border-radius: 999px;
    background: var(--yc-night-soft, #e5e7eb);
}

.dashboard-work-row > em i {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #8b5cf6, #6d28d9);
}

.dashboard-work-row > b {
    color: var(--yc-night-muted, #475569);
    font-size: 0.82rem;
    font-weight: 850;
    text-align: right;
    white-space: nowrap;
}

.dashboard-work-badge {
    min-width: 78px;
}

.dashboard-side-stack {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.dashboard-side-stack .dashboard-product-card + .dashboard-product-card {
    margin-top: 0;
}

.dashboard-shopping-card {
    display: block;
}

.dashboard-shopping-main {
    display: grid;
    gap: 10px;
    border-radius: 14px;
    padding: 10px;
    color: var(--yc-night-text, #0f172a);
    background: var(--yc-night-surface, #f8fafc);
}

.dashboard-shopping-main:hover,
.dashboard-shopping-main:focus-visible {
    background: var(--yc-night-accent-bg, #f5f3ff);
}

.dashboard-shopping-main > span {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
}

.dashboard-shopping-main small {
    color: var(--yc-night-muted, #475569);
    font-size: 0.82rem;
    font-weight: 800;
    white-space: nowrap;
}

.dashboard-shopping-card p {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 12px 0 0;
    color: var(--yc-night-muted, #64748b);
    font-size: 0.86rem;
    font-weight: 700;
}

.dashboard-shopping-card p::before {
    display: inline-flex;
    width: 18px;
    height: 18px;
    border-radius: 999px;
    background: var(--yc-night-accent-bg, #f3e8ff);
    content: "";
}

.dashboard-share-card {
    display: block;
}

.dashboard-share-request {
    border-bottom: 0;
    border-radius: 14px;
    padding: 10px;
    background: var(--yc-night-surface, #f8fafc);
}

.dashboard-share-request .user-avatar,
.dashboard-share-request .user-avatar img {
    width: 42px;
    height: 42px;
}

.dashboard-share-request .yc-btn {
    min-height: 40px;
    border-radius: 12px;
}

.dashboard-product-card .dashboard-empty {
    display: grid;
    gap: 3px;
    border-color: #d8b4fe;
    padding: 18px;
    background: linear-gradient(135deg, var(--yc-night-accent-bg, #faf5ff), var(--yc-night-surface, #fff));
    color: var(--yc-night-muted, #64748b);
    font-weight: 750;
}

@media (max-width: 1280px) {
    .dashboard-product-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-side-stack {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 940px) {
    .dashboard-attention-ribbon {
        grid-template-columns: 1fr;
    }

    .dashboard-ribbon-items {
        grid-template-columns: 1fr;
    }

    .dashboard-kpis--product {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dashboard-timeline-row,
    .dashboard-work-row,
    .dashboard-invoice-list a {
        grid-template-columns: 1fr;
    }

    .dashboard-timeline::before,
    .dashboard-timeline-dot {
        display: none;
    }

    .dashboard-timeline-row time,
    .dashboard-timeline-row em,
    .dashboard-invoice-list a > em,
    .dashboard-work-row > b {
        justify-self: start;
        text-align: left;
    }
}

@media (max-width: 640px) {
    .dashboard-topbar {
        align-items: stretch;
    }

    .dashboard-title-lockup {
        gap: 12px;
    }

    .dashboard-top-actions {
        justify-content: stretch;
    }

    .dashboard-icon-button {
        flex: 0 0 48px;
        height: 48px;
    }

    .dashboard-kpis--product,
    .dashboard-side-stack {
        grid-template-columns: 1fr;
    }

    .dashboard-kpi-card {
        grid-template-columns: auto minmax(0, 1fr);
        min-height: 108px;
    }

    .dashboard-product-card > header {
        align-items: flex-start;
        flex-direction: column;
    }

    .dashboard-product-card > header > a {
        padding-left: 0;
    }

    .dashboard-shopping-main > span {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .dashboard-page--product,
    .dashboard-page--product .dashboard-topbar,
    .dashboard-page--product .dashboard-attention-ribbon,
    .dashboard-page--product .dashboard-product-card,
    .dashboard-page--product .dashboard-kpi-card,
    .dashboard-page--product .dashboard-product-grid,
    .dashboard-page--product .dashboard-side-stack {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        box-sizing: border-box;
    }

    .dashboard-page--product {
        overflow-x: hidden;
    }

    .dashboard-page--product .dashboard-title-lockup,
    .dashboard-page--product .dashboard-title-lockup > div,
    .dashboard-page--product .dashboard-top-actions,
    .dashboard-page--product .dashboard-new-menu,
    .dashboard-page--product .dashboard-new-menu summary,
    .dashboard-page--product .dashboard-ribbon-items,
    .dashboard-page--product .dashboard-ribbon-items a,
    .dashboard-page--product .dashboard-product-card > header,
    .dashboard-page--product .dashboard-product-card h2,
    .dashboard-page--product .dashboard-invoice-stats,
    .dashboard-page--product .dashboard-invoice-stat,
    .dashboard-page--product .dashboard-invoice-list,
    .dashboard-page--product .dashboard-invoice-list a,
    .dashboard-page--product .dashboard-work-list,
    .dashboard-page--product .dashboard-work-row,
    .dashboard-page--product .dashboard-shopping-main,
    .dashboard-page--product .dashboard-share-request,
    .dashboard-page--product .dashboard-share-request > div:first-child {
        max-width: 100%;
        min-width: 0;
    }

    .dashboard-page--product .dashboard-ribbon-items a {
        grid-template-columns: auto minmax(0, 1fr);
        grid-template-areas:
            "icon title"
            "icon amount"
            "cta cta";
    }

    .dashboard-page--product .dashboard-ribbon-items a span {
        justify-self: start;
    }

    .dashboard-page--product .dashboard-invoice-stats {
        grid-template-columns: minmax(0, 1fr);
    }

    .dashboard-page--product .dashboard-top-actions {
        flex-wrap: wrap;
    }

    .dashboard-page--product .dashboard-product-card > header > a,
    .dashboard-page--product .dashboard-product-card h2,
    .dashboard-page--product .dashboard-invoice-stat strong,
    .dashboard-page--product .dashboard-kpi-card strong {
        overflow-wrap: anywhere;
    }
}
/* Password visibility toggle */
.yc-password-field {
    position: relative;
    display: block;
    width: 100%;
}

.yc-password-field .yc-input {
    width: 100%;
    padding-right: 52px;
}

.yc-password-toggle {
    position: absolute;
    top: 50%;
    right: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid transparent;
    border-radius: 12px;
    color: var(--yc-night-muted, #64748b);
    background: transparent;
    cursor: pointer;
    transform: translateY(-50%);
    transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.yc-password-toggle svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.yc-password-toggle:hover,
.yc-password-toggle:focus-visible,
.yc-password-toggle.is-active {
    border-color: var(--yc-night-border, #e9d5ff);
    color: var(--yc-night-accent, #7c3aed);
    background: var(--yc-night-accent-bg, #f5f3ff);
}

.auth-form .yc-password-toggle {
    right: 12px;
}
/* Unified page hero headers */
.yc-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    min-height: 88px;
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 18px;
    padding: 20px 24px;
    background: rgba(var(--yc-night-surface-rgb, 255, 255, 255), 0.96);
    box-shadow: 0 18px 48px rgba(15, 23, 42, 0.08);
}

.yc-page-header__title {
    display: flex;
    align-items: center;
    min-width: 0;
    gap: 16px;
}

.yc-page-header__title > div {
    min-width: 0;
}

.yc-page-header__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 58px;
    width: 58px;
    height: 58px;
    border-radius: 20px;
    color: #fff;
    background: radial-gradient(circle at 35% 25%, #a78bfa, #6d28d9 58%, #4c1d95 100%);
    box-shadow: 0 18px 32px rgba(109, 40, 217, 0.24);
}

.yc-page-header__icon svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.yc-page-header .yc-page-title {
    margin: 0;
    color: var(--yc-night-text, #0f172a);
    font-size: 1.95rem;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: 0;
}

.yc-page-header p,
.yc-page-header__title p {
    margin: 4px 0 0;
    color: var(--yc-night-muted, #475569);
    font-size: 0.98rem;
    font-weight: 500;
    line-height: 1.35;
}

.yc-page-header__actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 10px;
}

@media (max-width: 760px) {
    .yc-page-header {
        align-items: stretch;
        flex-direction: column;
        min-height: 0;
        border-radius: 16px;
        padding: 16px;
    }

    .yc-page-header__title {
        gap: 12px;
    }

    .yc-page-header__icon {
        flex-basis: 48px;
        width: 48px;
        height: 48px;
        border-radius: 16px;
    }

    .yc-page-header .yc-page-title {
        font-size: 1.55rem;
    }

    .yc-page-header__actions {
        justify-content: flex-start;
    }
}

.yc-upload-progress {
    display: grid;
    gap: 6px;
    margin-top: 10px;
    color: var(--yc-night-accent, #5b21b6);
    font-size: 13px;
    font-weight: 800;
}

.yc-upload-progress[hidden] {
    display: none !important;
}

.yc-upload-progress em {
    display: block;
    width: 100%;
    height: 8px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(124, 58, 237, 0.12);
}

.yc-upload-progress i {
    display: block;
    width: 0%;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(135deg, #7c3aed, #22c55e);
    transition: width 0.18s ease;
}

.yc-upload-progress.is-error {
    color: var(--yc-night-error, #dc2626);
}

.yc-upload-progress.is-error i {
    background: #dc2626;
}

.shopping-upload-progress-inline {
    min-width: 130px;
    margin-top: 0;
}

.settings-account-avatar-progress {
    width: min(100%, 420px);
    margin-top: 0;
}

.yc-live-updated {
    animation: yc-live-fragment-pulse 1.4s ease-out;
}

@keyframes yc-live-fragment-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.22);
    }
    100% {
        box-shadow: 0 0 0 16px rgba(34, 197, 94, 0);
    }
}
/* Scoped mobile alignment for section page headers. */
@media (max-width: 760px) {
    .calendar-page .yc-page-header,
    .invoice-page .yc-page-header,
    .shopping-page .yc-page-header,
    .consumption-page .yc-page-header {
        min-height: 72px;
        align-items: center;
        flex-direction: row;
        flex-wrap: nowrap;
        gap: 12px;
        padding: 12px 14px;
    }

    .calendar-page .yc-page-header__title,
    .invoice-page .yc-page-header__title,
    .shopping-page .yc-page-header__title,
    .consumption-page .yc-page-header__title {
        flex: 1 1 auto;
        width: auto;
        min-width: 0;
        align-items: center;
        gap: 10px;
    }

    .calendar-page .yc-page-header__title > div,
    .invoice-page .yc-page-header__title > div,
    .shopping-page .yc-page-header__title > div,
    .consumption-page .yc-page-header__title > div {
        display: flex;
        min-width: 0;
        align-items: center;
    }

    .calendar-page .yc-page-header__icon,
    .invoice-page .yc-page-header__icon,
    .shopping-page .yc-page-header__icon,
    .consumption-page .yc-page-header__icon {
        flex: 0 0 44px;
        width: 44px;
        height: 44px;
        border-radius: 15px;
    }

    .calendar-page .yc-page-header .yc-page-title,
    .invoice-page .yc-page-header .yc-page-title,
    .shopping-page .yc-page-header .yc-page-title,
    .consumption-page .yc-page-header .yc-page-title {
        margin: 0;
        overflow: hidden;
        font-size: 1.45rem;
        line-height: 1.08;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .calendar-page .yc-page-header__actions,
    .invoice-page .yc-page-header__actions,
    .shopping-page .yc-page-header__actions,
    .consumption-page .yc-page-header__actions {
        flex: 0 0 auto;
        width: auto;
        max-width: 44%;
        margin-left: auto;
        justify-content: flex-end;
        flex-wrap: nowrap;
        overflow: visible;
    }

    .calendar-page .yc-page-header__actions .yc-btn--primary,
    .shopping-page .yc-page-header__actions .yc-btn--primary,
    .consumption-page .yc-page-header__actions .yc-btn--primary {
        min-width: 96px;
        min-height: 40px;
        align-items: center;
        justify-content: center;
        gap: 7px;
        border-radius: 12px;
        padding: 0 14px;
        font-size: 14px;
        line-height: 1;
        white-space: nowrap;
    }

    .calendar-page .yc-page-header__actions .yc-btn--primary[data-mobile-label],
    .consumption-page .yc-page-header__actions .yc-btn--primary[data-mobile-label] {
        font-size: 0;
    }

    .calendar-page .yc-page-header__actions .yc-btn--primary[data-mobile-label]::after,
    .consumption-page .yc-page-header__actions .yc-btn--primary[data-mobile-label]::after {
        content: attr(data-mobile-label);
        font-size: 14px;
    }
}

.settings-help-toggle-row {
    display: flex;
    gap: 16px;
    align-items: center;
    justify-content: space-between;
}

.settings-help-toggle-row strong {
    display: block;
    color: var(--yc-night-text, #0f172a);
    font-size: 15px;
    font-weight: 800;
}

.settings-help-toggle-row p {
    max-width: 720px;
    margin: 6px 0 0;
    color: var(--yc-night-muted, #64748b);
    line-height: 1.55;
}

.settings-notification-types__list {
    display: grid;
}

.settings-notification-types__row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding-block: 10px;
    cursor: pointer;
}

.settings-notification-types__row + .settings-notification-types__row {
    border-top: 1px solid rgba(148, 163, 184, 0.16);
}

.settings-notification-types__row:first-child {
    padding-top: 0;
}

.settings-notification-types__row:last-child {
    padding-bottom: 0;
}

.settings-notification-types__copy {
    display: grid;
    gap: 4px;
    overflow-wrap: anywhere;
    color: var(--yc-muted, #64748b);
    font-size: 0.875rem;
    line-height: 1.45;
}

.settings-notification-types__copy strong {
    color: var(--yc-night-text, #0f172a);
    font-size: 15px;
    font-weight: 800;
}

.settings-notification-types__row .yc-toggle {
    width: auto;
    min-height: 44px;
}

.settings-help-layout {
    display: grid;
    grid-template-columns: minmax(240px, 320px) minmax(0, 1fr);
    gap: 18px;
    align-items: start;
}

.settings-help-list {
    display: grid;
    gap: 8px;
    padding: 12px;
}

.settings-help-list__item {
    display: flex;
    min-width: 0;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
    border: 1px solid transparent;
    border-radius: var(--yc-radius-md);
    padding: 11px 12px;
    color: var(--yc-night-muted, #334155);
    text-decoration: none;
    transition: border-color var(--yc-transition), background var(--yc-transition), box-shadow var(--yc-transition);
}

.settings-help-list__item:hover,
.settings-help-list__item.is-active {
    border-color: rgba(124, 58, 237, 0.22);
    background: rgba(124, 58, 237, 0.07);
}

.settings-help-list__item.is-active {
    box-shadow: 0 10px 24px rgba(124, 58, 237, 0.12);
}

.settings-help-list__item span {
    min-width: 0;
}

.settings-help-list__item strong,
.settings-help-list__item small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.settings-help-list__item strong {
    color: var(--yc-night-text, #0f172a);
    font-size: 14px;
    font-weight: 800;
}

.settings-help-list__item small {
    margin-top: 3px;
    color: var(--yc-night-muted, #64748b);
    font-size: 12px;
}

.settings-help-list__item em {
    flex: 0 0 auto;
    border-radius: 999px;
    padding: 4px 8px;
    font-size: 11px;
    font-style: normal;
    font-weight: 800;
}

.settings-help-list__item em.is-active {
    color: var(--yc-night-green, #047857);
    background: rgba(16, 185, 129, 0.12);
}

.settings-help-list__item em.is-inactive {
    color: var(--yc-night-muted, #64748b);
    background: var(--yc-night-soft, #f1f5f9);
}

.settings-help-empty {
    margin: 0;
    color: var(--yc-night-muted, #64748b);
    line-height: 1.5;
}

.settings-help-form .tox.tox-tinymce {
    border-radius: var(--yc-radius-md);
}

.settings-help-form .tox.tox-tinymce .tox-edit-area::before {
    border-radius: 0 0 var(--yc-radius-md) var(--yc-radius-md);
}

.system-help-content img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 14px 0;
    border-radius: var(--yc-radius-sm);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.14);
}

.system-help-button {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 1060;
    display: grid;
    width: 54px;
    height: 54px;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.32);
    border-radius: 16px;
    color: #fff;
    background: linear-gradient(135deg, #7c3aed, #6d28d9);
    box-shadow: 0 16px 34px rgba(79, 70, 229, 0.3);
    font-size: 25px;
    font-weight: 900;
    cursor: grab;
    user-select: none;
    touch-action: none;
    transition: transform var(--yc-transition), box-shadow var(--yc-transition), filter var(--yc-transition);
}

.system-help-button.is-custom-position {
    right: auto;
    bottom: auto;
}

.system-help-button.is-dragging {
    cursor: grabbing;
    transform: scale(1.02);
    transition: none;
}

.system-help-button.is-keyboard-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: none !important;
}
.system-help-button:hover,
.system-help-button:focus-visible {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.5);
    background: linear-gradient(135deg, #8b5cf6, #6d28d9);
    box-shadow: 0 20px 40px rgba(79, 70, 229, 0.36);
    filter: saturate(1.06);
    outline: none;
}

.system-help-button:focus-visible {
    box-shadow: var(--yc-focus-ring), 0 20px 40px rgba(79, 70, 229, 0.36);
}

.system-help-overlay {
    position: fixed;
    inset: 0;
    z-index: 1070;
    background: rgba(15, 23, 42, 0.46);
    opacity: 0;
    transition: opacity 180ms ease;
}

.system-help-overlay.is-open {
    opacity: 1;
}

.system-help-panel {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 1080;
    display: flex;
    width: min(420px, 100vw);
    height: 100vh;
    flex-direction: column;
    background: var(--yc-night-surface, #fff);
    box-shadow: -24px 0 48px rgba(15, 23, 42, 0.22);
    transform: translateX(102%);
    transition: transform 180ms ease;
}

.system-help-panel.is-open {
    transform: translateX(0);
}

.system-help-panel__header {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    justify-content: space-between;
    border-bottom: 1px solid var(--yc-border);
    padding: 22px 22px 18px;
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.1), rgba(79, 70, 229, 0.06));
}

.system-help-panel__header small {
    display: block;
    margin-bottom: 5px;
    color: var(--yc-night-accent, #7c3aed);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.system-help-panel__header h2 {
    margin: 0;
    color: var(--yc-night-text, #0f172a);
    font-size: 22px;
    line-height: 1.2;
}

.system-help-panel__close {
    display: grid;
    width: 38px;
    height: 38px;
    flex: 0 0 auto;
    place-items: center;
    border: 1px solid rgba(124, 58, 237, 0.18);
    border-radius: 999px;
    color: var(--yc-night-muted, #334155);
    background: rgba(var(--yc-night-surface-rgb, 255, 255, 255), 0.86);
    font-size: 24px;
    cursor: pointer;
}

.system-help-panel__body {
    overflow: auto;
    padding: 22px;
    color: var(--yc-night-muted, #334155);
    line-height: 1.65;
}

.system-help-panel__description {
    margin: 0 0 18px;
    color: var(--yc-night-muted, #64748b);
    font-size: 14px;
}

.system-help-panel__loading,
.system-help-panel__empty {
    margin: 0;
    border: 1px dashed rgba(124, 58, 237, 0.26);
    border-radius: var(--yc-radius-md);
    padding: 14px;
    color: var(--yc-night-muted, #64748b);
    background: rgba(124, 58, 237, 0.06);
}

.system-help-content > :first-child {
    margin-top: 0;
}

.system-help-content > :last-child {
    margin-bottom: 0;
}

.system-help-content a {
    color: var(--yc-night-accent, #6d28d9);
    font-weight: 800;
}

.system-help-content h3,
.system-help-content h4 {
    color: var(--yc-night-text, #0f172a);
    line-height: 1.25;
}

@media (max-width: 760px) {
    .settings-help-toggle-row {
        align-items: stretch;
        flex-direction: column;
    }

    .settings-help-layout {
        grid-template-columns: 1fr;
    }


    .system-help-button {
        right: 16px;
        bottom: 16px;
        width: 50px;
        height: 50px;
        font-size: 23px;
    }

    .system-help-panel {
        width: min(92vw, 420px);
    }
}
.dashboard-update-card,
.dashboard-alert-stack {
    margin: 0 0 18px;
}

.dashboard-update-card,
.dashboard-shared-alert {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    border: 1px solid rgba(124, 58, 237, 0.16);
    border-radius: 18px;
    background: rgba(var(--yc-night-surface-rgb, 255, 255, 255), 0.94);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
    padding: 16px 18px;
}

.dashboard-update-card > div,
.dashboard-shared-alert {
    min-width: 0;
}

.dashboard-update-card > div,
.dashboard-shared-alert {
    display: flex;
    align-items: center;
}

.dashboard-update-card > div,
.dashboard-shared-alert > div {
    gap: 14px;
}

.dashboard-update-card__icon,
.dashboard-shared-alert__icon {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    color: var(--yc-night-accent, #7c2bd6);
    background: rgba(124, 58, 237, 0.12);
}

.dashboard-update-card__icon svg,
.dashboard-shared-alert__icon svg {
    width: 20px;
    height: 20px;
}

.dashboard-update-card h2,
.dashboard-shared-alert h2 {
    margin: 0 0 4px;
    font-size: 1rem;
    line-height: 1.2;
}

.dashboard-update-card p,
.dashboard-shared-alert p {
    margin: 0;
    color: var(--yc-night-muted, #475569);
    line-height: 1.45;
}

.dashboard-shared-alert__content {
    min-width: 0;
}

.dashboard-shared-alert--empty {
    justify-content: flex-start;
}

.dashboard-shared-alert--empty .dashboard-shared-alert__content {
    flex: 0 1 auto;
}

.dashboard-shared-alert__time {
    display: inline-block;
    margin-top: 5px;
    color: #94a3b8;
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1.2;
}
.dashboard-alert-stack {
    display: grid;
    gap: 10px;
}

.dashboard-shared-alert__actions {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
}

.dashboard-shared-alert__actions form,
.dashboard-update-card form {
    margin: 0;
}

@media (max-width: 720px) {
    .dashboard-update-card,
    .dashboard-shared-alert {
        align-items: flex-start;
        flex-direction: column;
    }

    .dashboard-update-card > div,
    .dashboard-shared-alert {
        width: 100%;
    }

    .dashboard-shared-alert__actions {
        width: 100%;
        justify-content: flex-end;
    }

    .dashboard-shared-alert--empty {
        flex-direction: row;
        align-items: center;
    }

}

.dashboard-overview-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.dashboard-overview-card {
    min-width: 0;
    border: 1px solid rgba(var(--app-accent-rgb), 0.16);
    border-radius: 8px;
    padding: 18px;
    background: rgba(var(--yc-night-surface-rgb, 255, 255, 255), 0.96);
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.07);
}

.dashboard-overview-card__header {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) 36px;
    gap: 12px;
    align-items: center;
    margin-bottom: 14px;
}

.dashboard-overview-card__icon,
.dashboard-overview-card__header > a,
.dashboard-overview-row__marker {
    display: grid;
    place-items: center;
}

.dashboard-overview-card__icon {
    width: 42px;
    height: 42px;
    border-radius: 8px;
    color: #fff;
    background: var(--app-accent-gradient);
    box-shadow: 0 8px 18px rgba(var(--app-accent-rgb), 0.24);
}

.dashboard-overview-card__icon svg,
.dashboard-overview-card__header > a svg,
.dashboard-overview-row__marker svg {
    width: 19px;
    height: 19px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.dashboard-overview-card__header h2,
.dashboard-overview-card__header p {
    margin: 0;
}

.dashboard-overview-card__header h2 {
    color: var(--yc-night-text, #0f172a);
    font-size: 1rem;
    line-height: 1.25;
}

.dashboard-overview-card__header p {
    margin-top: 3px;
    color: var(--yc-night-muted, #64748b);
    font-size: 0.8rem;
    line-height: 1.35;
}

.dashboard-overview-card__header > a {
    width: 36px;
    height: 36px;
    border: 1px solid rgba(var(--app-accent-rgb), 0.2);
    border-radius: 50%;
    color: var(--yc-night-accent, var(--app-accent-dark));
    background: var(--app-accent-soft);
}

.dashboard-overview-card__header > a:hover,
.dashboard-overview-card__header > a:focus-visible {
    border-color: rgba(var(--app-accent-rgb), 0.42);
    outline: none;
    box-shadow: var(--yc-focus-ring);
}

.dashboard-overview-list {
    display: grid;
}

.dashboard-overview-row {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    min-width: 0;
    border-top: 1px solid var(--yc-night-border, #eef2f7);
    padding: 10px 2px;
    color: inherit;
    text-decoration: none;
}

.dashboard-overview-row:hover,
.dashboard-overview-row:focus-visible {
    color: inherit;
    background: var(--app-accent-soft);
    outline: none;
}

.dashboard-overview-row__marker {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    color: var(--yc-night-accent, var(--app-accent-dark));
    background: var(--app-accent-soft);
}

.dashboard-overview-row__marker--priority {
    color: var(--yc-night-error, #b91c1c);
    background: var(--yc-night-error-bg, #fef2f2);
}

.dashboard-overview-row__content,
.dashboard-shopping-summary span,
.dashboard-consumption-alert span {
    display: grid;
    min-width: 0;
    gap: 3px;
}

.dashboard-overview-row__content strong,
.dashboard-shopping-summary strong,
.dashboard-consumption-alert strong {
    overflow-wrap: anywhere;
    color: var(--yc-night-text, #172033);
    font-size: 0.9rem;
    line-height: 1.3;
}

.dashboard-overview-row__content small,
.dashboard-shopping-summary small,
.dashboard-consumption-alert small {
    color: var(--yc-night-muted, #64748b);
    font-size: 0.76rem;
    line-height: 1.35;
}

@media (max-width: 520px) {
    .lifestyle-kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .lifestyle-kpi {
        grid-template-columns: minmax(0, 1fr);
        align-content: start;
        gap: 8px;
        padding: 12px;
    }

    .lifestyle-kpi__icon {
        width: 36px;
        height: 36px;
    }

    .lifestyle-kpi strong {
        font-size: 17px;
    }

    .lifestyle-chart-card {
        padding: 12px 8px;
    }
}

.dashboard-overview-row__date-badge {
    display: inline-flex;
    min-height: 28px;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(var(--app-accent-rgb), 0.2);
    border-radius: 999px;
    padding: 4px 9px;
    color: var(--yc-night-accent, var(--app-accent-dark));
    background: var(--app-accent-soft);
    font-size: 0.75rem;
    font-weight: 800;
    line-height: 1;
    white-space: nowrap;
}

.dashboard-overview-card__empty {
    margin: 0;
    border-top: 1px solid var(--yc-night-border, #eef2f7);
    padding: 18px 4px 4px;
    color: var(--yc-night-muted, #64748b);
    font-size: 0.88rem;
    line-height: 1.5;
}

.dashboard-shopping-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-width: 0;
    color: inherit;
    text-decoration: none;
}

.dashboard-shopping-summary b {
    flex: 0 0 auto;
    color: var(--yc-night-accent, var(--app-accent-dark));
}

.dashboard-shopping-progress {
    overflow: hidden;
    height: 7px;
    margin: 12px 0;
    border-radius: 999px;
    background: var(--yc-night-soft, #e8edf4);
}

.dashboard-shopping-progress i {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--app-accent-gradient);
}

.dashboard-shopping-items {
    display: grid;
    gap: 7px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.dashboard-shopping-items li {
    position: relative;
    padding-left: 17px;
    overflow-wrap: anywhere;
    color: var(--yc-night-muted, #475569);
    font-size: 0.84rem;
}

.dashboard-shopping-items li::before {
    position: absolute;
    top: 0.52em;
    left: 2px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--app-accent);
    content: '';
}

.dashboard-consumption-alerts {
    display: grid;
    gap: 10px;
}

.dashboard-consumption-alert {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 10px;
    align-items: center;
    border-top: 1px solid #fed7aa;
    padding-top: 10px;
}

.dashboard-consumption-alert > b {
    color: var(--yc-night-warning, #c2410c);
    font-size: 0.78rem;
    white-space: nowrap;
}

.dashboard-consumption-alert.is-overdue {
    border-top-color: #fecaca;
}

.dashboard-consumption-alert.is-overdue > b {
    color: var(--yc-night-error, #b91c1c);
}

@media (max-width: 899px) {
    .dashboard-overview-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 430px) {
    .dashboard-overview-card {
        padding: 14px;
    }

    .dashboard-overview-card__header {
        grid-template-columns: 38px minmax(0, 1fr) 34px;
        gap: 9px;
    }

    .dashboard-overview-card__icon {
        width: 38px;
        height: 38px;
    }

    .dashboard-overview-row {
        grid-template-columns: 32px minmax(0, 1fr) auto;
        gap: 8px;
    }

    .dashboard-overview-row__date-badge {
        align-self: start;
        padding-inline: 7px;
        font-size: 0.7rem;
    }

    .dashboard-consumption-alert {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .dashboard-consumption-alert .yc-btn {
        grid-column: 1 / -1;
        justify-self: end;
    }
}
.schedule-share-badge {
    margin-left: 6px;
}

.schedule-row[data-can-edit="0"] .schedule-edit-trigger,
.schedule-row[data-can-edit="0"] [data-confirm-type="confirm"],
.schedule-row[data-can-edit="0"] [data-confirm-type="delete"],
.schedule-row[data-can-edit="0"] form[action="/schedule/uncomplete"] {
    display: none;
}

.schedule-row[data-can-manage="0"] .schedule-share-trigger,
.schedule-row[data-can-manage="0"] .schedule-drag-handle {
    display: none;
}

.schedule-page .modal.schedule-share-modal,
.schedule-page .yc-modal.schedule-share-modal {
    width: min(760px, calc(100vw - 48px));
    max-width: 100%;
    overflow-x: hidden;
}

.schedule-share-modal .yc-modal__title + .work-subsection-hint {
    margin-top: 8px;
    margin-bottom: 18px;
}

.schedule-share-modal .shopping-share-form-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 180px;
    align-items: flex-end;
    gap: 12px;
}

.schedule-share-modal .shopping-share-selected-row {
    grid-template-columns: minmax(0, 1fr) 180px 120px;
    align-items: center;
    gap: 10px;
}

.schedule-share-modal .shopping-share-person {
    min-width: 0;
}

.schedule-share-modal .shopping-share-selected-row .yc-select,
.schedule-share-modal .shopping-share-selected-row .yc-btn {
    width: 100%;
    min-height: 44px;
}

@media (max-width: 760px) {
    .schedule-page .modal.schedule-share-modal,
    .schedule-page .yc-modal.schedule-share-modal {
        width: min(100%, calc(100vw - 24px));
    }

    .schedule-share-modal .shopping-share-form-row,
    .schedule-share-modal .shopping-share-selected-row {
        grid-template-columns: minmax(0, 1fr);
    }

    .schedule-share-modal .shopping-share-form-row .yc-field + .yc-field {
        margin-top: 4px;
    }
}
.settings-device-notifications__grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.settings-offline .settings-offline__status {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.finance-form.settings-offline {
    grid-template-columns: minmax(0, 1fr);
}

.settings-offline > h2 {
    margin: 0;
    font-size: 1.25rem;
}

.settings-offline__preference {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
}

.settings-offline__preference .finance-form-actions {
    grid-column: auto;
    margin: 0;
}

.settings-offline__device {
    border-top: 1px solid var(--yc-border, #d8dee8);
    padding-top: 16px;
}

.settings-offline__device h2 {
    margin: 0 0 12px;
}

.settings-offline [data-offline-phrase] {
    margin-top: 12px;
}

@media (max-width: 600px) {
    .settings-offline__preference {
        grid-template-columns: minmax(0, 1fr);
    }
}

.settings-device-notifications__status {
    border: 1px solid var(--yc-border, #d8dee8);
    border-radius: 8px;
    padding: 12px;
    min-width: 0;
}

.settings-device-notifications__status span,
.settings-device-notifications__hint {
    color: var(--yc-muted, #64748b);
    display: block;
    font-size: 0.9rem;
}

.settings-device-notifications__status strong {
    display: block;
    margin-top: 4px;
}

.settings-device-notifications__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

.settings-device-notifications__hint,
.settings-device-notifications__message {
    margin: 12px 0 0;
}

@media (max-width: 760px) {
    .settings-device-notifications__grid {
        grid-template-columns: 1fr;
    }

    .settings-device-notifications__actions .yc-btn {
        width: 100%;
    }
}

.shared-indicator {
    position: relative;
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    z-index: 4;
}

.shared-indicator__button {
    display: inline-flex;
    width: 24px;
    height: 24px;
    min-width: 24px;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(124, 58, 237, 0.18);
    border-radius: 999px;
    padding: 0;
    color: var(--yc-night-accent, #6d28d9);
    background: var(--yc-night-surface, #fff);
    box-shadow: 0 6px 14px rgba(15, 23, 42, 0.08);
    cursor: pointer;
}

.shared-indicator__button:hover,
.shared-indicator__button:focus-visible,
.shared-indicator.is-open .shared-indicator__button {
    color: #fff;
    background: #6d28d9;
    outline: 0;
}

.shared-indicator__button svg {
    width: 14px;
    height: 14px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.25;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.shared-indicator__person {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    vertical-align: middle;
}

.shared-indicator__person svg {
    width: 13px;
    height: 13px;
    flex: 0 0 13px;
    fill: none;
    stroke: #6d28d9;
    stroke-width: 2.25;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.shared-indicator__separator,
.shared-indicator__more {
    color: var(--yc-night-muted, #475569);
}

.shared-indicator__popover {
    position: absolute;
    left: 50%;
    bottom: calc(100% + 8px);
    width: max-content;
    max-width: min(260px, calc(100vw - 32px));
    padding: 8px 10px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 10px;
    color: var(--yc-night-text, #0f172a);
    background: var(--yc-night-surface, #fff);
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.18);
    font-size: 12px;
    font-weight: 800;
    line-height: 1.35;
    opacity: 0;
    pointer-events: none;
    text-align: left;
    transform: translate(-50%, 4px);
    transition: opacity 0.14s ease, transform 0.14s ease;
    white-space: normal;
    z-index: 60;
}

.shared-indicator:hover .shared-indicator__popover,
.shared-indicator:focus-within .shared-indicator__popover,
.shared-indicator.is-open .shared-indicator__popover {
    opacity: 1;
    pointer-events: auto;
    transform: translate(-50%, 0);
}

.work-table-icon-cell {
    position: relative;
}

.work-table-icon-cell .shared-indicator {
    position: static;
    transform: none;
}

.work-card-marker + .shared-indicator {
    margin-left: 0;
}
.work-page--projects .work-title-with-share .shared-indicator__popover,
.documents-page .work-document-title-row .shared-indicator__popover,
.documents-page .work-folder-card__identity .shared-indicator__popover,
.work-detail-card--documents .work-document-title-row .shared-indicator__popover,
.work-detail-card--documents .work-folder-card__identity .shared-indicator__popover {
    z-index: 7200;
}

.work-page--projects .work-title-with-share:has(.shared-indicator.is-open),
.documents-page .work-sub-card:has(.shared-indicator.is-open),
.work-detail-card--documents .work-sub-card:has(.shared-indicator.is-open) {
    position: relative;
    z-index: 7100;
}

.work-folder-card .shared-indicator--folder {
    align-self: center;
}

.work-folder-card .shared-indicator--folder .shared-indicator__button,
.work-sub-card__main .shared-indicator__button,
.work-folder-view__title .shared-indicator__button {
    width: 22px;
    height: 22px;
    min-width: 22px;
}

.schedule-row-main .shared-indicator {
    margin-left: -2px;
}

.schedule-page .schedule-day,
.schedule-page .schedule-items,
.schedule-page .schedule-sortable {
    overflow: visible;
}

.schedule-page .schedule-row {
    position: relative;
    overflow: visible;
}

.schedule-page .schedule-row:hover,
.schedule-page .schedule-row:focus-within,
.schedule-page .schedule-row:has(.shared-indicator--schedule.is-open) {
    z-index: 80;
}

.schedule-page .schedule-row-main .shared-indicator--schedule {
    margin-left: -2px;
    z-index: 90;
}

.schedule-page .shared-indicator--schedule .shared-indicator__button {
    width: 22px;
    height: 22px;
    min-width: 22px;
    border-color: rgba(124, 58, 237, 0.28);
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.12);
}

.schedule-page .shared-indicator--schedule .shared-indicator__popover {
    top: 50%;
    bottom: auto;
    left: calc(100% + 10px);
    max-width: min(280px, calc(100vw - 40px));
    border-color: rgba(124, 58, 237, 0.18);
    border-left: 3px solid #7c3aed;
    color: var(--yc-night-accent, #1e1b4b);
    box-shadow: 0 18px 42px rgba(88, 28, 135, 0.2);
    overflow-wrap: anywhere;
    pointer-events: none;
    transform: translate(0, -50%);
    z-index: 2000;
}

.schedule-page .shared-indicator--schedule:hover .shared-indicator__popover,
.schedule-page .shared-indicator--schedule:focus-within .shared-indicator__popover,
.schedule-page .shared-indicator--schedule.is-open .shared-indicator__popover {
    pointer-events: none;
    transform: translate(0, -50%);
}

@media (max-width: 640px) {
    .schedule-page .shared-indicator--schedule .shared-indicator__popover {
        top: calc(100% + 8px);
        left: 0;
        max-width: calc(100vw - 48px);
        transform: translate(0, 0);
    }

    .schedule-page .shared-indicator--schedule:hover .shared-indicator__popover,
    .schedule-page .shared-indicator--schedule:focus-within .shared-indicator__popover,
    .schedule-page .shared-indicator--schedule.is-open .shared-indicator__popover {
        transform: translate(0, 0);
    }
}
@media (max-width: 899px) {
    .schedule-page .active-day:has(.shared-indicator--schedule.is-open),
    .schedule-page .schedule-items:has(.shared-indicator--schedule.is-open),
    .schedule-page .schedule-sortable:has(.shared-indicator--schedule.is-open),
    .schedule-page .schedule-row:has(.shared-indicator--schedule.is-open),
    .schedule-page .schedule-row-main:has(.shared-indicator--schedule.is-open) {
        overflow: visible !important;
    }

    .schedule-page .schedule-row:has(.shared-indicator--schedule.is-open) {
        z-index: 7300;
    }

    .schedule-page .shared-indicator--schedule.is-open {
        z-index: 7400;
    }
}
@media (max-width: 640px) {
    .shared-indicator__popover {
        left: 0;
        transform: translate(0, 4px);
    }

    .shared-indicator:hover .shared-indicator__popover,
    .shared-indicator:focus-within .shared-indicator__popover,
    .shared-indicator.is-open .shared-indicator__popover {
        transform: translate(0, 0);
    }
}
.shared-indicator.shared-indicator .shared-indicator__popover {
    top: auto;
    right: auto;
    bottom: calc(100% + 6px);
    left: 50%;
    display: flex;
    width: max-content;
    min-width: 0;
    max-width: min(240px, calc(100vw - 32px));
    flex-direction: column;
    gap: 8px;
    border: 1px solid rgba(124, 58, 237, 0.16);
    border-left: 1px solid rgba(124, 58, 237, 0.16);
    border-radius: 10px;
    padding: 10px 12px;
    color: var(--yc-night-text, #0f172a);
    background: var(--yc-night-surface, #fff);
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.18);
    font-size: 12px;
    font-weight: 700;
    line-height: 1.35;
    overflow-wrap: anywhere;
    pointer-events: none;
    transform: translate(-50%, 4px);
    z-index: 7200;
}

.shared-indicator.shared-indicator .shared-indicator__popover::before {
    content: "";
    position: absolute;
    right: 0;
    bottom: -10px;
    left: 0;
    height: 10px;
}

.shared-indicator.shared-indicator:hover .shared-indicator__popover,
.shared-indicator.shared-indicator:focus-within .shared-indicator__popover,
.shared-indicator.shared-indicator.is-open .shared-indicator__popover {
    pointer-events: auto;
    transform: translate(-50%, 0);
}

.shared-indicator__popover.is-viewport-positioned,
.shared-indicator.shared-indicator .shared-indicator__popover.is-viewport-positioned {
    position: fixed;
    right: auto;
    bottom: auto;
    left: 0;
    top: 0;
    box-sizing: border-box;
    min-width: 0;
    transform: none;
    transition: none;
    z-index: 9000;
}

.shared-indicator.shared-indicator:hover .shared-indicator__popover.is-viewport-positioned,
.shared-indicator.shared-indicator:focus-within .shared-indicator__popover.is-viewport-positioned,
.shared-indicator.shared-indicator.is-open .shared-indicator__popover.is-viewport-positioned,
.shared-indicator__popover.is-viewport-positioned.is-open,
.shared-indicator__popover.is-viewport-positioned.is-hovered {
    opacity: 1;
    pointer-events: auto;
    transform: none;
}

.shared-indicator.shared-indicator .shared-indicator__popover.is-viewport-positioned .shared-indicator__row,
.calendar-event .calendar-event-title-row .shared-indicator--calendar .shared-indicator__popover.is-viewport-positioned .shared-indicator__row {
    grid-template-columns: 30px minmax(0, 1fr);
}

.shared-indicator.shared-indicator .shared-indicator__popover.is-viewport-positioned .shared-indicator__content,
.calendar-event .calendar-event-title-row .shared-indicator--calendar .shared-indicator__popover.is-viewport-positioned .shared-indicator__content {
    width: auto;
    max-width: none;
}

.shared-indicator.shared-indicator .shared-indicator__popover.is-viewport-positioned .shared-indicator__person,
.calendar-event .calendar-event-title-row .shared-indicator--calendar .shared-indicator__popover.is-viewport-positioned .shared-indicator__person {
    width: auto;
    min-width: 0;
    max-width: 100%;
}

.shared-indicator.shared-indicator .shared-indicator__popover.is-viewport-positioned .shared-indicator__person span,
.calendar-event .calendar-event-title-row .shared-indicator--calendar .shared-indicator__popover.is-viewport-positioned .shared-indicator__person span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}
.shared-indicator__row {
    display: grid;
    grid-template-columns: 30px minmax(0, auto);
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.shared-indicator__avatar {
    display: inline-flex;
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(124, 58, 237, 0.18);
    border-radius: 999px;
    color: var(--yc-night-accent, #6d28d9);
    background: var(--yc-night-accent-bg, #f5f3ff);
    font-size: 13px;
    font-weight: 800;
    line-height: 1;
    overflow: hidden;
}

.shared-indicator__avatar img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.shared-indicator__content {
    display: flex;
    min-width: 0;
    max-width: min(180px, calc(100vw - 96px));
    flex-direction: column;
    gap: 2px;
}

.shared-indicator__label {
    color: var(--yc-night-muted, #64748b);
    font-size: 11px;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
}

.shared-indicator__person {
    display: inline-flex;
    min-width: 0;
    align-items: center;
    gap: 5px;
    color: var(--yc-night-text, #0f172a);
    font-size: 12px;
    font-weight: 800;
    line-height: 1.2;
    white-space: nowrap;
}

.shared-indicator__person svg {
    width: 13px;
    height: 13px;
    flex: 0 0 13px;
}

.shared-indicator__person span {
    display: inline-block;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (max-width: 640px) {
    .shared-indicator.shared-indicator .shared-indicator__popover {
        right: auto;
        bottom: calc(100% + 8px);
        left: 0;
        max-width: calc(100vw - 48px);
        transform: translate(0, 4px);
    }

    .shared-indicator.shared-indicator:hover .shared-indicator__popover,
    .shared-indicator.shared-indicator:focus-within .shared-indicator__popover,
    .shared-indicator.shared-indicator.is-open .shared-indicator__popover {
        transform: translate(0, 0);
    }
}

.calendar-event .calendar-event-title-row .shared-indicator--calendar .shared-indicator__popover {
    display: flex;
    width: max-content;
    min-width: max-content;
}


.calendar-event .calendar-event-title-row .shared-indicator--calendar .shared-indicator__row {
    grid-template-columns: 30px max-content;
}

.calendar-event .calendar-event-title-row .shared-indicator--calendar .shared-indicator__content {
    width: max-content;
    max-width: none;
}

.calendar-event .calendar-event-title-row .shared-indicator--calendar .shared-indicator__person {
    display: inline-flex;
    width: max-content;
    min-width: max-content;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
}

.calendar-event .calendar-event-title-row .shared-indicator--calendar .shared-indicator__person svg {
    display: block;
    flex: 0 0 13px;
}

.calendar-event .calendar-event-title-row .shared-indicator--calendar .shared-indicator__person span {
    display: inline-block;
    width: auto;
    min-width: 0;
    white-space: nowrap;
}
/* Mobile containment fixes for invoice detail and document folder names. */
@media (max-width: 760px) {
    .invoice-page,
    .invoice-page .work-detail-sections,
    .invoice-page .invoice-detail-sections,
    .invoice-page .yc-sticky-tabs,
    .invoice-page .invoice-detail-tabs,
    .invoice-page .invoice-overview-grid,
    .invoice-page .invoice-overview-card,
    .invoice-page .invoice-form,
    .invoice-page .invoice-form-boxes,
    .invoice-page .invoice-form-box,
    .invoice-page .invoice-items-section,
    .invoice-page .invoice-items-table,
    .invoice-page .invoice-pdf-preview-layout,
    .invoice-page .invoice-pdf-preview-card,
    .invoice-page .invoice-pdf-actions-card {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        box-sizing: border-box;
    }

    .invoice-page {
        overflow-x: clip;
    }

    .invoice-page .invoice-detail-hero {
        align-items: stretch;
        flex-direction: column;
        flex-wrap: nowrap;
    }

    .invoice-page .invoice-detail-title,
    .invoice-page .yc-page-header__title {
        width: 100%;
        min-width: 0;
    }

    .invoice-page .invoice-detail-actions {
        width: 100%;
        margin-left: 0;
        justify-content: stretch;
    }

    .invoice-page .invoice-detail-actions .yc-btn {
        width: 100%;
        max-width: 100%;
        justify-content: center;
    }

    .invoice-page .invoice-detail-tabs {
        overflow: hidden;
    }

    .invoice-page .finance-tabs {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        margin-right: 0;
        margin-left: 0;
        padding-right: 0;
        padding-left: 0;
        overflow-x: auto;
        overscroll-behavior-inline: contain;
    }

    .invoice-page .invoice-overview-list div {
        min-width: 0;
        align-items: flex-start;
    }

    .invoice-page .invoice-overview-list dt,
    .invoice-page .invoice-overview-list dd,
    .invoice-page .invoice-overview-link,
    .invoice-page .invoice-overview-total {
        min-width: 0;
        overflow-wrap: anywhere;
    }

    .invoice-page .invoice-overview-list dd {
        max-width: 62%;
    }

    .invoice-page .invoice-client-picker {
        grid-template-columns: minmax(0, 1fr) 42px;
        width: 100%;
        min-width: 0;
    }

    .invoice-page .invoice-items-table {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .invoice-page .invoice-items-heading {
        align-items: stretch;
        flex-direction: column;
        gap: 10px;
    }

    .invoice-page .invoice-items-heading .yc-btn,
    .invoice-page .invoice-pdf-tab-actions .yc-btn,
    .invoice-page .invoice-pdf-tab-actions form,
    .invoice-page .invoice-pdf-tab-actions form > .yc-btn {
        width: 100%;
        max-width: 100%;
    }

    .invoice-page .invoice-preview-image {
        width: 100%;
        max-width: 100%;
        height: auto;
    }

    .documents-page .work-folder-card__identity,
    .work-detail-card--documents .work-folder-card__identity {
        flex: 1 1 auto;
        width: auto;
        max-width: 100%;
        min-width: 0;
    }

    .documents-page .work-folder-card__identity .work-folder-card__link,
    .work-detail-card--documents .work-folder-card__identity .work-folder-card__link {
        flex: 1 1 auto;
        max-width: none;
        min-width: 0;
    }

    .documents-page .work-folder-card__identity h3,
    .work-detail-card--documents .work-folder-card__identity h3 {
        flex: 1 1 auto;
        min-width: 0;
    }
}

@media (max-width: 760px) {
    .documents-page .work-detail-card--documents,
    .documents-page .work-detail-card--documents .work-subsection,
    .documents-page .work-detail-card--documents .work-documents-content,
    .documents-page .work-detail-card--documents .work-documents-grid,
    .documents-page .work-detail-card--documents .work-sub-card,
    .documents-page .work-folder-view,
    .documents-page .work-folder-view__header {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        box-sizing: border-box;
    }

    .documents-page .work-folder-view__header {
        display: grid;
        grid-template-columns: auto minmax(0, 1fr);
        align-items: center;
        justify-content: stretch;
        gap: 12px;
        overflow: visible;
    }

    .documents-page .work-folder-view__header > .yc-btn {
        grid-column: 1;
        width: auto;
        min-width: 110px;
    }

    .documents-page .work-folder-view__title {
        grid-column: 2;
        justify-content: flex-end;
        flex-wrap: nowrap;
        width: 100%;
        max-width: 100%;
        min-width: 0;
        margin-left: 0;
    }

    .documents-page .work-folder-view__title h3 {
        flex: 0 1 auto;
        max-width: 100%;
        min-width: 0;
    }

    .documents-page .work-folder-view__title .shared-indicator,
    .documents-page .work-folder-view__title .shopping-share-trigger--standalone,
    .documents-page .work-folder-view__title .work-folder-edit-trigger {
        flex: 0 0 auto;
    }

    .documents-page .work-detail-card--documents .work-documents-grid .work-sub-card__header {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
        width: 100%;
        max-width: 100%;
        min-width: 0;
        overflow: hidden;
    }

    .documents-page .work-detail-card--documents .work-documents-grid .work-sub-card__main {
        grid-column: 1;
        min-width: 0;
        max-width: 100%;
        overflow: hidden;
    }

    .documents-page .work-detail-card--documents .work-documents-grid .work-sub-card__main > div,
    .documents-page .work-detail-card--documents .work-document-title-row {
        width: 100%;
        max-width: 100%;
        min-width: 0;
    }

    .documents-page .work-detail-card--documents .work-documents-grid .work-sub-actions--header {
        grid-column: 2;
        width: auto;
        min-width: 0;
        margin-left: 0;
        gap: 6px;
        overflow: visible;
    }
}
@media (max-width: 600px) {
    .schedule-page .schedule-row {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-areas: "main actions";
        align-items: center !important;
        column-gap: 8px;
        row-gap: 0;
    }

    .schedule-page .schedule-row[data-is-meeting="1"] {
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-areas:
            "main actions"
            "time actions";
        row-gap: 2px;
    }

    .schedule-page .schedule-row-main {
        grid-area: main;
        min-width: 0;
    }

    .schedule-page .schedule-title {
        min-width: 0;
    }

    .schedule-page .schedule-meeting-time {
        grid-area: time;
        justify-self: start;
        align-self: start;
        width: max-content;
        min-width: 54px;
        max-width: 100%;
        margin-left: 20px;
        flex: 0 0 auto;
        white-space: nowrap;
    }

    .schedule-page .schedule-actions {
        grid-area: actions;
        align-self: center !important;
        margin-left: 0;
    }
}
@media (max-width: 899px) {
    input[data-time-input] {
        font-size: 16px !important;
    }
}@media (max-width: 899px) {
    .schedule-page .meeting-time-input {
        font-size: 16px !important;
    }
}
@media (max-width: 899px) {
    body > .schedule-action-menu-panel.yc-dropdown__menu--portal {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) !important;
        gap: 0 !important;
        min-width: 168px !important;
        border: 1px solid rgba(148, 163, 184, 0.22) !important;
        border-radius: 16px !important;
        padding: 6px !important;
        background: var(--yc-night-surface, #fff) !important;
        box-shadow: 0 18px 42px rgba(15, 23, 42, 0.18) !important;
    }

    body > .schedule-action-menu-panel.yc-dropdown__menu--portal .schedule-action-menu-item,
    body > .schedule-action-menu-panel.yc-dropdown__menu--portal .app-icon-btn {
        display: flex !important;
        width: 100% !important;
        min-width: 0 !important;
        max-width: none !important;
        height: 36px !important;
        min-height: 36px !important;
        max-height: none !important;
        flex: 0 0 auto !important;
        align-items: center !important;
        justify-content: flex-start !important;
        gap: 10px !important;
        margin: 0 !important;
        border: 0 !important;
        border-radius: 10px !important;
        padding: 0 10px !important;
        background: transparent !important;
        box-shadow: none !important;
        color: var(--yc-night-muted, #334155) !important;
        font-size: 14px !important;
        font-weight: 650 !important;
        line-height: 1 !important;
        white-space: nowrap !important;
    }

    body > .schedule-action-menu-panel.yc-dropdown__menu--portal .schedule-action-menu-item:hover,
    body > .schedule-action-menu-panel.yc-dropdown__menu--portal .schedule-action-menu-item:focus-visible,
    body > .schedule-action-menu-panel.yc-dropdown__menu--portal .app-icon-btn:hover,
    body > .schedule-action-menu-panel.yc-dropdown__menu--portal .app-icon-btn:focus-visible {
        background: rgba(124, 58, 237, 0.08) !important;
    }

    body > .schedule-action-menu-panel.yc-dropdown__menu--portal .schedule-action-menu-item::after,
    body > .schedule-action-menu-panel.yc-dropdown__menu--portal .app-icon-btn::after {
        content: none !important;
        display: none !important;
    }

    body > .schedule-action-menu-panel.yc-dropdown__menu--portal .schedule-action-menu-item span,
    body > .schedule-action-menu-panel.yc-dropdown__menu--portal .app-icon-btn span {
        display: inline-block !important;
        position: static !important;
        width: auto !important;
        height: auto !important;
        max-width: none !important;
        min-width: 0 !important;
        overflow: hidden !important;
        color: var(--yc-night-text, #111827) !important;
        opacity: 1 !important;
        visibility: visible !important;
        font-size: 14px !important;
        font-weight: 650 !important;
        line-height: 1.2 !important;
        text-overflow: ellipsis !important;
        white-space: nowrap !important;
    }

    body > .schedule-action-menu-panel.yc-dropdown__menu--portal .schedule-action-menu-item svg,
    body > .schedule-action-menu-panel.yc-dropdown__menu--portal .app-icon-btn svg {
        width: 16px !important;
        height: 16px !important;
        flex: 0 0 16px !important;
        color: var(--yc-night-accent, var(--yc-primary)) !important;
        fill: none !important;
        stroke: var(--yc-primary) !important;
        stroke-width: 2 !important;
        stroke-linecap: round !important;
        stroke-linejoin: round !important;
    }

    body > .schedule-action-menu-panel.yc-dropdown__menu--portal .schedule-action-menu-item svg *,
    body > .schedule-action-menu-panel.yc-dropdown__menu--portal .app-icon-btn svg * {
        color: var(--yc-night-accent, var(--yc-primary)) !important;
        fill: none !important;
        stroke: var(--yc-primary) !important;
    }
}

/* User-selectable system accent */
body .app-sidebar {
    background: linear-gradient(180deg, var(--app-accent-dark) 0%, var(--app-accent) 52%, var(--app-accent-light) 100%) !important;
    box-shadow: 24px 0 70px rgba(var(--app-accent-rgb), 0.2);
}

body .mobile-menu-toggle,
body .mobile-topbar-logo,
body .finance-tabs a.is-active,
body .finance-tab.is-active,
body .calendar-view-switch .is-active,
body .schedule-page .day-tab.is-active,
body .shopping-tabs .finance-tab.is-active {
    background: var(--app-accent-gradient);
}

body .mobile-menu-toggle,
body .yc-page-header__icon,
body .work-hero__icon,
body .finance-tabs a.is-active,
body .finance-tab.is-active {
    box-shadow: 0 14px 30px rgba(var(--app-accent-rgb), 0.22);
}

body .yc-page-header__icon,
body .work-hero__icon {
    background: radial-gradient(circle at 35% 25%, var(--app-accent-light), var(--app-accent) 58%, var(--app-accent-dark) 100%);
}

body .mobile-topbar-brand,
body .sidebar-user-avatar,
body .finance-tabs a,
body .finance-tab,
body .work-card-marker,
body .settings-help-list__item.is-active,
body .yc-password-toggle.is-active {
    color: var(--yc-night-accent, var(--app-accent-dark));
}

body .finance-tabs a:hover,
body .finance-tabs a:focus-visible,
body .finance-tab:hover,
body .finance-tab:focus-visible,
body .work-card-marker,
body .settings-help-list__item.is-active,
body .settings-security-method.is-active {
    border-color: rgba(var(--app-accent-rgb), 0.32);
    background-color: rgba(var(--app-accent-rgb), 0.08);
}

body .sidebar-link:hover,
body .sidebar-link.is-active,
body .sidebar-link:hover .sidebar-link-icon,
body .sidebar-link.is-active .sidebar-link-icon {
    background: rgba(var(--yc-night-surface-rgb, 255, 255, 255), 0.18);
}

body .settings-color-option:has(input:checked) {
    border-color: var(--invoice-color);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--invoice-color) 16%, transparent), 0 14px 30px rgba(15, 23, 42, 0.08);
}
/* Schedule follows system accent, while today has a stable green palette */
body .schedule-page {
    --schedule-today-dark: #15803d;
    --schedule-today-light: #22c55e;
    --schedule-today-rgb: 34, 197, 94;
    --schedule-today-gradient: linear-gradient(135deg, var(--schedule-today-dark) 0%, var(--schedule-today-light) 100%);
}

body .schedule-page .day-tab:hover,
body .schedule-page .day-tab:focus-visible {
    border-color: rgba(var(--app-accent-rgb), 0.32);
    color: var(--yc-night-accent, var(--app-accent-dark));
    box-shadow: 0 14px 34px rgba(var(--app-accent-rgb), 0.14);
}

body .schedule-page .day-tab.is-today,
body .schedule-page .day-tab.is-today:hover,
body .schedule-page .day-tab.is-today:focus-visible {
    border-color: rgba(var(--schedule-today-rgb), 0.58);
    color: #fff;
    background: var(--schedule-today-gradient);
    box-shadow: 0 10px 26px rgba(var(--schedule-today-rgb), 0.24), inset 0 0 0 2px rgba(255, 255, 255, 0.18);
}

body .schedule-page .day-tab.is-today .day-tab-date {
    color: rgba(255, 255, 255, 0.9);
}

body .schedule-page .day-tab-badge {
    background: var(--app-accent);
}

body .schedule-page .day-tab.is-today .day-tab-badge {
    color: var(--schedule-today-dark);
    background: var(--yc-night-surface, #fff);
}

body .schedule-page .day-tab.is-active {
    border-color: rgba(var(--app-accent-rgb), 0.36);
    color: #fff;
    background: var(--app-accent-gradient);
    box-shadow: 0 14px 30px rgba(var(--app-accent-rgb), 0.24), 0 0 0 3px rgba(var(--app-accent-rgb), 0.14);
}

body .schedule-page .day-tab.is-active .day-tab-date {
    color: rgba(255, 255, 255, 0.86);
}

body .schedule-page .day-tab.is-active.is-today,
body .schedule-page .day-tab.is-active.is-today:hover,
body .schedule-page .day-tab.is-active.is-today:focus-visible {
    border-color: rgba(var(--schedule-today-rgb), 0.62);
    color: #fff;
    background: var(--schedule-today-gradient);
    box-shadow: 0 14px 30px rgba(var(--schedule-today-rgb), 0.28), 0 0 0 3px rgba(var(--schedule-today-rgb), 0.16);
}

body .schedule-page .day-tab.is-active.is-today .day-tab-date {
    color: rgba(255, 255, 255, 0.9);
}

body .schedule-page .day-tab.is-active.is-today .day-tab-badge {
    color: var(--schedule-today-dark);
    background: var(--yc-night-surface, #fff);
}

body .schedule-page .active-day,
body .schedule-page .active-day.is-today,
body .schedule-page .schedule-day-panel.is-today {
    border-color: rgba(var(--app-accent-rgb), 0.26);
    box-shadow: 0 16px 38px rgba(var(--app-accent-rgb), 0.14), 0 0 0 3px rgba(var(--app-accent-rgb), 0.08);
}

body .schedule-page .active-day .schedule-day-header,
body .schedule-page .active-day.is-today .schedule-day-header,
body .schedule-page .schedule-day-panel .schedule-day-header,
body .schedule-page .schedule-day-panel.is-today .schedule-day-header {
    color: #fff;
    background: var(--app-accent-gradient);
}

body .yc-btn--success,
body .yc-modal-btn--success,
body .modal-button.yc-modal-btn--success,
body .finance-form-actions .yc-btn--primary,
body .yc-page-header__actions .yc-btn--primary,
body .work-hero__actions .yc-btn--primary,
body .shopping-hero__actions .yc-btn--primary {
    color: #fff;
    border-color: transparent;
    background: linear-gradient(135deg, var(--yc-success-dark) 0%, var(--yc-success-light) 100%);
    box-shadow: 0 10px 22px rgba(var(--yc-success-rgb), 0.16);
}

body .yc-btn--success:hover,
body .yc-btn--success:focus-visible,
body .finance-form-actions .yc-btn--primary:hover,
body .finance-form-actions .yc-btn--primary:focus-visible,
body .yc-page-header__actions .yc-btn--primary:hover,
body .yc-page-header__actions .yc-btn--primary:focus-visible,
body .work-hero__actions .yc-btn--primary:hover,
body .work-hero__actions .yc-btn--primary:focus-visible,
body .shopping-hero__actions .yc-btn--primary:hover,
body .shopping-hero__actions .yc-btn--primary:focus-visible {
    background: linear-gradient(135deg, var(--yc-success-dark) 0%, var(--yc-success-light) 100%);
    box-shadow: 0 12px 24px rgba(var(--yc-success-rgb), 0.20);
}

body .yc-btn--icon.yc-btn--success,
body .app-icon-btn.app-icon-btn--success {
    color: var(--yc-success);
    border-color: var(--yc-night-button-success-border, #bbf7d0);
    background: var(--yc-night-surface, #fff);
}

body .yc-btn--icon.yc-btn--success:hover,
body .yc-btn--icon.yc-btn--success:focus-visible,
body .app-icon-btn.app-icon-btn--success:hover,
body .app-icon-btn.app-icon-btn--success:focus-visible {
    color: #fff;
    border-color: var(--yc-success-light);
    background: var(--yc-success-light);
}








/* Global viewport-safe entity context menu */
body > .yc-context-menu.yc-dropdown__menu--portal {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 2px;
    overflow-x: hidden;
    overflow-y: auto;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
    transform: translateY(-4px);
    padding: 8px;
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 8px;
    background: var(--yc-night-surface, #fff);
    box-shadow: 0 18px 44px rgba(15, 23, 42, 0.2), 0 3px 10px rgba(15, 23, 42, 0.08);
    color: var(--yc-night-text, #172033);
    transition: opacity 140ms ease, transform 140ms ease;
}

body > .yc-context-menu.yc-dropdown__menu--portal.yc-context-menu--open {
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
    body > .yc-context-menu.yc-dropdown__menu--portal {
        transition: none;
    }
}

body > .yc-context-menu .yc-dropdown__form {
    display: contents;
}

body > .yc-context-menu .yc-dropdown__item,
body > .yc-context-menu [role="menuitem"] {
    display: flex;
    width: 100%;
    min-width: 0;
    min-height: 38px;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    margin: 0;
    padding: 8px 10px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    box-shadow: none;
    color: var(--yc-night-muted, #334155);
    font: inherit;
    font-size: 14px;
    font-weight: 650;
    line-height: 1.25;
    text-align: left;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
}

body > .yc-context-menu .yc-dropdown__item:hover,
body > .yc-context-menu .yc-dropdown__item:focus-visible,
body > .yc-context-menu [role="menuitem"]:hover,
body > .yc-context-menu [role="menuitem"]:focus-visible {
    outline: none;
    background: var(--app-accent-soft, rgba(124, 58, 237, 0.09));
    color: var(--yc-night-accent, var(--app-accent-dark, #5b21b6));
}

body > .yc-context-menu .yc-dropdown__item svg,
body > .yc-context-menu [role="menuitem"] svg {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

body > .yc-context-menu .yc-context-menu__item--danger {
    color: var(--yc-night-error, #dc2626);
}

body > .yc-context-menu .yc-context-menu__item--danger:hover,
body > .yc-context-menu .yc-context-menu__item--danger:focus-visible {
    background: var(--yc-night-error-bg, #fef2f2);
    color: var(--yc-night-error, #b91c1c);
}

.schedule-page .yc-context-menu__item--success,
body > .yc-context-menu .yc-context-menu__item--success {
    color: var(--yc-success-dark);
}

.schedule-page .yc-context-menu__item--success svg,
.schedule-page .yc-context-menu__item--success svg *,
body > .yc-context-menu .yc-context-menu__item--success svg,
body > .yc-context-menu .yc-context-menu__item--success svg * {
    color: var(--yc-success-dark) !important;
    stroke: var(--yc-success-dark) !important;
}

.schedule-page .yc-context-menu__item--success span,
body > .yc-context-menu .yc-context-menu__item--success span {
    color: var(--yc-success-dark) !important;
}

.schedule-page .yc-context-menu__item--success:hover,
.schedule-page .yc-context-menu__item--success:focus-visible,
body > .yc-context-menu .yc-context-menu__item--success:hover,
body > .yc-context-menu .yc-context-menu__item--success:focus-visible {
    outline: none;
    color: var(--yc-success-dark);
    background: rgba(var(--yc-success-rgb), 0.10);
    box-shadow: inset 0 0 0 1px rgba(var(--yc-success-rgb), 0.22);
}

@media (max-width: 899px) {
    body > .yc-context-menu.yc-dropdown__menu--portal {
        max-width: calc(100vw - 24px) !important;
    }
}
/* Standalone notes */
.notes-page {
    display: grid;
    width: 100%;
    max-width: 100%;
    gap: 20px;
    min-width: 0;
}

.notes-header-action {
    gap: 8px;
}

.notes-header-action svg {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.notes-header-action__back-icon {
    transform: rotate(-90deg);
}

.notes-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
    gap: 16px;
    min-width: 0;
}

.notes-card {
    display: grid;
    min-width: 0;
    min-height: 168px;
    align-content: start;
    gap: 14px;
    padding: 18px;
    border: 1px solid var(--yc-night-border, #e2e8f0);
    border-radius: 8px;
    background: var(--yc-night-surface, #fff);
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.07);
    cursor: pointer;
}

.notes-card:hover,
.notes-card:focus-visible {
    outline: none;
    border-color: rgba(var(--app-accent-rgb), 0.35);
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.11);
}

.notes-card__header {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) auto;
    gap: 12px;
    align-items: start;
    min-width: 0;
}

.notes-card__icon,
.notes-empty > span {
    display: inline-flex;
    width: 42px;
    height: 42px;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    color: #fff;
    background: var(--app-accent-gradient);
}

.notes-card__icon svg,
.notes-empty > span svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
}

.notes-card__heading {
    min-width: 0;
}

.notes-card__heading h2 {
    margin: 0;
    font-size: 17px;
    line-height: 1.3;
    letter-spacing: 0;
}

.notes-card__heading a {
    color: var(--yc-night-text, #0f172a);
    text-decoration: none;
    overflow-wrap: anywhere;
}

.notes-card__heading time {
    display: block;
    margin-top: 4px;
    color: var(--yc-night-muted, #64748b);
    font-size: 12px;
}

.notes-card__preview {
    margin: 0;
    color: var(--yc-night-muted, #475569);
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.notes-card__preview p {
    margin: 0;
}

.notes-card__preview ul,
.notes-card__preview ol {
    margin: .2em 0 .35em;
    padding-left: 1.4em;
}

.notes-card__preview ul {
    list-style-type: disc;
}

.notes-card__preview ol {
    list-style-type: decimal;
}

.notes-card__preview li {
    display: list-item;
    margin: .08em 0;
}

.notes-card__preview strong,
.notes-card__preview b {
    font-weight: 700;
}

.notes-card__preview em,
.notes-card__preview i {
    font-style: italic;
}

.notes-card__preview a {
    color: var(--yc-night-accent, var(--app-accent-dark));
    text-decoration: underline;
}

.notes-empty {
    display: grid;
    justify-items: center;
    gap: 8px;
    padding: 40px 20px;
    text-align: center;
}

.notes-empty p {
    margin: 0;
    color: var(--yc-night-muted, #64748b);
}

.notes-editor-form {
    display: grid;
    width: 100%;
    max-width: 100%;
    gap: 18px;
    min-width: 0;
    padding: 20px;
}

.notes-editor-form .yc-field,
.notes-editor-form .yc-input,
.notes-editor-form .yc-textarea,
.notes-editor-form .tox-tinymce,
.notes-editor-form .tox-editor-container,
.notes-editor-form .tox-editor-header,
.notes-editor-form .tox-toolbar-overlord,
.notes-editor-form .tox-toolbar__primary,
.notes-editor-form .tox-edit-area,
.notes-editor-form .tox-edit-area__iframe {
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

.notes-editor-form .tox-toolbar__primary {
    overflow-x: auto;
    overscroll-behavior-inline: contain;
}

.notes-editor-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
}

@media (max-width: 699px) {
    .notes-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .notes-card {
        min-height: 0;
        padding: 14px;
    }

    .notes-card__header {
        grid-template-columns: 38px minmax(0, 1fr) auto;
        gap: 10px;
    }

    .notes-card__icon {
        width: 38px;
        height: 38px;
    }

    .notes-editor-form {
        gap: 14px;
        padding: 12px;
    }

    .notes-editor-actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .notes-editor-actions .yc-btn {
        width: 100%;
        min-width: 0;
        min-height: 44px;
        padding-inline: 10px;
    }

    .notes-editor-actions .yc-btn--danger {
        grid-column: 1 / -1;
    }
}

@media (max-width: 899px) {
    .notes-page .notes-header-action {
        width: 44px !important;
        min-width: 44px !important;
        max-width: 44px !important;
        height: 44px;
        padding: 0 !important;
    }

    .notes-page .notes-header-action span {
        display: none;
    }

    .notes-editor-page .yc-page-header__actions {
        max-width: 44px !important;
    }

    .notes-editor-form .tox.tox-tinymce {
        overflow: hidden;
    }
}

/* SCHEDULE TASK METADATA LAYOUT */
.schedule-page .schedule-row-main {
    gap: 7px;
}

.schedule-page .schedule-row-leading,
.schedule-page .schedule-status-icons {
    display: flex;
    flex: 0 0 auto;
    min-width: 0;
    align-items: center;
}

.schedule-page .schedule-row-leading {
    gap: 6px;
}

.schedule-page .schedule-status-icons {
    gap: 5px;
}

.schedule-page .schedule-status-icons:not(:has(> *)) {
    display: none;
}

.schedule-page .schedule-status-icons .schedule-task-icon,
.schedule-page .schedule-status-icons .schedule-calendar-link-icon,
.schedule-page .schedule-status-icons .shared-indicator--schedule {
    flex: 0 0 auto;
}

.schedule-page .schedule-status-icons .shared-indicator--schedule {
    margin-left: 0;
    z-index: 90;
}

.schedule-page .schedule-row-content {
    display: flex;
    flex: 1 1 auto;
    min-width: 0;
    align-items: center;
    gap: 8px;
}

.schedule-page .schedule-row-content .schedule-title {
    flex: 1 1 auto;
    min-width: 0;
}

.schedule-page .schedule-row-meta {
    display: flex;
    flex: 0 0 auto;
    min-width: 0;
    align-items: center;
}

.schedule-page .schedule-row-meta:not(:has(> :not(.is-hidden))) {
    display: none;
}

@media (max-width: 899px) {
    .schedule-page .schedule-row,
    .schedule-page .schedule-row[data-is-meeting="1"] {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-areas: "main actions";
        column-gap: 8px;
        row-gap: 0;
        align-items: center !important;
    }

    .schedule-page .schedule-row-main {
        grid-area: main;
        min-width: 0;
        overflow: hidden;
    }

    .schedule-page .schedule-row-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 2px;
    }

    .schedule-page .schedule-title {
        width: 100%;
        min-width: 0;
        max-width: 100%;
        -webkit-line-clamp: 2;
    }

    .schedule-page .schedule-row-meta {
        width: 100%;
        justify-content: flex-start;
    }

    .schedule-page .schedule-row-meta .schedule-meeting-time {
        grid-area: auto;
        width: max-content;
        min-width: 54px;
        max-width: 100%;
        margin: 0;
        padding: 4px 8px;
        justify-self: auto;
        align-self: center;
    }

    .schedule-page .schedule-actions {
        grid-area: actions;
        flex-shrink: 0;
        align-self: center !important;
        margin-left: 0;
    }
}
/* SCHEDULE SINGLE/TWO DAY VIEW */
.schedule-page .schedule-day-date-weather {
    display: flex;
    flex-direction: row;
    align-items: center;
    flex-shrink: 0;
    gap: 10px;
    min-width: 0;
    white-space: nowrap;
}

.schedule-page .schedule-day-header:has(.schedule-day-weather:not([hidden])) .schedule-day-title {
    flex-wrap: wrap;
    row-gap: 3px;
}

.schedule-page .schedule-day-weather {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 14px;
    white-space: nowrap;
}

.schedule-page .schedule-day-weather[hidden] { display: none; }
.schedule-page .schedule-day-weather svg { width: 18px; height: 18px; flex-shrink: 0; }

.schedule-page[data-schedule-module="schedule"] {
    width: 100%;
    min-width: 0;
    max-width: 100%;
}

.schedule-page .schedule-view-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.schedule-page .schedule-view-toggle .app-icon-btn {
    color: var(--app-accent, var(--yc-night-accent, var(--yc-primary)));
    background: var(--app-accent-soft, var(--yc-primary-soft));
}

.schedule-page .schedule-view-toggle .app-icon-btn.is-active {
    border-color: var(--app-accent, var(--yc-primary));
    color: #fff;
    background: var(--app-accent-gradient, var(--yc-primary-gradient));
    box-shadow: 0 8px 20px var(--app-accent-shadow, rgba(124, 58, 237, 0.2));
}

.schedule-page .day-tab.is-secondary-selected {
    border-color: var(--app-accent, var(--yc-primary));
    color: var(--app-accent-dark, var(--yc-night-accent, var(--yc-primary-dark)));
    background: var(--app-accent-soft, var(--yc-primary-soft));
    box-shadow: 0 0 0 2px var(--app-accent-soft, var(--yc-primary-soft));
}

.schedule-page .schedule-day-grid {
    display: grid;
    width: 100%;
    min-width: 0;
    gap: 18px;
}

.schedule-page .schedule-day-grid.is-two-day {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
}

.schedule-page .schedule-day-grid > .schedule-day {
    width: 100%;
    min-width: 0;
    max-width: 100%;
}

.schedule-page[data-schedule-view="two"] .schedule-row {
    min-height: 48px;
    padding: 8px 10px;
}

.schedule-page[data-schedule-view="two"] .schedule-title {
    font-size: 14px;
}

.schedule-page[data-schedule-view="two"] .schedule-sortable:not(:has(.schedule-row)) {
    min-height: 48px;
    border: 1px dashed rgba(148, 163, 184, 0.42);
    border-radius: 14px;
}

body.is-schedule-dragging .schedule-page[data-schedule-view="two"] .schedule-sortable:not(:has(.schedule-row))::after {
    content: "Pustit sem";
    display: grid;
    min-height: 46px;
    place-items: center;
    color: var(--app-accent-dark, var(--yc-night-accent, var(--yc-primary-dark)));
    background: var(--app-accent-soft, var(--yc-primary-soft));
    font-size: 12px;
    font-weight: 800;
}

@media (min-width: 701px) {
    .schedule-page[data-schedule-view="two"] .quick-add {
        grid-template-columns: minmax(0, 1fr) minmax(110px, 0.42fr) minmax(104px, auto);
    }

    .schedule-page[data-schedule-view="two"] .quick-add > input[name="title"],
    .schedule-page[data-schedule-view="two"] .quick-add .schedule-advanced-panel,
    .schedule-page[data-schedule-view="two"] .quick-add .schedule-form-error {
        grid-column: 1 / -1;
    }

    .schedule-page[data-schedule-view="two"] .quick-add .priority-picker {
        grid-column: 1 / 2;
    }

    .schedule-page[data-schedule-view="two"] .quick-add .schedule-advanced-toggle {
        grid-column: 2 / 3;
    }

    .schedule-page[data-schedule-view="two"] .quick-add > button[type="submit"] {
        grid-column: 3 / 4;
    }

    .schedule-page[data-schedule-view="two"] .quick-add .schedule-advanced-panel {
        grid-column: 1 / 4;
        grid-template-columns: minmax(0, 1fr);
    }

    .schedule-page[data-schedule-view="two"] .quick-add .schedule-advanced-primary {
        grid-template-columns: minmax(0, 1fr);
    }
}
@media (min-width: 900px) {
    .schedule-page[data-schedule-view="two"] .schedule-actions-desktop {
        display: none !important;
    }

    .schedule-page[data-schedule-view="two"] .schedule-actions {
        display: flex !important;
        align-items: center;
        justify-content: flex-end;
        overflow: visible;
    }

    .schedule-page[data-schedule-view="two"] .schedule-action-menu {
        position: relative;
        z-index: 30;
        display: inline-flex !important;
        width: 34px;
        min-width: 34px;
        height: 34px;
        overflow: visible;
    }

    .schedule-page[data-schedule-view="two"] .schedule-more-trigger {
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
    }

    .schedule-page[data-schedule-view="two"] .schedule-action-menu[open] {
        z-index: 7300;
    }

    .schedule-page[data-schedule-view="two"] .schedule-action-menu-panel {
        position: absolute;
        top: calc(100% + 8px);
        right: 0;
        left: auto;
        z-index: 7400;
        display: none !important;
        width: max-content;
        min-width: 168px;
        grid-template-columns: minmax(0, 1fr);
    }

    .schedule-page[data-schedule-view="two"] .schedule-action-menu[open] .schedule-action-menu-panel {
        display: grid !important;
    }
}

@media (max-width: 899.98px) {
    .schedule-page:not([data-schedule-module="schedule"]) .schedule-day-grid.is-two-day {
        grid-template-columns: minmax(0, 1fr);
        gap: 14px;
    }

    .schedule-page .schedule-view-toggle {
        display: none !important;
    }

    .schedule-page:not([data-schedule-module="schedule"])[data-schedule-view="two"] .schedule-day-grid > [data-schedule-day-panel]:nth-child(n + 2) {
        display: none !important;
    }
}

.schedule-page[data-schedule-module="schedule"] .schedule-day-grid.is-single-day {
    grid-template-columns: minmax(0, 1fr);
}

.schedule-page[data-schedule-module="schedule"] .schedule-day-grid > [data-schedule-day-panel][hidden] {
    display: none !important;
}

@media (max-width: 699.98px) {
    .schedule-page[data-schedule-module="schedule"] .schedule-day-grid.is-two-day {
        grid-template-columns: minmax(0, 1fr);
    }

    .schedule-page[data-schedule-module="schedule"] .schedule-day-grid > [data-schedule-day-panel]:nth-child(n + 2) {
        display: none !important;
    }
}

@media (min-width: 700px) and (max-width: 899.98px) {
    .schedule-page[data-schedule-module="schedule"][data-schedule-view="two"] .schedule-actions-desktop {
        display: none !important;
    }

    .schedule-page[data-schedule-module="schedule"][data-schedule-view="two"] .schedule-action-menu,
    .schedule-page[data-schedule-module="schedule"][data-schedule-view="two"] .schedule-more-trigger {
        display: inline-flex !important;
    }

}

/* Schedule separators are ordered rows, but intentionally not task cards. */
.schedule-page .schedule-separator-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    min-height: 38px;
    padding: 4px 2px 4px 10px;
    overflow: visible;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

.schedule-page .schedule-separator-row:hover {
    background: color-mix(in srgb, var(--app-accent, var(--yc-primary)) 4%, transparent);
}

.schedule-page .schedule-separator-main {
    display: grid;
    grid-template-columns: minmax(24px, 1fr) auto minmax(24px, 1fr);
    grid-column: 1;
    flex: 1 1 auto;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.schedule-page .schedule-separator-main.is-unnamed {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
}

.schedule-page .schedule-separator-main.is-unnamed .schedule-separator-line {
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(var(--app-accent-rgb), 0.55) 8%,
        rgba(var(--app-accent-rgb), 0.75) 50%,
        rgba(var(--app-accent-rgb), 0.55) 92%,
        transparent 100%
    );
}

.schedule-page .schedule-separator-line {
    display: block;
    height: 2px;
    min-width: 0;
    border-radius: 999px;
    background: linear-gradient(90deg, transparent, var(--app-accent, var(--yc-primary)));
    opacity: 0.72;
}

.schedule-page .schedule-separator-line:last-child {
    background: linear-gradient(90deg, var(--app-accent, var(--yc-primary)), transparent);
}

.schedule-page .schedule-separator-label {
    min-width: 0;
    max-width: min(360px, 32vw);
    overflow: hidden;
    color: var(--app-accent-dark, var(--yc-night-accent, var(--yc-primary-dark)));
    font-size: 11px;
    font-weight: 800;
    line-height: 1;
    text-overflow: ellipsis;
    text-transform: uppercase;
    white-space: nowrap;
}

.schedule-page .schedule-separator-actions {
    display: flex !important;
    flex: 0 0 auto;
    align-items: center;
    gap: 6px;
    margin-left: auto;
}

.schedule-page .schedule-separator-action-form,
.schedule-page .schedule-separator-menu-form {
    display: contents;
}

@media (min-width: 900px) {
    .schedule-page[data-schedule-view="two"] .schedule-separator-row .schedule-actions-desktop {
        display: contents !important;
    }

    .schedule-page[data-schedule-view="two"] .schedule-separator-row .schedule-action-menu,
    .schedule-page[data-schedule-view="two"] .schedule-separator-row .schedule-mobile-drag-handle {
        display: none !important;
    }

    .schedule-page[data-schedule-view="two"] .schedule-separator-actions {
        gap: 4px;
    }

    .schedule-page[data-schedule-view="two"] .schedule-separator-actions .app-icon-btn {
        width: 30px;
        min-width: 30px;
        height: 30px;
        min-height: 30px;
    }
}
.schedule-page .schedule-terminal-separator {
    cursor: default;
    opacity: 0.82;
}

.schedule-page .schedule-terminal-separator:hover {
    background: transparent;
}

.schedule-page .schedule-separator-row[data-can-edit="0"] [data-confirm-type="delete"] {
    display: flex;
}

.schedule-page .schedule-separator-row.is-dragging {
    padding: 6px 8px;
    background: var(--yc-night-surface, #fff);
    border: 1px solid color-mix(in srgb, var(--app-accent, var(--yc-primary)) 28%, var(--yc-night-border, #d8dde5));
    border-radius: 8px;
}

@media (max-width: 899px) {
    .schedule-page .schedule-separator-row {
        grid-template-columns: minmax(0, 1fr) auto !important;
        align-items: center !important;
        padding: 6px 4px 6px 8px;
        overflow: visible !important;
    }

    .schedule-page .schedule-separator-main {
        grid-column: 1 !important;
        grid-row: 1 !important;
    }

    .schedule-page .schedule-separator-actions {
        grid-column: 2 !important;
        grid-row: 1 !important;
        align-self: center !important;
    }
}

@media (max-width: 600px) {
    .schedule-page .schedule-separator-main {
        gap: 7px;
    }

    .schedule-page .schedule-separator-label {
        max-width: 42vw;
        font-size: 10px;
    }
}
@media (max-width: 899px) {
    body > .yc-context-menu.yc-dropdown__menu--portal .yc-context-menu__item--success,
    body > .yc-context-menu.yc-dropdown__menu--portal .yc-context-menu__item--success span,
    body > .yc-context-menu.yc-dropdown__menu--portal .yc-context-menu__item--success svg,
    body > .yc-context-menu.yc-dropdown__menu--portal .yc-context-menu__item--success svg * {
        color: var(--yc-success-dark) !important;
        stroke: var(--yc-success-dark) !important;
    }

    body > .yc-context-menu.yc-dropdown__menu--portal .yc-context-menu__item--success:hover,
    body > .yc-context-menu.yc-dropdown__menu--portal .yc-context-menu__item--success:focus-visible {
        background: rgba(var(--yc-success-rgb), 0.10) !important;
        box-shadow: inset 0 0 0 1px rgba(var(--yc-success-rgb), 0.22) !important;
    }

    body > .yc-context-menu.yc-dropdown__menu--portal .yc-context-menu__item--danger,
    body > .yc-context-menu.yc-dropdown__menu--portal .yc-context-menu__item--danger span,
    body > .yc-context-menu.yc-dropdown__menu--portal .yc-context-menu__item--danger svg,
    body > .yc-context-menu.yc-dropdown__menu--portal .yc-context-menu__item--danger svg * {
        color: var(--yc-night-error, #dc2626) !important;
        stroke: #dc2626 !important;
    }

    body > .yc-context-menu.yc-dropdown__menu--portal .yc-context-menu__item--danger:hover,
    body > .yc-context-menu.yc-dropdown__menu--portal .yc-context-menu__item--danger:focus-visible {
        background: var(--yc-night-error-bg, #fef2f2) !important;
        color: var(--yc-night-error, #b91c1c) !important;
    }
}
/* Persisted schedule separator labels may contain an owner-defined plain-text name. */
.schedule-page .schedule-separator-label {
    max-width: min(240px, 42vw);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (max-width: 600px) {
    .schedule-page .schedule-separator-label {
        max-width: min(160px, 36vw);
    }
}
.sidebar-logout-form {
    display: block;
    width: 100%;
    margin: 0;
    padding: 0;
}

.sidebar-logout-form .sidebar-link {
    appearance: none;
    -webkit-appearance: none;
    width: 100%;
    border: 0;
    background: transparent;
    box-shadow: none;
    color: rgba(255, 255, 255, 0.78);
    font: inherit;
    font-size: 14px;
    font-weight: 400;
    line-height: 20px;
    text-align: left;
    cursor: pointer;
}

body .sidebar-logout-form .sidebar-link:hover,
body .sidebar-logout-form .sidebar-link:focus-visible,
body .sidebar-logout-form .sidebar-link:active {
    color: #fff;
    background: rgba(239, 68, 68, 0.14);
    box-shadow: inset 0 0 0 1px rgba(254, 202, 202, 0.22);
    transform: none;
}

body .sidebar-logout-form .sidebar-link:focus-visible {
    outline: 2px solid rgba(254, 202, 202, 0.92);
    outline-offset: 2px;
}

body .sidebar-logout-form .sidebar-link:hover .sidebar-link-icon,
body .sidebar-logout-form .sidebar-link:focus-visible .sidebar-link-icon,
body .sidebar-logout-form .sidebar-link:active .sidebar-link-icon {
    color: #fff;
    background: rgba(239, 68, 68, 0.18);
}

@media (min-width: 900px) {
    html.is-sidebar-collapsed .sidebar-logout-form {
        width: 40px;
        margin-right: auto;
        margin-left: auto;
    }
}

@media (max-width: 899.98px) {
    .sidebar-logout-form .sidebar-link {
        min-height: 44px;
    }
}

/* Keep mobile page headers close to the fixed application topbar. */
@media (max-width: 899.98px) {
    .app-shell:not(.auth-shell) {
        padding-top: calc(var(--yc-mobile-topbar-height, 64px) + 12px) !important;
    }
}

/* Compact shared page header for the responsive application shell. */
@media (max-width: 899.98px) {
    .yc-page-header.yc-page-header {
        min-height: 62px;
        align-items: center;
        flex-direction: row;
        flex-wrap: nowrap;
        gap: 10px;
        margin-bottom: 2px;
        padding: 8px 12px;
        border-radius: 14px;
    }

    .yc-page-header.yc-page-header .yc-page-header__title {
        display: flex;
        flex: 1 1 auto;
        width: auto;
        min-width: 0;
        align-items: center;
        gap: 10px;
    }

    .yc-page-header.yc-page-header .yc-page-header__title > div {
        min-width: 0;
        overflow: hidden;
    }

    .yc-page-header.yc-page-header .yc-page-header__icon {
        width: 44px;
        height: 44px;
        flex: 0 0 44px;
        border-radius: 14px;
    }

    .yc-page-header.yc-page-header .yc-page-header__icon svg {
        width: 20px;
        height: 20px;
    }

    .yc-page-header.yc-page-header .yc-page-title {
        min-width: 0;
        overflow: hidden;
        font-size: 22px;
        line-height: 1.08;
        overflow-wrap: normal;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .yc-page-header.yc-page-header .yc-page-header__actions {
        display: flex;
        flex: 0 0 auto;
        width: auto;
        max-width: 48%;
        min-width: 0;
        align-items: center;
        justify-content: flex-end;
        flex-wrap: nowrap;
        gap: 8px;
        margin-left: auto;
        overflow: visible;
    }

    .yc-page-header.yc-page-header .yc-page-header__actions .yc-btn,
    .yc-page-header.yc-page-header .yc-page-header__actions .app-icon-btn {
        width: auto;
        min-width: 44px;
        max-width: none;
        height: 44px;
        min-height: 44px;
        padding-right: 12px;
        padding-left: 12px;
        white-space: nowrap;
    }

    .schedule-page .yc-page-header.yc-page-header {
        margin-bottom: 8px;
    }
}

/* Keep single-day desktop task actions in one consistently spaced control group. */
@media (min-width: 900px) {
    .schedule-page[data-schedule-view=single] .schedule-row:not(.schedule-separator-row) .schedule-actions-desktop {
        display: inline-flex;
        align-items: center;
        gap: 8px;
    }

    .schedule-page[data-schedule-view=single] .schedule-row:not(.schedule-separator-row) .schedule-actions-desktop > form {
        display: inline-flex;
        margin: 0;
    }

    .schedule-page[data-schedule-view=single] .schedule-row:not(.schedule-separator-row) .schedule-actions > .app-icon-btn,
    .schedule-page[data-schedule-view=single] .schedule-row:not(.schedule-separator-row) .schedule-actions > form > .app-icon-btn,
    .schedule-page[data-schedule-view=single] .schedule-row:not(.schedule-separator-row) .schedule-actions-desktop > .app-icon-btn,
    .schedule-page[data-schedule-view=single] .schedule-row:not(.schedule-separator-row) .schedule-actions-desktop > form > .app-icon-btn {
        width: 44px;
        min-width: 44px;
        height: 44px;
        min-height: 44px;
        flex: 0 0 44px;
        margin: 0;
    }
}

/* Company ARES preview, avatar editor and owner-scoped contacts. */
.settings-company-ares-control {
    display: flex;
    align-items: center;
    gap: 8px;
}

.settings-company-ares-control .yc-input {
    min-width: 0;
    flex: 1 1 auto;
}

.settings-company-ares-status {
    min-height: 20px;
    margin: 6px 0 0;
    color: var(--yc-night-muted, #64748b);
    font-size: 13px;
}

.settings-company-ares-status[data-state="error"] {
    color: var(--yc-night-error, #b91c1c);
}

.settings-company-ares-preview {
    display: grid;
    gap: 8px;
    margin: 0;
}

.settings-company-ares-preview__row {
    display: grid;
    grid-template-columns: minmax(120px, .55fr) minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    padding: 10px;
    border: 1px solid var(--yc-night-border, #e2e8f0);
    border-radius: 8px;
}

.settings-company-ares-preview__row > strong {
    color: var(--yc-night-muted, #475569);
    font-weight: 700;
}

.settings-company-ares-preview__row > span {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    min-width: 0;
}

.settings-company-ares-preview__row del,
.settings-company-ares-preview__row ins {
    min-width: 0;
    overflow-wrap: anywhere;
}

.settings-company-ares-preview__row ins {
    color: var(--yc-night-green, #166534);
    text-decoration: none;
    font-weight: 700;
}

.settings-company-ares-preview__row del {
    color: var(--yc-night-muted, #64748b);
}

.account-avatar-editor__dialog {
    width: min(760px, calc(100vw - 32px));
    max-height: calc(100vh - 32px);
    max-height: calc(100dvh - 32px);
    overflow-y: auto;
}

.account-avatar-editor__body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 210px;
    gap: 20px;
    align-items: start;
}

.account-avatar-editor__stage {
    position: relative;
    display: grid;
    place-items: center;
    min-width: 0;
    padding: 12px;
    background: #111827;
    border-radius: 8px;
    overflow: hidden;
    touch-action: none;
}

.account-avatar-editor__stage::after {
    position: absolute;
    inset: 12px;
    border: 2px solid rgba(255, 255, 255, .9);
    border-radius: 50%;
    box-shadow: 0 0 0 999px rgba(15, 23, 42, .42);
    content: "";
    pointer-events: none;
}

.account-avatar-editor__stage canvas {
    display: block;
    width: min(100%, 512px);
    height: auto;
    aspect-ratio: 1;
    cursor: grab;
}

.account-avatar-editor__stage.is-dragging canvas {
    cursor: grabbing;
}

body.is-account-avatar-editor-open {
    overflow: hidden;
}

.account-avatar-editor__controls {
    display: grid;
    gap: 14px;
}

.account-avatar-editor__zoom input {
    width: 100%;
    accent-color: var(--app-accent);
}

.account-avatar-editor__buttons {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
}

.account-avatar-editor__buttons .yc-btn {
    width: 100%;
    min-height: 44px;
}

.contacts-page {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

.contacts-page > .yc-page-header {
    margin-bottom: 0;
}

.contacts-page .yc-page-header__actions .yc-btn svg,
.contact-card__actions .yc-btn svg,
.contact-back-action svg {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
}

.contacts-search {
    display: flex;
    align-items: end;
    gap: 8px;
    margin: 0;
    padding: 12px;
    border: 1px solid rgba(148, 163, 184, .22);
    border-radius: 8px;
    background: var(--yc-night-surface, #fff);
    box-shadow: 0 8px 24px rgba(15, 23, 42, .05);
}

.contacts-search .yc-field {
    flex: 1 1 auto;
    min-width: 0;
}

.contacts-search__control {
    position: relative;
    display: block;
}

.contacts-search__control > svg {
    position: absolute;
    top: 50%;
    left: 14px;
    width: 18px;
    height: 18px;
    color: var(--yc-night-muted, #64748b);
    transform: translateY(-50%);
    pointer-events: none;
}

.contacts-search__control .yc-input {
    padding-left: 42px;
}

.contacts-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    align-items: start;
}

.contact-card {
    display: grid;
    gap: 12px;
    min-width: 0;
    padding: 14px;
    border: 1px solid var(--yc-night-border, #dbe3ee);
    border-radius: 8px;
    background: var(--yc-night-surface, #fff);
    box-shadow: 0 8px 22px rgba(15, 23, 42, .06);
}

.contact-card.is-favorite {
    border-color: rgba(var(--app-accent-rgb), .38);
}

.contact-card__main {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.contact-card__avatar {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    color: #fff;
    border-radius: 8px;
    background: var(--app-accent-gradient);
}

.contact-card__avatar svg,
.contact-card__links svg,
.contact-card__favorite svg,
.contacts-empty svg {
    width: 19px;
    height: 19px;
}

.contact-card__identity,
.contact-card__name-row,
.contact-card__links,
.contact-card__links a {
    min-width: 0;
}

.contact-card__name-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.contact-card h2,
.contact-card p {
    margin: 0;
}

.contact-card h2 {
    min-width: 0;
    font-size: 16px;
    overflow-wrap: anywhere;
}

.contact-card__company,
.contact-card__note {
    color: var(--yc-night-muted, #64748b);
    font-size: 13px;
}

.contact-card__favorite {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex: 0 0 auto;
    color: var(--yc-night-accent, var(--app-accent-dark));
    font-size: 11px;
    font-weight: 800;
}

.contact-card__favorite svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
}

.contact-card__links {
    display: grid;
    gap: 7px;
}

.contact-card__links a {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--yc-night-muted, #334155);
    text-decoration: none;
}

.contact-card__links a span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.contact-card__links a:hover,
.contact-card__links a:focus-visible {
    color: var(--yc-night-accent, var(--app-accent-dark));
}

.contact-card__note {
    padding-top: 10px;
    border-top: 1px solid var(--yc-night-border, #edf2f7);
    overflow-wrap: anywhere;
}

.contact-card__actions,
.contact-editor-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.contacts-empty {
    display: grid;
    justify-items: center;
    gap: 12px;
    padding: 36px 16px;
    color: var(--yc-night-muted, #475569);
    text-align: center;
    border: 1px dashed var(--yc-night-border, #cbd5e1);
    border-radius: 8px;
    background: var(--yc-night-surface, #fff);
}

.yc-empty-state__icon {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    color: #fff;
    border-radius: 8px;
    background: var(--app-accent-gradient);
}

.contact-editor-form {
    display: grid;
    gap: 18px;
}

.contact-editor-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.contact-editor-grid__wide {
    grid-column: 1 / -1;
}

.contact-editor-form .yc-switch-row {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    font-weight: 700;
    cursor: pointer;
}

.contact-editor-form .yc-switch-row input {
    width: 20px;
    height: 20px;
    accent-color: var(--app-accent);
}

.contact-editor-form .yc-switch {
    display: none;
}

.contact-back-action svg {
    transform: rotate(-90deg);
}

@media (max-width: 1100px) {
    .contacts-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 899px) {
    .account-avatar-editor__body {
        grid-template-columns: minmax(0, 1fr);
    }


    .contacts-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 560px) {
    .settings-company-ares-control,
    .contacts-search {
        align-items: stretch;
        flex-direction: column;
    }

    .settings-company-ares-preview__row {
        grid-template-columns: minmax(0, 1fr);
        gap: 5px;
    }

    .account-avatar-editor__dialog {
        width: calc(100vw - 20px);
    }

    .account-avatar-editor__body {
        grid-template-columns: minmax(0, 1fr);
    }


    .account-avatar-editor__buttons .yc-btn {
        min-width: 0;
        padding-right: 8px;
        padding-left: 8px;
    }

    .account-avatar-editor__buttons [data-avatar-editor-reset] {
        grid-column: auto;
    }

    .contact-editor-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .contact-editor-grid__wide {
        grid-column: auto;
    }

    .contact-card__actions .yc-btn {
        flex: 1 1 auto;
    }

    .contact-editor-actions {
        flex-wrap: wrap;
    }

    .contacts-search > .yc-btn {
        width: 100%;
    }

    .contact-editor-page .contact-back-action {
        width: 44px;
        min-width: 44px;
        padding: 0;
    }

    .contact-editor-page .contact-back-action span {
        display: none;
    }
}
/* Schedule Plus module chrome and immutable history only. */
.schedule-module-title {
    display: grid;
    min-width: 0;
    gap: 3px;
}

.schedule-page-title-row {
    display: flex;
    align-items: center;
    min-width: 0;
    gap: 9px;
}

.schedule-module-badge {
    flex: 0 0 auto;
    border: 1px solid rgba(var(--app-accent-rgb), .28);
    background: var(--app-accent-soft);
    color: var(--yc-night-accent, var(--app-accent-dark));
    font-size: 12px;
    font-weight: 800;
}

.schedule-history-link {
    flex: 0 0 auto;
}

.schedule-history-link--mobile {
    display: none;
}

.schedule-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

@media (max-width: 899.98px) {
    .schedule-page .schedule-history-link--mobile {
        display: inline-flex;
        min-height: 44px;
    }

    .schedule-page .schedule-history-link--mobile svg {
        width: 18px;
        height: 18px;
    }
}

.schedule-plus-history-page .schedule-history-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.schedule-plus-history-page .schedule-history-back svg {
    width: 17px;
    height: 17px;
    transform: rotate(-90deg);
}

.schedule-plus-history-page .day-tab {
    position: relative;
}

.schedule-plus-history-page .schedule-history-day-count {
    position: absolute;
    top: 6px;
    right: 7px;
    display: inline-grid;
    width: 21px;
    height: 21px;
    place-items: center;
    border: 1px solid rgba(var(--app-accent-rgb), .2);
    border-radius: 999px;
    color: var(--yc-night-accent, var(--app-accent-dark));
    background: rgba(var(--yc-night-surface-rgb, 255, 255, 255), .9);
    font-size: 10px;
    font-weight: 900;
    line-height: 1;
    box-shadow: 0 3px 10px rgba(15, 23, 42, .08);
}

.schedule-plus-history-page .day-tab.is-active .schedule-history-day-count,
.schedule-plus-history-page .day-tab.is-today .schedule-history-day-count {
    border-color: rgba(255, 255, 255, .45);
    color: var(--yc-night-muted, #334155);
    background: var(--yc-night-surface, #fff);
}

.schedule-plus-history-page .schedule-history-items {
    min-height: 88px;
}

.schedule-plus-history-page .schedule-history-empty {
    min-height: 58px;
    display: grid;
    place-items: center;
    margin: 0;
    border: 1px dashed rgba(148, 163, 184, .38);
    border-radius: 14px;
    background: rgba(var(--yc-night-soft-rgb, 248, 250, 252), .72);
    text-align: center;
}

.schedule-plus-history-page .schedule-history-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    min-height: 58px;
    align-items: center;
    gap: 12px;
    border: 1px solid rgba(148, 163, 184, .2);
    border-radius: 16px;
    padding: 10px 12px;
    background: var(--schedule-card);
    box-shadow: 0 8px 22px rgba(15, 23, 42, .045);
}

.schedule-plus-history-page .schedule-history-row[data-priority="high"] {
    border-color: rgba(248, 113, 113, .28);
    background: linear-gradient(180deg, rgba(var(--yc-night-error-bg-rgb, 254, 242, 242), .74), rgba(var(--yc-night-error-bg-rgb, 255, 247, 247), .7));
}

.schedule-plus-history-page .schedule-history-row__leading,
.schedule-plus-history-page .schedule-history-row__content,
.schedule-plus-history-page .schedule-history-row__meta,
.schedule-plus-history-page .schedule-history-completed {
    display: flex;
    min-width: 0;
    align-items: center;
}

.schedule-plus-history-page .schedule-history-row__leading {
    grid-row: 1;
    grid-column: 1;
    width: max-content;
    gap: 7px;
}

.schedule-plus-history-page .schedule-history-row__content {
    grid-row: 1;
    grid-column: 1;
    padding-left: 45px;
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
}

.schedule-plus-history-page .schedule-history-row__meta {
    flex-wrap: wrap;
    gap: 6px 10px;
    color: var(--yc-night-muted, #64748b);
    font-size: 12px;
    line-height: 1.35;
}

.schedule-plus-history-page .schedule-history-row__meta .schedule-meeting-time {
    min-width: auto;
    padding: 4px 8px;
    font-size: 11px;
}

.schedule-plus-history-page .schedule-history-state {
    border-radius: 999px;
    padding: 3px 8px;
    color: var(--yc-night-muted, #475569);
    background: var(--yc-night-soft, #f1f5f9);
    font-weight: 750;
}

.schedule-plus-history-page .schedule-history-completed {
    justify-content: center;
    gap: 6px;
    border: 1px solid rgba(22, 163, 74, .2);
    border-radius: 999px;
    padding: 7px 10px;
    color: var(--yc-night-green, #166534);
    background: var(--yc-night-green-bg, #f0fdf4);
    font-size: 12px;
    font-weight: 850;
    white-space: nowrap;
}

.schedule-plus-history-page .schedule-history-completed svg {
    width: 15px;
    height: 15px;
}

@media (max-width: 899px) {
    .schedule-plus-history-page .schedule-history-back {
        width: 44px;
        min-width: 44px;
        padding: 0;
        justify-content: center;
    }

    .schedule-plus-history-page .schedule-history-back span {
        display: none;
    }

    .schedule-plus-history-page .schedule-history-row {
        grid-template-columns: minmax(0, 1fr);
        gap: 8px;
    }

    .schedule-plus-history-page .schedule-history-completed {
        width: max-content;
        max-width: 100%;
        justify-self: start;
        margin-left: 45px;
    }
}

@media (max-width: 560px) {
    .schedule-plus-history-page .schedule-history-row__content {
        padding-left: 38px;
    }

    .schedule-plus-history-page .schedule-history-completed {
        margin-left: 38px;
    }

    .schedule-plus-history-page .schedule-history-row__meta {
        align-items: flex-start;
        flex-direction: column;
        gap: 5px;
    }
}

/* Harmonogram + partial completion */
.schedule-lineage-badge {
    display: inline-flex;
    align-items: center;
    min-width: 0;
    padding: 2px 7px;
    border: 1px solid rgba(var(--app-accent-rgb), .25);
    border-radius: 999px;
    background: var(--app-accent-soft);
    color: var(--yc-night-accent, var(--app-accent-dark));
    font-size: .72rem;
    font-weight: 700;
    line-height: 1.25;
    white-space: normal;
}

.schedule-partial {
    padding: 14px 12px;
    border-top: 1px solid rgba(var(--app-accent-rgb), .16);
    background: rgba(var(--app-accent-rgb), .035);
}

.schedule-partial > h3 {
    margin: 0 0 10px;
    font-size: .9rem;
}

.schedule-partial-list {
    display: grid;
    gap: 9px;
}

.schedule-partial-row {
    display: grid;
    grid-template-columns: 32px minmax(0, 1fr);
    gap: 10px;
    align-items: start;
    padding: 11px 12px;
    border: 1px solid rgba(var(--app-accent-rgb), .18);
    border-radius: 8px;
    background: var(--yc-night-surface, #fff);
}

.schedule-partial-row__icon {
    display: grid;
    place-items: center;
    min-height: 30px;
}

.schedule-partial-row__content,
.schedule-history-row--partial .schedule-history-row__content {
    display: grid;
    min-width: 0;
    gap: 6px;
    color: var(--yc-night-muted, #334155);
    font-size: .82rem;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.schedule-partial-row__heading {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 7px;
    color: var(--yc-night-text, #111827);
}

.schedule-partial-badge {
    display: inline-flex;
    width: fit-content;
    padding: 3px 8px;
    border: 1px solid rgba(217, 119, 6, .28);
    border-radius: 999px;
    background: var(--yc-night-warning-bg, #fff7ed);
    color: var(--yc-night-warning, #9a3412);
    font-size: .72rem;
    font-weight: 800;
}

.schedule-partial-row__meta,
.schedule-history-partial-state {
    color: var(--yc-night-muted, #64748b);
    font-weight: 700;
}

.schedule-partial-modal__dialog {
    width: min(760px, calc(100vw - 28px));
    max-height: calc(100dvh - 32px);
    overflow-y: auto;
}

.schedule-partial-summary {
    display: grid;
    gap: 3px;
    margin-bottom: 14px;
    padding: 10px 12px;
    border-radius: 7px;
    background: var(--app-accent-soft);
}

.schedule-partial-summary span {
    color: var(--yc-night-muted, #64748b);
    font-size: .8rem;
}

.schedule-partial-form {
    display: grid;
    gap: 13px;
}

.schedule-partial-form__row {
    display: grid;
    grid-template-columns: .75fr 1.2fr .8fr;
    gap: 10px;
}

.schedule-partial-form__error {
    margin: 0;
    color: var(--yc-night-error, #b91c1c);
    font-weight: 700;
}

.schedule-history-row--partial {
    align-items: start;
}

@media (max-width: 899px) {
    .schedule-partial {
        padding: 12px 10px;
    }

    .schedule-partial-row {
        grid-template-columns: 26px minmax(0, 1fr);
        padding: 10px;
    }

    .schedule-partial-form__row {
        grid-template-columns: minmax(0, 1fr);
    }

    .schedule-partial-modal__dialog {
        width: calc(100vw - 20px);
        max-height: calc(100dvh - 20px - env(safe-area-inset-top));
    }
}
/* Schedule Plus delegation and rollover */
.schedule-page[data-schedule-module="schedule_plus"] .schedule-delegation-section,
.schedule-page[data-schedule-module="schedule_plus"] .schedule-partial {
    margin-top: 12px;
    padding: 14px 12px 16px;
    border-top: 1px solid rgba(var(--app-accent-rgb), .16);
    background: rgba(var(--app-accent-rgb), .025);
}
.schedule-page[data-schedule-module="schedule_plus"] .schedule-delegation-section > h3,
.schedule-page[data-schedule-module="schedule_plus"] .schedule-partial > h3 {
    margin: 0 0 10px;
    font-size: .88rem;
}
.schedule-delegation-list { display: grid; gap: 10px; }
.schedule-delegation-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    min-width: 0;
    padding: 10px 12px;
    border: 1px solid rgba(var(--app-accent-rgb), .18);
    border-radius: 8px;
    background: var(--yc-night-surface, #fff);
}
.schedule-delegation-card__content,
.schedule-delegation-card__meta { display: grid; min-width: 0; gap: 4px; }
.schedule-delegation-card__content > strong { overflow-wrap: anywhere; }
.schedule-delegation-card__meta { color: var(--yc-text-muted, #64748b); font-size: .78rem; }
.schedule-delegation-card.is-completed {
    grid-template-columns: minmax(0, 1fr);
    border-color: rgba(22, 163, 74, .28);
    background: rgba(22, 163, 74, .04);
}
.schedule-delegation-card__actions { display: flex; align-items: center; gap: 8px; }
.schedule-delegation-card__actions form,
.schedule-watch-resolve-form { margin: 0; }
.schedule-delegation-badge,
.schedule-watch-badge {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    padding: 2px 7px;
    border-radius: 999px;
    font-size: .72rem;
    font-weight: 700;
}
.schedule-delegation-badge { color: var(--yc-night-accent, var(--app-accent-dark)); background: rgba(var(--app-accent-rgb), .1); }
.schedule-delegation-completed-badge {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    padding: 2px 7px;
    border-radius: 999px;
    color: var(--yc-night-green, #147a3b);
    background: var(--yc-night-green-bg, #e8f7ed);
    font-size: .72rem;
    font-weight: 700;
}
.schedule-watch-badge { color: var(--yc-night-warning, #8a4b00); background: var(--yc-night-warning-bg, #fff2d8); }
.schedule-delegation-warning { color: var(--yc-night-error, #b42318); font-weight: 700; }
.schedule-row--watch { border-color: #f0b44d; background: var(--yc-night-soft, #fffaf0); }
.schedule-row--watch .schedule-edit-trigger,
.schedule-row--watch .schedule-partial-trigger,
.schedule-row--watch .schedule-duplicate-form,
.schedule-row--watch .schedule-share-trigger,
.schedule-row--watch [data-confirm-trigger],
.schedule-row--watch .schedule-action-menu,
.schedule-row--watch .schedule-mobile-drag-handle { display: none !important; }
.schedule-delegation-type { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.schedule-delegation-type label { min-height: 44px; display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--yc-night-border, #d8dfeb); border-radius: 8px; }
.schedule-delegation-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.schedule-delegation-form { display: grid; gap: 12px; }
.schedule-delegation-modal__dialog { width: min(680px, calc(100vw - 24px)); max-height: min(88vh, 820px); overflow: auto; }
.schedule-delegation-empty {
    display: grid;
    gap: 4px;
    margin-top: 8px;
    padding: 11px 12px;
    border: 1px solid rgba(var(--app-accent-rgb), .2);
    border-radius: 8px;
    background: rgba(var(--app-accent-rgb), .06);
    color: var(--yc-text);
    font-size: 13px;
    line-height: 1.45;
}
.schedule-delegation-empty span { color: var(--yc-muted); }
.schedule-watch-resolve-form--mobile { display: none; }
.schedule-plus-history-page .schedule-history-audit {
    display: grid;
    gap: 10px;
    margin-top: 12px;
    padding: 14px 12px 16px;
    border-top: 1px solid rgba(var(--app-accent-rgb), .16);
    background: rgba(var(--app-accent-rgb), .025);
}
.schedule-plus-history-page .schedule-history-audit > h3 {
    margin: 0;
    font-size: .88rem;
}
.schedule-plus-history-page .schedule-history-audit__list {
    display: grid;
    gap: 10px;
    min-width: 0;
}
.schedule-plus-history-page .schedule-history-event-card {
    display: grid;
    gap: 8px;
    min-width: 0;
    padding: 12px;
    border: 1px solid rgba(var(--app-accent-rgb), .18);
    border-radius: 8px;
    background: var(--yc-night-surface, #fff);
    box-shadow: 0 4px 14px rgba(15, 23, 42, .04);
}
.schedule-plus-history-page .schedule-history-event-card__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    min-width: 0;
}
.schedule-plus-history-page .schedule-history-event-card__title {
    min-width: 0;
    overflow-wrap: anywhere;
}
.schedule-plus-history-page .schedule-history-event-badge {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    min-height: 24px;
    padding: 2px 8px;
    border-radius: 999px;
    color: var(--yc-night-accent, var(--app-accent-dark));
    background: rgba(var(--app-accent-rgb), .1);
    font-size: .72rem;
    font-weight: 700;
    line-height: 1.2;
}
.schedule-plus-history-page .schedule-history-event-badge--success {
    color: var(--yc-night-green, #147a3b);
    background: var(--yc-night-green-bg, #e8f7ed);
}
.schedule-plus-history-page .schedule-history-event-badge--danger {
    color: var(--yc-night-error, #b42318);
    background: var(--yc-night-soft, #fff0ef);
}
.schedule-plus-history-page .schedule-history-event-badge--warning {
    color: var(--yc-night-warning, #8a4b00);
    background: var(--yc-night-warning-bg, #fff2d8);
}
.schedule-plus-history-page .schedule-history-event-badge--info {
    color: var(--yc-night-blue, #145da0);
    background: var(--yc-night-soft, #eaf4ff);
}
.schedule-plus-history-page .schedule-history-event-card__summary,
.schedule-plus-history-page .schedule-history-event-card__note {
    margin: 0;
    overflow-wrap: anywhere;
    color: var(--yc-text);
    font-size: .84rem;
    line-height: 1.45;
}
.schedule-plus-history-page .schedule-history-event-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 5px 12px;
    color: var(--yc-text-muted, #64748b);
    font-size: .76rem;
}
.schedule-plus-history-page .schedule-history-event-card__meta > span + span::before {
    content: "·";
    margin-right: 12px;
}
.schedule-plus-history-page .schedule-history-event-card__note {
    padding-top: 7px;
    border-top: 1px solid rgba(148, 163, 184, .18);
    color: var(--yc-text-muted, #64748b);
}
@media (max-width: 899px) {
    .schedule-page[data-schedule-module="schedule_plus"] .schedule-delegation-section,
    .schedule-page[data-schedule-module="schedule_plus"] .schedule-partial,
    .schedule-plus-history-page .schedule-history-audit {
        padding: 12px 10px 14px;
    }
    .schedule-delegation-card { grid-template-columns: minmax(0, 1fr); }
    .schedule-delegation-card__actions { justify-content: flex-end; flex-wrap: wrap; }
    .schedule-delegation-grid { grid-template-columns: minmax(0, 1fr); }
    .schedule-row--watch .schedule-actions-desktop { display: flex; }
    .schedule-watch-resolve-form--mobile { display: flex; }
}
/* Work schedule */
.work-schedule-page { display: grid; gap: 18px; min-width: 0; }
.work-schedule-subtitle { margin: 4px 0 0; color: var(--yc-night-muted, #64748b); font-size: 14px; }
.work-schedule-toolbar { display: grid; gap: 16px; padding: 16px; border: 1px solid var(--yc-night-border, #dbe3ef); border-radius: 8px; background: var(--yc-night-surface, #fff); }
.work-schedule-period { display: grid; grid-template-columns: 44px minmax(170px, 1fr) 44px; align-items: center; gap: 10px; }
.work-schedule-period h2 { margin: 0; text-align: center; font-size: 20px; }
.work-schedule-period [aria-label^="Předchozí"] svg { transform: rotate(90deg); }
.work-schedule-period [aria-label^="Následující"] svg { transform: rotate(-90deg); }
.work-schedule-filters { min-width: 0; margin: 0; padding: 0; border: 0; }
.work-schedule-filters legend { margin-bottom: 8px; color: var(--yc-night-muted, #475569); font-size: 13px; font-weight: 800; }
.work-schedule-filter-list { display: flex; flex-wrap: wrap; gap: 8px; }
.work-schedule-filter { display: inline-flex; min-height: 40px; align-items: center; gap: 8px; padding: 8px 12px; border: 1px solid var(--yc-night-border, #dbe3ef); border-radius: 8px; background: var(--yc-night-surface, #fff); color: var(--yc-night-muted, #334155); cursor: pointer; font-size: 13px; font-weight: 700; }
.work-schedule-filter:has(input:focus-visible) { border-color: var(--app-accent); box-shadow: var(--yc-focus-ring); }
.work-schedule-filter.is-inactive { opacity: .7; }
.work-schedule-filter input { width: 16px; height: 16px; margin: 0; accent-color: var(--app-accent); }
.work-schedule-filter__swatch { width: 16px; height: 16px; flex: 0 0 16px; border: 1px solid rgba(15, 23, 42, .16); border-radius: 50%; background: var(--work-resource-color); }
.work-schedule-filter-reset { min-height: 40px; padding: 0 10px; border: 0; background: transparent; color: var(--yc-night-accent, var(--app-accent)); cursor: pointer; font: inherit; font-size: 13px; font-weight: 800; }
.work-schedule-filter-reset:focus-visible { border-radius: 6px; outline: 2px solid var(--app-accent); outline-offset: 2px; }
.work-schedule-calendar { width: 100%; min-width: 0; overflow: hidden; border: 1px solid var(--yc-night-border, #dbe3ef); border-radius: 8px; background: var(--yc-night-surface, #fff); }
.work-schedule-weekdays { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-bottom: 1px solid var(--yc-night-border, #dbe3ef); background: var(--yc-night-surface, #f8fafc); }
.work-schedule-weekdays span { padding: 10px 6px; color: var(--yc-night-muted, #64748b); text-align: center; font-size: 12px; font-weight: 800; }
.work-schedule-week { position: relative; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); grid-template-rows: 40px repeat(var(--work-schedule-lanes), 30px); min-height: calc(40px + var(--work-schedule-lanes) * 30px); border-bottom: 1px solid var(--yc-night-border, #dbe3ef); }
.work-schedule-week:last-child { border-bottom: 0; }
.work-schedule-day { position: relative; display: flex; min-width: 0; align-items: flex-start; justify-content: flex-start; padding: 8px; border: 0; border-right: 1px solid var(--yc-night-border, #e5eaf2); background: transparent; color: var(--yc-night-muted, #334155); cursor: pointer; font: inherit; text-align: left; }
.work-schedule-day:nth-of-type(7) { border-right: 0; }
.work-schedule-day.is-weekend { background: var(--yc-night-surface, #f8fafc); }
.work-schedule-day.is-outside { color: #94a3b8; background: var(--yc-night-surface, #fbfcfe); }
.work-schedule-day.is-today { background: rgba(22, 163, 74, .08); box-shadow: inset 0 0 0 2px rgba(22, 163, 74, .42); color: var(--yc-night-green, #166534); }
.work-schedule-day:not(:disabled):hover { background: var(--app-accent-soft); }
.work-schedule-day:focus-visible { outline: 0; }
.work-schedule-day:focus-visible .work-schedule-day-number { outline: 2px solid var(--app-accent); outline-offset: 2px; }
.work-schedule-day-number { position: relative; z-index: 4; display: inline-flex; min-width: 24px; min-height: 24px; align-items: center; justify-content: center; border-radius: 6px; background: rgba(var(--yc-night-surface-rgb, 255, 255, 255), .9); box-shadow: 0 1px 3px rgba(15, 23, 42, .08); font-size: 13px; font-weight: 800; }
.work-schedule-day.is-today .work-schedule-day-number { background: #16a34a; color: #fff; }
.work-schedule-bar { z-index: 2; display: flex; min-width: 0; height: 26px; align-items: center; margin: 2px 2px; padding: 0 8px; overflow: hidden; border: 0; border-radius: 0; background: var(--work-resource-color); box-shadow: 0 2px 6px rgba(15, 23, 42, .14); color: var(--work-resource-text); cursor: pointer; font: inherit; font-size: 11px; font-weight: 800; text-align: left; }
.work-schedule-bar.is-filtered-out { display: none; }
.work-schedule-bar.starts-here { margin-left: 3px; border-radius: 7px 0 0 7px; }
.work-schedule-bar.ends-here { margin-right: 3px; border-radius: 0 7px 7px 0; }
.work-schedule-bar.starts-here.ends-here { border-radius: 7px; }
.work-schedule-bar > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.work-schedule-bar:hover { filter: brightness(.96); }
.work-schedule-bar:focus-visible { outline: 3px solid #fff; outline-offset: -4px; box-shadow: 0 0 0 3px var(--app-accent), 0 3px 8px rgba(15, 23, 42, .2); }
.work-schedule-calendar-empty { margin: 0; padding: 14px; color: var(--yc-night-muted, #64748b); text-align: center; font-size: 13px; }
.work-schedule-empty { min-height: 240px; }
.work-schedule-modal-backdrop[hidden] { display: none; }
.work-schedule-modal-backdrop { position: fixed; z-index: var(--yc-z-modal); inset: 0; display: grid; overflow-y: auto; place-items: center; padding: 24px; background: rgba(15, 23, 42, .52); }
.work-schedule-modal { width: min(640px, 100%); }
.work-schedule-modal .yc-modal__header, .work-schedule-resources-modal .yc-modal__header { grid-template-columns: minmax(0, 1fr) 44px; align-items: center; }
.work-schedule-modal .yc-modal__header .app-icon-btn, .work-schedule-resources-modal .yc-modal__header .app-icon-btn { grid-column: 2; grid-row: 1; }
.work-schedule-resources-modal { width: min(1120px, 100%); max-height: min(880px, calc(100dvh - 48px)); overflow: hidden; }
.work-schedule-form { display: grid; gap: 14px; }
.work-schedule-date-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.work-schedule-duration { margin: -4px 0 0; color: var(--yc-night-muted, #475569); font-size: 13px; font-weight: 700; }
.work-schedule-duration.is-error { color: var(--yc-night-error, #b91c1c); }
.work-resource-manager { display: grid; max-height: calc(100dvh - 140px); gap: 16px; overflow-y: auto; padding: 2px; }
.work-resource-panel { padding: 16px; border: 1px solid var(--yc-night-border, #dbe3ef); border-radius: 8px; background: var(--yc-night-surface, #f8fafc); }
.work-resource-panel__header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.work-resource-panel__header h3 { margin: 0; color: var(--yc-night-text, #0f172a); font-size: 17px; }
.work-resource-panel__header p { margin: 4px 0 0; color: var(--yc-night-muted, #64748b); font-size: 13px; }
.work-resource-count { display: inline-flex; min-width: 28px; min-height: 28px; align-items: center; justify-content: center; border-radius: 50%; background: var(--app-accent-soft); color: var(--yc-night-accent, var(--app-accent-dark)); font-size: 12px; font-weight: 800; }
.work-resource-create { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); align-items: end; gap: 12px; }
.work-resource-create > .yc-field { grid-column: span 4; }
.work-resource-create .work-resource-colors { grid-column: 1 / span 9; }
.work-resource-create > .yc-btn { grid-column: span 3; }
.work-resource-list { display: grid; gap: 12px; margin: 0 0 14px; }
.work-resource-row { display: grid; grid-template-columns: 44px repeat(3, minmax(0, 1fr)); align-items: end; gap: 12px; padding: 14px; border: 1px solid var(--yc-night-border, #dbe3ef); border-radius: 8px; background: var(--yc-night-surface, #fff); }
.work-resource-row.is-inactive { border-style: dashed; background: var(--yc-night-soft, #f1f5f9); }
.work-resource-card__heading { display: flex; min-width: 0; align-items: center; gap: 10px; grid-column: 2 / -1; }
.work-resource-card__heading strong { min-width: 0; overflow: hidden; color: var(--yc-night-text, #0f172a); text-overflow: ellipsis; white-space: nowrap; }
.work-resource-status { padding: 3px 8px; border-radius: 999px; background: var(--yc-night-soft, #e2e8f0); color: var(--yc-night-muted, #475569); font-size: 11px; font-weight: 800; }
.work-resource-order { display: grid; align-self: stretch; gap: 8px; grid-column: 1; grid-row: 1 / span 3; }
.work-resource-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; grid-column: 4; }
.work-resource-colors { display: flex; min-width: 0; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; border: 0; }
.work-resource-colors legend { width: 100%; margin-bottom: 5px; color: var(--yc-night-muted, #475569); font-size: 13px; font-weight: 800; }
.work-resource-row .work-resource-colors { grid-column: 2 / span 2; }
.work-resource-colors label { position: relative; display: grid; width: 38px; height: 38px; border: 2px solid transparent; border-radius: 8px; cursor: pointer; place-items: center; }
.work-resource-colors input { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.work-resource-colors label > span { width: 22px; height: 22px; border: 1px solid rgba(15, 23, 42, .16); border-radius: 50%; background: var(--work-resource-color); }
.work-resource-colors label:has(input:checked) { border-color: var(--app-accent); background: var(--app-accent-soft); }
.work-resource-colors label:has(input:focus-visible) { box-shadow: var(--yc-focus-ring); }
[data-work-resource-reorder-form] { display: flex; justify-content: flex-end; }
body.is-work-schedule-modal-open { overflow: hidden; }

@media (min-width: 900px) {
    .work-schedule-page { display: flex; min-height: calc(100dvh - 88px); flex-direction: column; }
    .work-schedule-calendar { display: flex; min-height: 0; flex: 1 0 auto; flex-direction: column; }
    .work-schedule-weekdays { flex: 0 0 auto; }
    .work-schedule-week { flex: 1 0 calc(40px + var(--work-schedule-lanes) * 30px); }
}

@media (max-width: 899px) {
    .work-schedule-page { gap: 12px; }
    .work-schedule-page .yc-page-header__actions { display: grid; width: 100%; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .work-schedule-period { grid-template-columns: 44px minmax(0, 1fr) 44px; gap: 6px; }
    .work-schedule-period h2 { font-size: 14px; line-height: 1.25; }
    .work-schedule-toolbar { padding: 12px; }
    .work-schedule-filter-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .work-schedule-filter, .work-schedule-filter-reset { width: 100%; }
    .work-schedule-weekdays span { padding: 8px 2px; font-size: 10px; }
    .work-schedule-week { grid-template-rows: 30px repeat(var(--work-schedule-lanes), 28px); min-height: calc(30px + var(--work-schedule-lanes) * 28px); }
    .work-schedule-day { padding: 4px 2px; }
    .work-schedule-day-number { min-width: 21px; min-height: 21px; font-size: 10px; }
    .work-schedule-bar { height: 25px; margin-top: 1px; padding: 0 4px; font-size: 9px; line-height: 1.15; }
    .work-schedule-modal-backdrop { align-items: end; padding: max(12px, env(safe-area-inset-top)) 0 0; }
    .work-schedule-modal, .work-schedule-resources-modal { width: 100%; max-height: calc(100dvh - max(12px, env(safe-area-inset-top))); border-radius: 8px 8px 0 0; }
    .work-resource-manager { max-height: calc(100dvh - 112px); }
    .work-schedule-date-grid, .work-resource-create, .work-resource-row { grid-template-columns: 1fr; }
    .work-resource-create > .yc-field, .work-resource-create .work-resource-colors, .work-resource-create > .yc-btn { grid-column: 1; }
    .work-resource-row { align-items: stretch; }
    .work-resource-card__heading, .work-resource-row .work-resource-colors, .work-resource-actions { grid-column: 1; }
    .work-resource-order { display: flex; justify-content: flex-end; grid-column: 1; grid-row: auto; }
    .work-resource-actions { justify-content: stretch; }
    .work-resource-actions .yc-btn { flex: 1 1 0; }
    [data-work-resource-reorder-form] .yc-btn { width: 100%; }
}
.work-schedule-page .yc-btn svg {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}
@media (max-width: 899px) {
    .work-schedule-page .yc-page-header {
        min-width: 0;
        flex-wrap: wrap;
    }
    .work-schedule-page .yc-page-header__title {
        width: 100%;
        flex: 1 1 100%;
    }
    .work-schedule-page .yc-page-header__actions {
        display: grid;
        width: 100%;
        max-width: none;
        flex: 1 1 100%;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        overflow: visible;
    }
    .work-schedule-page .yc-page-header__actions .yc-btn {
        width: 100%;
        min-width: 0;
    }
    .work-schedule-toolbar,
    .work-schedule-period,
    .work-schedule-calendar {
        width: 100%;
        min-width: 0;
        max-width: 100%;
    }
}
@media (max-width: 899px) {
    .work-schedule-page .yc-page-header.yc-page-header {
        flex-wrap: wrap;
    }
    .work-schedule-page .yc-page-header.yc-page-header .yc-page-header__title {
        width: 100%;
        flex: 1 1 100%;
    }
    .work-schedule-page .yc-page-header.yc-page-header .yc-page-header__actions {
        display: grid;
        width: 100%;
        max-width: none;
        flex: 1 1 100%;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        margin-left: 0;
    }
    .work-schedule-page .yc-page-header.yc-page-header .yc-page-header__actions .yc-btn {
        width: 100%;
        min-width: 0;
    }
}
@media (max-width: 899px) {
    .work-schedule-page .work-resource-actions .yc-btn {
        min-width: 0;
        padding-right: 10px;
        padding-left: 10px;
    }
}

/* Admin permissions are a compact, owner-safe projection of user_section_permissions. */
.settings-permissions-section .work-form-section {
    display: grid;
    gap: 14px;
}

.settings-permissions-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.settings-permission-row {
    display: flex;
    min-width: 0;
    min-height: 74px;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 12px 14px;
    border: 1px solid rgba(var(--app-accent-rgb), .16);
    border-radius: 8px;
    background: var(--yc-night-surface, #fff);
}

.settings-permission-row__identity {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 10px;
}

.settings-permission-row__identity {
    flex: 1 1 auto;
}

.settings-permission-row__icon {
    display: inline-grid;
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    place-items: center;
    border-radius: 8px;
    color: var(--yc-night-accent, var(--app-accent-dark));
    background: rgba(var(--app-accent-rgb), .12);
}

.settings-permission-row__icon svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.settings-permission-row__label {
    min-width: 0;
    color: var(--yc-night-text, #172033);
    font-weight: 800;
    overflow-wrap: anywhere;
}

.settings-permission-row__required {
    flex: 0 0 auto;
    padding: 3px 7px;
    border-radius: 999px;
    color: var(--yc-night-green, #365314);
    background: #ecfccb;
    font-size: 11px;
    font-weight: 800;
}

.settings-permission-row__toggle {
    width: 44px;
    min-width: 44px;
    min-height: 44px;
    flex: 0 0 auto;
    justify-content: flex-end;
    margin-left: auto;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
}

.settings-permission-row__toggle:hover,
.settings-permission-row__toggle:focus-within {
    border: 0;
    background: transparent;
}

.settings-permission-row__toggle:focus-within {
    box-shadow: var(--yc-focus-ring);
}

.settings-permission-row__toggle input[type="checkbox"]:checked {
    border-color: var(--yc-switch-active-border, rgba(var(--app-accent-rgb), .68));
    background: var(--yc-switch-active, var(--app-accent-gradient));
}

.settings-permission-row__toggle input[type="checkbox"]:disabled {
    cursor: not-allowed;
}

.settings-permission-row__toggle input[type="checkbox"]:checked:disabled {
    opacity: .72;
}

@media (max-width: 900px) {
    .settings-permissions-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .settings-permission-row {
        grid-column: auto;
        flex-wrap: nowrap;
        min-height: 0;
    }

    .settings-permission-row__toggle {
        margin-left: auto;
    }

}

/* Schedule presentation: existing actions and responsive behavior stay intact. */
body .schedule-page[data-schedule-module="schedule"] .schedule-day.active-day {
    border: 1px solid var(--yc-night-border, #e2e6ee);
    border-radius: 18px;
    background: var(--yc-night-surface, #fff);
    box-shadow: 0 5px 18px rgba(25, 32, 49, .045);
}

body .schedule-page[data-schedule-module="schedule"] .schedule-day.active-day .schedule-day-header {
    min-height: 84px;
    padding: 16px 18px;
    gap: 12px;
    background: linear-gradient(115deg, var(--app-accent-dark), var(--app-accent));
    border: 0;
    border-radius: 17px 17px 0 0;
}

body .schedule-page[data-schedule-module="schedule"] .schedule-day.active-day .schedule-day-header:is([data-weather-condition="clear"], [data-weather-condition="partly-cloudy"], [data-weather-condition="cloudy"], [data-weather-condition="fog"], [data-weather-condition="drizzle"], [data-weather-condition="rain"], [data-weather-condition="showers"], [data-weather-condition="freezing-rain"], [data-weather-condition="snow"], [data-weather-condition="storm"]) {
    background-image: linear-gradient(100deg, rgba(45, 19, 88, .64), rgba(22, 25, 52, .62)),
        var(--schedule-weather-image), var(--app-accent-gradient);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.schedule-page[data-schedule-module="schedule"] [data-weather-condition="clear"] { --schedule-weather-image: url("/assets/images/weather-bg/slunecno.jpg"); }
.schedule-page[data-schedule-module="schedule"] [data-weather-condition="partly-cloudy"] { --schedule-weather-image: url("/assets/images/weather-bg/polojasno.jpg"); }
.schedule-page[data-schedule-module="schedule"] [data-weather-condition="cloudy"],
.schedule-page[data-schedule-module="schedule"] [data-weather-condition="fog"] { --schedule-weather-image: url("/assets/images/weather-bg/zatazeno.jpg"); }
.schedule-page[data-schedule-module="schedule"] [data-weather-condition="rain"],
.schedule-page[data-schedule-module="schedule"] [data-weather-condition="drizzle"],
.schedule-page[data-schedule-module="schedule"] [data-weather-condition="showers"],
.schedule-page[data-schedule-module="schedule"] [data-weather-condition="freezing-rain"] { --schedule-weather-image: url("/assets/images/weather-bg/dest.jpg"); }
.schedule-page[data-schedule-module="schedule"] [data-weather-condition="snow"] { --schedule-weather-image: url("/assets/images/weather-bg/snih.jpg"); }
.schedule-page[data-schedule-module="schedule"] [data-weather-condition="storm"] { --schedule-weather-image: url("/assets/images/weather-bg/bourka.jpg"); }

.schedule-page[data-schedule-module="schedule"] .schedule-day-title {
    flex-wrap: wrap;
    gap: 4px 7px;
}

.schedule-page[data-schedule-module="schedule"] .schedule-day-title > [data-day-name] {
    font-size: 22px;
    font-weight: 750;
    line-height: 1.2;
    color: #fff;
}

.schedule-page[data-schedule-module="schedule"] .schedule-day-progress {
    font-size: 12px;
    font-weight: 600;
}

.schedule-page[data-schedule-module="schedule"] .schedule-day-date-weather { gap: 10px; }
.schedule-page[data-schedule-module="schedule"] .schedule-today-badge { margin-left: 0; }

body .schedule-page[data-schedule-module="schedule"] .day-tab,
body .schedule-page[data-schedule-module="schedule"] .day-tab.is-active {
    border-radius: 12px;
    box-shadow: 0 2px 7px rgba(25, 32, 49, .04);
    transform: none;
}

body .schedule-page[data-schedule-module="schedule"] {
    --schedule-selection-ink: var(--yc-night-accent, var(--app-accent-dark));
    --schedule-selection-fill: color-mix(in srgb, var(--app-accent-dark) 72%, var(--app-accent));
}

body .schedule-page[data-schedule-module="schedule"] .day-tab.is-secondary-selected:not(.is-today, .is-active, .is-day-drop-target, .is-day-drop-success) {
    border-color: var(--yc-night-accent, var(--app-accent));
    color: var(--schedule-selection-ink);
    background: var(--yc-night-accent-bg, color-mix(in srgb, var(--app-accent) 12%, var(--yc-surface)));
    box-shadow: inset 0 0 0 1px rgba(var(--app-accent-rgb), .15);
}

body .schedule-page[data-schedule-module="schedule"] .day-tab.is-secondary-selected:not(.is-today, .is-active, .is-day-drop-target, .is-day-drop-success) .day-tab-date {
    color: inherit;
}

body .schedule-page[data-schedule-module="schedule"] .day-tab.is-active:not(.is-today, .is-day-drop-target, .is-day-drop-success),
body .schedule-page[data-schedule-module="schedule"] .schedule-view-toggle .app-icon-btn.is-active {
    color: #fff;
    background: var(--schedule-selection-fill);
}

body .schedule-page[data-schedule-module="schedule"] .day-tab.is-today:not(.is-day-drop-target, .is-day-drop-success) {
    background: var(--schedule-today-dark);
}

body .schedule-page[data-schedule-module="schedule"] .day-tab:is(.is-today, .is-active):not(.is-day-drop-target, .is-day-drop-success) .day-tab-date {
    color: inherit;
}

body .schedule-page[data-schedule-module="schedule"] .schedule-view-toggle .app-icon-btn:not(.is-active) {
    color: var(--schedule-selection-ink);
    background: var(--yc-night-accent-bg, color-mix(in srgb, var(--app-accent) 8%, var(--yc-surface)));
}

.schedule-page[data-schedule-module="schedule"] .day-switcher {
    scrollbar-width: thin;
    scrollbar-color: rgba(var(--app-accent-rgb), .28) transparent;
    gap: 8px;
}

.schedule-page[data-schedule-module="schedule"] .quick-add {
    padding: 14px;
    gap: 8px;
    background: light-dark(#e2e6ed, #0c111b);
    border-bottom: 1px solid var(--yc-night-border, #edf0f5);
}

.schedule-page[data-schedule-module="schedule"] .quick-add > input[name="title"],
.schedule-page[data-schedule-module="schedule"] .quick-add > button,
.schedule-page[data-schedule-module="schedule"] .quick-add .priority-picker-trigger {
    min-height: 44px;
    height: 44px;
    border-radius: 9px;
    box-shadow: none;
    font-size: 14px;
}

.schedule-page[data-schedule-module="schedule"] .quick-add > button[type="submit"] {
    box-shadow: 0 3px 8px rgba(var(--yc-success-rgb), .1);
}

/* Size quick-add controls against their own day, including the desktop sidebar. */
.schedule-page[data-schedule-module="schedule"] .quick-add {
    container: schedule-quick / inline-size;
    grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
}

.schedule-page[data-schedule-module="schedule"] .quick-add > input[name="title"] {
    order: 1;
    grid-column: 1 / -1 !important;
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

.schedule-page[data-schedule-module="schedule"] .quick-add > input[name="title"]::placeholder {
    font-size: 14px;
}

@media (max-width: 899px) and (any-pointer: coarse) {
    .schedule-page[data-schedule-module="schedule"] {
        padding-block-end: var(--schedule-keyboard-runway, 0px);
    }
    .schedule-days-sticky.is-quick-keyboard-obscuring { visibility: hidden; }

    @supports (-webkit-touch-callout: none) {
        .yc-input:not([type="checkbox"], [type="radio"], [type="color"], [type="range"]),
        .yc-select,
        .yc-textarea,
        .schedule-page[data-schedule-module="schedule"] .quick-add > input[name="title"] {
            font-size: 16px; /* Prevent WebKit from zooming the form when the keyboard opens. */
        }
    }
}

.schedule-page[data-schedule-module="schedule"] .quick-add .priority-picker {
    order: 2;
    grid-column: 1 / span 3 !important;
    min-width: 0;
    width: 100%;
}

.schedule-page[data-schedule-module="schedule"] .quick-add .schedule-advanced-toggle {
    order: 3;
    grid-column: 4 / span 3 !important;
}

.schedule-page[data-schedule-module="schedule"] .quick-add :is(.priority-picker-trigger, .schedule-advanced-toggle) {
    width: 100%;
    min-width: 0;
    min-height: 44px;
    padding-inline: 10px;
}

.schedule-page[data-schedule-module="schedule"] .quick-add > button[type="submit"] {
    order: 4;
    grid-column: 1 / -1 !important;
    width: 100%;
    min-width: 0;
}

.schedule-page[data-schedule-module="schedule"] .quick-add .schedule-advanced-panel {
    order: 5;
    grid-column: 1 / -1 !important;
}

@container schedule-quick (min-width: 400px) {
    .schedule-page[data-schedule-module="schedule"] .quick-add .priority-picker { grid-column: 1 / span 2 !important; }
    .schedule-page[data-schedule-module="schedule"] .quick-add .schedule-advanced-toggle { grid-column: 3 / span 2 !important; }
    .schedule-page[data-schedule-module="schedule"] .quick-add > button[type="submit"] { grid-column: 5 / span 2 !important; }
}

.schedule-page[data-schedule-module="schedule"] .schedule-items {
    padding: 12px 14px;
    background: var(--yc-night-surface, #fff);
}

.schedule-page[data-schedule-module="schedule"] .schedule-sortable { gap: 8px; }
@media (max-width: 899.98px) {
    .schedule-row-main:has(> .schedule-row-open-event) { position: relative; }
    .schedule-row-open-event { position: absolute; inset: 0; }
    .schedule-row-open-event:focus-visible { outline-offset: -2px; }
}

@media (min-width: 900px) {
    .schedule-row-open-event { display: none; }
}

.schedule-page[data-schedule-module="schedule"] .schedule-row:not(.schedule-separator-row) {
    min-height: 52px;
    padding: 9px 10px;
    border: 1px solid var(--yc-night-border, #e5e9f0);
    border-radius: 11px;
    background: var(--yc-night-surface, #fff);
    box-shadow: 0 1px 3px rgba(25, 32, 49, .025);
    gap: 10px;
}

.schedule-page[data-schedule-module="schedule"] .schedule-row:not(.schedule-separator-row):hover {
    border-color: rgba(var(--app-accent-rgb), .28);
    box-shadow: 0 3px 10px rgba(25, 32, 49, .04);
}

.schedule-page[data-schedule-module="schedule"] .schedule-row[data-priority="high"]:not(.schedule-separator-row) {
    border-left: 3px solid #ef7575;
    background: var(--yc-night-surface, #fffdfd);
}

.schedule-page[data-schedule-module="schedule"] .schedule-row-main,
.schedule-page[data-schedule-module="schedule"] .schedule-row-content { min-width: 0; }

@media (any-pointer: coarse) {
    .schedule-page[data-schedule-module="schedule"] .schedule-sortable .schedule-row:not(.is-dragging) {
        touch-action: pan-y pinch-zoom;
    }

    .schedule-page[data-schedule-module="schedule"] :is(.schedule-sortable, .schedule-completed > .schedule-items):has(> .is-swiping) {
        overflow: clip;
    }

    .schedule-page[data-schedule-module="schedule"] .schedule-row.is-swiping {
        transform: translateX(var(--schedule-swipe-x, 0px));
        transition: none;
        /* Keep the visible area fixed to the original row, including the revealed action. */
        clip-path: inset(0 var(--schedule-swipe-x, 0px) 0 calc(-1 * var(--schedule-swipe-x, 0px)) round 8px);
    }

    .schedule-page[data-schedule-module="schedule"] .schedule-row.is-swipe-returning {
        transition: transform 160ms ease-out, clip-path 160ms ease-out;
    }

    .schedule-swipe-action {
        position: absolute;
        inset-block: -1px;
        width: 45%;
        display: flex;
        align-items: center;
        gap: 6px;
        padding-inline: 12px;
        color: #fff;
        font-size: 13px;
        font-weight: 700;
        pointer-events: none;
    }

    .schedule-swipe-action--left {
        left: calc(100% + 1px);
        background: var(--yc-danger, #dc2626);
    }

    .schedule-swipe-action--right {
        right: calc(100% + 1px);
        justify-content: flex-end;
        background: color-mix(in srgb, var(--yc-success, #16a34a) 76%, #14281d);
    }

    .schedule-swipe-action svg {
        width: 16px;
        height: 16px;
        fill: none;
        stroke: currentColor;
        stroke-width: 2;
    }
}

@media (prefers-reduced-motion: reduce) {
    .schedule-page[data-schedule-module="schedule"] .schedule-row.is-swipe-returning { transition: none; }
}

.schedule-page[data-schedule-module="schedule"] .schedule-row .schedule-title {
    display: block;
    overflow: visible;
    -webkit-line-clamp: unset;
    white-space: normal;
    overflow-wrap: anywhere;
    font-size: 14px;
    line-height: 1.5;
    font-weight: 500;
    color: var(--yc-night-text, #202a3b);
}

.schedule-page[data-schedule-module="schedule"] .schedule-actions {
    gap: 6px;
    align-items: center;
    flex-shrink: 0;
}

.schedule-page[data-schedule-module="schedule"] .schedule-actions .app-icon-btn {
    width: 36px;
    min-width: 36px;
    height: 36px;
    min-height: 36px;
    border-radius: 9px;
    padding: 7px;
    box-shadow: none;
}

.schedule-page[data-schedule-module="schedule"] .schedule-actions .app-icon-btn svg { width: 18px; height: 18px; }
.schedule-page[data-schedule-module="schedule"] .schedule-more-trigger { color: var(--yc-night-muted, #64748b); border-color: var(--yc-night-border, #e4e8f0); background: var(--yc-night-surface, #fff); }

.schedule-page[data-schedule-module="schedule"] .schedule-empty-drop-zone {
    min-height: 20px;
    border-color: var(--yc-night-border, #edf0f5);
}

.schedule-page[data-schedule-module="schedule"] .schedule-separator-row { padding-block: 10px; }
.schedule-page[data-schedule-module="schedule"] .schedule-separator-label { font-size: 11px; font-weight: 700; text-transform: uppercase; color: var(--yc-night-muted, #68748a); }

.schedule-page[data-schedule-module="schedule"] .schedule-completed {
    margin: 0 14px 14px;
    padding: 0;
    border: 0;
    background: var(--yc-night-soft, #f3f8f6);
    border-radius: 10px;
}

.schedule-page[data-schedule-module="schedule"] .schedule-completed > summary {
    padding: 13px 12px;
    font-size: 12px;
    color: var(--yc-night-muted, #36715d);
    font-weight: 700;
}

.schedule-page[data-schedule-module="schedule"] .schedule-completed .schedule-row.is-completed { background: var(--yc-night-surface, #f9fcfa); border-color: var(--yc-night-border, #e2ece6); }

/* Both existing edit dialogs share the app's spacing, controls and icon palette. */
#schedule-edit-modal .schedule-edit-redesign,
.calendar-modal-backdrop .calendar-modal {
    width: min(940px, calc(100vw - 40px));
    max-width: 940px;
    max-height: calc(100dvh - 40px);
    overflow-y: auto;
    overflow-x: visible;
    padding: 24px;
    border: 1px solid var(--yc-night-border, #e5e8ef);
    border-radius: 20px;
    background: var(--yc-night-surface, #fafbfe);
    box-shadow: 0 24px 80px rgba(24, 28, 45, .2);
}

.crm-modal-heading-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    border-radius: 14px;
    color: #fff;
    background: var(--app-accent-gradient);
}

.crm-modal-heading-icon svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; }
#schedule-edit-modal .schedule-edit-redesign > .crm-modal-heading-icon { float: left; margin-right: 14px; }
#schedule-edit-modal .schedule-edit-redesign > h2 { min-height: 48px; display: flex; align-items: center; margin: 0 44px 22px 0; font-size: 24px; }
.calendar-modal-backdrop .calendar-modal > .yc-modal__header { display: flex; align-items: center; justify-content: flex-start; gap: 14px; padding: 0 44px 20px 0; }
.calendar-modal-backdrop .calendar-modal .yc-modal__title { font-size: 24px; margin: 0; }

#schedule-edit-modal .schedule-edit-redesign .schedule-edit-form {
    clear: both;
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    align-items: start;
    gap: 16px;
    overflow: visible;
}

#schedule-edit-modal .schedule-edit-section {
    min-width: 0;
    margin: 0;
    padding: 16px;
    border: 1px solid var(--yc-night-border, #e7eaf1);
    border-radius: 12px;
    background: var(--yc-night-surface, #fff);
}

#schedule-edit-modal .schedule-edit-section > legend {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 5px;
    font-size: 14px;
    font-weight: 700;
    color: var(--yc-night-text, #202a3b);
}

#schedule-edit-modal .schedule-edit-section > legend svg,
.calendar-modal .crm-modal-section-title svg { width: 18px; height: 18px; color: var(--yc-night-accent, var(--app-accent)); fill: none; stroke: currentColor; stroke-width: 2; }
#schedule-edit-modal .schedule-edit-section .modal-field { width: 100%; min-width: 0; margin: 0; }
#schedule-edit-modal .schedule-edit-section .modal-field + .modal-field { margin-top: 14px; }
#schedule-edit-modal .schedule-edit-section--basic textarea[name="title"] { min-height: 140px; resize: vertical; }
#schedule-edit-modal .schedule-edit-section--contacts { grid-column: 1 / -1; }
#schedule-edit-modal .schedule-edit-redesign .schedule-contact-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
#schedule-edit-modal .schedule-edit-redesign .schedule-icon-picker__panel { min-width: 0; width: 100%; margin: 10px 0 0; box-shadow: none; }
#schedule-edit-modal .schedule-edit-redesign .schedule-icon-picker__grid { min-width: 0; grid-template-columns: repeat(4, minmax(0, 1fr)); }

#schedule-edit-modal .schedule-edit-redesign .schedule-icon-picker__option,
.calendar-modal .schedule-icon-picker__option {
    min-width: 0;
    height: 44px;
    border-radius: 9px;
    border: 1px solid var(--yc-night-border, #e1e5ee);
    background: var(--yc-night-surface, #fff);
}

#schedule-edit-modal .schedule-edit-redesign .schedule-icon-picker__option.is-selected,
.calendar-modal .schedule-icon-picker__option.is-selected { color: var(--yc-night-accent, var(--app-accent)); border-color: var(--app-accent); background: var(--app-accent-soft); box-shadow: 0 0 0 2px rgba(var(--app-accent-rgb), .1); }

#schedule-edit-modal .schedule-edit-redesign .yc-toggle,
.calendar-modal-backdrop .calendar-modal .yc-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    padding: 6px 0;
    border: 0;
    background: transparent;
}


#schedule-edit-modal .schedule-edit-redesign .yc-input,
#schedule-edit-modal .schedule-edit-redesign .yc-select,
#schedule-edit-modal .schedule-edit-redesign .priority-picker-trigger,
.calendar-modal-backdrop .calendar-modal .yc-input,
.calendar-modal-backdrop .calendar-modal .yc-select,
.calendar-modal-backdrop .calendar-modal .calendar-event-type-trigger { min-height: 44px; border-radius: 9px; background-color: var(--yc-night-surface, #fff); box-shadow: none; }

#schedule-edit-modal .schedule-edit-redesign .modal-actions,
.calendar-modal-backdrop .calendar-modal .calendar-modal-actions {
    position: sticky;
    bottom: -24px;
    z-index: 2;
    grid-column: 1 / -1;
    margin: 0 -24px -24px;
    padding: 16px 24px;
    background: rgba(var(--yc-night-surface-rgb, 255, 255, 255), .97);
    border-top: 1px solid var(--yc-night-border, #e7eaf1);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 10px;
}

#schedule-edit-modal .schedule-edit-delete-slot { display: inline-flex; margin-right: auto; }
#schedule-edit-modal .schedule-edit-delete svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; flex-shrink: 0; }
#schedule-edit-modal .schedule-edit-redesign .modal-actions { width: calc(100% + 48px); max-width: none; }
#schedule-edit-modal .schedule-edit-cancel { color: var(--yc-night-muted, #475569) !important; background: var(--yc-night-surface, #fff) !important; border: 1px solid var(--yc-night-border, #dce2ec) !important; box-shadow: none !important; }
#schedule-edit-modal .schedule-edit-redesign .modal-actions .yc-btn,
.calendar-modal .calendar-modal-actions .yc-btn { min-height: 44px; border-radius: 9px; }
#schedule-edit-modal .schedule-edit-delete,
.calendar-modal [data-calendar-delete] { color: var(--yc-night-error, #dc2626); background: var(--yc-night-surface, #fff); border: 1px solid #f5baba; box-shadow: none; }
.calendar-modal .calendar-modal-actions .yc-modal__actions { display: flex; width: 100%; align-items: center; gap: 10px; }
.calendar-modal .calendar-modal-actions [data-calendar-delete] { margin-right: auto; }
.calendar-modal .calendar-modal-actions [data-shopping-create-submit] { margin-left: auto; }

.calendar-modal .calendar-form { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; padding: 0; }
.calendar-modal .calendar-details-section,
.calendar-modal .calendar-options > .calendar-reminder-group,
.calendar-modal .calendar-options > .calendar-toggle,
.calendar-modal .shopping-create-share { padding: 16px; border: 1px solid var(--yc-night-border, #e7eaf1); border-radius: 12px; background: var(--yc-night-surface, #fff); }
.calendar-modal .calendar-details-section { display: grid; gap: 16px; }
.calendar-modal .calendar-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.calendar-modal .calendar-options > .calendar-reminder-group { padding-block: 7px; }
.calendar-modal .calendar-options > .calendar-toggle { min-height: 60px; }
.calendar-modal .calendar-options > [data-toggle-panel="friend"] { grid-column: 1 / -1; }
.calendar-modal .calendar-details-section > .yc-field { grid-template-columns: minmax(0, 1fr); }
.calendar-modal .tox-tinymce,
#schedule-edit-modal .schedule-edit-redesign .tox-tinymce { min-width: 0; max-width: 100%; min-height: 200px; border: 1px solid var(--yc-night-border, #e1e5ee); border-radius: 9px; }
.calendar-modal .tox .tox-toolbar__group { padding-inline: 4px; }
.company-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.company-list .work-mobile-card { display: flex; align-items: center; gap: 12px; min-width: 0; padding: 16px; border: 1px solid var(--border-color, #e2e8f0); border-radius: 8px; background: var(--yc-night-surface, #fff); }
.company-list .work-mobile-card__body { display: grid; gap: 6px; min-width: 0; flex: 1; overflow-wrap: anywhere; }
.company-list .work-mobile-card small { color: var(--yc-night-muted, #64748b); }
.company-list .work-status-badge { justify-self: start; }
.company-list .work-card-marker svg { width: 24px; height: 24px; color: var(--yc-night-accent, var(--app-accent)); }
.company-filters, .company-invoice-context { display: flex; align-items: end; flex-wrap: wrap; gap: 12px; margin-bottom: 18px; }
.invoice-form--no-vat .invoice-vat-only { display: none; }
.company-filters .yc-field, .company-invoice-context .yc-field { min-width: 0; flex: 1 1 180px; }
.company-page .company-list-filters { grid-template-columns: minmax(0, 1fr) minmax(180px, 220px) auto; align-items: end; }
@media (max-width: 899.98px) {
    .company-page .company-list-filters { grid-template-columns: minmax(0, 1fr); }
}
@media (min-width: 900px) {
    .work-page--projects .work-filters--projects { grid-template-columns: minmax(0, 1fr) minmax(180px, 220px) !important; }
    .work-page--projects .work-filters--projects > .work-filter-search { grid-column: auto; }
    .company-page .company-list-filters { grid-template-columns: minmax(0, 1fr) minmax(180px, 220px) auto !important; }
}
.company-dashboard { min-width: 0; }
.company-dashboard a, .company-list a:not(.app-icon-btn) { color: var(--yc-night-accent, var(--app-accent)); text-decoration: none; }
.company-dashboard a:hover, .company-list a:hover { text-decoration: underline; }
.company-dashboard-toolbar, .company-data-toolbar { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; margin-bottom: 16px; }
.company-data .company-data-toolbar { flex-direction: row; }
.company-dashboard-toolbar h2, .company-data-toolbar h2, .company-dashboard-section h2 { margin: 0; color: var(--yc-text); font-size: 18px; line-height: 1.3; }
.company-dashboard-toolbar .company-filters { margin: 0; flex-wrap: nowrap; gap: 10px; align-items: center; }
.company-dashboard-toolbar .yc-field { display: flex; flex: 0 0 auto; align-items: center; gap: 8px; }
.company-dashboard-toolbar .yc-input { width: 104px; }
.company-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.company-metrics .company-metric { display: grid; align-content: start; gap: 14px; min-width: 0; padding: 18px; border-radius: 8px; }
.company-metric .finance-summary-card__label { color: var(--yc-muted); line-height: 1.4; }
.company-metric .finance-summary-card__label svg { color: var(--yc-night-accent, var(--app-accent)); }
.company-metric strong { font-size: 22px; line-height: 1.25; overflow-wrap: anywhere; }
.company-metric strong.finance-amount--income { color: var(--yc-night-green, #16a34a); }
.company-metric strong.finance-amount--expense { color: var(--yc-night-error, #dc2626); }
.company-result-notice { margin: 16px 0; padding: 12px 14px; border-radius: 8px; font-size: 13px; line-height: 1.5; }
.company-dashboard-section { min-width: 0; padding-block: 18px; border-top: 1px solid var(--yc-border, #e2e8f0); }
.company-activity-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin-top: 8px; }
.company-activity-list { list-style: none; padding: 0; margin: 10px 0 0; }
.company-activity-list li { display: flex; flex-wrap: wrap; align-items: start; justify-content: space-between; gap: 8px; padding-block: 12px; border-bottom: 1px solid var(--yc-border, #e2e8f0); }
.company-activity-list li:last-child { border-bottom: 0; }
.company-activity-list li > span { flex: 1 1 100px; min-width: 0; }
.company-activity-list a { font-size: 14px; font-weight: 700; overflow-wrap: anywhere; }
.company-activity-list small { display: block; margin-top: 4px; color: var(--yc-muted); font-size: 12px; overflow-wrap: anywhere; }
.company-activity-list strong { font-size: 13px; white-space: nowrap; }
.company-empty-state { margin: 10px 0 0; color: var(--yc-muted); font-size: 14px; line-height: 1.5; }
.company-data-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; }
.company-data-section { min-width: 0; padding-block: 16px; border-top: 1px solid var(--yc-border, #e2e8f0); }
.company-data-section h3 { margin: 0 0 14px; font-size: 16px; color: var(--yc-text); }
.company-data-section dl { margin: 0; }
.company-data-section dl > div { display: grid; grid-template-columns: minmax(100px, .8fr) minmax(0, 1.2fr); gap: 14px; padding-block: 10px; border-bottom: 1px solid var(--yc-border, #e2e8f0); }
.company-data-section dt { color: var(--yc-muted); font-size: 13px; }
.company-data-section dd { margin: 0; color: var(--yc-text); font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
.company-data-toolbar .yc-btn svg { width: 18px; height: 18px; flex-shrink: 0; }
.company-section-toolbar { display: flex; justify-content: flex-end; margin-block: 4px 14px; }
.company-section-toolbar .yc-page-header__actions { max-width: 100%; }
.company-detail-page .yc-page-header .yc-page-title { white-space: normal; overflow-wrap: anywhere; }
.company-detail-page .yc-page-header__title { width: 100%; }
.company-table-wrap { max-width: 100%; overflow: auto; }
.company-table-wrap table { width: 100%; border-collapse: collapse; text-align: left; }
.company-table-wrap th, .company-table-wrap td { padding: 12px; border-bottom: 1px solid var(--yc-night-border, #e2e8f0); white-space: nowrap; }
@media (max-width: 699.98px) {
    .company-list, .company-metrics, .company-activity-grid, .company-data-grid { grid-template-columns: minmax(0, 1fr); }
    .company-list .work-mobile-card { flex-wrap: wrap; }
    .company-invoice-context .yc-field { flex-basis: 100%; }
    .company-activity-grid, .company-data-grid { gap: 0; }
    .company-dashboard-toolbar .company-filters { width: 100%; justify-content: space-between; }
    .company-detail-page .yc-page-header.yc-page-header .yc-page-title { white-space: normal; overflow-wrap: anywhere; font-size: 20px; line-height: 1.25; }
}

.my-finance-page { display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; min-width: 0; letter-spacing: 0; color: var(--yc-text, #162036); }
.my-finance-page *, .my-finance-page *::before, .my-finance-page *::after { box-sizing: border-box; }
.my-finance-page h2 { font-size: 19px; line-height: 1.35; margin: 0; }
.my-finance-page h3 { font-size: 15px; line-height: 1.4; margin: 0; }
.my-finance-page p { line-height: 1.55; }
.my-finance-page svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; flex-shrink: 0; }
.my-finance-page .yc-page-header__icon svg { width: 28px; height: 28px; }
.my-finance-page .my-finance-category-header { flex-wrap: wrap; }
.my-finance-page .my-finance-category-header .yc-page-header__actions { max-width: 100%; margin-left: auto; flex-wrap: wrap; }
.my-finance-page a:not(.yc-btn):not(.app-icon-btn):not(.finance-tab) { color: var(--yc-night-accent, var(--app-accent-dark)); }
.my-finance-page small { display: block; color: var(--yc-muted, #64748b); font-size: 12px; line-height: 1.5; }
.my-finance-page :is(h1,h2,h3,strong,dd,p,small) { overflow-wrap: anywhere; }
.my-finance-page :is(a,button,summary,[tabindex]):focus-visible { outline: 2px solid var(--app-accent); outline-offset: 3px; }
body:has(.my-finance-page) [role="dialog"] :is(button,a):focus-visible { outline: 2px solid var(--app-accent); outline-offset: 3px; }
.my-finance-page .my-finance-tabs { display: flex; flex-wrap: wrap; gap: 7px; margin: 0; padding: 2px; min-width: 0; max-width: 100%; }
.my-finance-tabs .finance-tab { min-height: 40px; font-size: 13px; padding: 9px 13px; flex-shrink: 0; }
.my-finance-tabs .finance-tab--more { cursor: pointer; font-family: inherit; }
.my-finance-tabs .finance-tab--more:focus-visible { outline: 2px solid var(--yc-night-accent, var(--app-accent-dark)); outline-offset: -2px; }
.mf-tabs-more {
    position: fixed; inset: auto; margin: 0; padding: 5px; width: min(230px, calc(100vw - 16px));
    max-height: min(360px, calc(100dvh - 24px)); overflow: auto;
    background: var(--yc-surface, white); color: var(--yc-text, #172033); border: 1px solid var(--yc-border, #dbe2ec);
    border-radius: 8px; box-shadow: 0 8px 24px rgb(0 0 0 / 18%);
}
.mf-tabs-more:popover-open { display: grid; gap: 2px; }
.mf-tabs-more .finance-tab { justify-content: flex-start; width: 100%; }
.mf-current__basis small { display: block; overflow-wrap: anywhere; }
.mf-current__basis summary { font-size: 12px; cursor: pointer; }
.my-finance-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-bottom: 16px; min-width: 0; }
.my-finance-heading > div { min-width: 0; }
.my-finance-page > .my-finance-heading { margin-bottom: 0; }
.my-finance-page > .my-finance-forecast-basis { margin: 0; }
.my-finance-heading > a:not(.yc-btn) { font-size: 13px; font-weight: 600; }
.my-finance-band { min-width: 0; padding-block: 22px; border-top: 1px solid var(--yc-night-border, #dfe4ed); }
.my-finance-currency { font-size: .65em; font-weight: 600; color: var(--yc-night-muted, #64748b); white-space: nowrap; }
.my-finance-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 14px; }
.my-finance-kpi { min-width: 0; background: var(--yc-night-surface, #fff); border: 1px solid var(--yc-night-border, #e0e5ee); border-radius: 8px; padding: 16px; box-shadow: 0 2px 8px rgba(15,23,42,.025); }
.my-finance-kpi__label { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; min-height: 38px; }
.my-finance-kpi__label h3 { font-size: 12px; font-weight: 600; color: var(--yc-night-muted, #526078); }
.my-finance-kpi > strong { display: block; font-size: 24px; line-height: 1.3; font-variant-numeric: tabular-nums; margin-bottom: 7px; }
.my-finance-symbol { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; flex: 0 0 36px; border-radius: 8px; background: rgba(var(--app-accent-rgb),.08); color: var(--yc-night-accent, var(--app-accent-dark)); }
.my-finance-kpi[data-tone="success"] .my-finance-symbol, .my-finance-symbol[data-tone="success"] { background: var(--yc-night-green-bg, #ecfdf3); color: var(--yc-night-green, #15803d); }
.my-finance-kpi[data-tone="danger"] .my-finance-symbol, .my-finance-symbol[data-tone="danger"] { background: var(--yc-night-error-bg, #fff1f2); color: var(--yc-night-error, #be123c); }
.my-finance-kpi[data-tone="danger"] > strong { color: var(--yc-night-error, #be123c); }
.my-finance-kpi[data-tone="warning"] .my-finance-symbol, .my-finance-symbol[data-tone="warning"] { background: var(--yc-night-warning-bg, #fff7e8); color: #a85c06; }
.my-finance-kpi[data-tone="neutral"] .my-finance-symbol { background: var(--yc-night-soft, #f1f4f8); color: var(--yc-night-muted, #526078); }
.my-finance-page progress { display: block; width: 100%; height: 6px; border: 0; border-radius: 4px; overflow: hidden; accent-color: var(--app-accent); margin-top: 12px; }
.my-finance-page progress::-webkit-progress-bar { background: var(--yc-night-soft, #e9edf4); border-radius: 4px; }
.my-finance-page progress::-webkit-progress-value { background: var(--app-accent); border-radius: 4px; }
.my-finance-badge { display: inline-flex; align-items: center; justify-content: center; gap: 5px; width: fit-content; max-width: 100%; padding: 4px 8px; border-radius: 5px; font-size: 11px; font-weight: 650; line-height: 1.4; overflow-wrap: anywhere; }
.my-finance-badge svg { width: 14px; height: 14px; }
.my-finance-badge--info { color: var(--yc-night-accent, var(--app-accent-dark)); background: rgba(var(--app-accent-rgb),.09); }
.my-finance-badge--neutral, .my-finance-badge--muted { color: var(--yc-night-muted, #526078); background: var(--yc-night-soft, #f0f3f7); }
.my-finance-badge--success { color: var(--yc-night-green, #166534); background: var(--yc-night-green-bg, #eaf8ef); }
.my-finance-badge--warning { color: var(--yc-night-warning, #92400e); background: var(--yc-night-warning-bg, #fff4db); }
.my-finance-badge--danger { color: var(--yc-night-error, #9f1239); background: var(--yc-night-soft, #fff0f3); }
.my-finance-steps { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; list-style: none; margin: 0; padding: 0; }
.my-finance-step { display: flex; align-items: center; gap: 12px; min-width: 0; padding: 14px; border: 1px solid var(--yc-night-border, #e0e5ee); background: var(--yc-night-surface, #fff); border-radius: 8px; }
.my-finance-step > div { flex: 1; min-width: 0; }
.my-finance-step h3 { font-size: 13px; }
.my-finance-step .my-finance-badge { margin-top: 5px; }
.my-finance-step__number { width: 30px; height: 30px; display: inline-flex; justify-content: center; align-items: center; flex-shrink: 0; border-radius: 50%; font-size: 13px; font-weight: 700; background: rgba(var(--app-accent-rgb),.09); color: var(--yc-night-accent, var(--app-accent-dark)); }
.my-finance-step.is-done { background: var(--yc-night-surface, #f9fbfc); }
.my-finance-step.is-done .my-finance-step__number { background: var(--yc-night-green-bg, #eaf8ef); color: var(--yc-night-green, #15803d); }
.my-finance-preparation { padding-block: 12px; }
.my-finance-preparation > summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; cursor: pointer; list-style: none; }
.my-finance-preparation > summary::-webkit-details-marker { display: none; }
.my-finance-preparation > summary strong { font-size: 15px; }
.my-finance-preparation[open] > summary > svg { transform: rotate(180deg); }
.my-finance-preparation > :is(ol,form) { margin-top: 12px; }
.my-finance-preparation .my-finance-steps { align-items: start; gap: 8px; }
.my-finance-preparation .my-finance-step { padding: 10px; }
.my-finance-preparation .my-finance-step.is-done { padding: 6px 10px; gap: 8px; }
.my-finance-preparation .my-finance-step.is-done > div { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; }
.my-finance-preparation .my-finance-step.is-done h3 { font-size: 12px; }
.my-finance-preparation .my-finance-step.is-done .my-finance-step__hint { display: none; }
.my-finance-preparation .my-finance-step.is-done .my-finance-badge { margin-top: 0; }
.my-finance-preparation .my-finance-step.is-done .my-finance-step__number { width: 24px; height: 24px; }
.my-finance-account-warnings { margin-top: 0; }
.my-finance-loan-list { list-style: none; margin: 8px 0 0; padding: 0; }
.my-finance-loan-list > li { border-bottom: 1px solid var(--yc-night-border, #e0e5ee); }
.my-finance-loan { display: grid; grid-template-columns: minmax(0,1fr) minmax(110px,max-content) minmax(100px,max-content) 18px; align-items: center; gap: 12px; padding: 10px 0; min-height: 56px; text-decoration: none; }
.my-finance-loan__name, .my-finance-loan > span { min-width: 0; }
.my-finance-loan strong { font-size: 13px; line-height: 1.5; }
.my-finance-loan > span strong { color: var(--yc-text, #162036); font-variant-numeric: tabular-nums; }
.my-finance-loan > svg { width: 18px; height: 18px; }
@media (max-width: 699.98px) {
    .my-finance-loan { grid-template-columns: minmax(0,1fr) max-content; gap: 5px 12px; }
    .my-finance-loan__name { grid-column: 1 / -1; }
    .my-finance-loan > svg { display: none; }
}
.my-finance-decision-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.my-finance-decision { display: flex; align-items: start; gap: 12px; padding: 16px; min-width: 0; background: var(--yc-night-surface, #fff); border: 1px solid var(--yc-night-border, #e0e5ee); border-radius: 8px; }
.my-finance-decision[data-severity="error"] { border-left: 3px solid #e11d48; }
.my-finance-decision[data-severity="warning"] { border-left: 3px solid #d99a29; }
.my-finance-decision h3 { font-size: 14px; margin-bottom: 5px; }
.my-finance-decision p { margin: 0; font-size: 13px; color: var(--yc-night-muted, #526078); }
.my-finance-more { min-width: 0; margin-top: 14px; font-size: 13px; }
.my-finance-more > summary { cursor: pointer; color: var(--yc-night-muted, #526078); min-height: 40px; padding-block: 10px; font-weight: 600; }
.my-finance-entities { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; }
.my-finance-entity { --entity-color: var(--app-accent); min-width: 0; padding: 18px; border: 1px solid var(--yc-night-border, #e0e5ee); border-top: 3px solid var(--entity-color); border-radius: 8px; background: var(--yc-night-surface, #fff); }
.my-finance-entity[data-entity-type="company"] { --entity-color: #2563eb; }
.my-finance-entity[data-entity-type="household"] { --entity-color: #0891b2; }
.my-finance-entity .my-finance-symbol { color: var(--entity-color); background: var(--yc-night-soft, #f1f5fa); }
.my-finance-entity > h3 { margin-block: 12px 14px; }
.my-finance-entity > strong { display: block; margin-block: 4px 16px; font-size: 23px; font-variant-numeric: tabular-nums; }
.my-finance-reserve-line { display: flex; justify-content: space-between; gap: 10px; font-size: 12px; margin-top: 14px; color: var(--yc-night-muted, #526078); }
.my-finance-facts { display: grid; gap: 9px; margin: 0; font-size: 12px; }
.my-finance-facts > div { display: flex; align-items: start; justify-content: space-between; gap: 12px; min-width: 0; }
.my-finance-facts dt { color: var(--yc-night-muted, #64748b); }
.my-finance-facts dd { margin: 0; text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.my-finance-facts--columns { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
.my-finance-facts--columns > div { display: block; }
.my-finance-facts--columns dd { margin-top: 4px; text-align: left; }
.my-finance-account-list { list-style: none; padding: 0; margin: 0; }
.my-finance-account-list li { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding-block: 10px; border-top: 1px solid var(--yc-night-border, #e9edf4); }
.my-finance-account-list strong { font-size: 12px; }
.my-finance-forecast { min-width: 0; display: grid; gap: 14px; }
.my-finance-forecast-controls { display: flex; flex-wrap: wrap; align-items: end; gap: 14px; padding: 16px; border: 1px solid var(--yc-night-border, #e0e5ee); border-radius: 8px; background: var(--yc-night-surface, #fafbfe); min-width: 0; }
.my-finance-forecast-controls .yc-field { min-width: 0; flex: 1 1 150px; }
.my-finance-segment { padding: 0; margin: 0; border: 0; min-width: 0; }
.my-finance-segment legend { font-size: 12px; font-weight: 600; margin-bottom: 7px; color: var(--yc-night-muted, #526078); }
.my-finance-segment > div { display: flex; padding: 3px; gap: 2px; border: 1px solid var(--yc-night-border, #dce2ed); background: var(--yc-night-surface, #fff); border-radius: 7px; }
.my-finance-segment label { position: relative; cursor: pointer; min-width: 0; flex: 1; }
.my-finance-segment input { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.my-finance-segment label > span { display: block; padding: 9px 12px; font-size: 12px; font-weight: 600; text-align: center; border-radius: 4px; white-space: nowrap; color: var(--yc-night-muted, #526078); }
.my-finance-segment label:has(input:checked) > span { background: var(--app-accent); color: #fff; }
.my-finance-segment label:has(input:focus-visible) > span { outline: 2px solid var(--app-accent); outline-offset: 3px; }
.my-finance-scenario-note { display: flex; align-items: start; gap: 9px; margin: 0; font-size: 12px; color: var(--yc-night-muted, #526078); }
.my-finance-scenario-note > svg { color: var(--yc-night-accent, var(--app-accent)); width: 17px; height: 17px; }
.my-finance-forecast-table { max-width: 100%; min-width: 0; overflow-x: auto; border: 1px solid var(--yc-night-border, #e0e5ee); border-radius: 8px; background: var(--yc-night-surface, #fff); }
.my-finance-forecast-table table { width: 100%; min-width: 850px; margin: 0; border-collapse: collapse; font-size: 12px; }
.my-finance-forecast-table caption { padding: 12px 14px; font-weight: 600; text-align: left; color: var(--yc-night-muted, #526078); }
.my-finance-forecast-table :is(th,td) { white-space: nowrap; padding: 13px 14px; text-align: right; border-bottom: 1px solid var(--yc-night-border, #edf0f6); font-variant-numeric: tabular-nums; }
.my-finance-forecast-table th:first-child { position: sticky; left: 0; background: var(--yc-night-surface, #f8fafc); text-align: left; }
.my-finance-forecast-table thead th { background: var(--yc-night-surface, #f8fafc); color: var(--yc-night-muted, #526078); font-weight: 600; }
.my-finance-closing { background: var(--yc-night-surface, #f8fafc); font-weight: 700; }
.my-finance-forecast-table .finance-amount--expense { background: var(--yc-night-soft, #fff2f4); color: var(--yc-night-error, #be123c); }
.my-finance-forecast-basis { color: var(--yc-night-muted, #64748b); font-size: 12px; line-height: 1.55; margin-block: 8px; }
.my-finance-summary { padding-block: 20px; border-top: 1px solid var(--yc-night-border, #dfe4ed); min-width: 0; }
.my-finance-summary h3 { margin-bottom: 12px; }
.my-finance-metrics { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; margin: 0; }
.my-finance-metric { padding: 16px; border: 1px solid var(--yc-night-border, #e0e5ee); border-radius: 8px; background: var(--yc-night-surface, #fff); min-width: 0; }
.my-finance-metric dt { color: var(--yc-night-muted, #64748b); font-size: 12px; margin-bottom: 8px; }
.my-finance-metric dd { margin: 0; font-size: 19px; line-height: 1.4; font-weight: 700; font-variant-numeric: tabular-nums; }
.my-finance-alerts { display: grid; gap: 8px; list-style: none; padding: 0; margin-block: 10px; }
.my-finance-alerts li { padding: 12px 14px; border-left: 3px solid #a7b0bf; background: var(--yc-night-soft, #f6f8fb); overflow-wrap: anywhere; font-size: 13px; line-height: 1.5; }
.my-finance-alerts [data-severity="error"] { border-color: #e11d48; background: var(--yc-night-error-bg, #fff1f2); color: var(--yc-night-error, #9f1239); }
.my-finance-alerts [data-severity="warning"] { border-color: #d99a29; background: var(--yc-night-soft, #fff9ed); color: var(--yc-night-warning, #92400e); }
.my-finance-alerts [data-severity="success"] { border-color: #16a34a; background: var(--yc-night-soft, #effaf2); color: var(--yc-night-green, #166534); }
.my-finance-month { display: flex; align-items: end; gap: 8px; max-width: 100%; }
.my-finance-month .yc-field { min-width: 0; }
.my-finance-ledger { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 18px; margin: 18px 0; }
.my-finance-ledger dt { font-size: 12px; color: var(--yc-night-muted, #64748b); }
.my-finance-ledger dd { margin: 5px 0 0; font-size: 17px; font-weight: 650; }
.my-finance-details { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 20px; }
.my-finance-records { display: grid; gap: 12px; }
.my-finance-filters { display: grid; gap: 10px; margin-block: 4px 12px; min-width: 0; padding: 16px; border: 1px solid var(--yc-night-border, #dfe4ed); border-radius: 8px; background: var(--yc-night-surface, #fff); box-shadow: 0 2px 8px #17263804; }
.my-finance-filters__search { display: flex; align-items: end; gap: 8px; flex-wrap: wrap; }
.my-finance-filters__search .yc-field { flex: 1 1 240px; min-width: 0; }
.my-finance-filters :is(.yc-input,.yc-select) { width: 100%; min-width: 0; min-height: 44px; }
.my-finance-filters .yc-btn { min-height: 44px; height: 44px; padding-block: 8px; }
.my-finance-filters__details { min-width: 0; border-top: 1px solid var(--yc-night-border, #e0e5ee); padding-top: 8px; }
.my-finance-filters__details summary { cursor: pointer; font-size: 13px; font-weight: 600; min-height: 32px; align-content: center; }
.my-finance-filters__fields { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,180px),1fr)); align-items: end; gap: 12px; padding-block: 10px; }
.my-finance-filters__fields .yc-field { min-width: 0; }
.my-finance-filters__active { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.my-finance-filters__active .my-finance-badge { white-space: normal; overflow-wrap: anywhere; }
.my-finance-record--categories, .my-finance-record--recurring, .my-finance-record--items { padding: 14px 16px; gap: 10px 16px; }
.my-finance-record--categories .my-finance-record__content .my-finance-facts,
.my-finance-record--recurring .my-finance-facts,
.my-finance-record--items .my-finance-facts { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.my-finance-record--categories .my-finance-facts > div,
.my-finance-record--recurring .my-finance-facts > div,
.my-finance-record--items .my-finance-facts > div { justify-content: start; gap: 6px; }
.my-finance-record--recurring .my-finance-record__content,
.my-finance-record--items .my-finance-record__content { gap: 8px; }
.my-finance-page :is(h3,dd,small) { overflow-wrap: anywhere; }
.my-finance-page .my-finance-recurring-months { gap: 0; }
.my-finance-recurring-settings .my-finance-facts { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; }
.my-finance-recurring-settings .my-finance-facts > div { display: block; }
.my-finance-recurring-settings .my-finance-facts dd { text-align: left; margin-top: 4px; }
.my-finance-recurring-months .my-finance-record { border-width: 0 0 1px; border-radius: 0; padding: 12px 0; align-items: center; grid-template-columns: minmax(110px,.7fr) minmax(0,2fr) auto; }
.my-finance-recurring-months .my-finance-heading { margin: 0; display: grid; gap: 5px; }
.my-finance-recurring-months .my-finance-heading h4 { margin: 0; font-size: 13px; }
.my-finance-recurring-months .my-finance-facts { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
.my-finance-recurring-months .my-finance-facts > div { display: block; }
.my-finance-recurring-months .my-finance-facts dd { text-align: left; margin-top: 3px; }
.my-finance-recurring-months .yc-btn { min-height: 44px; padding: 8px 12px; font-size: 12px; }
@media (max-width: 699px) {
    .my-finance-recurring-settings .my-finance-facts { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .my-finance-recurring-months .my-finance-record { grid-template-columns: minmax(0,1fr) auto; }
    .my-finance-recurring-months .my-finance-facts { grid-column: 1 / -1; grid-row: 2; }
    .my-finance-recurring-months .yc-btn { grid-column: 2; grid-row: 1; }
    .my-finance-filters__search .yc-field { flex-basis: 100%; max-width: none; }
    .my-finance-filters__details summary { min-height: 44px; }
}
.my-finance-records--cards { grid-template-columns: repeat(auto-fit,minmax(min(100%,300px),1fr)); }
.my-finance-record { display: grid; grid-template-columns: minmax(0,1fr) auto auto; gap: 14px 20px; padding: 18px; background: var(--yc-night-surface, #fff); border: 1px solid var(--yc-night-border, #e0e5ee); border-radius: 8px; min-width: 0; }
.my-finance-record__main { display: flex; align-items: center; gap: 12px; min-width: 0; grid-column: 1; grid-row: 1; }
.my-finance-record__title { flex: 1; min-width: 0; }
.my-finance-record__title a { text-decoration: none; }
.my-finance-record__balance { grid-column: 2; grid-row: 1; }
.my-finance-record__balance > strong { display: block; font-size: 22px; font-variant-numeric: tabular-nums; margin-top: 4px; }
.my-finance-record__content { grid-column: 1 / -1; display: grid; gap: 12px; min-width: 0; }
.my-finance-record__actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; grid-column: 3; grid-row: 1; min-width: 0; }
.my-finance-record__actions .app-icon-btn, .my-finance-row__actions .app-icon-btn { width: 44px; height: 44px; }
.my-finance-records--cards .my-finance-record { display: flex; flex-direction: column; gap: 16px; }
.my-finance-records--cards .my-finance-record__balance > strong { font-size: 25px; }
.my-finance-records--cards .my-finance-record__actions { border-top: 1px solid var(--yc-night-border, #edf0f6); padding-top: 12px; margin-top: auto; }
.my-finance-inline { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 16px; font-size: 12px; color: var(--yc-night-muted, #526078); }
.my-finance-inline > span { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.my-finance-inline svg { width: 15px; height: 15px; }
.my-finance-transfer { display: flex; align-items: center; gap: 18px; font-weight: 600; font-size: 14px; }
.my-finance-transfer > span { flex: 1; min-width: 0; }
.my-finance-customer { font-weight: 600; }
.my-finance-next { display: flex; align-items: start; gap: 8px; color: var(--yc-night-muted, #526078); font-size: 12px; margin: 0; }
.my-finance-notice { display: flex; align-items: center; gap: 8px; padding: 10px 12px; background: var(--yc-night-warning-bg, #fff7e8); color: var(--yc-night-warning, #92400e); border-radius: 6px; font-size: 12px; margin: 0; }
.my-finance-empty { padding: 26px 16px; min-width: 0; display: grid; justify-items: center; gap: 12px; text-align: center; border: 1px dashed var(--yc-night-border, #d6deea); border-radius: 8px; background: var(--yc-night-surface, #fafbfe); }
.my-finance-empty h3 { font-size: 17px; }
.my-finance-empty p { margin: 0; max-width: 480px; color: var(--yc-night-muted, #64748b); font-size: 13px; }
.my-finance-row { display: grid; grid-template-columns: minmax(0,1fr) auto auto; align-items: center; gap: 12px; padding: 16px; background: var(--yc-night-surface, #fff); border: 1px solid var(--yc-night-border, #e0e5ee); border-radius: 8px; min-width: 0; margin-top: 10px; }
.my-finance-row__body { min-width: 0; overflow-wrap: anywhere; }
.my-finance-row__amount { font-size: 17px; font-variant-numeric: tabular-nums; }
.my-finance-row__actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.my-finance-form { display: grid; gap: 22px; min-width: 0; background: var(--yc-night-surface, #fff); padding: 22px; border: 1px solid var(--yc-night-border, #e0e5ee); border-radius: 8px; }
.my-finance-form__section { margin: 0; padding: 0 0 20px; border: 0; border-bottom: 1px solid var(--yc-night-border, #e9edf4); min-width: 0; }
.my-finance-form__section legend { font-size: 14px; font-weight: 700; padding: 0 0 16px; }
.my-finance-form__fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
.my-finance-form .yc-field { min-width: 0; }
.my-finance-form .yc-field[hidden] { display: none; }
.my-finance-form .yc-label { font-size: 12px; }
.my-finance-form :is(.yc-input,.yc-select) { min-height: 44px; min-width: 0; width: 100%; font-size: 14px; }
.my-finance-form__wide { grid-column: 1 / -1; }
.my-finance-form__toggle { align-self: end; min-height: 44px; }
.my-finance-form__actions { display: flex; justify-content: flex-end; gap: 12px; flex-wrap: wrap; }
.my-finance-history-table table { min-width: 620px; }
.my-finance-recurring-versions table { min-width: 0; table-layout: fixed; }
.my-finance-recurring-versions :is(th,td) { white-space: normal; overflow-wrap: anywhere; padding: 10px; }
.my-finance-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.my-finance-record--opportunities { border-left: 3px solid var(--app-accent); }
.my-finance-record--opportunities .my-finance-facts--columns { display: flex; flex-wrap: wrap; gap: 10px 24px; }
.my-finance-record--opportunities .my-finance-record__balance > strong { color: var(--yc-night-accent, var(--app-accent-dark)); }
.my-finance-record--opportunities .my-finance-opportunity-weight { margin-top: 8px; }
.my-finance-opportunity-weight > div { display: block; }
.my-finance-opportunity-weight dd { margin-top: 3px; }
.my-finance-opportunity-detail { min-width: 0; }
.my-finance-opportunity-detail .my-finance-band { padding-block: 16px; }
.my-finance-opportunity-detail .my-finance-heading { margin-bottom: 12px; }
.my-finance-empty--compact { padding: 14px 16px; text-align: left; justify-items: start; }
@media (max-width: 1199.98px) {
    .my-finance-entities { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .my-finance-record { grid-template-columns: minmax(0,1fr) auto; }
    .my-finance-record__main { grid-column: 1; }
    .my-finance-record__balance { grid-column: 2; }
    .my-finance-record__actions { grid-column: 1 / -1; grid-row: 3; }
}
@media (max-width: 699.98px) {
    .my-finance-page { gap: 18px; }
    .my-finance-page .my-finance-category-header .yc-page-header__actions { display: grid; grid-template-columns: minmax(0,1fr); width: 100%; }
    .my-finance-page .my-finance-category-header .yc-page-header__actions .yc-btn { width: 100%; }
    .my-finance-page .yc-page-header { flex-wrap: wrap; }
    .my-finance-page .yc-page-header__actions { margin-left: auto; max-width: 100%; flex-wrap: wrap; }
    .my-finance-page .my-finance-tabs { flex-wrap: nowrap; overflow-x: auto; padding: 3px 3px 8px; scrollbar-width: thin; }
    .my-finance-kpis, .my-finance-metrics, .my-finance-ledger { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
    .my-finance-kpi { padding: 13px; }
    .my-finance-kpi__label { align-items: start; gap: 7px; }
    .my-finance-kpi__label h3 { font-size: 11px; }
    .my-finance-kpi .my-finance-symbol { width: 28px; height: 28px; flex-basis: 28px; border-radius: 6px; }
    .my-finance-kpi .my-finance-symbol svg { width: 17px; height: 17px; }
    .my-finance-kpi > strong { font-size: 19px; }
    .my-finance-entities, .my-finance-steps, .my-finance-decision-grid, .my-finance-form__fields, .my-finance-details { grid-template-columns: minmax(0,1fr); }
    .my-finance-forecast-controls { padding: 12px; gap: 12px; }
    .my-finance-forecast-controls .my-finance-segment { width: 100%; }
    .my-finance-segment label > span { padding-inline: 8px; }
    .my-finance-month { flex-wrap: wrap; width: 100%; }
    .my-finance-month .yc-field { flex: 1; }
    .my-finance-record { padding: 16px; gap: 14px; }
    .my-finance-record__main { grid-column: 1 / -1; flex-wrap: wrap; gap: 9px; }
    .my-finance-record__balance { grid-column: 1 / -1; grid-row: 2; }
    .my-finance-record__content { grid-row: 3; }
    .my-finance-record__actions { grid-row: 4; }
    .my-finance-record__main .my-finance-badge { margin-left: auto; }
    .my-finance-record__balance > strong { font-size: 23px; }
    .my-finance-row { grid-template-columns: minmax(0,1fr) auto; padding: 14px; }
    .my-finance-row__body { grid-column: 1 / -1; }
    .my-finance-row__amount { grid-column: 1; font-size: 16px; }
    .my-finance-row__actions { grid-column: 2; }
    .my-finance-form { padding: 16px; }
    .my-finance-metric { padding: 13px; }
    .my-finance-metric dd { font-size: 17px; }
}

.calendar-modal-backdrop:not([hidden]) { display: grid; overflow: hidden; align-items: center; }
.calendar-modal-backdrop .calendar-modal .yc-modal__title { flex: 1; min-width: 0; }

@media (max-width: 899.98px) {
    #schedule-edit-modal .schedule-edit-redesign,
    .calendar-modal-backdrop .calendar-modal { width: calc(100vw - 24px); max-height: calc(100dvh - 24px); padding: 18px; border-radius: 16px; }
    #schedule-edit-modal .schedule-edit-redesign .schedule-edit-form,
    #schedule-edit-modal .schedule-edit-redesign .schedule-contact-fields,
    .calendar-modal .calendar-options { grid-template-columns: minmax(0, 1fr); }
    #schedule-edit-modal .schedule-edit-redesign .modal-actions,
    .calendar-modal-backdrop .calendar-modal .calendar-modal-actions { bottom: -18px; margin: 0 -18px -18px; padding: 14px 18px; }
    #schedule-edit-modal .schedule-edit-redesign .modal-actions { width: calc(100% + 36px); }
    #schedule-edit-modal .schedule-edit-redesign > h2,
    .calendar-modal-backdrop .calendar-modal .yc-modal__title { font-size: 20px; }
    .crm-modal-heading-icon { width: 42px; height: 42px; flex-basis: 42px; border-radius: 12px; }
    body .schedule-page[data-schedule-module="schedule"] .schedule-day.active-day .schedule-day-header { padding: 14px; gap: 8px; }
    .schedule-page[data-schedule-module="schedule"] .schedule-items { padding: 10px; }
}

.my-finance-bank-panel { margin: 20px 0; padding: 20px 0; border-top: 1px solid var(--border-color, #e2e5ed); min-width: 0; }
.my-finance-bank-settings fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.my-finance-bank-settings .yc-field { max-width: 360px; }
.my-finance-bank-toggles { display: grid; gap: 16px; margin: 20px 0; }
.my-finance-bank-toggles .yc-toggle { display: flex; align-items: center; gap: 12px; min-height: 44px; }
.my-finance-bank-toggles .yc-toggle span { min-width: 0; overflow-wrap: anywhere; }
.my-finance-bank-actions { display: flex; gap: 12px; justify-content: flex-end; flex-wrap: wrap; margin: 16px 0; }
.my-finance-bank-page .my-finance-empty h2 { font-size: 20px; overflow-wrap: anywhere; }
.my-finance-bank-page .my-finance-empty p { max-width: 540px; margin-inline: auto; }
.my-finance-bank-list { display: grid; gap: 12px; }
.my-finance-bank-row__text { min-width: 0; overflow-wrap: anywhere; }
.my-finance-bank-page .my-finance-facts dd { overflow-wrap: anywhere; }

.my-finance-record.mf-record-card { display: grid; grid-template-columns: minmax(0,1fr) minmax(190px,250px); align-items: stretch; gap: 16px 24px; padding: 16px; }
.my-finance-record.mf-record-card:is(.mf-flow-row,.my-finance-record--opportunities) { padding-left: 14px; }
.mf-record-card .my-finance-record__body { display: flex; flex-direction: column; justify-content: center; gap: 10px; min-width: 0; }
.mf-record-card .my-finance-record__main { align-items: start; flex-wrap: nowrap; gap: 12px; }
.mf-record-card .my-finance-record__title h3 { margin: 0 0 4px; font-size: 15px; line-height: 1.5; }
.mf-record-card .my-finance-record__content { gap: 8px; }
.mf-record-card .my-finance-record__content > .my-finance-facts { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.mf-record-card .my-finance-record__content > .my-finance-facts > div { justify-content: flex-start; gap: 6px; }
.mf-record-card .my-finance-record__content > .my-finance-facts dd { text-align: left; }
.mf-record-card .my-finance-record__body > p { margin: 0; }
.mf-record-card .my-finance-record__body .yc-btn { max-width: 100%; white-space: normal; }
.mf-record-card .my-finance-record__aside { display: flex; flex-direction: column; justify-content: center; align-items: flex-end; gap: 10px; min-width: 0; }
.mf-record-card .my-finance-record__balance { min-width: 0; max-width: 100%; text-align: right; }
.mf-record-card .my-finance-record__balance > strong { font-size: 22px; line-height: 1.4; }
.mf-record-card .my-finance-record__actions { flex-wrap: wrap; padding: 0; margin: 0; border: 0; gap: 8px; }
.mf-record-card .my-finance-record__actions .yc-btn { min-height: 44px; padding: 8px 12px; }
@media (max-width: 699.98px) {
    .my-finance-record.mf-record-card { grid-template-columns: minmax(0,1fr); gap: 12px; padding: 14px; }
    .my-finance-record.mf-record-card:is(.mf-flow-row,.my-finance-record--opportunities) { padding-left: 12px; }
    .mf-record-card .my-finance-record__aside { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 10px 12px; border-top: 1px solid var(--yc-night-border, #edf0f6); padding-top: 12px; }
    .mf-record-card .my-finance-record__aside > :is(.mf-payment-state,.my-finance-badge) { grid-column: 1; grid-row: 1; justify-self: start; }
    .mf-record-card .my-finance-record__balance { grid-column: 2; grid-row: 1; }
    .mf-record-card .my-finance-record__actions { grid-column: 1 / -1; grid-row: 2; }
}

/* Operational tools stay separate from the detailed forecast. */
.mf-operations { display: grid; grid-template-columns: minmax(0,1.25fr) minmax(0,1fr); gap: 18px; min-width: 0; align-items: start; }
.mf-operations > section { min-width: 0; }
.mf-operations > :is(.mf-current,.mf-liquidity,.mf-quick,.mf-payment-summary,.mf-areas) { grid-column: 1 / -1; }
.mf-operations > :is(.mf-payment-summary,.mf-daily,.mf-month) { background: var(--yc-night-surface, #fff); border: 1px solid var(--yc-night-border, #dfe4ed); border-radius: 8px; padding: 18px; box-shadow: 0 2px 8px #17263804; }
.mf-operations .my-finance-heading { margin-bottom: 12px; }
.mf-operations .my-finance-heading small { font-size: 11px; color: var(--yc-night-muted, #667386); }
.mf-operations h2 { font-size: 19px; margin: 0; }
.mf-operations h3 { font-size: 15px; margin: 0; }
.mf-current__metrics { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 12px; margin: 14px 0 12px; }
.mf-current__metric { min-width: 0; background: var(--yc-night-surface, #fff); border: 1px solid var(--yc-night-border, #dfe4ed); border-top: 3px solid var(--app-accent); border-radius: 8px; padding: 14px; box-shadow: 0 3px 10px #17263805; }
.mf-current__metric[data-tone="success"] { border-top-color: #16a34a; }
.mf-current__metric[data-tone="danger"] { border-top-color: #dc2626; }
.mf-current__label { display: flex; align-items: center; gap: 8px; min-height: 40px; margin-bottom: 10px; font-size: 11px; line-height: 1.45; color: var(--yc-night-muted, #536174); }
.mf-current__label .my-finance-symbol { width: 28px; height: 28px; flex-basis: 28px; border-radius: 6px; }
.mf-current__label svg { width: 17px; height: 17px; }
.mf-current__metric[data-tone="success"] .my-finance-symbol { background: var(--yc-night-soft, #edf9f1); color: var(--yc-night-green, #15803d); }
.mf-current__metric[data-tone="danger"] .my-finance-symbol { background: var(--yc-night-error-bg, #fff1f2); color: var(--yc-night-error, #b91c1c); }
.mf-current__metric > strong { display: block; font-size: 22px; line-height: 1.35; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.mf-current__metric small { display: block; margin-top: 5px; color: var(--yc-night-muted, #657386); font-size: 11px; line-height: 1.5; }
.mf-snapshots { display: flex; flex-wrap: wrap; gap: 8px; font-size: 11px; }
.mf-snapshots a { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 6px; min-height: 36px; padding: 5px 9px; border: 1px solid var(--yc-night-border, #e0e5ed); border-radius: 6px; background: var(--yc-night-surface, #f9fafc); text-decoration: none; color: var(--yc-night-muted, #465468); }
.mf-snapshots svg { width: 14px; height: 14px; }
.mf-snapshots strong { font-weight: 600; }
.mf-snapshots span { color: var(--yc-night-muted, #6a7788); }
.mf-quick { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px; background: var(--yc-night-surface, #fff); border: 1px solid var(--yc-night-border, #dfe4ed); border-radius: 8px; }
.mf-quick .yc-btn { font-size: 12px; min-height: 44px; padding: 9px 12px; }
.mf-quick .mf-quick__main { border-color: rgba(var(--app-accent-rgb),.24); background: var(--app-accent-soft); color: var(--yc-night-accent, var(--app-accent-dark)); }
.mf-quick__more { display: none; position: relative; }
.mf-quick__more summary { list-style: none; cursor: pointer; }
.mf-quick__more summary::-webkit-details-marker { display: none; }
.mf-quick__more > div { position: absolute; top: calc(100% + 6px); right: 0; z-index: 70; width: 240px; max-width: calc(100vw - 24px); padding: 6px; background: var(--yc-night-surface, #fff); border: 1px solid var(--yc-night-border, #dce3eb); border-radius: 8px; box-shadow: 0 10px 30px #17263824; }
.mf-quick__more a { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 8px; color: var(--yc-night-muted, #263447); text-decoration: none; }
.mf-quick__more a:hover { background: var(--yc-night-soft, #f0f4f8); }
.my-finance-page {
    --mf-income-color: var(--yc-night-green, #15803d);
    --mf-income-soft: var(--yc-night-green-bg, #effaf3);
    --mf-income-border: #16a34a;
    --mf-expense-color: var(--yc-night-error, #b91c1c);
    --mf-expense-soft: var(--yc-night-error-bg, #fff3f3);
    --mf-expense-border: #dc2626;
    --mf-overdue-color: var(--yc-night-warning, #9a3412);
    --mf-overdue-soft: var(--yc-night-warning-bg, #fff4e5);
    --mf-overdue-border: #d97706;
}
.mf-flow--income { --mf-flow-color: var(--mf-income-color); --mf-flow-soft: var(--mf-income-soft); --mf-flow-border: var(--mf-income-border); }
.mf-flow--expense { --mf-flow-color: var(--mf-expense-color); --mf-flow-soft: var(--mf-expense-soft); --mf-flow-border: var(--mf-expense-border); }
.my-finance-page .mf-flow-amount { color: var(--mf-flow-color); }
.my-finance-page .mf-flow-row { border-left: 3px solid var(--mf-flow-border); }
.mf-flow-row .my-finance-symbol { color: var(--mf-flow-color); background: var(--mf-flow-soft); }
.my-finance-page .mf-flow-row { padding-left: 14px; }
.my-finance-page .mf-flow-row :is(.my-finance-record__main,.my-finance-row__body) { min-width: 0; }
.my-finance-page .mf-flow-row .mf-payment-state { max-width: 150px; flex-shrink: 0; }
.mf-current__metric.mf-flow--income,.mf-current__metric.mf-flow--expense { border-top-color: var(--mf-flow-border); }
.mf-current__metric[class*="mf-flow--"] .my-finance-symbol { color: var(--mf-flow-color); background: var(--mf-flow-soft); }
.mf-daily-progress__item > .mf-direction { margin-bottom: 6px; }
.my-finance-page .mf-flow-row :is(strong,dd,small) { overflow-wrap: anywhere; }
.mf-payment-state,.mf-payment__status { display: inline-block; padding: 4px 7px; border-radius: 4px; background: var(--yc-night-soft, #f1f4f8); color: var(--yc-night-muted, #4c5b6f); font-size: 11px; line-height: 1.45; overflow-wrap: anywhere; }
.my-finance-record__balance .mf-direction { margin: 5px 0 2px; }
.my-finance-page .finance-amount--income { color: var(--mf-income-color); }
.my-finance-page .finance-amount--expense { color: var(--mf-expense-color); }
.mf-payment-list { display: grid; gap: 8px; margin-top: 10px; }
.mf-payment { display: grid; grid-template-columns: 84px minmax(0,1fr) minmax(125px,auto) 130px auto; grid-template-areas: 'date body amount status actions'; gap: 12px; align-items: center; min-width: 0; padding: 12px 14px; border: 1px solid var(--yc-night-border, #dfe4ed); border-left: 3px solid var(--mf-flow-border); border-radius: 8px; background: var(--yc-night-surface, #fff); box-shadow: 0 2px 6px #17263804; }
.my-finance-page .mf-payment.is-overdue { border-left-color: var(--mf-overdue-border); }
.mf-payment.is-today .mf-payment__date { color: var(--yc-night-green, #15803d); }
.mf-payment.is-overdue .mf-payment__date { color: var(--yc-night-warning, #b45309); }
.mf-payment__date { display: grid; gap: 4px; font-size: 12px; font-weight: 600; }
.mf-payment__date { grid-area: date; overflow-wrap: anywhere; }
.mf-payment__date small { font-size: 11px; color: var(--yc-night-muted, #64748b); }
.mf-payment.is-overdue .mf-payment__date small { color: var(--yc-night-warning, #9a3412); background: var(--yc-night-soft, #fff1e7); border-radius: 4px; padding: 3px 4px; font-size: 10px; }
.mf-payment__body { min-width: 0; grid-area: body; }
.mf-payment__body > strong { display: block; font-size: 14px; line-height: 1.45; overflow-wrap: anywhere; }
.mf-payment__body > small { display: block; color: var(--yc-night-muted, #627084); font-size: 11px; margin-top: 4px; }
.mf-payment__meta { display: flex; gap: 3px 10px; flex-wrap: wrap; margin-top: 4px; font-size: 12px; color: var(--yc-night-muted, #4c5b6f); overflow-wrap: anywhere; }
.mf-payment__status { grid-area: status; justify-self: start; max-width: 100%; }
.mf-payment__amount { display: grid; grid-area: amount; justify-items: end; gap: 5px; min-width: 0; }
.mf-payment__amount strong { font-size: 15px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.mf-direction { display: inline-flex; align-items: center; gap: 4px; padding: 2px 5px; border-radius: 4px; font-size: 10px; font-weight: 700; }
.mf-direction svg { width: 14px; height: 14px; }
.mf-direction--income { color: var(--mf-income-color); background: var(--mf-income-soft); }
.mf-direction--expense { color: var(--mf-expense-color); background: var(--mf-expense-soft); }
.mf-payment__actions { display: flex; grid-area: actions; gap: 8px; align-items: center; justify-content: flex-end; }
.mf-payment__actions > form { margin: 0; }
.mf-payment__actions .app-icon-btn { width: 44px; height: 44px; flex: 0 0 44px; }
.mf-payment__confirm { min-width: 108px; min-height: 44px; padding: 8px 10px; font-size: 12px; color: var(--mf-income-color); border-color: var(--yc-night-border, #bbdfc9); background: var(--yc-night-soft, #f6fcf8); }
.mf-payment__confirm:hover { color: var(--yc-night-green, #166534); border-color: #86c99e; background: var(--yc-night-green-bg, #eaf8ef); }
.mf-payment__confirm svg { width: 16px; height: 16px; }
.mf-payment-counts { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; margin: 0; }
.mf-payment-counts > div { min-width: 0; padding: 8px 12px; border-left: 2px solid var(--yc-night-border, #dfe4ed); }
.mf-payment-counts dt { font-size: 12px; color: var(--yc-night-muted, #627084); }
.mf-payment-counts dd { margin: 5px 0 0; font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; }
.mf-payment-counts .is-overdue { border-color: #d97706; }
.mf-payment-counts .is-overdue dd { color: var(--yc-night-warning, #9a3412); }
.mf-payment-summary .my-finance-heading { flex-wrap: wrap; gap: 12px; }
.mf-payment-summary .yc-btn { font-size: 12px; }
.mf-payment-calendar { min-width: 0; }
.mf-payment-calendar > .mf-payment-counts { margin: 4px 0 16px; }
.mf-payment-calendar .mf-payment-counts > div { position: relative; padding: 14px 16px; border: 1px solid var(--yc-night-border, #dfe4ed); border-top: 3px solid var(--app-accent); border-radius: 8px; background: var(--yc-night-surface, #fff); box-shadow: 0 2px 8px #17263805; }
.mf-payment-calendar .mf-payment-counts dt { display: flex; align-items: center; gap: 9px; min-height: 32px; }
.mf-payment-calendar .mf-payment-counts dd { padding-left: 41px; font-size: 26px; }
.mf-payment-counts__icon { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 32px; width: 32px; height: 32px; border-radius: 6px; color: var(--yc-night-accent, var(--app-accent-dark)); background: var(--app-accent-soft); }
.mf-payment-counts__icon svg { width: 19px; height: 19px; }
.mf-payment-calendar .mf-payment-counts > [data-payment-count="overdue"] { border-top-color: #d97706; }
.mf-payment-calendar [data-payment-count="overdue"] .mf-payment-counts__icon { color: var(--yc-night-warning, #9a3412); background: var(--yc-night-soft, #fff4e5); }
.mf-payment-calendar .mf-payment-counts > [data-payment-count="pending"] { border-top-color: #16a34a; }
.mf-payment-calendar [data-payment-count="pending"] .mf-payment-counts__icon { color: var(--yc-night-green, #15803d); background: var(--yc-night-soft, #ecf9f0); }
.mf-payment-calendar .mf-payment-period { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,380px); gap: 12px; align-items: end; margin-bottom: 4px; }
.mf-payment-calendar .mf-payment-period__modes { margin-bottom: 0; }
.mf-payment-calendar .mf-payment-period__dates { grid-template-columns: repeat(2,minmax(0,1fr)); }
.mf-payment-calendar__groups { display: grid; grid-template-columns: minmax(0,1fr); gap: 18px; }
.mf-payment-calendar__group { min-width: 0; border-top: 2px solid var(--yc-night-border, #dfe4ed); padding-top: 12px; }
.mf-payment-calendar__group[data-payment-group="overdue"] { border-top-color: #d97706; }
.mf-payment-calendar__group .my-finance-heading { margin: 0 0 8px; }
.mf-payment-calendar__group h2 { margin: 0; font-size: 17px; }
.mf-payment.is-push-target,
.mf-payment:target {
    outline: 2px solid var(--yc-primary);
    outline-offset: -2px;
    scroll-margin-block-start: 8rem;
}
.mf-payment-calendar__group .mf-empty { padding: 10px 12px; margin: 0; font-size: 13px; background: var(--yc-night-soft, #f0f3f7); border-radius: 6px; }
.mf-payment-direction { min-width: 0; margin-top: 12px; }
.mf-payment-direction + .mf-payment-direction { margin-top: 18px; }
.mf-payment-direction__heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 16px; padding: 8px 12px; border-left: 3px solid var(--mf-flow-border); background: var(--mf-flow-soft); color: var(--mf-flow-color); }
.mf-payment-direction__heading h3 { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 14px; }
.mf-payment-direction__heading svg { width: 18px; height: 18px; flex-shrink: 0; }
.mf-payment-direction__heading p { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 14px; min-width: 0; margin: 0; font-size: 12px; }
.mf-payment-direction__heading strong { font-size: 14px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.mf-payment-direction .mf-payment-list { margin-top: 8px; }
.mf-payment-period { margin: 0 0 14px; padding: 0; border: 0; min-width: 0; }
.mf-payment-period legend { margin-bottom: 8px; font-size: 13px; font-weight: 600; }
.mf-payment-period__modes { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.mf-payment-period__modes label { position: relative; cursor: pointer; }
.mf-payment-period__modes input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.mf-payment-period__modes span { display: flex; align-items: center; min-height: 44px; padding: 9px 14px; border: 1px solid var(--yc-night-border, #dfe4ed); border-radius: 6px; font-size: 13px; }
.mf-payment-period__modes input:checked + span { color: var(--yc-night-accent, var(--app-accent-dark)); background: var(--app-accent-soft); border-color: var(--app-accent); }
.mf-payment-period__modes input:focus-visible + span { outline: 2px solid var(--app-accent); outline-offset: 2px; }
.mf-payment-period__dates { display: grid; grid-template-columns: repeat(2,minmax(0,200px)); gap: 12px; }
.mf-payment-period__dates .yc-input { min-width: 0; width: 100%; }
.mf-empty { margin: 16px 0 0; padding: 14px 0; color: var(--yc-night-muted, #657386); font-size: 14px; }
.mf-month__figures { display: grid; gap: 10px; margin: 18px 0; }
.mf-month__figures > div { min-width: 0; }
.mf-month__figures > div { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.mf-month__figures > div:last-child { border-top: 1px solid var(--yc-night-border, #e5e9f0); padding-top: 12px; }
.mf-month__figures dt { font-size: 12px; color: var(--yc-night-muted, #5f6c7e); line-height: 1.5; }
.mf-month__figures dd { margin: 0; font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; text-align: right; }
.mf-month__result { padding: 14px; background: var(--yc-night-green-bg, #ecfdf3); color: var(--yc-night-green, #166534); border-radius: 6px; margin: 12px 0; }
.mf-month__result > span { display: block; font-size: 12px; margin-bottom: 6px; }
.mf-month__result > strong { display: block; font-size: 26px; line-height: 1.3; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.mf-month__result.is-short { background: var(--yc-night-error-bg, #fff1f2); color: var(--yc-night-error, #9f1239); }
.mf-reference { display: flex; gap: 10px; align-items: end; flex-wrap: wrap; margin-top: 12px; }
.mf-reference .yc-field { flex: 1 1 240px; max-width: 380px; }
.mf-areas__grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; }
.mf-area { padding: 16px; border: 1px solid var(--yc-night-border, #dfe4ed); border-radius: 8px; background: var(--yc-night-surface, #fff); min-width: 0; }
.mf-area__name { display: flex; align-items: center; gap: 10px; min-width: 0; }
.mf-area__name h3 { overflow-wrap: anywhere; }
.mf-area dl { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; margin: 16px 0; }
.mf-area dt { font-size: 12px; color: var(--yc-night-muted, #657386); }
.mf-area dd { margin: 5px 0 0; font-weight: 700; font-size: 14px; overflow-wrap: anywhere; }
.mf-area > small { display: block; border-top: 1px solid var(--yc-night-border, #edf0f4); padding-top: 12px; font-size: 11px; color: var(--yc-night-muted, #57667a); line-height: 1.5; overflow-wrap: anywhere; }
.mf-liquidity { padding: 0; min-width: 0; }
.mf-liquidity__notice { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: var(--yc-night-warning-bg, #fff7ed); border-left: 3px solid #c2410c; font-size: 12px; }
.mf-liquidity__notice > div { flex: 1; min-width: 0; }
.mf-liquidity__notice strong { display: block; color: var(--yc-night-warning, #9a3412); font-size: 12px; }
.mf-liquidity__notice span { display: block; margin-top: 3px; color: var(--yc-night-muted, #665e56); overflow-wrap: anywhere; }
.mf-liquidity__notice > a { font-size: 11px; min-height: 36px; display: inline-flex; align-items: center; }
.mf-liquidity__more { margin-top: 6px; font-size: 12px; }
.mf-liquidity__more summary { cursor: pointer; padding: 5px 0; color: var(--yc-night-muted, #5c6575); }
.mf-liquidity__more .mf-liquidity__notice { margin-top: 6px; }
.my-finance-technical { margin-top: 24px; min-width: 0; }
.mf-forecast-detail > section { margin-top: 20px; }
.mf-forecast-detail .my-finance-forecast-controls { align-items: end; }
.mf-forecast-group { margin: 18px 0; border-block: 1px solid var(--yc-night-border, #dfe4ed); min-width: 0; }
.mf-forecast-group > summary { display: flex; align-items: center; gap: 12px; padding: 14px 0; font-size: 15px; font-weight: 700; cursor: pointer; list-style: none; }
.mf-forecast-group > summary::before { content: '+'; color: var(--yc-night-accent, var(--app-accent-dark)); font-size: 20px; font-weight: 500; }
.mf-forecast-group[open] > summary::before { content: '-'; }
.mf-forecast-group > .my-finance-band { border-top: 0; padding-top: 8px; }
.my-finance-page .my-finance-form { padding: 18px; gap: 16px; }
.my-finance-page .my-finance-form__section { padding-bottom: 14px; }
.my-finance-page .my-finance-form__section legend { padding-bottom: 10px; }
.my-finance-page .my-finance-form__fields { gap: 12px; }
.my-finance-page .my-finance-recurring-months .my-finance-record { grid-template-columns: 130px minmax(0,1fr) auto; border-width: 0 0 1px; border-radius: 0; padding: 12px 0; gap: 12px; }
.my-finance-recurring-months .my-finance-heading { margin: 0; flex-wrap: wrap; }
.my-finance-recurring-months h4 { margin: 0; }
.my-finance-recurring-months .my-finance-facts { margin: 0; gap: 5px 18px; }
.my-finance-page .my-finance-recurring-versions table { min-width: 0; table-layout: fixed; width: 100%; }
.my-finance-recurring-versions :is(th,td) { overflow-wrap: anywhere; }
.mf-lookup { position: relative; display: block; min-width: 0; }
.mf-lookup [hidden] { display: none !important; }
.mf-lookup__results { position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 80; max-height: 260px; overflow-y: auto; overscroll-behavior: contain; padding: 4px; background: var(--yc-night-surface, #fff); border: 1px solid var(--yc-night-border, #cbd5e1); border-radius: 6px; box-shadow: 0 8px 24px #17263820; }
.mf-lookup__results.is-above { top: auto; bottom: calc(100% + 4px); }
.mf-lookup__results button { display: block; width: 100%; min-height: 44px; padding: 9px 10px; border: 0; border-radius: 4px; background: transparent; font: inherit; font-size: 13px; text-align: left; color: var(--yc-night-muted, #233246); white-space: normal; overflow-wrap: anywhere; }
.mf-lookup__results button:is(:hover,.is-active) { background: var(--app-accent-soft,#f2edff); color: var(--yc-night-accent, var(--app-accent-dark,#5526a5)); }
.mf-confirm[open] { display: flex; flex-direction: column; width: min(520px, calc(100% - 24px)); max-width: 100%; max-height: calc(100dvh - 32px); overflow: hidden; padding: 0; border: 1px solid var(--yc-night-border, #dbe2ec); border-radius: 16px; color: var(--yc-night-text, #172335); background: var(--yc-night-surface, #fff); box-shadow: 0 20px 70px #15243740; }
.mf-confirm::backdrop { background: #151a37a1; backdrop-filter: blur(3px); }
.mf-confirm [hidden] { display: none !important; }
.mf-confirm [data-mf-confirm-name] { overflow-wrap: anywhere; }
.mf-confirm .my-finance-facts dd { min-width: 0; overflow-wrap: anywhere; }
.mf-confirm header h2 { overflow-wrap: anywhere; }
.mf-confirm .modal-action-grid > .yc-btn { white-space: normal; }
.mf-confirm p { margin: 0; font-size: 13px; }
.mf-confirm__error { color: var(--yc-night-error, #b91c1c); }
.mf-history__filters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; align-items: end; }
.mf-history__filters > .yc-btn { min-width: 0; min-height: 44px; }
.mf-history__list { list-style: none; margin: 8px 0 0; padding: 0; }
.mf-history__row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, auto); gap: 8px 12px; padding: 10px 0; border-bottom: 1px solid var(--yc-night-border, #dbe2ec); overflow-wrap: anywhere; }
.mf-history__row > div { min-width: 0; display: grid; align-content: start; justify-items: start; gap: 3px; }
.mf-history__row small { font-size: 12px; color: var(--yc-night-muted, #4b5563); }
.mf-history__row .mf-history__amount { text-align: end; justify-items: end; font-variant-numeric: tabular-nums; }
.mf-history__row .mf-history__time { text-align: end; justify-items: end; }
.mf-history__actions { grid-column: 1 / -1; }
.mf-history__actions .yc-btn { white-space: normal; }
.mf-history__pages { display: flex; gap: 12px; justify-content: center; align-items: center; }
@media (min-width: 768px) {
    .mf-history[open] { width: min(1060px, calc(100% - 24px)); }
    .mf-history__filters { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .mf-history__search { grid-column: span 2; }
    .mf-history__row { grid-template-columns: minmax(0, 1.4fr) minmax(0, .7fr) minmax(0, 1.25fr) minmax(0, .75fr) minmax(0, 1fr); align-items: center; }
    .mf-history__actions { grid-column: auto; }
}
.mf-receipt-picker { display: grid; min-width: 0; gap: 8px; margin: 0; padding: 0; border: 0; }
.mf-receipt-picker legend { padding: 0; margin-bottom: 6px; font-size: 13px; font-weight: 700; }
.mf-receipt-picker__drop { display: grid; gap: 8px; justify-items: center; padding: 12px; border: 1px dashed var(--yc-night-border, #bfc8de); border-radius: 8px; background: var(--yc-night-surface, #fff); }
.mf-receipt-picker__drop.is-dragging { border-color: var(--app-accent); background: var(--yc-night-soft, #f4eeff); }
.mf-receipt-picker__hint, .mf-receipt-picker__formats { color: var(--yc-night-muted, #4d5b75); margin: 0; font-size: 13px; }
.mf-receipt-picker__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.mf-receipt-picker__control { position: relative; min-height: 44px; cursor: pointer; }
.mf-receipt-picker__control:focus-within { outline: 2px solid var(--app-accent); outline-offset: 2px; }
.mf-receipt-picker__control input[type="file"] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.mf-receipt-picker__camera { display: none; }
.mf-receipt-files { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.mf-receipt-files[hidden] { display: none; }
.mf-receipt-file { display: grid; grid-template-columns: 42px minmax(0,1fr) auto; align-items: center; gap: 8px; min-width: 0; padding: 7px; border: 1px solid var(--yc-night-border, #e3e7f0); border-radius: 8px; background: var(--yc-night-surface, #fff); }
.mf-receipt-file__icon, .mf-receipt-file img { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 6px; object-fit: contain; color: var(--yc-night-accent, var(--app-accent-dark)); background: var(--yc-night-accent-bg, #f3effb); }
.mf-receipt-file__icon svg, .mf-receipt-link svg { width: 17px; height: 17px; flex: 0 0 17px; fill: none; stroke: currentColor; stroke-width: 2; }
.mf-receipt-file__meta { display: grid; min-width: 0; overflow-wrap: anywhere; }
.mf-receipt-file__meta small, .mf-receipt-history time { color: var(--yc-night-muted, #4d5b75); }
.mf-receipt-file__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.mf-receipt-file__actions form { margin: 0; }
.mf-receipt-page__form { display: grid; justify-items: start; gap: 10px; margin-top: 16px; }
.mf-receipt-page__form fieldset { width: min(100%, 520px); }
.mf-receipt-link { display: inline-flex; align-items: center; justify-self: start; gap: 5px; min-height: 32px; font-size: 13px; }
.mf-receipt-history { margin-top: 16px; }
.mf-receipt-history li { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 12px; padding: 6px 0; }
.mf-receipt-history li strong { min-width: 0; overflow-wrap: anywhere; }
@media (pointer: coarse) {
    .mf-receipt-picker__camera { display: inline-flex; }
    .mf-receipt-picker__hint { display: none; }
}
@media (max-width: 767px) {
    .mf-confirm[open] { position: fixed; inset: var(--modal-visual-top, 0px) 0 auto; height: fit-content; margin: 0 auto; width: 100%; max-height: calc(var(--modal-visual-height, 100dvh) - 12px); transform: translateY(max(12px, calc(var(--modal-visual-height, 100dvh) - 100%))); border: 0; border-radius: 16px 16px 0 0; }
    .mf-confirm .modal-sheet__scroll { border-radius: 12px 12px 0 0; }
    .mf-receipt-page .mf-receipt-file__actions { grid-column: 2 / -1; }
}
.mf-daily [data-mf-daily-status][data-error] { color: var(--yc-night-error, #b91c1c); }
.mf-confirm :is(input,textarea) { width: 100%; min-width: 0; }
.mf-daily-entry { display: grid; gap: 12px; margin: 0; }
.mf-daily .mf-daily-entry__heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin: 0; }
.mf-daily-entry__heading h2 { margin: 0; }
.mf-daily-entry__account { display: grid; grid-template-columns: auto minmax(0,1fr); align-items: center; gap: 8px; flex: 0 1 auto; min-width: 0; max-width: 100%; margin: 0; }
.mf-daily-entry__account-control { position: relative; min-width: 0; width: clamp(11.5rem, 15vw, 13rem); max-width: 100%; }
.mf-daily-entry__grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px 12px; min-width: 0; }
.mf-daily-entry__category { min-width: 0; }
.mf-lookup > .sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0; clip-path: inset(50%); overflow: hidden; white-space: nowrap; }
.mf-daily-entry > button { justify-self: center; min-width: 170px; min-height: 44px; }
.mf-daily-entry .yc-label { font-size: 12px; }
.mf-daily-entry .yc-input { min-width: 0; width: 100%; min-height: 44px; }
.mf-account-select, .mf-account-picker__trigger {
    --mf-account-control-height: 36px;
    width: 100%;
    min-width: 0;
    height: var(--mf-account-control-height);
    min-height: var(--mf-account-control-height);
    padding-inline: 8px;
    font-size: 14px;
    font-variant-numeric: tabular-nums;
    text-overflow: ellipsis;
}
@media (max-width: 700px) {
    .mf-account-select, .mf-account-picker__trigger { --mf-account-control-height: 44px; font-size: 16px; }
}
select.mf-account-select.mf-account-picker__native {
    position: absolute;
    width: 1px;
    height: 1px;
    min-height: 0;
    padding: 0;
    border: 0;
    opacity: 0;
    pointer-events: none;
}
.mf-account-picker { display: block; min-width: 0; container-type: inline-size; }
.mf-account-picker .mf-account-picker__trigger {
    display: flex;
    gap: 8px;
    align-items: center;
    height: auto;
    min-height: 52px;
    padding: 6px 12px 6px 10px;
    text-align: left;
}
.mf-account-picker .mf-account-picker__trigger:has(.mf-account-picker__content--compact) {
    min-height: var(--mf-account-control-height);
    padding-block: 3px;
}
.my-finance-filters, .mf-history__filters { --yc-control-height: 52px; }
.my-finance-filters :is(.yc-input, .yc-select), .mf-history__filters :is(.yc-input, .yc-select) { min-height: var(--yc-control-height); }
.mf-account-picker .mf-account-picker__trigger:focus-visible { border-color: var(--yc-control-focus, var(--yc-border)); box-shadow: var(--yc-focus-ring); }
.mf-account-picker__trigger::after { content: ""; flex: 0 0 6px; height: 6px; margin-inline-start: auto; border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: translateY(-2px) rotate(45deg); }
.mf-account-picker__content { display: grid; grid-template-columns: minmax(0,1fr); flex: 1; min-width: 0; align-items: center; gap: 2px 8px; line-height: 1.3; }
.mf-account-picker__content.has-account { grid-template-columns: 28px minmax(0,1fr) fit-content(50%); }
.mf-account-picker__content--compact.has-account { grid-template-columns: 23px minmax(0,1fr); }
.mf-account-picker__meta { display: grid; gap: 2px; min-width: 0; }
.mf-account-picker__content :is(.mf-account-picker__name, .mf-account-picker__area, .mf-account-picker__amount) { min-width: 0; overflow-wrap: anywhere; white-space: normal; }
.mf-account-picker__content.has-account .mf-account-picker__name { font-size: 14px; font-weight: 650; }
.mf-account-picker__area { font-size: 12px; color: var(--yc-muted, #526076); }
.mf-account-picker__amount { font-size: 13px; font-weight: 650; font-variant-numeric: tabular-nums; text-align: right; }
.mf-account-picker__icon {
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    color: var(--mf-account-color);
    background: color-mix(in srgb, var(--mf-account-color) 14%, transparent);
}
.mf-account-picker__icon svg { width: 16px; height: 16px; }
.mf-account-picker__content--compact .mf-account-picker__icon { width: 23px; height: 23px; }
.mf-account-picker__content [hidden] { display: none; }
@container (max-width: 260px) {
    .mf-account-picker__trigger .mf-account-picker__content.has-account:not(.mf-account-picker__content--compact) {
        grid-template-areas: "icon name amount" "icon area area";
        & .mf-account-picker__meta { display: contents; }
        & .mf-account-picker__icon { grid-area: icon; }
        & .mf-account-picker__name { grid-area: name; }
        & .mf-account-picker__area { grid-area: area; align-self: start; }
        & .mf-account-picker__amount { grid-area: amount; }
    }
}
@container (max-width: 205px) {
    .mf-account-picker__trigger .mf-account-picker__content.has-account:not(.mf-account-picker__content--compact) {
        grid-template-columns: 28px minmax(0,1fr);
        grid-template-areas: "icon name" "area area" "amount amount";
    }
}
.mf-account-picker__menu {
    position: fixed;
    inset: auto;
    margin: 0;
    z-index: 1200;
    display: grid;
    align-content: start;
    padding: 4px;
    border: 1px solid var(--yc-border, #dbe2ec);
    border-radius: 8px;
    color: var(--yc-text, #172033);
    background: var(--yc-surface, #fff);
    box-shadow: 0 8px 24px rgb(24 33 54 / 14%);
    overflow: auto;
    overscroll-behavior: contain;
}
.mf-account-picker__menu[hidden], .mf-account-dot[hidden], .mf-account-picker__error[hidden] { display: none; }
.mf-account-picker__option { display: flex; align-items: center; min-height: 46px; padding: 6px 8px; font-size: 14px; border-radius: 4px; cursor: pointer; }
.mf-account-picker__option + .mf-account-picker__option { border-top: 1px solid var(--yc-border, #dbe2ec); }
.mf-account-picker__option[aria-selected="true"] { background: color-mix(in srgb, var(--app-accent, #7939cc) 9%, transparent); }
.mf-account-picker__option:is(:hover, .is-focused) { outline: 1px solid var(--yc-border, #dbe2ec); outline-offset: -1px; }
.mf-account-picker__option:is(:hover, .is-focused):not([aria-selected="true"]) { background: var(--yc-bg-soft, #f1f3f8); }
.yc-theme-light .mf-account-picker__option:is(:hover, .is-focused, [aria-selected="true"]) .mf-account-picker__area { color: #526076; }
.yc-theme-dark .mf-account-picker__menu { background: var(--yc-surface); color: var(--yc-text); }
.yc-theme-dark .mf-account-picker__option:is(:hover, .is-focused):not([aria-selected="true"]) { background: var(--yc-night-soft); }
.yc-theme-dark .mf-account-picker__option[aria-selected="true"] { background: var(--yc-night-accent-bg); }
.yc-theme-dark .mf-account-picker__option:is(:hover, .is-focused) { outline-color: var(--yc-night-accent); }
.mf-account-picker__error { display: block; margin-top: 4px; color: #a51e38; }
[data-mf-account-color] { --mf-account-color: #626b7a; }
[data-mf-account-color="red"] { --mf-account-color: #c92a36; }
[data-mf-account-color="rose"] { --mf-account-color: #ae2051; }
[data-mf-account-color="orange"] { --mf-account-color: #d85113; }
[data-mf-account-color="amber"] { --mf-account-color: #e69a08; }
[data-mf-account-color="olive"] { --mf-account-color: #687822; }
[data-mf-account-color="lime"] { --mf-account-color: #79a518; }
[data-mf-account-color="green"] { --mf-account-color: #16874c; }
[data-mf-account-color="teal"] { --mf-account-color: #117f77; }
[data-mf-account-color="cyan"] { --mf-account-color: #098ba9; }
[data-mf-account-color="blue"] { --mf-account-color: #2268ce; }
[data-mf-account-color="indigo"] { --mf-account-color: #4147a1; }
[data-mf-account-color="violet"] { --mf-account-color: #7939cc; }
[data-mf-account-color="pink"] { --mf-account-color: #cf51a5; }
[data-mf-account-color="brown"] { --mf-account-color: #87512f; }
[data-mf-account-color="sand"] { --mf-account-color: #a58966; }
.mf-account-dot { display: inline-block; width: 10px; height: 10px; flex: 0 0 10px; border-radius: 50%; background: var(--mf-account-color); box-shadow: 0 0 0 1px rgb(24 33 54 / 20%); }
:is(.my-finance-record--accounts, .my-finance-record--entities, .mf-v3-area__header, .mf-area-appearance__preview) .my-finance-symbol[data-mf-account-color] {
    color: var(--mf-account-color); background: color-mix(in srgb, var(--mf-account-color) 12%, transparent);
}
.yc-theme-dark :is(.my-finance-record--entities, .mf-v3-area__header, .mf-area-appearance__preview) .my-finance-symbol[data-mf-account-color] {
    color: color-mix(in srgb, var(--mf-account-color), white 45%);
}
.mf-area-appearance__preview { display: flex; align-items: center; gap: 8px; grid-column: 1 / -1; }
.mf-area-picker .mf-account-picker__amount { white-space: nowrap; }
.mf-area-picker .mf-account-picker__option[aria-selected="true"]::after { content: "\2713"; margin-inline: 5px; }
.mf-account-inline { display: flex; align-items: center; gap: 8px; }
.mf-account-appearance { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 12px; }
.mf-account-appearance__choices { display: flex; flex-wrap: wrap; gap: 5px; }
.mf-account-appearance__choice { position: relative; }
.mf-account-appearance__choice input { position: absolute; opacity: 0; }
.mf-account-appearance__choice > span { display: grid; place-items: center; width: 40px; height: 40px; border: 1px solid var(--yc-border, #dbe2ec); border-radius: 8px; cursor: pointer; }
.mf-account-appearance__choice :is(svg, .mf-account-dot) { width: 18px; height: 18px; }
.mf-account-appearance__choice input:checked + span { outline: 2px solid var(--yc-text, #172033); outline-offset: -2px; }
.mf-account-appearance__choice input:focus-visible + span { outline: 2px solid var(--yc-accent, #7939cc); outline-offset: 1px; }
.mf-daily-progress__grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 16px; }
.mf-daily-progress__item { min-width: 0; padding: 8px 0 0; }
.mf-daily-progress__item h4 { font-size: 13px; margin: 0 0 7px; }
.mf-daily-progress__values { display: flex; flex-wrap: wrap; align-content: start; align-items: baseline; gap: 0 4px; min-height: 40px; line-height: 1.4; }
.mf-daily-progress__values strong { display: block; max-width: 100%; font-size: 14px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.mf-daily-progress__values > span { max-width: 100%; font-size: 12px; color: var(--yc-night-muted, #607084); overflow-wrap: anywhere; }
.mf-daily-progress__meter { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 8px; align-items: center; min-height: 18px; }
.mf-daily-progress__meter > span { font-size: 12px; color: var(--yc-night-muted, #59687b); white-space: nowrap; font-variant-numeric: tabular-nums; }
.mf-daily-progress__item progress { display: block; min-width: 0; width: 100%; height: 6px; margin: 0; accent-color: var(--app-accent); }
.mf-daily-progress__item[data-tone="warning"] progress { accent-color: #d97706; }
.mf-daily-progress__item[data-tone="danger"] progress { accent-color: #dc2626; }
.mf-daily-entry__category[data-tone="warning"] progress { accent-color: #d97706; }
.mf-daily-entry__category[data-tone="danger"] progress { accent-color: #dc2626; }
.mf-daily-progress__item small { display: block; color: var(--yc-night-muted, #59687b); font-size: 12px; }
.mf-daily-progress__item small > span { display: block; margin-top: 3px; }
.mf-daily-progress__number { display: inline-block; white-space: nowrap; }
.mf-daily-progress__item[data-tone="danger"] small { color: var(--yc-night-error, #b91c1c); }
.mf-daily-history__row { display: grid; grid-template-columns: minmax(0,1fr) auto auto auto; align-items: start; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--yc-night-border, #e2e8f0); }
.mf-daily-history__row > div { display: grid; gap: 4px; min-width: 0; }
.mf-daily-history__row time { font-size: 12px; color: var(--yc-night-muted, #667588); }
.mf-daily-history__row strong { font-size: 13px; overflow-wrap: anywhere; }
.mf-daily-history__row form { margin: 0; }
.mf-daily-edit > form { display: grid; gap: 10px; margin-top: 12px; }
.mf-daily-edit .yc-label { font-size: 12px; }
.mf-daily-edit .yc-input,.mf-daily-edit .yc-select { min-width: 0; width: 100%; }
.mf-daily [role="status"] { color: var(--yc-night-green, #166534); font-size: 13px; }
.mf-daily [data-mf-daily-status]:empty { display: none; }
.mf-daily-history { border-top: 1px solid var(--yc-night-border, #edf0f4); padding-top: 8px; margin-top: 10px; }
.mf-daily-history > summary { font-size: 12px; }
@media (min-width: 1200px) {
    .mf-daily-entry__grid { grid-template-columns: repeat(4,minmax(0,1fr)); }
    .mf-daily-entry .mf-daily-progress__values { min-height: 28px; }
}
@media (max-width: 640px) {
    .mf-daily .mf-daily-entry__heading { flex-direction: column; align-items: stretch; }
    .mf-daily-entry__account { width: fit-content; }
    .mf-daily-entry > button { width: min(100%,260px); }
}
@media (max-width: 379.98px) {
    .mf-daily-entry__grid { grid-template-columns: minmax(0,1fr); }
}
@media (max-width: 1199px) {
    .mf-payment-calendar .mf-payment-counts { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .mf-payment-calendar .mf-payment-period { grid-template-columns: minmax(0,1fr); }
    .mf-payment-calendar .mf-payment-period__dates { max-width: 420px; }
    .mf-payment { grid-template-columns: 84px minmax(0,1fr) auto; grid-template-areas: 'date body status' 'date amount actions'; gap: 8px 12px; }
    .mf-payment__amount { display: flex; justify-content: flex-start; align-items: center; flex-wrap: wrap; gap: 8px; }
    .mf-payment__status { justify-self: end; max-width: 150px; }
    .mf-operations { grid-template-columns: minmax(0,1fr); }
    .mf-current__metrics { grid-template-columns: repeat(3,minmax(0,1fr)); }
}
@media (max-width: 899.98px) {
    .mf-quick .mf-quick__desktop { display: none; }
    .mf-quick__more { display: block; }
    .mf-operations > .mf-current { order: 0; }
    .mf-operations > .mf-liquidity { order: 1; }
    .mf-operations > .mf-payment-summary { order: 2; }
    .mf-operations > .mf-daily { order: 4; }
    .mf-operations > .mf-month { order: 5; }
    .mf-operations > .mf-quick { order: 6; }
    .mf-operations > .mf-areas { order: 7; }
}
@media (max-width: 699.98px) {
    .mf-payment-direction__heading { align-items: flex-start; flex-direction: column; gap: 5px; }
    .mf-operations { gap: 14px; }
    .mf-operations > :is(.mf-payment-summary,.mf-daily,.mf-month) { padding: 14px; }
    .mf-payment-counts { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
    .mf-payment-period__dates { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .mf-operations h2 { font-size: 17px; }
    .mf-current__metrics { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
    .mf-current__metric { padding: 11px; }
    .mf-current__metric:last-child { grid-column: 1 / -1; }
    .mf-current__metric > strong { font-size: 19px; }
    .mf-current__label { align-items: start; gap: 6px; min-height: 46px; }
    .mf-current__metric:last-child .mf-current__label { min-height: 0; align-items: center; margin-bottom: 7px; }
    .mf-current__label .my-finance-symbol { width: 24px; height: 24px; flex-basis: 24px; }
    .mf-payment { grid-template-columns: minmax(0,1fr) minmax(0,1fr); grid-template-areas: 'date status' 'body body' 'amount amount' 'actions actions'; gap: 8px; padding: 12px; }
    .mf-payment__date { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; font-size: 11px; }
    .mf-payment__actions { justify-content: flex-start; flex-wrap: wrap; }
    .mf-payment__actions .app-icon-btn { width: 44px; }
    .mf-payment-calendar .mf-payment-counts > div { padding: 10px; }
    .mf-payment-calendar .mf-payment-counts dt { gap: 7px; font-size: 11px; }
    .mf-payment-calendar .mf-payment-counts dd { padding-left: 39px; font-size: 23px; }
    .my-finance-filters { padding: 12px; }
    .mf-payment__body > strong { font-size: 13px; }
    .mf-payment__meta { font-size: 11px; }
    .mf-quick { gap: 6px; padding: 8px; }
    .mf-quick .yc-btn { padding-inline: 9px; font-size: 11px; }
    .mf-quick__more summary { width: 44px; padding-inline: 0; justify-content: center; }
    .mf-quick__more summary > span { display: none; }
    .mf-area dl { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .mf-areas__grid { grid-template-columns: minmax(0,1fr); }
    .mf-liquidity__notice { flex-wrap: wrap; align-items: start; }
    .mf-liquidity__notice > a { margin-left: 28px; min-height: 32px; }
    .my-finance-page .my-finance-recurring-months .my-finance-record { grid-template-columns: minmax(0,1fr) auto; }
    .my-finance-recurring-months .my-finance-facts { grid-column: 1 / -1; grid-row: 2; }
    .mf-daily-progress__grid { gap: 10px; }
    .mf-daily-progress__item strong { font-size: 14px; overflow-wrap: anywhere; }
    .mf-daily-progress__item strong span,.mf-daily-progress__item small { font-size: 11px; }
    .mf-daily-entry { gap: 10px; }
    .mf-daily-entry .yc-input { font-size: 16px; padding-inline: 8px; }
    .mf-daily-entry__heading { align-items: center; gap: 8px; }
    .mf-daily-history__row { grid-template-columns: minmax(0,1fr) auto; }
    .mf-daily-edit { grid-column: 1; }
}

/* Dashboard V3 reuses the canonical payment and forecast presentation tokens. */
.mf-operations.mf-v3 { grid-template-columns: minmax(0,1fr); gap: 22px; }
.mf-operations.mf-v3 > * { order: 0; }
.my-finance-page form[method="get"] { scroll-margin-top: 150px; }
.mf-v3-areas { display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 32px)/2.15); gap: 14px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x proximity; padding: 3px 2px 12px; scrollbar-width: thin; scrollbar-color: #bba2ed #eee8f8; min-width: 0; }
.mf-v3-area { --mf-area-color: #7c3aed; min-width: 0; display: flex; flex-direction: column; scroll-snap-align: start; padding: 16px; border: 1px solid var(--yc-night-border, #e0dcef); border-top: 2px solid var(--mf-area-color); border-radius: 8px; background: var(--yc-night-surface, #fff); box-shadow: 0 3px 12px #47208008; }
@supports (grid-template-rows: subgrid) {
    .mf-v3-areas { row-gap: 0; }
    .mf-v3-area { display: grid; grid-row: 1 / span 5; grid-template-rows: subgrid; }
}
.mf-v3-area[data-entity-type="household"] { --mf-area-color: #16a34a; }
.mf-v3-area[data-entity-type="company"] { --mf-area-color: #2563eb; }
.mf-v3-area__header { display: flex; align-items: center; gap: 9px; min-width: 0; }
.mf-v3-area__header > div:not([popover]) { flex: 1; min-width: 0; }
.mf-v3 .mf-v3-area__header h3 { font-size: 17px; line-height: 1.3; overflow-wrap: anywhere; }
.mf-v3-area__header small { display: block; font-size: 11px; color: var(--yc-night-muted, #667386); margin-top: 3px; }
.mf-v3-area__header .my-finance-symbol { color: var(--mf-area-color); }
.mf-v3-area__header .app-icon-btn { flex: 0 0 36px; width: 36px; height: 44px; }
.mf-v3-area__header .my-finance-badge { font-size: 10px; padding: 3px 5px; }
.mf-v3-area__metrics { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; margin: 18px 0; }
.mf-v3-area__metrics > div { min-width: 0; }
.mf-v3-area__metrics > div + div { border-left: 1px solid var(--yc-night-border, #e6e8ef); padding-left: 10px; }
.mf-v3-area__metrics dt { color: var(--yc-night-muted, #526078); font-size: 10px; line-height: 1.5; min-height: 30px; }
.mf-v3-area__metrics dd { margin: 5px 0 0; font-size: 17px; font-weight: 700; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.mf-v3-area__accounts { display: flex; flex-wrap: wrap; align-content: start; gap: 6px 14px; margin: -6px 0 14px; padding-top: 10px; border-top: 1px solid var(--yc-night-border, #edf0f5); color: var(--yc-night-muted, #626f83); font-size: 11px; line-height: 1.5; }
.mf-v3-area__accounts:empty { padding: 0; border: 0; }
.mf-v3-area__accounts > div { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 6px; min-width: 0; max-width: 100%; }
.mf-v3-area__accounts dt { display: flex; align-items: baseline; gap: 4px; min-width: 0; overflow-wrap: anywhere; }
.mf-v3-area__accounts dt > span { min-width: 0; }
.mf-v3-area__accounts svg { width: 13px; height: 13px; flex: 0 0 13px; align-self: center; }
.mf-v3-area__accounts dd { margin: 0; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.mf-v3 .my-finance-currency { font-size: 10px; font-weight: 500; }
.mf-v3-area__need { display: flex; gap: 10px; align-items: center; padding: 12px; background: var(--yc-night-green-bg, #effaf3); color: var(--yc-night-green, #166534); }
.mf-v3-area__need.is-short { background: var(--yc-night-error-bg, #fff1f2); color: var(--yc-night-error, #b91c1c); }
.mf-v3-area__need .my-finance-symbol { color: inherit; background: transparent; }
.mf-v3-area__need > div { min-width: 0; }
.mf-v3-area__need span { font-size: 12px; }
.mf-v3-area__need strong { display: block; font-size: 21px; margin: 3px 0; overflow-wrap: anywhere; }
.mf-v3-area__need small { display: block; font-size: 11px; line-height: 1.5; }
.mf-v3-area__payments { margin-top: 18px; }
.mf-v3 .mf-v3-area__payments .my-finance-heading { margin-bottom: 3px; gap: 8px; }
.mf-v3-area__payments h4 { margin: 0; font-size: 13px; }
.mf-v3-area__payments .my-finance-heading a { font-size: 11px; white-space: nowrap; }
.mf-v3-period { display: block; color: var(--yc-night-muted, #667386); font-size: 10px; margin-bottom: 8px; }
.mf-v3-obligations { --mf-obligation-height: 44px; min-height: calc(5 * var(--mf-obligation-height)); }
.mf-v3-obligation { display: grid; grid-template-columns: 24px minmax(0,1fr) auto auto; grid-template-areas: 'icon name amount action' 'icon date amount action'; gap: 3px 7px; align-items: center; min-height: var(--mf-obligation-height); padding: 4px 0; border-top: 1px solid var(--yc-night-border, #edf0f5); color: var(--yc-night-text, #172335); font-size: 12px; }
.mf-v3-obligation > .my-finance-symbol { grid-area: icon; width: 24px; height: 24px; }
.mf-v3-obligation svg { width: 15px; height: 15px; }
.mf-v3-obligation__name { grid-area: name; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: inherit; }
.mf-v3-obligation time { grid-area: date; font-size: 10px; color: var(--yc-night-muted, #667386); }
.mf-v3-obligation strong { grid-area: amount; font-size: 12px; font-variant-numeric: tabular-nums; }
.mf-v3-obligation.is-overdue, .mf-v3-obligation.is-overdue time { color: var(--yc-night-error, #b91c1c); }
.mf-v3-obligation form { grid-area: action; }
.mf-v3-obligation .mf-payment__confirm { min-width: 0; min-height: 34px; padding: 3px 6px; gap: 4px; font-size: 11px; }
.mf-v3-obligation .mf-payment__confirm span { display: inline; }
@media (max-width: 700px) {
    .mf-v3-obligations { --mf-obligation-height: 54px; }
    .mf-v3-obligation { grid-template-areas: 'icon name name name' 'icon date amount action'; }
}
.mf-v3-menu { position: fixed; inset: auto; margin: 0; padding: 6px; width: 232px; max-width: calc(100vw - 24px); border: 1px solid var(--yc-night-border, #e0dcef); border-radius: 8px; background: var(--yc-night-surface, #fff); color: var(--yc-night-text, #172335); box-shadow: 0 12px 35px #17263826; }
.mf-v3-menu :is(a,button) { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; padding: 8px 10px; font-size: 13px; text-decoration: none; color: inherit; }
.mf-v3-menu button { border: 0; background: transparent; text-align: start; cursor: pointer; }
.mf-v3-menu svg { width: 18px; height: 18px; color: var(--yc-night-accent, var(--app-accent)); flex-shrink: 0; }
.mf-v3-menu a[href*="direction=income"] svg { color: var(--mf-income-color); }
.mf-v3-menu a[href*="direction=expense"] svg { color: var(--mf-expense-color); }
.mf-v3-menu :is(a,button):hover { background: var(--app-accent-soft); }
.mf-v3 :is(a,button,[tabindex]):focus-visible,.mf-v3-menu :is(a,button):focus-visible { outline: 2px solid var(--app-accent); outline-offset: 2px; }
.mf-v3 .mf-current__metrics { margin: 0; }
.mf-v3 .mf-current__metric { border-top: 1px solid var(--yc-night-border, #dfe4ed); padding: 14px; }
.mf-v3 .mf-current__metric > strong { font-size: 21px; }
.mf-v3-quick { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.mf-v3-quick > a { display: flex; align-items: center; gap: 8px; min-width: 0; min-height: 44px; padding: 7px 8px; border: 1px solid var(--yc-night-border, #e0dcef); border-radius: 8px; background: var(--yc-night-surface, #fff); box-shadow: 0 3px 12px #47208006; color: var(--yc-night-accent, var(--app-accent-dark)); text-decoration: none; }
.mf-v3-quick > a:is(:hover,:focus-visible) { border-color: var(--app-accent); background: var(--app-accent-soft); }
.mf-v3-quick .my-finance-symbol { width: 28px; height: 28px; flex-basis: 28px; }
.mf-v3-quick strong { min-width: 0; font-size: 13px; line-height: 1.25; overflow-wrap: anywhere; }
@media (min-width: 700px) { .mf-v3-quick { grid-template-columns: repeat(3,minmax(0,1fr)); } }
@media (min-width: 1200px) { .mf-v3-quick { grid-template-columns: repeat(6,minmax(0,1fr)); } }
.mf-v3 .mf-daily { width: 100%; }
.mf-v3-outlook { display: grid; grid-template-columns: minmax(0,1.4fr) minmax(0,1fr); gap: 18px; min-width: 0; }
.mf-v3-outlook > section { padding: 18px; min-width: 0; background: var(--yc-night-surface, #fff); border: 1px solid var(--yc-night-border, #e0dcef); border-radius: 8px; box-shadow: 0 3px 12px #47208006; }
.mf-v3-outlook h2 { display: flex; gap: 8px; align-items: center; }
.mf-v3-outlook h2 svg { color: var(--yc-night-accent, var(--app-accent)); width: 22px; height: 22px; flex-shrink: 0; }
.mf-v3-scenarios > header { flex-wrap: wrap; gap: 10px; }
.mf-v3-scenarios .mf-payment-period__modes { margin: 0; gap: 4px; }
.mf-v3-scenarios .mf-payment-period__modes span { font-size: 11px; padding: 6px 10px; }
.mf-v3-scenario-group { display: grid; gap: 10px; margin: 14px 0; }
.mf-v3-scenario { display: grid; grid-template-columns: 32px minmax(100px,1fr) minmax(0,1.3fr); gap: 10px; align-items: center; padding: 12px; background: var(--yc-night-surface, #f7f8fc); }
.mf-v3-scenario[data-dashboard-scenario="SAFE"] { background: var(--yc-night-soft, #f2faf6); }
.mf-v3-scenario small { font-size: 11px; color: var(--yc-night-muted, #667386); }
.mf-v3-scenario dl { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; margin: 0; }
.mf-v3-scenario dt { color: var(--yc-night-muted, #667386); font-size: 11px; }
.mf-v3-scenario dd { margin: 4px 0 0; font-size: 16px; font-weight: 700; overflow-wrap: anywhere; }
.mf-v3-risk > h2 { margin-bottom: 16px; }
.mf-v3-risk__profile { display: grid; grid-template-columns: minmax(0,.43fr) minmax(0,.57fr); gap: 14px; align-items: center; min-width: 0; }
.mf-v3-risk__profile + .mf-v3-risk__profile { border-top: 1px solid var(--yc-night-border, #e0dcef); padding-top: 16px; margin-top: 16px; }
.mf-v3-risk__gauge { min-width: 0; width: 100%; max-width: 240px; margin: 0 auto; text-align: center; }
.mf-v3-risk__gauge > svg { display: block; width: 100%; height: auto; aspect-ratio: 220 / 125; overflow: visible; }
.mf-v3-risk__arc--low { stroke: #16a34a; }
.mf-v3-risk__arc--caution { stroke: #eab308; }
.mf-v3-risk__arc--medium { stroke: #f97316; }
.mf-v3-risk__arc--high { stroke: #dc2626; }
.mf-v3-risk__needle { fill: #172335; transform-box: view-box; transform-origin: 50% 88%; }
[data-risk-level="low"] .mf-v3-risk__needle { transform: rotate(-65deg); }
[data-risk-level="medium"] .mf-v3-risk__needle { transform: rotate(12deg); }
[data-risk-level="high"] .mf-v3-risk__needle { transform: rotate(65deg); }
.mf-v3-risk__gauge figcaption { margin-top: 8px; }
.mf-v3-risk__gauge figcaption small { display: block; margin-top: 6px; font-size: 11px; color: var(--yc-night-muted, #667386); }
.mf-v3-risk__gauge .my-finance-badge { white-space: normal; }
.mf-v3-risk__facts { min-width: 0; padding: 0; margin: 0; list-style: none; display: grid; gap: 10px; }
.mf-v3-risk__facts li { display: flex; gap: 10px; font-size: 12px; line-height: 1.5; }
.mf-v3-risk__facts li > span { min-width: 0; overflow-wrap: anywhere; }
.mf-v3-risk__facts small { display: block; margin-top: 3px; font-size: 10px; color: var(--yc-night-muted, #667386); }
.mf-v3-risk__facts svg { width: 18px; height: 18px; flex: 0 0 18px; }
.mf-v3-risk__facts [data-risk-severity="success"] > svg { color: var(--yc-night-green, #15803d); }
.mf-v3-risk__facts [data-risk-severity="warning"] > svg { color: var(--yc-night-warning, #a16207); }
.mf-v3-risk__facts [data-risk-severity="danger"] > svg { color: var(--yc-night-error, #b91c1c); }
@media (min-width: 1800px) { .mf-v3-areas { grid-auto-columns: calc((100% - 28px)/3); } }
@media (max-width: 1199.98px) {
    .mf-v3-areas { grid-auto-columns: min(440px,85%); }
    .mf-daily-progress__grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .mf-v3-outlook { grid-template-columns: minmax(0,1fr); }
}
@media (max-width: 899.98px) {
    .my-finance-page .mf-settings-link { min-width: 44px; width: 44px; min-height: 44px; padding: 0; justify-content: center; }
    .my-finance-page .mf-settings-link > span { display: none; }
}
@media (max-width: 699.98px) {
    .mf-v3-areas { grid-auto-columns: calc(100% - 26px); gap: 10px; }
    .mf-v3-area { padding: 12px; }
    .mf-v3-area__header { gap: 6px; }
    .mf-v3-area__header > .my-finance-symbol { width: 28px; height: 28px; flex-basis: 28px; }
    .mf-v3 .mf-v3-area__header h3 { font-size: 16px; }
    .mf-v3-area__metrics { gap: 6px; }
    .mf-v3-area__metrics > div + div { padding-left: 6px; }
    .mf-v3-area__metrics dd { font-size: 16px; }
    .mf-daily-progress__grid { grid-template-columns: minmax(0,1fr); }
    .mf-v3-outlook > section { padding: 14px; }
    .mf-v3-scenario dl { grid-column: 1 / -1; }
    .mf-v3-scenario { grid-template-columns: 32px minmax(0,1fr); }
    .mf-v3-risk__profile { grid-template-columns: minmax(0,1fr); gap: 16px; }
    .mf-v3-risk__gauge { max-width: 200px; }
}

.my-finance-page .mf-ledger-summary { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 16px; padding: 16px 0; }
.my-finance-page .mf-ledger-summary > strong { font-size: 22px; }
.my-finance-page .mf-ledger-filters { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: end; gap: 12px; }
.mf-ledger-filters .yc-field { min-width: 0; }
.mf-ledger-list { display: grid; gap: 8px; }
.mf-ledger-row { display: grid; grid-template-columns: 100px minmax(0, 1fr) minmax(170px, auto) 44px; align-items: center; gap: 16px; padding: 14px 16px; border: 1px solid var(--app-border, #e3e5ed); border-left: 3px solid rgba(var(--app-accent-rgb), .35); border-radius: 8px; background: var(--yc-night-surface, #fff); }
.mf-ledger-row.mf-flow--income { border-left-color: #16a34a; }
.mf-ledger-row.mf-flow--expense { border-left-color: #dc2626; }
.mf-ledger-description, .mf-ledger-values { min-width: 0; display: grid; gap: 5px; overflow-wrap: anywhere; }
.mf-ledger-values { text-align: right; }
.mf-ledger-values > strong { font-size: 17px; }
.mf-ledger-row small { color: var(--yc-night-muted, #626a80); font-size: 12px; }
.mf-ledger-row .app-icon-btn { width: 44px; height: 44px; }
.mf-ledger-archive { padding: 16px 0; overflow-wrap: anywhere; }
.mf-ledger-archive summary { cursor: pointer; min-height: 44px; }
.mf-fv2 { display: grid; gap: 24px; min-width: 0; }
.mf-fv2 > section { min-width: 0; }
.mf-fv2 h2 { display: flex; align-items: center; gap: 8px; font-size: 20px; margin: 0; }
.mf-fv2 h2 > svg { width: 23px; height: 23px; color: var(--yc-night-accent, #7c3aed); flex-shrink: 0; }
.mf-fv2-heading { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.mf-fv2-heading > div { flex: 1 1 290px; }
.mf-fv2-heading h2 { font-size: 26px; }
.mf-fv2-heading p { margin: 7px 0 0; color: var(--yc-night-muted, #626f83); font-size: 13px; }
.mf-fv2-controls { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; max-width: 100%; flex-shrink: 0; }
.mf-fv2-controls fieldset { margin: 0; min-width: 0; flex: 0 0 auto; }
.mf-fv2-controls .my-finance-segment label { flex: 0 0 auto; }
.mf-fv2-controls .my-finance-segment label > span { min-height: 40px; display: flex; align-items: center; padding: 8px 10px; }
.mf-fv2-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 14px; }
.mf-fv2 .my-finance-kpi { min-width: 0; border-radius: 8px; padding: 16px; }
.mf-fv2 .my-finance-kpi h3 { font-size: 13px; margin: 0; line-height: 1.4; }
.mf-fv2 .my-finance-kpi > strong { font-size: 22px; line-height: 1.4; overflow-wrap: anywhere; }
.mf-fv2 .my-finance-kpi small { font-size: 11px; line-height: 1.5; }
.mf-fv2 .my-finance-currency { font-size: 11px; font-weight: 500; }
.mf-fv2-chart { background: var(--yc-night-surface, #fff); border: 1px solid var(--yc-night-border, #e4e0ee); border-radius: 8px; padding: 18px; min-width: 0; }
.mf-fv2-chart + .mf-fv2-chart { margin-top: 16px; }
.mf-fv2-chart-modes { display: flex; flex-wrap: wrap; gap: 4px; }
.mf-fv2-chart-modes button { border: 1px solid var(--yc-night-border, #e5dfef); color: var(--yc-night-muted, #514071); background: var(--yc-night-surface, #fff); border-radius: 6px; min-height: 44px; padding: 7px 12px; font: inherit; font-size: 12px; cursor: pointer; }
.mf-fv2-chart-modes button[aria-pressed="true"] { background: #7c3aed; color: #fff; border-color: #7c3aed; }
.mf-fv2-chart-modes button:focus-visible, .mf-fv2 [data-fv-point]:focus-visible { outline: 2px solid #7c3aed; outline-offset: 2px; }
.mf-fv2-plot { position: relative; width: 100%; height: 340px; min-width: 0; }
.mf-fv2 .mf-fv2-plot > svg { display: block; width: 100%; height: 100%; overflow: visible; stroke: none; fill: none; }
.mf-fv2-grid-line { stroke: #e9e8f0; stroke-width: 1; }
.mf-fv2-zero { stroke: #b99ae9; stroke-width: 1; stroke-dasharray: 4 3; }
.mf-fv2-axis { font: 11px system-ui, sans-serif; fill: #68738b; stroke: none; }
.mf-fv2-area-fill { fill: #7c3aed; opacity: .1; }
.mf-fv2-balance-line { fill: none; stroke: #7c3aed; stroke-width: 2.5; stroke-linejoin: round; }
.mf-fv2-point { fill: #fff; stroke: #7c3aed; stroke-width: 2; }
.mf-fv2-bar { opacity: .25; stroke: none; }
.mf-fv2-bar--income { fill: #16a34a; }
.mf-fv2-bar--expense { fill: #dc2626; }
.mf-fv2-chart[data-mode="flows"] .mf-fv2-bar { opacity: .85; }
.mf-fv2-chart[data-mode="flows"] .mf-fv2-area-fill { opacity: .025; }
.mf-fv2 [data-fv-point] { cursor: crosshair; stroke: none; }
.mf-fv2 [data-fv-point].is-selected { fill: #7c3aed; fill-opacity: .035; }
.mf-fv2-tooltip { position: absolute; z-index: 3; width: 250px; max-width: calc(100% - 8px); border: 1px solid var(--yc-night-border, #dcd6eb); border-radius: 6px; background: var(--yc-night-surface, #fff); padding: 12px; box-shadow: 0 5px 18px #25154022; font-size: 12px; pointer-events: none; }
.mf-fv2-tooltip > strong { display: block; margin-bottom: 8px; }
.mf-fv2-tooltip > div { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 4px 10px; margin-top: 5px; }
.mf-fv2-tooltip [data-series="income"] { color: var(--yc-night-green, #15803d); }
.mf-fv2-tooltip [data-series="expenses"] { color: var(--yc-night-error, #b91c1c); }
.mf-fv2-legend { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; color: var(--yc-night-muted, #637089); font-size: 12px; }
.mf-fv2-legend > span::before { content: ""; display: inline-block; width: 9px; height: 9px; border-radius: 2px; background: #7c3aed; margin-right: 6px; }
.mf-fv2-legend > [data-series="income"]::before { background: #16a34a; }
.mf-fv2-legend > [data-series="expense"]::before { background: #dc2626; }
.mf-fv2-legend small { margin-left: auto; }
.mf-fv2-note { font-size: 12px; color: var(--yc-night-muted, #69758a); line-height: 1.5; margin: 10px 0 0; }
.mf-fv2-stats { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 10px; }
.mf-fv2-stats .my-finance-kpi > strong { font-size: 19px; }
.mf-fv2-account-grid { display: grid; grid-auto-flow: column; grid-auto-columns: min(280px, 86%); gap: 12px; min-width: 0; max-width: 100%; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x proximity; padding: 2px 2px 12px; scrollbar-width: thin; scrollbar-color: #bba2ed #eee8f8; }
.mf-fv2-account-grid > .mf-fv2-mini { scroll-snap-align: start; }
.mf-fv2-account-grid:focus-visible { outline: 2px solid var(--app-accent-dark); outline-offset: 2px; }
.mf-fv2-area-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 12px; }
.mf-fv2-mini { min-width: 0; border: 1px solid var(--yc-night-border, #e2deed); border-radius: 8px; padding: 14px; background: var(--yc-night-surface, #fff); }
.mf-fv2-mini header { display: flex; gap: 8px; align-items: center; margin-bottom: 12px; }
.mf-fv2-mini header > div { flex: 1; min-width: 0; }
.mf-fv2-mini h3 { font-size: 14px; margin: 0; overflow-wrap: anywhere; }
.mf-fv2-mini > strong { display: block; font-size: 21px; margin: 4px 0; overflow-wrap: anywhere; }
.mf-fv2-mini small { display: block; font-size: 11px; color: var(--yc-night-muted, #69758a); line-height: 1.5; }
.mf-fv2-mini-bottom { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px; margin-top: 8px; }
.mf-fv2-mini-bottom > div { min-width: 0; flex: 1 1 100px; }
.mf-fv2-mini-bottom b { display: block; font-size: 14px; overflow-wrap: anywhere; }
.mf-fv2-mini-bottom .my-finance-badge { display: inline-flex; margin-top: 7px; font-size: 11px; }
.mf-fv2 .mf-fv2-spark { width: 105px; max-width: 100%; height: 44px; stroke: none; fill: none; }
.mf-fv2-expand { display: flex; gap: 6px; }
.mf-fv2-months { margin-top: 8px; border: 1px solid var(--yc-night-border, #e3dfee); border-radius: 6px; overflow: hidden; scroll-margin-top: 100px; }
.mf-fv2-months > summary { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; min-height: 48px; padding: 10px 12px; cursor: pointer; background: var(--yc-night-accent-bg, #f7f5fc); }
.mf-fv2-months summary > strong { display: flex; align-items: center; gap: 8px; font-size: 13px; min-width: 0; overflow-wrap: anywhere; }
.mf-fv2-months summary svg { width: 17px; height: 17px; flex-shrink: 0; color: var(--yc-night-accent, #7c3aed); }
.mf-fv2-months summary > span { font-size: 11px; overflow-wrap: anywhere; }
.mf-fv2-months .my-finance-forecast-table { margin: 0; }
.mf-fv2-months .yc-table { min-width: 650px; font-size: 12px; }
.mf-fv2-months .mf-fv2-note { margin: 8px 12px 12px; }
.mf-fv2-warning { display: flex; align-items: center; gap: 12px; background: var(--yc-night-accent-bg, #f7f5fc); border-left: 3px solid #8b70bc; padding: 12px; margin: 8px 0; }
.mf-fv2-warning[data-severity="error"] { background: var(--yc-night-error-bg, #fff1f2); border-color: #dc2626; }
.mf-fv2-warning[data-severity="warning"] { background: var(--yc-night-warning-bg, #fffbeb); border-color: #d97706; }
.mf-fv2-warning[data-severity="success"] { background: var(--yc-night-green-bg, #f0fdf4); border-color: #16a34a; }
.mf-fv2-warning > div { flex: 1; min-width: 0; }
.mf-fv2-warning p { margin: 0; font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; }
.mf-fv2-warning small { font-size: 11px; color: var(--yc-night-muted, #69758a); }
.mf-fv2-warning .yc-btn { font-size: 12px; min-height: 44px; flex-shrink: 0; }
.mf-fv2-more-warnings > summary, .mf-fv2-support > summary { min-height: 44px; padding: 12px 0; cursor: pointer; color: var(--yc-night-accent, #6532b3); font-size: 13px; }
.mf-fv2-support .my-finance-technical { display: grid; gap: 12px; min-width: 0; margin-top: 0; padding-top: 12px; }
.mf-fv2-support .mf-forecast-group, .mf-fv2-support .my-finance-preparation { margin: 0; min-width: 0; border: 1px solid var(--yc-night-border, #e3dfee); border-radius: 8px; background: var(--yc-night-surface, #fff); }
.mf-fv2-support .mf-forecast-group > summary, .mf-fv2-support .my-finance-preparation > summary { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 14px 16px; background: var(--yc-night-accent-bg, #f7f5fc); border-radius: 8px; list-style: none; }
.mf-fv2-support summary > span { min-width: 0; }
.mf-fv2-support .mf-forecast-group > summary strong { display: block; font-size: 14px; overflow-wrap: anywhere; }
.mf-fv2-support .mf-forecast-group > summary small { display: block; margin-top: 4px; color: var(--yc-night-muted, #69758a); font-size: 12px; font-weight: 400; line-height: 1.5; }
.mf-fv2-support .mf-forecast-group[open] > summary, .mf-fv2-support .my-finance-preparation[open] > summary { border-radius: 8px 8px 0 0; border-bottom: 1px solid var(--yc-night-border, #e3dfee); }
.mf-fv2-support summary:focus-visible { outline: 2px solid var(--app-accent-dark); outline-offset: -3px; }
.mf-fv2-support .mf-fv2-support-body { min-width: 0; padding: 16px; }
.mf-fv2-support .mf-fv2-support-body > :first-child { margin-top: 0; }
.mf-fv2-support .mf-fv2-support-body > :last-child { margin-bottom: 0; }
.mf-fv2-support .my-finance-preparation > .my-finance-steps, .mf-fv2-support .my-finance-preparation > form { margin: 16px; }
.mf-fv2-support .my-finance-facts--columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.mf-fv2-support .my-finance-facts > div { min-width: 0; padding: 10px 0; border-bottom: 1px solid var(--yc-night-border, #e9e5f2); }
.mf-fv2-support .my-finance-facts dt { font-size: 12px; color: var(--yc-night-muted, #69758a); }
.mf-fv2-support .my-finance-facts dd { margin: 6px 0 0; font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
.mf-fv2-support .my-finance-facts dd small { display: block; margin-top: 5px; font-weight: 400; line-height: 1.5; }
.mf-fv2-support .mf-fv2-support-body .my-finance-band { min-width: 0; margin: 0; padding: 0; border: 0; background: transparent; box-shadow: none; }
.mf-fv2-support .my-finance-heading { flex-wrap: wrap; }
.mf-fv2-support .my-finance-forecast-table { max-width: 100%; }
.mf-fv2-events { border-top: 1px solid var(--yc-night-border, #e9e5f2); }
.mf-fv2-event { display: grid; grid-template-columns: 90px 30px minmax(0,1fr) auto 44px; gap: 10px; align-items: center; border-bottom: 1px solid var(--yc-night-border, #e9e5f2); padding: 12px 0; }
.mf-fv2-event > div { min-width: 0; }
.mf-fv2-event > div > strong { display: block; font-size: 13px; overflow-wrap: anywhere; }
.mf-fv2-event small { display: block; margin-top: 4px; color: var(--yc-night-muted, #69758a); font-size: 11px; }
.mf-fv2-event time { font-size: 12px; }
.mf-fv2 .my-finance-symbol { flex-shrink: 0; }
.mf-fv2 .app-icon-btn { min-width: 44px; min-height: 44px; }
@media (max-width: 1199.98px) {
    .mf-fv2-controls { width: 100%; order: 3; }
}
@media (max-width: 699.98px) {
    .mf-fv2 { gap: 20px; }
    .mf-fv2-heading h2 { font-size: 23px; }
    .mf-fv2-heading > div { flex-basis: 100%; }
    .mf-fv2-kpis, .mf-fv2-stats { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .mf-fv2 .my-finance-kpi { padding: 12px; }
    .mf-fv2 .my-finance-kpi > strong { font-size: 19px; }
    .mf-fv2-area-grid { grid-template-columns: minmax(0,1fr); }
    .mf-fv2-support .mf-fv2-support-body { padding: 12px; }
    .mf-fv2-support .my-finance-facts--columns { grid-template-columns: minmax(0,1fr); }
    .mf-fv2-chart { padding: 12px; }
    .mf-fv2-plot { height: 265px; }
    .mf-fv2 h2 { font-size: 18px; }
    .mf-fv2-event { grid-template-columns: 65px minmax(0,1fr) 44px; gap: 8px; }
    .mf-fv2-event > .my-finance-symbol { display: none; }
    .mf-fv2-event > div { grid-column: 2; }
    .mf-fv2-event > strong { grid-column: 2; font-size: 14px; }
    .mf-fv2-event > a { grid-column: 3; grid-row: 1 / 3; }
    .mf-fv2-warning { flex-wrap: wrap; }
    .mf-fv2-warning > .my-finance-symbol { display: none; }
    .mf-fv2-warning > div { flex-basis: 100%; }
    .mf-fv2-controls .my-finance-segment label > span { padding-inline: 8px; }
}
@media (max-width: 699.98px) {
    .my-finance-page .mf-ledger-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .mf-ledger-row { grid-template-columns: minmax(0, 1fr) 44px; gap: 10px; padding: 12px; }
    .mf-ledger-row > time { grid-column: 1; font-size: 13px; }
    .mf-ledger-description { grid-column: 1 / -1; grid-row: 2; }
    .mf-ledger-values { grid-column: 1; grid-row: 3; text-align: left; }
    .mf-ledger-row > a { grid-column: 2; grid-row: 3; }
}

/* Calendar workspace and selected-day agenda. */
[data-calendar-page] {
    --cal-edge: #e5e6ef;
    --cal-wash: #f8f8fc;
    --cal-accent: var(--yc-primary-dark);
    --cal-active: var(--yc-primary-gradient);
    --cal-selected: rgba(var(--app-accent-rgb, 124, 58, 237), .11);
    --cal-today: rgba(var(--app-accent-rgb, 124, 58, 237), .15);
    width: 100%;
    max-width: none;
    min-width: 0;
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
    margin: 0;
}

.calendar-page .calendar-hero { min-height: 66px; margin: 0; padding: 10px 16px; border-radius: 8px; box-shadow: var(--yc-shadow-sm); }
.calendar-page .calendar-hero__icon { width: 44px; height: 44px; flex: 0 0 44px; border-radius: 10px; }
.calendar-page .calendar-open-create { min-width: 0; min-height: 44px; gap: 7px; padding-inline: 14px; border-radius: 8px; }
.calendar-create-short { display: none; }
.calendar-page .calendar-main { container: calendar-board / inline-size; padding: 14px; border-radius: 8px; }
.calendar-page .calendar-shell { grid-template-columns: minmax(0, 1fr); gap: 6px; }

.calendar-page .calendar-toolbar {
    display: grid;
    grid-template-columns: auto auto auto minmax(0, 1fr) auto;
    grid-template-areas: "today prev next period views";
    align-items: center;
    gap: 8px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--cal-edge);
}
.calendar-period-prev { grid-area: prev; }
.calendar-period-next { grid-area: next; }
.calendar-period-today { grid-area: today; padding-inline: 12px; }
.calendar-toolbar__month { grid-area: period; min-width: 0; color: var(--yc-text); font-size: 18px; text-align: center; overflow-wrap: anywhere; }
.calendar-view-switch { grid-area: views; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2px; padding: 2px; border: 1px solid var(--cal-edge); border-radius: 8px; background: var(--cal-wash); }
.calendar-view-switch a, .calendar-period-button {
    display: flex; align-items: center; justify-content: center; gap: 6px;
    min-width: 0; min-height: 38px; color: var(--yc-text); font-size: 13px; font-weight: 750; text-decoration: none;
}
.calendar-view-switch a { padding-inline: 10px; border-radius: 6px; }
.calendar-view-switch .is-active { color: #fff; background: var(--cal-active); }
.calendar-period-button { min-width: 38px; border: 1px solid var(--cal-edge); border-radius: 8px; background: var(--yc-night-surface, #fff); }
.calendar-period-button:hover, .calendar-view-switch a:not(.is-active):hover { color: var(--cal-accent); background: var(--cal-selected); }
.calendar-page .calendar-toolbar svg { width: 16px; height: 16px; flex: 0 0 16px; }

.calendar-month-board { display: grid; grid-template-columns: minmax(0, 1fr); align-items: start; gap: 14px; min-width: 0; }
.calendar-grid-wrap { min-width: 0; }
.calendar-weekdays, .calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.calendar-weekdays span { display: grid; min-height: 40px; place-items: center; color: var(--yc-text); font-size: 13px; font-weight: 800; }
.calendar-grid { border: 1px solid var(--cal-edge); border-radius: 8px; }
.calendar-day { position: relative; min-width: 0; min-height: 96px; padding: 5px; border-right: 1px solid var(--cal-edge); border-bottom: 1px solid var(--cal-edge); }
.calendar-day:nth-child(7n) { border-right: 0; }
.calendar-day:nth-last-child(-n+7) { border-bottom: 0; }
.calendar-day:nth-child(7n - 1), .calendar-day:nth-child(7n) { background: var(--yc-night-surface, #fcfcfe); }
.calendar-day.is-muted { color: var(--yc-night-muted, #687385); background: var(--cal-wash); }
.calendar-day:hover { background: rgba(var(--app-accent-rgb, 124, 58, 237), .045); }
.calendar-day.is-selected { border-radius: 7px; background: var(--cal-selected); box-shadow: inset 0 0 0 1px rgba(var(--app-accent-rgb, 124, 58, 237), .65); }
.calendar-day__select, .calendar-day__more, .calendar-week-day__add { display: inline-flex; align-items: center; justify-content: center; padding: 0; border: 0; color: inherit; background: transparent; font: inherit; cursor: pointer; }
.calendar-day__select::before { position: absolute; inset: 0; content: ""; }
.calendar-day__number { display: grid; width: 27px; height: 27px; place-items: center; border-radius: 50%; font-size: 13px; font-weight: 800; }
.calendar-day.is-today:not(.is-selected) .calendar-day__number { color: var(--cal-accent); background: var(--cal-today); }
.calendar-day.is-selected .calendar-day__number { color: #fff; background: var(--cal-day-badge, var(--cal-active)); }
.calendar-day__events { display: grid; gap: 4px; min-width: 0; }
.calendar-day__events > .calendar-event:nth-child(n+4) { display: none; }
.calendar-day__more { position: relative; margin-top: 4px; padding: 3px; color: var(--cal-accent); font-size: 11px; font-weight: 800; }
.calendar-day__dots { display: none; }

.calendar-page .calendar-event--other { color: var(--yc-night-accent, #5820a5); border-color: var(--yc-night-border, #e5d8f9); background: var(--yc-night-accent-bg, #f1e8fb); }
.calendar-page .calendar-event--meeting { color: var(--yc-night-warning, #8f3909); border-color: var(--yc-night-border, #fae7bb); background: var(--yc-night-warning-bg, #fff4df); }
.calendar-page .calendar-event--personal { color: var(--yc-night-warning, #92410c); border-color: var(--yc-night-border, #f8dfcd); background: var(--yc-night-warning-bg, #fef0e4); }
.calendar-page .calendar-event--birthday { color: var(--yc-night-pink, #a12460); border-color: var(--yc-night-border, #f5d5e7); background: var(--yc-night-pink-bg, #fcebf4); }
.calendar-page .calendar-event--reminder { color: var(--yc-night-blue, #184da8); border-color: var(--yc-night-border, #d6e6ff); background: var(--yc-night-blue-bg, #eaf3ff); }
.calendar-month-board .calendar-event { position: relative; gap: 0; padding: 0; border-radius: 7px; }
.calendar-event__trigger {
    display: flex; align-items: flex-start; flex: 1 1 auto; gap: 5px;
    min-width: 0; width: 100%; min-height: 30px; padding: 5px;
    color: inherit; background: transparent; border: 0; border-radius: inherit;
    text-align: left; font: inherit; cursor: pointer;
}
.calendar-month-board .calendar-event__copy { flex: 1 1 0; min-width: 0; overflow-wrap: anywhere; }
.calendar-day__events .calendar-event__copy strong { font-size: 11px; line-height: 1.2; }
.calendar-day__events .calendar-event-type-icon { width: 13px; height: 13px; }
.calendar-month-board .calendar-event__arrow, .calendar-month-board .calendar-event__clock { display: none; }
.calendar-month-board .calendar-event > .calendar-event-title-row { flex: 0 0 auto; width: auto; margin-inline-end: 4px; }
.calendar-day__events .calendar-event-title-row .shared-indicator__button { width: 15px; height: 15px; min-width: 15px; }

.calendar-day-panel { display: grid; align-content: start; gap: 12px; min-width: 0; padding: 14px; border: 1px solid var(--cal-edge); border-radius: 8px; background: var(--cal-wash); }
.calendar-day-panel__header { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.calendar-day-panel__header h2 { flex: 1 1 150px; margin: 0; color: var(--yc-text); font-size: 16px; line-height: 1.25; }
.calendar-day-panel__count { display: inline-flex; align-items: center; gap: 5px; padding: 5px 8px; border-radius: 20px; color: var(--cal-accent); background: var(--cal-selected); font-size: 11px; font-weight: 800; white-space: nowrap; }
.calendar-day-panel svg { width: 15px; height: 15px; flex: 0 0 15px; fill: none; stroke: currentColor; stroke-width: 2; }
.calendar-day-panel__empty { margin: 0; padding: 8px 0; color: var(--yc-muted); font-size: 13px; }
.calendar-day-panel__events { display: grid; gap: 8px; }
.calendar-day-panel__empty:not([hidden]) + .calendar-day-panel__events { display: none; }
.calendar-day-panel__events .calendar-event__trigger { align-items: center; min-height: 56px; gap: 9px; padding: 10px; }
.calendar-day-panel__events .calendar-event__copy strong { display: block; font-size: 14px; }
.calendar-day-panel__events small { display: flex; align-items: center; gap: 4px; font-size: 12px; }
.calendar-day-panel__events .calendar-event__clock, .calendar-day-panel__events .calendar-event__arrow { display: block; width: 13px; height: 13px; }
.calendar-day-panel__actions { display: grid; gap: 6px; padding-top: 12px; border-top: 1px solid var(--cal-edge); }
.calendar-day-panel__actions h3 { margin: 0 0 2px; font-size: 14px; }
.calendar-day-panel__actions button { display: flex; align-items: center; gap: 8px; min-height: 36px; padding: 6px 9px; border: 1px solid var(--cal-edge); border-radius: 7px; background: var(--yc-night-surface, #fff); color: var(--yc-text); font: inherit; font-size: 12px; font-weight: 750; text-align: left; cursor: pointer; }
.calendar-day-panel__actions button:hover { border-color: var(--cal-accent); color: var(--cal-accent); }
.calendar-page :is(.calendar-view-switch a, .calendar-period-button, .calendar-day__select, .calendar-day__more, .calendar-event__trigger, .calendar-week-day__add, .calendar-day-panel a, .calendar-day-panel button):focus-visible { outline: 2px solid var(--cal-accent); outline-offset: 2px; }

.calendar-page .calendar-week-view { grid-template-columns: repeat(7, minmax(0, 1fr)); overflow: visible; }
.calendar-page .calendar-week-day { min-width: 0; padding: 8px; }
.calendar-week-day__add { min-width: 36px; min-height: 36px; border-radius: 8px; }
.calendar-page :is(.calendar-week-day, .calendar-day-view) .calendar-event { min-height: 40px; border-radius: 7px; text-align: left; }
.calendar-page .calendar-day-view { border-radius: 8px; box-shadow: none; }

@media (min-width: 1024px) {
    .calendar-grid .calendar-day.is-today {
        background: var(--cal-today);
        box-shadow: inset 3px 0 var(--cal-accent);
    }
    .calendar-grid .calendar-day.is-today:hover {
        background-color: rgba(var(--app-accent-rgb, 124, 58, 237), .19);
    }
    .calendar-grid .calendar-day.is-today.is-selected {
        box-shadow: inset 3px 0 var(--cal-accent), inset 0 0 0 1px var(--cal-accent);
    }
    .calendar-grid .calendar-day.is-today .calendar-day__number {
        color: #fff;
        background: var(--cal-day-badge, var(--cal-accent));
    }
}
@media (min-width: 1280px) {
    @container calendar-board (min-width: 860px) {
        .calendar-month-board { grid-template-columns: minmax(0, 1fr) clamp(220px, 24%, 304px); }
        .calendar-day-panel { align-self: stretch; margin-top: 4px; min-height: 300px; }
        .calendar-day-panel__header h2 { flex-basis: 100%; }
    }
}
@media (max-width: 1023.98px) {
    .calendar-page .calendar-week-view { grid-template-columns: minmax(0, 1fr); gap: 8px; }
    .calendar-page .calendar-week-day { min-height: 0; border: 1px solid var(--cal-edge); border-radius: 7px; }
}
@media (max-width: 767.98px) {
    .calendar-page .calendar-hero { min-height: 62px; padding-inline: 10px; }
    .calendar-modal .calendar-details-section .yc-textarea { font-size: 16px; }
    .calendar-page .calendar-main { padding: 8px 6px; }
    .calendar-open-create .calendar-create-label { display: none; }
    .calendar-create-short { display: inline; }
    .calendar-page .calendar-toolbar { grid-template-columns: 44px minmax(0, 1fr) auto 44px; grid-template-areas: "views views views views" "prev period today next"; gap: 6px; padding-bottom: 4px; border-bottom: 0; }
    .calendar-toolbar__month { font-size: 15px; }
    .calendar-view-switch a, .calendar-period-button { min-height: 44px; }
    .calendar-period-today { padding-inline: 7px; font-size: 12px; }
    .calendar-weekdays span { min-height: 30px; font-size: 12px; }
    .calendar-grid { border: 0; border-top: 1px solid var(--cal-edge); border-radius: 0; }
    .calendar-day { min-height: 44px; padding: 0 2px; border: 0; }
    .calendar-day.is-selected { background: transparent; box-shadow: none; }
    .calendar-day__select { display: flex; flex-direction: column; gap: 2px; width: 100%; min-height: 44px; border-radius: 9px; }
    .calendar-day__select::before { content: none; }
    .calendar-day__number { width: auto; height: auto; padding: 0 4px; }
    .calendar-day.is-today:not(.is-selected) .calendar-day__select { background: var(--cal-today); }
    .calendar-day.is-today:not(.is-selected) .calendar-day__number { background: transparent; }
    .calendar-day.is-selected .calendar-day__select { color: #fff; background: var(--cal-day-badge, var(--cal-active)); }
    .calendar-day.is-selected .calendar-day__number { background: transparent; }
    .calendar-day__events, .calendar-day__more, .calendar-day-panel__actions { display: none; }
    .calendar-day__dots { display: flex; justify-content: center; align-items: center; gap: 2px; min-height: 8px; }
    .calendar-page .calendar-dot { width: 5px; height: 5px; flex: 0 0 5px; border-radius: 50%; background: currentColor; }
    .calendar-day.is-selected .calendar-dot { color: #eee2ff; }
    .calendar-dot-overflow { font-size: 9px; line-height: 1; }
    .calendar-month-board { gap: 10px; }
    .calendar-day-panel { position: relative; padding: 18px 9px 10px; background: var(--yc-night-surface, #fff); }
    .calendar-day-panel::before { position: absolute; top: 6px; left: calc(50% - 14px); width: 28px; height: 3px; border-radius: 2px; background: #c3c5d1; content: ""; }
    .calendar-day-panel__header h2 { font-size: 15px; }
}

/* Planning sheets and shared confirmation retain independent form/submit handlers. */
html:has([data-modal-surface].is-open, [data-calendar-modal]:not([hidden])),
body:has([data-modal-surface].is-open, [data-calendar-modal]:not([hidden])) { overflow: hidden; }

.modal-sheet-backdrop,
.yc-global-confirm-backdrop {
    top: var(--modal-visual-top, 0px);
    bottom: auto;
    height: var(--modal-visual-height, 100dvh);
    overscroll-behavior: contain;
}
.modal-sheet-backdrop { background: #151a37a1; backdrop-filter: blur(3px); }

#schedule-edit-modal .modal-sheet,
.calendar-modal-backdrop .calendar-modal.modal-sheet,
.modal-sheet.schedule-create-sheet {
    display: flex;
    flex-direction: column;
    width: min(740px, 100%);
    max-height: calc(var(--modal-visual-height, 100dvh) - 40px);
    padding: 0;
    overflow: hidden;
    border: 1px solid var(--yc-night-border, #e2e6f0);
    border-radius: 16px;
    background: var(--yc-night-surface, #fff);
}

.modal-sheet > .modal-sheet__header,
.calendar-modal-backdrop .calendar-modal > .modal-sheet__header {
    position: relative;
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 10px;
    min-width: 0;
    margin: 0;
    padding: 14px 18px;
    border-bottom: 1px solid var(--yc-night-border, #e6e9f1);
}

.modal-sheet__header .crm-modal-heading-icon { width: 40px; height: 40px; flex-basis: 40px; border-radius: 8px; }
.modal-sheet__header .crm-modal-heading-icon svg { width: 21px; height: 21px; }
.modal-sheet__header > .yc-modal__title,
#schedule-edit-modal .modal-sheet__header > .yc-modal__title,
.calendar-modal-backdrop .calendar-modal .modal-sheet__header > .yc-modal__title {
    flex: 1;
    min-width: 0;
    margin: 0;
    font-size: 21px;
    line-height: 1.16;
    outline: none;
}

.modal-sheet__header > .yc-modal-close {
    position: static;
    width: 44px;
    height: 44px;
    min-width: 44px;
    flex: 0 0 44px;
    border-radius: 8px;
}

.modal-sheet > .modal-sheet__form,
#schedule-edit-modal .modal-sheet .modal-sheet__form {
    display: flex;
    flex: 0 1 auto;
    flex-direction: column;
    min-height: 0;
    min-width: 0;
    gap: 0;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

#schedule-edit-modal .modal-sheet .modal-sheet__form { align-items: stretch; }

.modal-sheet__scroll {
    display: grid;
    flex: 0 1 auto;
    min-height: 0;
    min-width: 0;
    gap: 9px;
    padding: 12px 18px;
    overflow: auto;
    overscroll-behavior: contain;
    scroll-padding-block: 8px;
    background: var(--yc-night-surface, #fbfcff);
}

.modal-sheet__scroll .yc-field { min-width: 0; gap: 5px; margin: 0; }
.modal-sheet__scroll .yc-label { display: flex; align-items: center; gap: 6px; font-size: 13px; line-height: 1.2; }
.modal-sheet__scroll .yc-field:has(> [required]):not(.modal-sheet__time) > .yc-label::after { content: "*"; color: var(--yc-night-error, #b42330); }
.modal-sheet__scroll :is(.yc-label, .modal-toggle-row > span) svg,
.modal-action-grid .yc-btn svg { width: 17px; height: 17px; flex: 0 0 17px; fill: none; stroke: currentColor; stroke-width: 2; }
.modal-sheet__scroll :is(.yc-label, .modal-toggle-row > span) svg { color: var(--yc-night-accent, var(--app-accent-dark)); }
.modal-sheet__scroll :is(.yc-input, .yc-select, .yc-textarea, .priority-picker-trigger, .schedule-icon-picker__toggle) { min-width: 0; max-width: 100%; min-height: 44px; border-radius: 8px; }
.modal-sheet__date { display: flex; align-items: center; white-space: nowrap; }
.modal-field-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; gap: 8px; }

.modal-sheet__scroll .modal-toggle-row,
#schedule-edit-modal .modal-sheet .modal-toggle-row,
.calendar-modal-backdrop .calendar-modal .modal-sheet__scroll .modal-toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    min-width: 0;
    min-height: 44px;
    padding: 4px 8px;
    border: 1px solid var(--yc-night-border, #e5e8f0);
    border-radius: 8px;
    background: var(--yc-night-surface, #fff);
    cursor: pointer;
}

.modal-sheet__scroll .modal-toggle-row > span {
    order: -1;
    display: flex;
    align-items: center;
    min-width: 0;
    gap: 6px;
    color: var(--yc-text);
    font-size: 13px;
    font-weight: 700;
    text-align: left;
}

.modal-sheet__scroll .modal-toggle-row > input[type="checkbox"] {
    appearance: none;
    position: relative;
    display: block;
    width: 34px;
    height: 20px;
    min-width: 34px;
    flex: 0 0 34px;
    margin: 0;
    padding: 0;
    border: 1px solid var(--yc-switch-border, #aab4c7);
    border-radius: 12px;
    background: var(--yc-switch-track, #e1e5ee);
    box-shadow: none;
    cursor: inherit;
}

.modal-sheet__scroll .modal-toggle-row > input[type="checkbox"]::before {
    position: absolute;
    inset: 2px auto auto 2px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--yc-switch-thumb, #fff);
    box-shadow: 0 1px 2px #18243740;
    content: "";
}

.modal-sheet__scroll .modal-toggle-row > input[type="checkbox"]::after { content: none; }
.modal-sheet__scroll .modal-toggle-row > input[type="checkbox"]:checked {
    border-color: var(--yc-switch-active-border, var(--app-accent));
    background: var(--yc-switch-active, var(--app-accent));
}
.modal-sheet__scroll .modal-toggle-row > input[type="checkbox"]:checked::before { transform: translateX(14px); }
.modal-sheet__scroll .modal-toggle-row > input[type="checkbox"]:disabled { opacity: .6; cursor: not-allowed; }
.modal-sheet__scroll .modal-toggle-row > input[type="checkbox"]:focus-visible { outline: 2px solid var(--yc-switch-active-border, var(--app-accent)); outline-offset: 3px; }
.modal-sheet__scroll .modal-toggle-row:hover { border-color: var(--yc-night-border, #b9bfd4); }

.modal-sheet .modal-sheet__footer,
#schedule-edit-modal .modal-sheet .modal-sheet__footer,
.calendar-modal-backdrop .modal-sheet .modal-sheet__footer,
.yc-global-confirm-modal .modal-action-grid {
    position: static;
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(0, 1fr);
    align-items: stretch;
    flex: 0 0 auto;
    gap: 8px;
    width: 100%;
    min-width: 0;
    margin: 0;
    padding: 10px 18px;
    border-top: 1px solid var(--yc-night-border, #e3e7f0);
    background: var(--yc-night-surface, #fff);
}

.modal-action-grid > :is(form, span) { display: block; min-width: 0; margin: 0; }
#schedule-edit-modal .modal-action-grid > .schedule-edit-delete-slot { display: block; width: 100%; margin: 0; }
#schedule-edit-modal .modal-action-grid > .schedule-edit-delete-slot:empty,
.modal-action-grid > [hidden] { display: none; }
.modal-action-grid .yc-btn,
#schedule-edit-modal .modal-sheet .modal-action-grid .yc-btn,
.calendar-modal .modal-sheet__footer .yc-btn {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 100%;
    min-width: 0;
    height: auto;
    min-height: 44px;
    margin: 0;
    padding: 8px 6px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 750;
    line-height: 1.2;
    white-space: nowrap;
}

.modal-action-grid .yc-btn--secondary { color: var(--yc-text); border: 1px solid var(--yc-night-border, #dce1ed); background: var(--yc-night-surface, #f9faff); box-shadow: none; }
.modal-sheet__footer .yc-btn--danger,
#schedule-edit-modal .modal-sheet .modal-action-grid .yc-btn--danger,
.calendar-modal .modal-sheet__footer [data-calendar-delete],
.yc-global-confirm-modal .modal-action-grid .yc-btn--danger {
    color: var(--yc-night-error, #b42330);
    border: 1px solid var(--yc-night-button-danger-state, var(--yc-night-button-danger-border, #ea9fa6));
    background: var(--yc-night-error-bg, #fff5f5);
    box-shadow: none;
}

.modal-action-grid .yc-btn--danger:hover,
#schedule-edit-modal .modal-sheet .modal-action-grid .yc-btn--danger:hover,
.calendar-modal .modal-sheet__footer [data-calendar-delete]:hover,
.yc-global-confirm-modal .modal-action-grid .yc-btn--danger:hover { background: var(--yc-night-soft, #ffe6e8); }
.modal-sheet__footer .yc-btn--success { color: #fff; background: var(--app-accent-gradient); }

.yc-global-confirm-backdrop.is-open { z-index: calc(var(--yc-z-modal) + 1); }
.yc-global-confirm-backdrop .yc-global-confirm-modal {
    display: flex;
    flex-direction: column;
    width: min(408px, 100%);
    max-height: calc(var(--modal-visual-height, 100dvh) - 26px);
    padding: 0;
    overflow: hidden;
    border: 1px solid var(--yc-night-border, #e2e6f0);
    border-radius: 14px;
    background: var(--yc-night-surface, #fff);
}
.yc-global-confirm-modal .yc-modal__header { flex: 0 0 auto; padding: 20px 52px 8px 18px; }
.yc-global-confirm-modal .yc-modal__title { font-size: 21px; }
.yc-global-confirm-modal .yc-modal__header .yc-modal-close { width: 44px; height: 44px; min-width: 44px; }
.yc-global-confirm-modal .yc-modal__body { overflow: auto; padding: 0 18px 16px; overflow-wrap: anywhere; }
.yc-global-confirm-modal .modal-action-grid { grid-auto-columns: none; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.yc-global-confirm-modal .modal-action-grid [data-global-confirm-form] { display: block; width: 100%; margin: 0; }
.yc-global-confirm-modal .modal-action-grid .yc-btn { width: 100%; white-space: normal; overflow-wrap: anywhere; }

.calendar-modal .calendar-details-section,
.calendar-modal .calendar-options > .calendar-reminder-group {
    padding: 0;
    border: 0;
    background: transparent;
}
.calendar-modal .calendar-details-section { gap: 9px; }
.calendar-details-grid {
    display: grid;
    min-width: 0;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr);
    gap: 8px;
}
.calendar-modal .modal-sheet__scroll .calendar-options { grid-template-columns: minmax(0, 1fr); gap: 6px; }
.calendar-modal .calendar-subpanel.calendar-reminder-panel { margin: 4px 0 0; padding: 6px 8px; }
.calendar-modal .modal-sheet__scroll .yc-textarea { min-height: 76px; }

.schedule-sheet-create-trigger.app-icon-btn { width: 42px; min-width: 42px; height: 42px; }
#schedule-edit-modal .schedule-edit-layout,
.schedule-create-fields { align-content: start; }
:is(.schedule-edit-layout, .schedule-create-fields) > .schedule-modal-column { display: contents; }
#schedule-edit-modal .schedule-edit-layout .schedule-edit-section {
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
}
#schedule-edit-modal .schedule-edit-layout .schedule-edit-section > legend,
#schedule-edit-modal .schedule-edit-layout .meeting-edit-field > .yc-label { display: none; }
#schedule-edit-modal .schedule-edit-layout .schedule-edit-section .modal-field + .modal-field { margin-top: 0; }
#schedule-edit-modal .schedule-edit-layout .schedule-edit-section--basic textarea[name="title"] { height: 56px; min-height: 56px; }
#schedule-create-modal .schedule-create-fields textarea[name="title"] { height: 44px; min-height: 44px; resize: none; }
#schedule-edit-modal .schedule-edit-layout :is(.schedule-edit-section--time, .schedule-edit-section--priority) {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 8px;
    align-items: start;
}
#schedule-edit-modal .schedule-edit-layout .schedule-edit-completion-field { align-self: end; }
.modal-field-row .yc-field > .yc-label,
#schedule-edit-modal .schedule-edit-section--time .yc-field > .yc-label { min-height: 28px; }
.modal-sheet__scroll .modal-sheet__time .modal-toggle-row,
#schedule-edit-modal .modal-sheet__scroll .modal-sheet__time .modal-toggle-row {
    min-height: 28px;
    padding: 2px 0;
    border: 0;
    background: transparent;
}
#schedule-edit-modal .schedule-edit-layout .schedule-contact-fields { grid-template-columns: minmax(0, 1fr); gap: 6px; }
#schedule-edit-modal .schedule-edit-layout .schedule-contact-option { gap: 8px; }
#schedule-edit-modal .schedule-edit-layout .schedule-contact-option:has(.schedule-contact-field:not([hidden])) { grid-template-columns: minmax(112px, .9fr) minmax(0, 1.1fr); align-items: start; }
#schedule-edit-modal .schedule-edit-layout .schedule-contact-field > .yc-label { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); }
.schedule-contact-option .yc-input::placeholder { font-size: 13px; }
#schedule-edit-modal .schedule-edit-share-row > .modal-field { min-width: 0; margin: 0; }
#schedule-edit-modal .schedule-edit-share-row .modal-toggle-row { width: 100%; }
.schedule-sheet-time-placeholder { display: none; }

@media (min-width: 1024px) {
    :is(#schedule-edit-modal .schedule-edit-layout, #schedule-create-modal .schedule-create-fields) {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        align-items: start;
        column-gap: 20px;
    }

    :is(.schedule-edit-layout, .schedule-create-fields) > .schedule-modal-column {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        align-content: start;
        min-width: 0;
        gap: 9px;
    }

    :is(#schedule-edit-modal, #schedule-create-modal) .modal-sheet .modal-sheet__scroll textarea[name="title"] {
        height: 120px;
        min-height: 120px;
    }
}

@media (max-width: 767px) {
    .schedule-page .modal-sheet-backdrop,
    .calendar-modal-backdrop.modal-sheet-backdrop:not([hidden]) { place-items: end center; padding: 0; }
    #schedule-edit-modal .modal-sheet,
    .calendar-modal-backdrop .calendar-modal.modal-sheet,
    .modal-sheet.schedule-create-sheet {
        width: 100%;
        max-height: calc(var(--modal-visual-height, 100dvh) - 16px);
        border: 0;
        border-radius: 18px 18px 0 0;
    }
    .modal-sheet > .modal-sheet__header,
    .calendar-modal-backdrop .calendar-modal > .modal-sheet__header {
        padding: 20px 12px 8px;
        border-bottom-color: transparent;
        background: #201a3d;
    }
    .modal-sheet__header::before {
        position: absolute;
        top: 7px;
        left: calc(50% - 16px);
        width: 32px;
        height: 4px;
        border-radius: 3px;
        background: #c5bed7;
        content: "";
    }
    .modal-sheet__header > .yc-modal__title,
    #schedule-edit-modal .modal-sheet__header > .yc-modal__title,
    .calendar-modal-backdrop .calendar-modal .modal-sheet__header > .yc-modal__title { color: #fff; font-size: 19px; }
    .modal-sheet__header > .yc-modal-close,
    .calendar-modal .modal-sheet__header > .yc-modal-close { color: #fff; border-color: transparent; background: #ffffff26; }
    .modal-sheet__header > .yc-modal-close:hover { color: #fff; background: #ffffff38; }
    .modal-sheet__scroll { padding: 10px 12px; }
    .modal-sheet__scroll :is(.yc-input, .yc-select, .yc-textarea) { font-size: 16px; }
    .modal-sheet .modal-sheet__footer,
    #schedule-edit-modal .modal-sheet .modal-sheet__footer,
    .calendar-modal-backdrop .modal-sheet .modal-sheet__footer { padding: 8px 12px max(8px, env(safe-area-inset-bottom)); }
    .calendar-details-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .calendar-details-grid > .calendar-title-field { grid-column: 1 / -1; }
    .schedule-sheet-create-trigger.app-icon-btn { width: 44px; min-width: 44px; height: 44px; }

    :is(#schedule-edit-modal, #schedule-create-modal) .modal-sheet__scroll {
        width: 100%;
        grid-template-columns: minmax(0, 1fr);
    }

    :is(#schedule-edit-modal, #schedule-create-modal) .modal-sheet__scroll
        :is(.yc-field, .yc-input, .yc-select:not(.priority-native-select), .yc-textarea, .modal-toggle-row, .priority-picker, .priority-picker-trigger, .schedule-icon-picker) {
        width: 100%;
        min-width: 0;
    }

    :is(#schedule-edit-modal, #schedule-create-modal) .modal-sheet__scroll [name="title"] { padding-inline: 14px; }
    :is(#schedule-edit-modal, #schedule-create-modal) .modal-sheet .modal-sheet__scroll textarea[name="title"] {
        height: 112px;
        min-height: 112px;
        max-height: 112px;
        overflow-y: auto;
        resize: none;
    }

    :is(#schedule-edit-modal, #schedule-create-modal) .yc-field:has(> .modal-sheet__date) > .yc-label,
    :is(#schedule-edit-modal, #schedule-create-modal) .modal-sheet__scroll .modal-sheet__time > .modal-toggle-row { min-height: 44px; }

    :is(#schedule-edit-modal, #schedule-create-modal) .modal-sheet__time {
        grid-template-rows: 44px 44px;
        align-content: start;
        gap: 5px;
    }

    :is(#schedule-edit-modal, #schedule-create-modal) .modal-sheet__time > [data-meeting-time][hidden] + .schedule-sheet-time-placeholder {
        display: flex;
        align-items: center;
        padding-inline: 14px;
        color: var(--yc-night-muted, #667085);
        background: var(--yc-night-soft, #f3f5fa);
    }

    #schedule-edit-modal .schedule-edit-layout :is(.schedule-edit-section--time, .schedule-edit-section--priority) > .yc-field {
        gap: 5px;
    }
    #schedule-edit-modal .schedule-edit-completion-field .modal-toggle-row { gap: 4px; padding-inline: 6px; }
    #schedule-edit-modal .schedule-edit-completion-field .modal-toggle-row > span { gap: 4px; }

    #schedule-edit-modal .schedule-edit-layout .schedule-contact-option:has(.schedule-contact-field:not([hidden])) {
        grid-template-columns: minmax(120px, .9fr) minmax(0, 1.1fr);
    }

    :is(#schedule-edit-modal, #schedule-create-modal) .modal-sheet__scroll
        :is(.schedule-icon-picker__option, .schedule-icon-picker__clear, .priority-picker-option) { min-height: 44px; }

}
.invoices-page .invoice-status-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(116px, 100%), 1fr));
    gap: 8px;
}

.invoices-page .invoice-list-create {
    flex: 0 0 auto;
    width: auto;
    min-width: 0;
    min-height: 44px;
    white-space: nowrap;
}

.invoice-list-create > svg,
.invoice-editor-workspace [data-invoice-item-add] > svg {
    flex: 0 0 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
}

@media (max-width: 430px) {
    .invoice-list-create__suffix { display: none; }
}

.invoice-status-filter {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    padding: 10px;
    border: 1px solid var(--yc-night-border, #dee3f0);
    border-radius: 8px;
    background: var(--yc-night-surface, #fff);
    color: var(--yc-text);
    text-decoration: none;
    font-size: 13px;
}

.invoice-status-filter:hover,
.invoice-status-filter[aria-current="true"] {
    border-color: var(--yc-accent, #6d28d9);
    box-shadow: inset 0 0 0 1px var(--yc-accent, #6d28d9);
}

.invoices-page .invoice-status--paid { background: var(--yc-night-green-bg, #ecfdf3); color: #13643a; }
.invoices-page .invoice-status--overdue { background: var(--yc-night-error-bg, #fff1f2); color: var(--yc-night-error, #9f1239); }
.invoices-page .invoice-status--open { background: var(--yc-night-soft, #f1ecff); color: var(--yc-night-accent, #51249e); }

.invoices-page .invoice-filters {
    grid-template-columns: repeat(auto-fit, minmax(min(150px, 100%), 1fr));
}

.invoices-page .work-mobile-card__body {
    min-width: 0;
    overflow-wrap: anywhere;
}

.invoice-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
}

.invoice-editor-workspace {
    display: grid;
    grid-template-areas: "preview" "editor";
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    gap: 14px;
    min-width: 0;
}

.invoice-editor-workspace > .invoice-form {
    grid-area: editor;
    gap: 12px;
}

.invoice-editor-section {
    min-width: 0;
    border: 1px solid var(--yc-night-border, #dee3f0);
    border-radius: 8px;
    background: var(--yc-night-surface, #fff);
}

.invoice-editor-section .invoice-editor-section__heading { margin: 0; font-size: 15px; }

.invoice-editor-section__toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    min-height: 48px;
    padding: 9px 12px;
    border: 0;
    border-radius: 7px;
    background: none;
    color: var(--yc-text);
    font: inherit;
    font-weight: 700;
    text-align: start;
    overflow-wrap: anywhere;
    cursor: pointer;
}

.invoice-editor-section__toggle:hover { background: var(--yc-night-accent-bg, #f5f7fc); }
.invoice-editor-section__toggle:focus-visible { outline: 2px solid var(--app-accent, #6d28d9); outline-offset: -3px; }
.invoice-editor-section__toggle::after {
    content: "";
    flex: 0 0 8px;
    height: 8px;
    margin-inline: 3px;
    border: solid var(--yc-muted);
    border-width: 0 2px 2px 0;
    transform: rotate(-45deg);
    transition: transform 150ms ease;
}
.invoice-editor-section__toggle[aria-expanded="true"]::after { transform: translateY(-2px) rotate(45deg); }
.invoice-editor-section__panel { display: grid; grid-template-rows: 1fr; min-width: 0; }
.invoice-editor-section__panel[inert] { grid-template-rows: 0fr; }
.invoice-editor-section__panel[data-invoice-section-animated] { transition: grid-template-rows 150ms ease; }
.invoice-editor-section__clip { min-height: 0; min-width: 0; overflow: hidden; }
.invoice-editor-section__content {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
    padding: 12px;
    border-top: 1px solid var(--yc-night-border, #e8ebf3);
}
.invoice-editor-section__subject { margin: 0; overflow-wrap: anywhere; }
.invoice-page .invoice-editor-workspace .invoice-editor-section .invoice-form-box { padding: 0; border: 0; background: transparent; }
.invoice-editor-section .invoice-items-section { padding: 0; border: 0; background: transparent; }
.invoice-editor-section .invoice-items-heading { justify-content: flex-end; }
@media (prefers-reduced-motion: reduce) {
    .invoice-editor-section__toggle::after,
    .invoice-editor-section__panel[data-invoice-section-animated] { transition: none; }
}

.invoice-editor-preview {
    grid-area: preview;
    min-width: 0;
    border: 1px solid var(--yc-night-border, #dee3f0);
    border-radius: 8px;
    background: var(--yc-night-accent-bg, #f5f7fc);
}

.invoice-editor-preview summary {
    padding: 12px 14px;
    color: var(--yc-text);
    font-weight: 700;
    cursor: pointer;
}

.invoice-editor-preview__status {
    margin: 0;
    padding: 0 14px 10px;
    color: var(--yc-muted);
    font-size: 13px;
}

.invoice-paper {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
    margin: 0 8px 8px;
}

.invoice-paper__page {
    display: block;
    width: 100%;
    height: auto;
    background: #fff;
    box-shadow: 0 0 0 1px #dee3f0;
}

.invoice-paper__transcript {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
}

.invoice-page .invoice-editor-workspace .invoice-form-box {
    padding: 12px;
    gap: 10px;
    border-radius: 8px;
    box-shadow: none;
}

.invoice-page .invoice-editor-workspace .work-form-section__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px;
}

.invoice-editor-workspace .invoice-basic-grid > * {
    grid-area: auto;
    min-width: 0;
}

.invoice-editor-workspace .invoice-basic-grid > :is(.invoice-client-picker, .invoice-taxable-supply-date-field, .invoice-vat-mode-field) {
    grid-column: 1 / -1;
}

.invoice-page .invoice-editor-workspace .invoice-items-table {
    container: invoice-items / inline-size;
    border: 0;
    overflow: visible;
    gap: 8px;
    background: transparent;
}

.invoice-editor-workspace .invoice-items-table__head,
.invoice-editor-workspace .invoice-form--no-vat .invoice-items-table__head { display: none; }

.invoice-editor-workspace .invoice-items-table [data-invoice-item-row] {
    min-width: 0;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-template-areas:
        "label result result result"
        "name name name name"
        "quantity quantity unit unit"
        "price price vat vat";
    align-items: end;
    gap: 6px 8px;
    border: 1px solid var(--yc-night-border, #dee3f0);
    border-radius: 8px;
    padding: 8px;
}

.invoice-editor-workspace .invoice-items-table__row > * { min-width: 0; }
.invoice-editor-workspace .invoice-items-table__row .yc-label { display: block; font-size: 12px; line-height: 1.2; }
.invoice-editor-workspace .invoice-items-table__row .yc-field { gap: 4px; }

.invoice-page .invoice-editor-workspace .invoice-items-table__row :is(.yc-input, .yc-select) {
    min-height: 40px;
    padding-block: 6px;
}

.invoice-editor-workspace .invoice-item-row__name { grid-area: name; }
.invoice-editor-workspace .invoice-item-row__quantity { grid-area: quantity; }
.invoice-editor-workspace .invoice-item-row__unit { grid-area: unit; }
.invoice-editor-workspace .invoice-item-row__price { grid-area: price; }
.invoice-editor-workspace .invoice-item-row__vat { grid-area: vat; }

.invoice-editor-workspace .invoice-item-row__result {
    grid-area: result;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    min-width: 0;
}

.invoice-editor-workspace .invoice-item-row__result .invoice-item-row__total {
    min-width: 0;
    gap: 2px;
    text-align: right;
    overflow-wrap: anywhere;
}

.invoice-editor-workspace .invoice-item-row__result [data-invoice-line-total] {
    display: block;
    min-height: 0;
    font-size: 14px;
    font-variant-numeric: tabular-nums;
}

.invoice-editor-workspace .invoice-item-row__remove {
    flex: 0 0 36px;
    width: 36px;
    min-width: 36px;
    height: 36px;
    min-height: 36px;
}

@container invoice-items (width < 400px) {
    .invoice-editor-workspace .invoice-item-row__name { display: contents; }
    .invoice-editor-workspace .invoice-item-row__name .yc-label { grid-area: label; align-self: center; }
    .invoice-editor-workspace .invoice-item-row__name .yc-input { grid-area: name; }
}

@container invoice-items (min-width: 400px) {
    .invoice-editor-workspace .invoice-items-table [data-invoice-item-row] {
        grid-template-columns: minmax(72px, .8fr) minmax(70px, .8fr) minmax(116px, 1.3fr) minmax(78px, .9fr);
        grid-template-areas:
            "name name result result"
            "quantity unit price vat";
    }

    .invoice-editor-workspace .invoice-form--no-vat .invoice-items-table [data-invoice-item-row] {
        grid-template-columns: minmax(72px, 104px) minmax(70px, 104px) minmax(116px, 1fr);
        grid-template-areas:
            "name name result"
            "quantity unit price";
    }

    .invoice-editor-workspace .invoice-item-row__result { min-height: 40px; }
}

@container invoice-items (min-width: 600px) {
    .invoice-editor-workspace .invoice-items-table [data-invoice-item-row] {
        grid-template-columns: minmax(82px, 104px) minmax(80px, 104px) minmax(122px, 154px) minmax(92px, 112px) minmax(134px, 1fr);
        grid-template-areas:
            "name name name name name"
            "quantity unit price vat result";
    }

    .invoice-editor-workspace .invoice-form--no-vat .invoice-items-table [data-invoice-item-row] {
        grid-template-columns: minmax(82px, 104px) minmax(80px, 104px) minmax(122px, 154px) minmax(134px, 1fr);
        grid-template-areas:
            "name name name name"
            "quantity unit price result";
    }
}

@media (min-width: 1200px) {
    html:has(.invoice-editor-workspace),
    body:has(.invoice-editor-workspace) {
        overflow-x: clip;
    }

    .app-shell:has(.invoice-editor-workspace),
    .app-shell:has(.invoice-editor-workspace) .page {
        overflow: visible;
    }

    .invoice-editor-workspace {
        grid-template-areas: "editor preview";
        grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
    }

    .invoice-editor-preview {
        position: sticky;
        top: 12px;
        max-height: calc(100dvh - 24px);
        overflow: auto;
    }

    .invoice-detail-sections .invoice-editor-preview {
        top: 72px;
        max-height: calc(100dvh - 84px);
    }
}

@media (max-width: 360px) {
    .invoice-page .invoice-editor-workspace .work-form-section__grid {
        grid-template-columns: minmax(0, 1fr) !important;
    }
}

.access-vault {
    display: grid;
    gap: 16px;
    min-width: 0;
}

.access-vault [hidden] {
    display: none;
}

.access-vault--private:not(.access-vault--workspace) {
    width: min(100%, 820px);
    margin-inline: auto;
    padding: 20px 16px 32px;
}

.access-vault--private > a {
    justify-self: start;
}

.access-vault--private h1 {
    margin: 0;
    font-size: 1.55rem;
    overflow-wrap: anywhere;
}

.access-vault__actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    min-width: 0;
}

.access-vault__actions svg,
.access-vault__back svg {
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
}

.access-vault__search {
    width: 100%;
}
.access-vault__search > .sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

.access-vault__entries {
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.access-vault__entry {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border: 1px solid var(--yc-border, #e2e7f0);
    border-radius: 8px;
    background: var(--yc-night-surface, #fafbfe);
    text-decoration: none;
    color: inherit;
}

.access-vault__entry:hover {
    border-color: var(--yc-primary);
}

.access-vault__entry.is-active {
    border-color: var(--yc-primary);
    background: var(--yc-primary-soft, #f5efff);
}

.access-vault__entry-text { display: grid; min-width: 0; gap: 2px; }

.access-vault__entry strong {
    overflow-wrap: anywhere;
}

.access-vault__entry time {
    color: var(--yc-text-muted, #5b6475);
    font-size: .875rem;
}

.access-vault__form {
    display: grid;
    gap: 12px;
    min-width: 0;
}

.access-vault__form--challenge {
    width: min(100%, 380px);
}

.access-vault__form .yc-input {
    width: 100%;
    min-width: 0;
}

.access-vault__content {
    min-height: 240px;
    resize: vertical;
    font: 1rem / 1.5 ui-monospace, Consolas, monospace;
}

.access-vault__form textarea.yc-input { padding: 12px; }

.access-vault__edit-toggle:not([hidden]) {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 36px;
}

.access-vault__edit-toggle input { accent-color: var(--yc-primary); }

.access-vault__actions [hidden] { display: none; }

.access-vault__status,
.access-vault__error {
    margin: 0;
}

.access-vault__status:empty {
    display: none;
}

.access-vault__error {
    color: var(--yc-night-error, #9f1239);
}

.yc-theme-dark .access-vault .yc-btn--danger { color: var(--yc-night-error); }

.access-vault--workspace {
    align-content: start;
    row-gap: 14px;
}
.access-vault--workspace > .yc-page-header { margin-bottom: 0; }
.access-vault__unlock { width: min(100%, 440px); }
.access-vault__unlock .auth-passkey-status:empty { display: none; }
.access-vault__backup-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    gap: 14px;
    width: min(100%, 640px);
    min-width: 0;
}
.access-vault__backup-header,
.access-vault__backup-totp,
.access-vault__backup-recovery-links { display: flex; flex-wrap: wrap; gap: 8px; min-width: 0; }
.access-vault__backup-header { justify-content: space-between; align-items: center; }
.access-vault__backup-layout :is(p, h3) { margin: 0; }
.access-vault__backup-layout p { line-height: 1.45; overflow-wrap: anywhere; }
.access-vault__backup-note {
    display: grid;
    gap: 6px;
    padding: 10px 12px;
    border-radius: 6px;
    background: var(--yc-primary-soft, #f4effc);
}
.access-vault__backup-fields {
    display: grid;
    gap: 10px;
    min-width: 0;
    margin: 0;
    padding: 8px 0 0;
    border: 0;
    border-block-start: 1px solid var(--yc-border);
}
.access-vault__backup-fields legend { padding: 0 8px 0 0; font-weight: 700; }
.access-vault__backup-fields .yc-field { min-width: 0; }
.access-vault__backup-fields input[type="file"] {
    padding: 4px 8px;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.access-vault__backup-fields input[type="file"]::file-selector-button {
    min-height: 32px;
    margin-inline-end: 8px;
    padding: 4px 10px;
    border: 1px solid var(--yc-border);
    border-radius: 6px;
    background: var(--yc-night-soft, #f5f4fa);
    color: inherit;
    font: inherit;
    cursor: pointer;
}
.access-vault__backup-fields > .yc-btn,
.access-vault__backup-recovery > .yc-btn { justify-self: start; }
.access-vault__backup-totp { align-items: end; }
.access-vault__backup-totp .yc-field { flex: 1 1 175px; max-width: 248px; }
.access-vault__backup-layout .yc-btn {
    min-width: 0;
    max-width: 100%;
    min-height: 42px;
    padding: 8px 12px;
    white-space: normal;
    line-height: 1.2;
    text-align: center;
}
.access-vault__backup-layout .yc-btn > svg,
.access-vault__backup-recovery h2 > svg {
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
}
.access-vault__backup-recovery h2 { display: flex; align-items: center; gap: 8px; }
.access-vault__backup-recovery-links a { color: var(--yc-night-accent, var(--app-accent-dark)); }
.access-vault__backup [hidden], .access-vault__backup [data-vault-backup-status]:empty { display: none; }
@media (min-width: 1120px) {
    .access-vault__backup-layout {
        grid-template-columns: minmax(0, 1fr) minmax(242px, 290px);
        width: min(100%, 930px);
    }
}
.access-vault .work-hero:has(.access-vault__backup-links) { flex-wrap: wrap; }
.access-vault .work-hero:has(.access-vault__backup-links) .yc-page-header__title { flex: 0 0 auto; }
.access-vault__backup-links { max-width: 100%; }
.access-vault__backup-links .yc-btn { min-width: 0; min-height: 40px; padding: 8px 12px; white-space: normal; }
.access-vault__tabs { margin: 0; }
.access-vault__credentials {
    --vault-action-size: 36px;
    --vault-grip-size: 28px;
    --vault-action-gap: 4px;
    --vault-action-count: 2;
    --vault-action-strip: calc(var(--vault-action-count) * (var(--vault-action-size) + var(--vault-action-gap)) - var(--vault-action-gap));
    display: grid;
    min-width: 0;
    gap: 10px;
    container: vault-credentials / inline-size;
}
.access-vault__credentials:has([data-allow-edits]:checked) { --vault-action-count: 4; }
.access-vault__credentials:has([data-allow-edits]:checked):has([data-group-id]:not([data-group-id=""])) { --vault-action-count: 5; }
.access-vault__credentials [hidden] { display: none !important; }
.access-vault__credential-groups { display: grid; gap: 16px; min-width: 0; }
.access-vault__credential-group { min-width: 0; }
.access-vault__sort-handle {
    display: grid;
    place-items: center;
    box-sizing: border-box;
    flex: 0 0 var(--vault-grip-size);
    width: var(--vault-grip-size);
    min-height: var(--vault-action-size);
    padding: 0;
    border: 0;
    border-radius: 4px;
    background: transparent;
    color: var(--yc-night-muted, #475569);
    cursor: grab;
    touch-action: none;
    user-select: none;
}
.access-vault__sort-handle svg { width: 16px; height: 16px; fill: currentColor; }
.access-vault__sort-handle:disabled { opacity: .45; cursor: default; }
.access-vault__sort-handle:focus-visible { outline: 2px solid var(--yc-night-accent, var(--app-accent)); outline-offset: -2px; }
.access-vault__sort-handle:hover:not(:disabled) { background: var(--yc-night-accent-bg, var(--yc-primary-soft)); }
.access-vault__credentials [data-vault-drop] { position: relative; }
.access-vault__credentials [data-vault-drop]::after {
    content: "";
    position: absolute;
    z-index: 1;
    inset-inline: 0;
    block-size: 3px;
    border-radius: 2px;
    background: var(--yc-night-accent, var(--app-accent));
    pointer-events: none;
}
.access-vault__credentials [data-vault-drop="before"]::after { inset-block-start: -2px; }
.access-vault__credentials [data-vault-drop="after"]::after { inset-block-end: -2px; }
.access-vault__credentials .is-vault-dragging > :first-child { opacity: .55; }
.access-vault__credential-heading {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    padding: 4px 8px;
    border: 1px solid color-mix(in srgb, var(--app-accent) 24%, var(--yc-border));
    border-radius: 8px;
    background: var(--yc-night-accent-bg, color-mix(in srgb, var(--app-accent) 10%, var(--yc-surface)));
    color: var(--yc-night-accent, var(--app-accent-dark));
}
.access-vault__credential-heading h3 { flex: 1 1 auto; min-width: 0; margin: 0; font-size: 1.0625rem; font-weight: 750; }
.access-vault__credential-heading h3 button {
    display: flex;
    align-items: center;
    gap: 7px;
    width: 100%;
    min-height: 36px;
    padding: 2px 0;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    text-align: start;
    overflow-wrap: anywhere;
    cursor: pointer;
}
.access-vault__credential-heading h3 button:focus-visible { outline: 2px solid currentColor; outline-offset: 1px; }
.access-vault__credential-heading h3 svg { flex: 0 0 16px; width: 16px; height: 16px; }
.access-vault__credential-heading [aria-expanded="false"] > svg:first-child { transform: rotate(-90deg); }
.access-vault__credential-count { flex: none; min-width: 2ch; text-align: end; font-size: .8125rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.access-vault.is-vault-checking { visibility: hidden; }
.access-vault .access-vault__group-add {
    min-height: 40px;
    padding: 6px 12px;
    color: var(--yc-night-green, #166534);
    background: transparent;
    border-color: color-mix(in srgb, currentColor 62%, var(--yc-border));
    box-shadow: none;
}
.access-vault .access-vault__group-add:hover:not(:disabled) { background: var(--yc-night-green-bg, #ecfdf3); }
.access-vault .access-vault__group-add:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
.access-vault__credential-group [data-add] { margin-top: 10px; padding: 5px 10px; min-height: 36px; }
.access-vault__credential-group [data-add] svg { width: 16px; height: 16px; flex: 0 0 16px; }
.access-vault__credential-heading h3 svg,
.access-vault__credential-group [data-add] svg { fill: none; stroke: currentColor; stroke-width: 2; }
.access-vault__credential-editor {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    gap: 6px;
    grid-column: 1 / -1;
    min-width: 0;
    margin: 4px 0;
}
.access-vault__credential-editor label { flex: 1 1 180px; min-width: 0; }
.access-vault__credential-editor .yc-input { width: 100%; }
.access-vault__credential-editor[data-group-editor] label { display: grid; gap: 8px; }
.access-vault__credential-editor[data-group-editor] :is(.yc-input, .yc-btn) { min-height: 42px; }
.access-vault__credential-list { margin: 0; padding: 0; list-style: none; }
.access-vault__credential-list > li {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr)) var(--vault-action-strip);
    align-items: start;
    gap: 8px;
    padding: 6px 0;
}
.access-vault__credential-list > li + li { border-top: 1px solid var(--yc-border); }
.access-vault__credential-list > li:has(> [data-vault-sort]:not([hidden])) {
    grid-template-columns: var(--vault-grip-size) repeat(2, minmax(0, 1fr)) var(--vault-action-strip);
}
.access-vault__credential-list .yc-input { width: 100%; min-width: 0; padding: 6px 8px; min-height: var(--vault-action-size); }
.access-vault__credential-value { min-width: 0; }
.access-vault__credential-value textarea { resize: vertical; overflow-wrap: anywhere; }
.access-vault__credential-tools { display: flex; gap: var(--vault-action-gap); }
.access-vault__credential-tools .app-icon-btn {
    flex: none;
    width: var(--vault-action-size);
    height: var(--vault-action-size);
    min-width: var(--vault-action-size);
    min-height: var(--vault-action-size);
}
.access-vault__credential-tools svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; }
.access-vault__credential-list .access-vault__credential-tools { justify-content: flex-end; }
@container vault-credentials (width < 460px) {
    .access-vault__credential-list > li { grid-template-columns: minmax(0, 1fr) var(--vault-action-strip); }
    .access-vault__credential-list > li > input { grid-column: 1 / -1; }
    .access-vault__credential-list > li:has(> [data-vault-sort]:not([hidden])) {
        grid-template-columns: var(--vault-grip-size) minmax(0, 1fr) var(--vault-action-strip);
    }
    .access-vault__credential-list > li:has(> [data-vault-sort]:not([hidden])) > input { grid-column: 2 / -1; }
    .access-vault__credential-list > li:has(> [data-vault-sort]:not([hidden])) > .access-vault__credential-value { grid-column: 1 / 3; }
}
@container vault-credentials (width < 280px) {
    .access-vault__credential-list > li { grid-template-columns: minmax(0, 1fr); }
    .access-vault__credential-list .access-vault__credential-tools { justify-self: end; }
    .access-vault__credential-list > li:has(> [data-vault-sort]:not([hidden])) {
        grid-template-columns: var(--vault-grip-size) minmax(0, 1fr);
    }
    .access-vault__credential-list > li:has(> [data-vault-sort]:not([hidden])) > :is(.access-vault__credential-value, .access-vault__credential-tools) {
        grid-column: 1 / -1;
    }
}
@media (max-width: 650px) {
    .access-vault__tabs { flex-wrap: wrap; }
}
.access-vault__tabs [data-vault-document-count] {
    padding: 0 6px;
    border-radius: 4px;
    background: var(--yc-night-soft, #edf0f5);
    color: var(--yc-night-text, #0f172a);
}
.access-vault__documents { min-width: 0; display: grid; gap: 8px; }
.access-vault__documents.is-dragover { outline: 2px dashed var(--app-accent); outline-offset: 3px; }
.access-vault__documents progress { width: min(100%, 280px); accent-color: var(--app-accent); }
.access-vault__document-list { list-style: none; margin: 0; padding: 0; }
.access-vault__document-list > li {
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
    border-top: 1px solid var(--yc-border, #e2e7f0);
}
.access-vault__document-list > li > svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; }
.access-vault__document-list strong {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
    overflow-wrap: anywhere;
}
.access-vault__document-list small { color: var(--yc-night-muted, #475569); }
@media (max-width: 600px) {
    .access-vault__document-list > li { grid-template-columns: 18px minmax(0, 1fr); }
    .access-vault__document-list > li .access-vault__actions { grid-column: 2; }
}
@media (max-width: 767px) {
    .access-vault__backup-links { width: 100%; }
}
.access-vault__mobile-actions { display: none; }
.access-vault__workspace {
    display: grid;
    grid-template-columns: minmax(235px, .85fr) minmax(0, 1.65fr);
    align-items: start;
    gap: 14px;
    min-width: 0;
}

.access-vault__rail,
.access-vault__detail {
    display: grid;
    gap: 12px;
    min-width: 0;
    padding: 14px;
    border: 1px solid var(--yc-border, #e2e7f0);
    border-radius: 8px;
    background: var(--yc-night-surface, #fff);
}
.access-vault__rail-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.access-vault__rail h2, .access-vault__detail h2 { margin: 0; font-size: 1.16rem; overflow-wrap: anywhere; }
.access-vault__rail-head small { color: var(--yc-night-accent, var(--yc-primary-dark)); }
.access-vault__detail h2 { font-size: 1.4rem; }
.access-vault__symbol, .meal-planner__tile-icon {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    color: var(--yc-night-accent, var(--yc-primary-dark));
    background: var(--yc-primary-soft, #f1e8ff);
}
.access-vault__symbol svg, .access-vault__modified svg, .access-vault__placeholder svg,
.access-vault__new svg, .access-vault__passkey svg, .meal-planner__tile-icon svg {
    width: 17px; height: 17px; flex: 0 0 17px; fill: none; stroke: currentColor; stroke-width: 2;
}
.access-vault__back { display: none; }
.access-vault--private:not(.access-vault--workspace) .access-vault__back { display: inline-flex; }
.access-vault__write { margin-left: auto; }
@media (min-width: 900px) {
    .access-vault__workspace > :is(.access-vault__rail, .access-vault__detail) {
        max-block-size: max(240px, calc(100dvh - 176px));
        overflow-y: auto;
        overscroll-behavior-y: contain;
    }
}
.access-vault__modified, .access-vault__placeholder {
    display: flex; align-items: center; gap: 8px; margin: 0; padding: 8px 10px;
    border-radius: 8px; background: var(--yc-primary-soft, #f4effc);
    color: var(--yc-night-accent, var(--yc-primary-dark)); font-size: .875rem;
}
@media (max-width: 899px) {
    .access-vault__workspace { grid-template-columns: minmax(0, 1fr); }
    .access-vault__workspace.has-detail .access-vault__rail,
    .access-vault__workspace.is-list .access-vault__detail { display: none; }
    .access-vault__mobile-actions { display: flex; align-items: center; flex-wrap: wrap; justify-content: space-between; gap: 8px; }
    .access-vault__back { display: inline-flex; }
    .access-vault__write { margin-left: 0; }
    .access-vault__content { height: 240px; min-height: 220px; resize: none; }
}
@media (max-width: 360px) {
    .access-vault .yc-page-header.yc-page-header { flex-wrap: wrap; }
    .access-vault .yc-page-header.yc-page-header .yc-page-header__title { flex-basis: 100%; }
}

.meal-planner {
    display: grid;
    gap: 14px;
    min-width: 0;
    container-type: inline-size;
}

.meal-planner h2,
.meal-planner h3,
.meal-planner p {
    margin: 0;
    overflow-wrap: anywhere;
}

.meal-planner [hidden] { display: none; }

.meal-planner__tabs-bar .meal-planner__tabs { flex-wrap: wrap; width: auto; min-width: 0; margin: 0; }

.meal-planner__toolbar,
.meal-planner__tabs-bar,
.meal-planner__week-nav,
.meal-planner__week-control,
.meal-planner__actions,
.meal-planner__search {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    min-width: 0;
}

.meal-planner__toolbar { justify-content: space-between; }
.meal-planner__tabs-bar { justify-content: space-between; }
.meal-planner__week-toolbar {
    padding: 12px;
    border: 1px solid var(--yc-border, #e2e7f0);
    border-radius: 8px;
    background: var(--yc-night-surface, #fff);
}
.meal-planner__week-nav { flex-wrap: nowrap; }
.meal-planner__week-nav h2 { font-size: 1.05rem; text-align: center; }
.meal-planner__week-nav .app-icon-btn { flex: 0 0 38px; width: 38px; height: 38px; font-size: 1.45rem; }
.meal-planner__toolbar > .meal-planner__actions { margin-left: auto; }
.meal-planner__actions svg,
.meal-planner__search svg,
.meal-planner__toolbar .yc-btn svg,
.meal-planner__back svg {
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
}

.meal-planner__summary {
    display: flex; align-items: center; gap: 7px;
    color: var(--yc-night-accent, var(--yc-primary-dark)); font-weight: 700; font-size: .875rem;
}
.meal-planner__summary svg, .meal-planner__recipe-meta svg, .meal-planner__week-summary h2 svg,
.meal-range svg, .meal-range-dialog__header svg, .meal-planner__library-new svg {
    width: 16px; height: 16px; flex: 0 0 16px; fill: none; stroke: currentColor; stroke-width: 2;
}
.meal-planner__days {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr));
    align-items: stretch;
    gap: 12px;
}

.meal-planner__day { display: grid; grid-template-rows: auto 1fr 1fr; min-width: 0; padding: 0 9px 9px; border-radius: 8px; }
@media (min-width: 561px) {
    .meal-planner__days:has(.meal-planner__meal + .meal-planner__meal) { align-items: start; }
    .meal-planner__days:has(.meal-planner__meal + .meal-planner__meal) .meal-planner__day { grid-template-rows: auto auto auto; }
    .meal-planner__day { container: meal-planner-day / inline-size; }
}
.meal-planner__day.is-today { border-color: var(--yc-primary); }
.meal-planner__day > header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 4px 8px;
    margin-inline: -9px;
    padding: 10px 9px;
    background: var(--yc-night-soft, #f6f6fc);
    border-radius: 8px 8px 0 0;
}

.meal-planner__day h3 { font-size: 1rem; }
.meal-planner__day time, .meal-planner__slot small { color: var(--yc-text-muted, #526177); }
.meal-planner__slot {
    display: grid;
    grid-template-rows: auto 1fr;
    align-items: start;
    gap: 5px;
    padding-block: 6px;
    border-top: 1px solid var(--yc-border, #dfe4ed);
}
.meal-planner__slot-label { font-size: .875rem; font-weight: 700; }
.meal-planner__entries { display: grid; min-width: 0; gap: 5px; }
.meal-planner__slot a:not(.meal-planner__add) {
    overflow-wrap: anywhere;
    font-weight: 700;
    color: var(--yc-night-accent, var(--yc-primary-dark));
    text-decoration: none;
}
.meal-planner__slot a:not(.meal-planner__add):is(:hover, :focus-visible) { text-decoration: underline; }
.meal-planner__add {
    display: flex;
    min-height: 68px;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 6px;
    border: 1px dashed var(--yc-border, #dfe4ed);
    border-radius: 8px;
    color: var(--yc-night-accent, var(--yc-primary));
    font-size: .8rem;
    font-weight: 700;
    text-decoration: none;
}
.meal-planner__add:hover { background: var(--yc-primary-soft); }
.meal-planner__add--inline { min-height: 36px; }
.meal-planner__add svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; }

.meal-planner__meal {
    display: grid;
    grid-template-columns: 26px minmax(0, 1fr) 14px;
    align-items: start;
    min-height: 68px;
    gap: 5px;
    padding: 7px 5px;
    border: 1px solid var(--yc-border, #e2e7f0);
    border-left: 2px solid var(--yc-primary);
    border-radius: 8px;
    background: var(--yc-night-accent-bg, #fbfaff);
}
.meal-planner__meal .meal-planner__tile-icon { width: 26px; height: 26px; }
.meal-planner__meal .meal-planner__tile-icon svg { width: 14px; height: 14px; }
.meal-planner__meal-info { display: grid; min-width: 0; gap: 3px; font-size: .875rem; }
.meal-planner__meal-info small { font-weight: 500; }
.meal-planner__edit-icon svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; }
.meal-planner__cook-tag {
    justify-self: start; max-width: 100%; padding: 2px 5px; border-radius: 6px;
    background: var(--yc-primary-soft, #f2eaff); color: var(--yc-night-accent, var(--yc-primary-dark)); font-size: .7rem;
}
@container meal-planner-day (max-width: 180px) {
    .meal-planner__meal { min-height: 56px; padding-block: 5px; }
    .meal-planner__meal-info { gap: 2px; }
    .meal-planner__meal-info > strong {
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 3;
        overflow: hidden;
    }
    .meal-planner__cook-tag { overflow: hidden; padding-inline: 3px; text-overflow: ellipsis; white-space: nowrap; }
}
.meal-planner__week-summary {
    display: grid; align-items: center; gap: 12px; padding: 12px;
    border: 1px solid var(--yc-border, #e2e7f0); border-radius: 8px; background: var(--yc-night-surface, #fff);
}
.meal-planner__week-summary h2 { display: flex; align-items: center; gap: 8px; font-size: 1rem; }
.meal-planner__week-summary dl { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 0; }
.meal-planner__week-summary dl > div { display: flex; align-items: baseline; flex-direction: row-reverse; gap: 6px; }
.meal-planner__week-summary dt { color: var(--yc-text-muted, #526177); font-size: .875rem; }
.meal-planner__week-summary dd { margin: 0; color: var(--yc-night-accent, var(--yc-primary-dark)); font-weight: 750; }
.meal-planner__library-actions { flex: 0 1 min(100%, 580px); justify-content: flex-end; }
.meal-planner__library-actions .meal-planner__search { flex: 1 1 280px; }
.meal-planner__recipe-grid {
    display: grid; grid-template-columns: minmax(0, 1fr); grid-auto-rows: 1fr; gap: 12px;
    margin: 0; padding: 0; list-style: none;
}
@media (min-width: 768px) {
    .meal-planner__recipe-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1280px) {
    .meal-planner__recipe-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.meal-planner__recipe-card {
    container: meal-recipe-card / inline-size;
    display: grid;
    grid-template-columns: 37% minmax(0, 1fr);
    grid-template-rows: 1fr auto;
    min-width: 0;
    padding: 0;
    overflow: hidden;
    border-radius: 8px;
}
.meal-planner__recipe-body { grid-area: 1 / 2; display: grid; gap: 6px; align-content: start; min-width: 0; padding: 12px 10px 8px; }
.meal-planner__recipe-body > p {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    overflow-wrap: anywhere;
    margin: 0;
    font-size: .875rem;
}
.meal-planner__recipe-actions { grid-area: 2 / 2; justify-content: end; align-items: stretch; gap: 6px; padding: 0 8px 10px; }
.meal-planner__recipe-actions .yc-btn { min-width: 0; min-height: 38px; padding: 6px 8px; gap: 4px; font-size: .8rem; }
.meal-planner__recipe-actions .yc-btn svg { width: 12px; height: 12px; flex-basis: 12px; }
@container meal-recipe-card (max-width: 334px) {
    .meal-planner__recipe-actions .yc-btn svg { display: none; }
}
.meal-planner__recipe-title h3 { font-size: 1rem; }
.meal-planner__media {
    position: relative;
    display: grid;
    place-items: center;
    overflow: hidden;
    border-radius: 8px;
    background: var(--yc-night-soft, #f0f2f6);
    color: var(--yc-night-muted, #64748b);
}
.meal-planner__media svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; }
.meal-planner__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.meal-planner__recipe-photo { grid-area: 1 / 1 / -1; min-height: 144px; border-radius: 0; }
.meal-planner__recipe-photo img { object-position: center; }
@media (max-width: 599px) {
    .meal-planner__recipe-grid { grid-auto-rows: auto; gap: 8px; }
    .meal-planner__recipe-card {
        grid-template-columns: 28% minmax(0, 1fr);
        grid-template-rows: 1fr auto;
    }
    .meal-planner__recipe-photo { min-height: 104px; }
    .meal-planner__recipe-body { gap: 4px; padding: 8px; }
    .meal-planner__recipe-body > p { -webkit-line-clamp: 1; }
    .meal-planner__recipe-meta { gap: 4px 8px; }
    .meal-planner__recipe-actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        padding: 0 8px 8px;
    }
    .meal-planner__recipe-actions .yc-btn { min-height: 44px; white-space: normal; }
}
.meal-planner__image-preview { flex: 0 0 72px; width: 72px; height: 72px; }
.meal-planner__image-field { display: flex; gap: 12px; align-items: center; }
.meal-planner__image-controls { display: grid; gap: 7px; min-width: 0; width: 100%; max-width: 440px; }
.meal-planner__image-controls .yc-input { padding: 7px; font-size: .875rem; }
.meal-planner__image-remove { display: inline-flex; align-items: center; gap: 6px; font-size: .875rem; }
.meal-autocomplete { position: relative; min-width: 0; }
.meal-autocomplete__list {
    position: absolute;
    top: calc(100% + 4px);
    inset-inline: 0;
    z-index: 5;
    display: grid;
    gap: 2px;
    max-height: 250px;
    overflow-y: auto;
    padding: 4px;
    border: 1px solid var(--yc-border, #dfe4ed);
    border-radius: 8px;
    background: var(--yc-night-surface, #fff);
    box-shadow: 0 8px 20px #131b3020;
}
.meal-autocomplete__list[hidden], .meal-planner__media img[hidden] { display: none; }
.meal-autocomplete__list button {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    min-height: 40px;
    padding: 4px 6px;
    border: 0;
    border-radius: 5px;
    background: transparent;
    color: inherit;
    font: inherit;
    text-align: start;
    cursor: pointer;
}
.meal-autocomplete__list button:is(:hover, [aria-selected=true]) { background: var(--yc-primary-soft, #f4eaff); }
.meal-autocomplete__thumb {
    flex: 0 0 32px;
    width: 32px;
    height: 32px;
    border: 1px solid var(--yc-border, #dfe4ed);
}
.meal-autocomplete__label { display: grid; min-width: 0; overflow-wrap: anywhere; }
.meal-autocomplete__label small { color: var(--yc-text-muted, #526177); }
.meal-planner__recipe-title a { color: inherit; overflow-wrap: anywhere; }
.meal-planner__recipe-title a:not(:hover) { text-decoration: none; }
.meal-planner__recipe-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; color: var(--yc-text-muted, #526177); font-size: .875rem; }
.meal-planner__recipe-meta > span { display: flex; gap: 5px; align-items: center; }
.meal-planner__search { flex-wrap: nowrap; flex: 0 1 420px; }
.meal-planner__search input { min-width: 0; }
.meal-planner__back { justify-self: start; }
.meal-planner__form,
.meal-planner__form fieldset,
.meal-planner__ingredients {
    display: grid;
    gap: 12px;
    min-width: 0;
}
.meal-planner__form { max-width: 880px; }
.meal-planner__form > fieldset {
    padding: 14px;
    border: 1px solid var(--yc-border, #e2e7f0);
    border-radius: 8px;
    background: var(--yc-night-surface, #fff);
}
.meal-planner__form fieldset { margin: 0; }
.meal-planner__form .yc-input,
.meal-planner__form .yc-select,
.meal-range .yc-select { width: 100%; min-width: 0; }
.meal-planner__form-pair {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
    gap: 10px;
}
.meal-planner__ingredient {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, .9fr) minmax(0, 1fr) 40px;
    align-items: end;
    gap: 8px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--yc-border, #dfe4ed);
}
.meal-planner__ingredient > button { width: 40px; height: 42px; }
.meal-planner__choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 178px), 1fr)); gap: 8px; }
.meal-planner__slot-option {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    padding: 8px;
    border: 1px solid var(--yc-border, #dfe4ed);
    border-radius: 8px;
}
.meal-planner__slot-option > strong { grid-column: 1 / -1; }
.meal-planner__slot-option > label {
    display: flex;
    align-items: center;
    gap: 4px;
    min-height: 36px;
    font-size: .875rem;
}
.meal-planner__slot-option input { width: 16px; height: 16px; accent-color: var(--yc-primary); }
.meal-planner__next[open] summary { margin-bottom: 8px; }

@container (min-width: 1110px) {
    .meal-planner__days { grid-template-columns: repeat(7, minmax(0, 1fr)); }
}

.meal-range-dialog {
    inset: 0 0 0 auto;
    margin: 0 0 0 auto;
    padding: 0;
    width: min(100%, 520px);
    max-width: 100%;
    height: 100dvh;
    max-height: 100dvh;
    color: var(--yc-text, #172034);
    border: solid var(--yc-border, #e2e7f0);
    border-width: 0 0 0 1px;
    border-radius: 8px 0 0 8px;
    background: var(--yc-night-surface, #fff);
}
.meal-range-dialog[open] { display: grid; grid-template-rows: auto minmax(0, 1fr); }
.meal-range-dialog::backdrop { background: rgba(22, 31, 51, .32); }
.meal-range-dialog__header {
    display: grid; grid-template-columns: 34px minmax(0, 1fr) 36px;
    align-items: center; gap: 8px; padding: 12px; border-bottom: 1px solid var(--yc-border, #e2e7f0);
}
.meal-range-dialog__header h2 { font-size: 1.12rem; }
.meal-range-dialog__header button { width: 36px; height: 36px; }
.meal-range-dialog__content { display: grid; min-height: 0; }
.meal-range-dialog__message { padding: 14px; }
.meal-range {
    display: grid; grid-template-rows: minmax(0, 1fr) auto; min-height: 0;
    max-width: 680px; border: 1px solid var(--yc-border, #e2e7f0);
    border-radius: 8px; background: var(--yc-night-surface, #fff);
}
.meal-range-dialog .meal-range { border: 0; border-radius: 0; }
.meal-range__body { display: grid; align-content: start; gap: 14px; padding: 12px; overflow-y: auto; }
.meal-range__section { display: grid; gap: 8px; min-width: 0; }
.meal-range__section h3 { font-size: .98rem; }
.meal-range__choices { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.meal-range__choice {
    display: grid; place-items: center; align-content: center; gap: 3px; min-height: 68px;
    padding: 5px; border: 1px solid var(--yc-border, #e2e7f0);
    border-radius: 8px; color: inherit; background: var(--yc-night-surface, #fafbfe); text-align: center;
    font-size: .77rem; text-decoration: none; overflow-wrap: anywhere;
}
.meal-range__choice.is-active, .meal-range__choice:hover { border-color: var(--yc-primary); color: var(--yc-night-accent, var(--yc-primary-dark)); }
.meal-range__choice.is-active { background: var(--yc-primary-soft, #f1e8ff); }
.meal-range__choice small { color: var(--yc-text-muted, #526177); }
.meal-range__custom { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.meal-range__custom button { grid-column: 1 / -1; justify-self: start; }
.meal-range__custom .yc-input { width: 100%; min-width: 0; }
.meal-range__label {
    display: flex; align-items: center; flex-wrap: wrap; gap: 4px 7px;
    padding: 8px; border-radius: 8px; color: var(--yc-night-accent, var(--yc-primary-dark)); background: var(--yc-primary-soft, #f1e8ff);
    font-size: .875rem;
}
.meal-range__preview { margin: 0; padding: 0; list-style: none; }
.meal-range__preview li {
    display: flex; align-items: baseline; flex-wrap: wrap; justify-content: space-between; gap: 4px 8px;
    min-height: 38px; padding: 7px 8px; border-bottom: 1px solid var(--yc-border, #e2e7f0);
    font-size: .875rem; overflow-wrap: anywhere;
}
.meal-range__footer {
    display: grid; gap: 10px; padding: 12px;
    padding-bottom: max(12px, env(safe-area-inset-bottom, 0px));
    border-top: 1px solid var(--yc-border, #e2e7f0);
    background: var(--yc-night-surface, #fff);
}
.meal-range__footer .meal-planner__actions { justify-content: space-between; }
.meal-range__footer .yc-btn { max-width: 100%; white-space: normal; }

@media (max-width: 560px) {
    .meal-planner:has(> .meal-planner__days, > .meal-planner__recipe-grid) { gap: 8px; }
    .meal-planner__week-toolbar { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; padding: 8px; }
    .meal-planner__week-control {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 6px;
    }
    .meal-planner__week-nav { display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px; gap: 4px; }
    .meal-planner__week-nav h2 { font-size: .9375rem; }
    .meal-planner__week-nav .app-icon-btn { width: 44px; height: 44px; }
    .meal-planner__week-control > .yc-btn { min-height: 44px; padding: 4px 8px; font-size: .8125rem; }
    .meal-planner__summary { font-size: .8125rem; }
    .meal-planner__week-toolbar > .meal-planner__actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        align-items: stretch;
        gap: 6px;
    }
    .meal-planner__week-toolbar > .meal-planner__actions:not(:has(> a)) { display: none; }
    .meal-planner__week-toolbar > .meal-planner__actions .yc-btn {
        min-width: 0;
        min-height: 44px;
        padding: 4px 6px;
        gap: 4px;
        font-size: .8125rem;
        text-align: center;
    }
    .meal-planner__week-toolbar > .meal-planner__actions .yc-btn:only-child { grid-column: 1 / -1; }
    .meal-planner__days { grid-template-columns: minmax(0, 1fr); gap: 8px; }
    .meal-planner__day { grid-template-rows: auto auto auto; padding-bottom: 0; }
    .meal-planner__day > header { flex-wrap: nowrap; padding-block: 5px; }
    .meal-planner__day time { font-size: .875rem; white-space: nowrap; }
    .meal-planner__slot {
        grid-template: auto / 4rem minmax(0, 1fr);
        align-items: center;
        gap: 8px;
        min-height: 48px;
        padding-block: 2px;
    }
    .meal-planner__add, .meal-planner__meal { min-height: 44px; }
    .meal-planner__slot:has(.meal-planner__meal) .meal-planner__slot-label { align-self: start; padding-top: 12px; }
    .meal-planner__add { justify-content: flex-start; padding: 4px 8px; }
    .meal-planner__meal { align-items: center; }
    .meal-planner__toolbar > .meal-planner__actions { margin-left: 0; }
    .meal-planner__toolbar > .meal-planner__actions .yc-btn,
    .meal-planner__library-new { max-width: 100%; white-space: normal; }
    .meal-planner__library-actions { justify-content: flex-start; }
    .meal-planner__form-pair { grid-template-columns: minmax(0, 1fr); }
    .meal-planner__ingredient { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 40px; }
    .meal-planner__ingredient > .meal-autocomplete { grid-column: 1 / -1; }
    .meal-planner__ingredient > button { justify-self: end; }
    .meal-range-dialog {
        inset: auto 0 0;
        margin: 0;
        width: 100%;
        height: min(92dvh, 770px);
        border-width: 1px 0 0;
        border-radius: 8px 8px 0 0;
    }
    .meal-range__choices { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .meal-range__choice { min-height: 56px; }
}

.module-sharing-grid { display: grid; grid-template-columns: minmax(0, 1fr); align-items: start; gap: 12px; }
.module-sharing-settings { container-type: inline-size; min-width: 0; padding: 12px; border-radius: 8px; background: var(--yc-surface); }
.module-sharing-heading { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; align-items: center; gap: 8px; }
.module-sharing-heading h2 { margin: 0; font-size: 16px; overflow-wrap: anywhere; }
.module-sharing-settings svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; flex-shrink: 0; }
.module-sharing-glyph, .module-sharing-person-icon {
    display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 8px;
    background: var(--yc-night-accent-bg, var(--app-accent-soft)); color: var(--yc-night-accent, var(--app-accent-dark));
}
.module-sharing-person-icon { width: 26px; height: 26px; border-radius: 6px; color: var(--yc-night-muted, #526078); background: var(--yc-night-soft, #eef2f7); }
.module-sharing-badge {
    display: inline-flex; align-items: center; gap: 4px; padding: 4px 7px; border-radius: 6px; font-size: 12px; line-height: 1.3; font-weight: 650;
    color: var(--yc-night-muted, #46556c); background: var(--yc-night-soft, #eef2f7);
}
.module-sharing-badge svg { width: 13px; height: 13px; }
.module-sharing-badge[data-share-state="incoming"] { color: var(--yc-night-accent, var(--app-accent-dark)); background: var(--yc-night-accent-bg, var(--app-accent-soft)); }
.module-sharing-badge[data-share-state="outgoing"] { color: var(--yc-night-green, #166534); background: var(--yc-night-green-bg, #e7f5eb); }
.module-sharing-badge[data-share-state="error"] { color: var(--yc-night-error, #9f2131); background: var(--yc-night-error-bg, #fdecef); }
.module-sharing-row, .module-sharing-member { display: grid; align-items: center; gap: 7px 8px; margin-top: 9px; padding-top: 9px; border-top: 1px solid var(--yc-night-border, #e2e7ef); }
.module-sharing-member { grid-template-columns: auto minmax(0, 1fr) auto; }
.module-sharing-member p { margin: 0; overflow-wrap: anywhere; }
.module-sharing-member small { display: block; color: var(--yc-night-muted, #526078); }
.module-sharing-person { display: flex; align-items: center; gap: 6px; min-width: 0; font-weight: 650; font-size: 14px; overflow-wrap: anywhere; }
.module-sharing-row--existing { grid-template-columns: minmax(0, 1fr) auto; }
.module-sharing-row--existing .module-sharing-person { grid-column: 1 / -1; }
.module-sharing-row--add { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: end; }
.module-sharing-row--add button { grid-column: 1 / -1; justify-self: end; }
.module-sharing-row > .yc-field { min-width: 0; margin: 0; }
.module-sharing-row :is(.yc-select, .yc-btn) { min-height: 40px; font-size: 14px; }
.module-sharing-row .yc-select { width: 100%; min-width: 0; }
.module-sharing-row .yc-btn { padding-inline: 10px; }
.module-sharing-row .yc-btn span { display: inline-flex; align-items: center; gap: 5px; }
.module-sharing-row .yc-btn .module-sharing-remove,
.module-sharing-row:has(select[name="permission"] option[value=""]:checked) .module-sharing-save { display: none; }
.module-sharing-row:has(select[name="permission"] option[value=""]:checked) .yc-btn {
    color: var(--yc-night-error, #a52131); border-color: var(--yc-night-button-danger-border, currentColor); background: var(--yc-night-error-bg, #fff2f3);
}
.module-sharing-row:has(select[name="permission"] option[value=""]:checked) .yc-btn .module-sharing-remove { display: inline-flex; }
@media (min-width: 900px) {
    .module-sharing-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@container (min-width: 390px) {
    .module-sharing-row { grid-template-columns: minmax(0, 1fr) minmax(120px, .72fr) auto; }
    .module-sharing-row--existing .module-sharing-person, .module-sharing-row--add button { grid-column: auto; }
}

.module-shared-readonly :is([data-calendar-selected-action], [data-schedule-create-open]) {
    display: none;
}

.module-shared-readonly .schedule-page[data-schedule-module="schedule"]
    :is(.quick-add, .schedule-drag-handle, .schedule-action-menu, .schedule-edit-trigger, .schedule-separator-actions,
        .schedule-actions [data-confirm-trigger], .schedule-actions form[action*="/uncomplete"]) {
    display: none !important;
}
.native-sync-row {
    position: relative;
}

[data-offline-unavailable] { display: none !important; }

.shopping-list-workflow:has(> .shopping-list-create-card[data-offline-unavailable]) > .shopping-list-manager-card {
    grid-column: 1 / -1;
}

[data-offline-shopping-completed] :is(.shopping-management-card__actions, .shopping-quick-add, .shopping-action-menu) {
    display: none !important;
}
[data-offline-shopping-completed] .shopping-check-toggle { pointer-events: none; }

.native-sync-icon {
    display: inline-flex;
    width: 14px;
    height: 14px;
    color: #a84a10;
}

.native-sync-icon svg {
    width: 100%;
    height: 100%;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.native-sync-row > .native-sync-icon {
    position: absolute;
    inset-block-start: 2px;
    inset-inline-end: 4px;
    z-index: 1;
}

.native-sync-count {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    flex: 0 0 auto;
    min-height: 24px;
    padding: 2px 5px;
    border: 0;
    border-radius: 4px;
    background: var(--yc-night-warning-bg, #fff0d9);
    color: var(--yc-night-warning, #8a390a);
    line-height: 1;
    cursor: pointer;
}

.mobile-topbar > .native-sync-count { order: 1; margin-inline-end: auto; }
.mobile-topbar > .mobile-topbar-brand:has(+ .native-sync-count) { flex: 0 1 auto !important; }
.sidebar-header > .native-sync-count { font-size: 11px; }
html.is-sidebar-collapsed .sidebar-header > .native-sync-count {
    position: absolute;
    inset-inline-end: 2px;
    inset-block-end: 0;
    z-index: 1;
}

.native-sync-entry {
    padding-block: 10px;
    border-bottom: 1px solid var(--yc-border, #e2e8f0);
    overflow-wrap: anywhere;
}
.native-sync-entry p { margin: 4px 0; }
.native-sync-entry__reference { font-size: 12px; }
.native-sync-entry__actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.native-sync-dialog:modal {
    display: flex;
    flex-direction: column;
    width: min(560px, calc(100% - 28px));
    max-height: calc(var(--modal-visual-height, 100dvh) - 28px);
    padding: 0;
    overflow: hidden;
    border: 1px solid var(--yc-border, #e2e8f0);
    border-radius: 8px;
    background: var(--yc-night-surface, #fff);
    box-shadow: 0 12px 36px #1b18352b;
}
.native-sync-dialog::backdrop { background: #151a3757; }
.native-offline-progress { width: 100%; accent-color: var(--yc-accent, #6d28d9); }
html:is([data-native-offline="true"], [data-native-network-unavailable]) [data-mf-offline-reconciliation] { display: none !important; }

.native-offline-badge {
    flex: 0 0 auto;
    padding: 2px 4px;
    border: 1px solid currentColor;
    border-radius: 4px;
    color: inherit;
    font-size: 9px;
    line-height: 1.15;
}
.native-brand-states {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex: 0 0 auto;
    white-space: nowrap;
}

.sidebar-brand:has(.native-brand-states) {
    position: relative;
}

.sidebar-brand .native-brand-states {
    position: absolute;
    inset-inline-start: 44px;
    inset-block-end: -9px;
    font-size: 10px;
}

html.is-sidebar-collapsed .sidebar-brand:has(.native-brand-states) { overflow: visible; }
html.is-sidebar-collapsed .sidebar-brand:has(.native-brand-states) .sidebar-brand-logo {
    clip-path: inset(0 calc(100% - 28px) 0 0);
}
html.is-sidebar-collapsed .sidebar-brand .native-brand-states {
    inset-inline-start: -8px;
    inset-block-end: -18px;
}

[data-offline-removed] {
    display: none !important;
}

.calendar-day-view__empty[hidden] { display: none; }
[data-mf-offline-balance] {
    flex-basis: 100%;
    overflow-wrap: anywhere;
}
/* Central Workspace surfaces; shared module styles stay untouched. */
:is(.workspace-overview, .workspace-health-page, .workspace-dialog, html[data-workspace-embed]) {
    --cw-surface: var(--yc-surface);
    --cw-soft: #f5f7fb;
    --cw-text: var(--yc-text);
    --cw-muted: #526078;
    --cw-border: var(--yc-border);
    --cw-accent: var(--yc-primary-dark);
    --cw-accent-bg: var(--yc-primary-soft);
    --cw-green: #146241;
    --cw-green-bg: #e5f5ec;
    --cw-blue: #245b99;
    --cw-blue-bg: #eaf2fd;
    --cw-warning: #8c4b08;
    --cw-warning-bg: #fff2db;
    --cw-error: #a52d39;
    --cw-error-bg: #fdecee;
    color: var(--cw-text);
}
:is(.workspace-overview, .workspace-health-page, .workspace-dialog) [data-tone] { --cw-tone: var(--cw-accent); --cw-tone-bg: var(--cw-accent-bg); }
:is(.workspace-overview, .workspace-health-page, .workspace-alerts-dialog) :is([data-tone=green], [data-tone=ok]) { --cw-tone: var(--cw-green); --cw-tone-bg: var(--cw-green-bg); }
.workspace-overview [data-tone=blue] { --cw-tone: var(--cw-blue); --cw-tone-bg: var(--cw-blue-bg); }
:is(.workspace-overview, .workspace-health-page, .workspace-alerts-dialog) :is([data-tone=warning], [data-tone=attention]) { --cw-tone: var(--cw-warning); --cw-tone-bg: var(--cw-warning-bg); }
:is(.workspace-overview, .workspace-health-page, .workspace-alerts-dialog) [data-tone=error] { --cw-tone: var(--cw-error); --cw-tone-bg: var(--cw-error-bg); }
.workspace-health-page :is([data-tone=unknown], [data-tone=unused]) { --cw-tone: var(--cw-muted); --cw-tone-bg: var(--cw-soft); }
.workspace-glyph {
    display: inline-grid; place-items: center; flex: none; inline-size: 38px; block-size: 38px; border-radius: 8px;
    background: var(--cw-tone-bg, var(--cw-accent-bg, var(--yc-primary-soft)));
    color: var(--cw-tone, var(--cw-accent, var(--yc-primary-dark)));
}
:is(.workspace-glyph, .workspace-query, .workspace-health-badge, .workspace-record-mark, .workspace-customize, .workspace-layout-row, .workspace-trigger, .workspace-dialog-head) svg {
    display: block; flex: none; inline-size: 20px; block-size: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}
.workspace-triggers { display: flex; gap: 5px; margin: 0 0 6px; min-width: 0; }
.workspace-triggers .workspace-trigger {
    display: inline-grid; place-items: center; position: relative; flex: 0 0 38px;
    inline-size: 38px; block-size: 38px; min-inline-size: 38px; min-block-size: 38px;
    padding: 0; color: inherit; background: transparent;
}
.workspace-triggers .workspace-trigger svg { inline-size: 16px; block-size: 16px; }
.workspace-triggers [hidden], .workspace-actions [hidden], html[data-native-offline] .workspace-health-trigger { display: none; }
.is-sidebar-collapsed .workspace-triggers:not(.workspace-triggers--mobile) { flex-direction: column; }
.workspace-triggers--mobile { margin: 0 0 0 auto; flex: 0 0 auto; }
@media (min-width: 900px) {
    html:not(.is-sidebar-collapsed) .app-sidebar .sidebar-header { padding-inline-start: 0; }
    .is-sidebar-collapsed .app-sidebar .workspace-triggers { align-items: center; }
}
@media (max-width: 899px) {
    .mobile-topbar { gap: 5px !important; }
    .mobile-topbar > .mobile-topbar-brand { order: 0; }
    .mobile-topbar > .workspace-triggers--mobile { order: 2; }
    .mobile-topbar > .mobile-menu-toggle { order: 3; }
    .mobile-topbar .mobile-topbar-logo { flex: 0 0 auto; }
}
@media (max-width: 310px) {
    html:not([data-native-offline]) .mobile-topbar:has(.workspace-health-trigger:not([hidden])) > .mobile-topbar-brand > span:nth-child(2) { display: none; }
}
.workspace-triggers .workspace-health-trigger[data-tone=ok] { color: var(--yc-night-green, #146241); }
.workspace-triggers .workspace-health-trigger[data-tone=attention] {
    --workspace-badge-bg: var(--yc-night-warning-bg, #fff2db); color: var(--yc-night-warning, #8c4b08);
}
.workspace-triggers .workspace-health-trigger[data-tone=error] {
    --workspace-badge-bg: var(--yc-night-error-bg, #fdecee); color: var(--yc-night-error, #a52d39);
}
.workspace-health-count {
    position: absolute; inset-block-start: -4px; inset-inline-end: -4px; display: grid; place-items: center;
    min-inline-size: 17px; block-size: 17px; padding-inline: 3px; border: 1px solid currentColor; border-radius: 9px;
    background: var(--workspace-badge-bg, var(--yc-surface)); color: inherit; font-size: 10px; font-weight: 750;
}
.workspace-alerts-body { padding: 12px 16px; }
.workspace-alerts-body > p { margin: 4px 0; color: var(--cw-muted); }
.workspace-alerts-list { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.workspace-alerts-list li {
    min-width: 0; padding: 10px 12px; border: 1px solid var(--cw-border);
    border-inline-start: 3px solid var(--cw-tone); border-radius: 8px; background: var(--cw-soft);
}
.workspace-alerts-list :is(header, footer) { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 4px 8px; }
.workspace-alerts-list p { margin: 6px 0; font-size: .875rem; overflow-wrap: anywhere; }
.workspace-alerts-list footer { color: var(--cw-muted); font-size: .8rem; }
.workspace-alerts-footer { position: sticky; bottom: 0; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; padding: 10px 16px; border-top: 1px solid var(--cw-border); background: var(--cw-surface); }
.workspace-health-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.workspace-alerts-list .workspace-health-actions { flex-basis: 100%; }
.workspace-health-actions .yc-btn { min-height: 34px; padding: 5px 10px; font-size: .82rem; }
.workspace-health-detail-result { display: grid; gap: 10px; }
.workspace-health-detail-result > p, .workspace-health-detail-body > p { margin: 0; }
.workspace-health-detail-result .workspace-health-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.workspace-health-detail-result :is(time, small) { color: var(--cw-muted); font-size: .8rem; }
.workspace-health-detail-result .workspace-health-keyfacts { margin: 0; }

dialog.workspace-dialog {
    position: fixed; box-sizing: border-box; inline-size: min(620px, calc(100% - 28px)); max-inline-size: none;
    max-block-size: calc(var(--workspace-visible-height, 100dvh) - 24px); margin: auto; padding: 0;
    overflow: auto; overscroll-behavior: contain; border: 1px solid var(--cw-border); border-radius: 8px;
    background: var(--cw-surface); color: var(--cw-text); box-shadow: var(--yc-shadow-lg);
}
dialog.workspace-dialog::backdrop { background: rgb(16 22 34 / .6); }
.workspace-dialog-head {
    position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: 10px; min-width: 0;
    margin: 0; padding: 12px 16px; border-bottom: 1px solid var(--cw-border); background: var(--cw-surface);
}
.workspace-dialog-head h2 { flex: 1; min-width: 0; margin: 0; font-size: 1.125rem; overflow-wrap: anywhere; color: var(--cw-text); }
.workspace-dialog-head .yc-modal-close { position: static; flex: none; margin: 0; color: var(--cw-muted); }
.workspace-dialog-head .yc-modal-close svg { inline-size: 16px; block-size: 16px; }
.workspace-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding: 14px 16px 16px; }
.workspace-actions[hidden], .workspace-quick-frame[hidden] { display: none; }
.workspace-action {
    display: flex; align-items: center; gap: 8px; min-width: 0; min-height: 58px; padding: 8px;
    border: 1px solid var(--cw-border); border-radius: 8px; background: var(--cw-soft); color: var(--cw-text);
    text-align: start; font: inherit; font-size: .875rem; font-weight: 650; line-height: 1.25; white-space: normal; cursor: pointer;
}
.workspace-action > span:last-child { min-width: 0; overflow-wrap: anywhere; }
.workspace-action .workspace-glyph { inline-size: 34px; block-size: 34px; }
.workspace-action .workspace-glyph svg { inline-size: 22px; block-size: 22px; }
.workspace-action:is(:hover,:focus-visible) { border-color: var(--cw-accent); background: var(--cw-accent-bg); }
.workspace-action:focus-visible { outline: 2px solid var(--cw-accent); outline-offset: 1px; }
#workspace-quick[open]:has(.workspace-quick-frame:not([hidden])) {
    display: flex; flex-direction: column; overflow: hidden;
    inset-block: var(--workspace-visible-top, 0px) var(--workspace-visible-bottom, 0px);
}
#workspace-quick:has(.workspace-quick-frame[data-kind=transfer]:not([hidden])) { inline-size: min(520px, calc(100% - 28px)); }
#workspace-quick:has(.workspace-quick-frame[data-kind=shopping]:not([hidden])) { inline-size: min(480px, calc(100% - 28px)); }
#workspace-quick .workspace-dialog-head { flex: none; }
.workspace-quick-frame:not([hidden]) {
    display: block; inline-size: 100%; block-size: var(--workspace-form-height, 96px); min-block-size: 0;
    flex: 0 1 auto; border: 0; color-scheme: inherit; background: var(--cw-surface);
}
@media (max-width: 599px) {
    .workspace-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); padding-inline: 12px; }
}

dialog.workspace-search[open] { display: grid; grid-template-rows: auto auto minmax(0, 1fr) auto; overflow: hidden; }
.workspace-query { position: relative; min-width: 0; display: block; margin: 12px 16px 6px; }
.workspace-query > svg { position: absolute; inset-inline-start: 13px; top: 50%; translate: 0 -50%; pointer-events: none; color: var(--cw-accent); }
.workspace-query .workspace-search-input { display: block; inline-size: 100%; min-height: 46px; padding-inline-start: 41px; border-color: var(--cw-border); background: var(--cw-soft); color: var(--cw-text); }
.workspace-search-scroll { min-block-size: 0; overflow-y: auto; overscroll-behavior: contain; padding: 4px 16px 10px; }
.workspace-search-state:not([hidden]) { min-block-size: 108px; display: grid; place-content: center; justify-items: center; gap: 7px; text-align: center; }
.workspace-status { margin: 0; color: var(--cw-muted); font-size: .875rem; }
.workspace-search-state[data-workspace-search-state=loading] .workspace-glyph svg { display: none; }
.workspace-search-state[data-workspace-search-state=loading] .workspace-glyph::after { content: ""; inline-size: 17px; block-size: 17px; border: 2px solid currentColor; border-inline-end-color: transparent; border-radius: 50%; animation: workspace-spin .8s linear infinite; }
@keyframes workspace-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .workspace-search-state[data-workspace-search-state=loading] .workspace-glyph::after { animation: none; } }
.workspace-search-results h3 { margin: 10px 0 4px 4px; font-size: .78rem; color: var(--cw-muted); }
.workspace-search-results a {
    display: flex; align-items: center; gap: 9px; min-height: 49px; padding: 5px 8px; border: 1px solid transparent; border-radius: 8px;
    text-decoration: none; color: var(--cw-text); overflow-wrap: anywhere;
}
.workspace-search-results a:is(:hover,:focus-visible) { background: var(--cw-accent-bg); border-color: var(--cw-accent); outline: none; }
.workspace-search-results .workspace-glyph { inline-size: 31px; block-size: 31px; }
.workspace-search-results .workspace-glyph svg { inline-size: 17px; block-size: 17px; }
.workspace-result-description { display: grid; min-width: 0; gap: 2px; font-size: .875rem; }
.workspace-result-description small { color: var(--cw-muted); }
.workspace-search-keys { display: flex; justify-content: flex-end; gap: 7px; padding: 8px 16px; border-top: 1px solid var(--cw-border); color: var(--cw-muted); background: var(--cw-soft); }
.workspace-search-keys kbd { display: inline-grid; place-items: center; min-inline-size: 23px; padding: 3px 5px; border: 1px solid var(--cw-border); border-radius: 4px; font-size: .75rem; }
.workspace-search-keys span kbd + kbd { margin-inline-start: 3px; }
@media (pointer: coarse), (max-width: 599px) {
    .workspace-search-keys { display: none; }
    dialog.workspace-search[open] { grid-template-rows: auto auto minmax(0, 1fr); margin-block: 12px auto; }
    .workspace-query .workspace-search-input { font-size: 16px; }
}

.workspace-overview { gap: 14px; }
.workspace-overview .dashboard-topbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.workspace-customize { margin-inline-start: auto; }
.workspace-customize svg { inline-size: 16px; block-size: 16px; }
:is(.workspace-card, .workspace-kpi) { min-width: 0; background: var(--cw-surface); color: var(--cw-text); border: 1px solid var(--cw-border); border-radius: 8px; box-shadow: var(--yc-shadow-sm); }
.workspace-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(210px, 100%), 1fr)); gap: 10px; }
.workspace-kpi { display: flex; align-items: flex-start; gap: 10px; padding: 12px; }
.workspace-kpi > div { display: grid; min-width: 0; gap: 3px; }
.workspace-kpi h2 { margin: 0; font-size: .84rem; overflow-wrap: anywhere; }
.workspace-kpi a { color: inherit; }
.workspace-kpi strong { font-size: 1.45rem; line-height: 1; font-variant-numeric: tabular-nums; }
.workspace-kpi small { color: var(--cw-muted); line-height: 1.25; font-size: .75rem; }
.workspace-dashboard { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.workspace-dashboard-block { padding: 14px; scroll-margin-top: 80px; }
.workspace-card-head { display: flex; min-width: 0; align-items: center; gap: 9px; margin: 0 0 12px; }
.workspace-card-head h2 { margin: 0; flex: 1; min-width: 0; font-size: 1.06rem; color: var(--cw-text); overflow-wrap: anywhere; }
.workspace-card-head time { margin-inline-start: auto; font-size: .8rem; white-space: nowrap; color: var(--cw-muted); }
.workspace-card-link { color: var(--cw-accent); font-size: .78rem; font-weight: 650; text-decoration: none; text-align: end; }
.workspace-card-link:hover { text-decoration: underline; }
.workspace-dashboard-groups { display: grid; gap: 12px; }
[data-workspace-block=attention] .workspace-dashboard-groups { grid-template-columns: repeat(auto-fit, minmax(min(235px, 100%), 1fr)); }
[data-workspace-block=today] .workspace-dashboard-groups { grid-template-columns: repeat(auto-fit, minmax(min(210px, 100%), 1fr)); }
[data-workspace-block=today] .workspace-group { padding-inline: 8px; }
[data-workspace-block=today] .workspace-group + .workspace-group { border-inline-start: 1px solid var(--cw-border); }
[data-workspace-block=today] .workspace-group-head { align-items: center; min-height: 25px; }
[data-workspace-block=today] .workspace-group-head h3 { display: inline-flex; align-items: center; gap: 6px; color: var(--cw-text); }
[data-workspace-block=today] .workspace-group-head svg { width: 16px; height: 16px; stroke: currentColor; fill: none; color: var(--cw-accent); }
[data-workspace-block=today] .workspace-record { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px; padding: 6px 2px; }
[data-workspace-block=today] .workspace-record small { white-space: nowrap; }
[data-workspace-block=today] .workspace-dashboard-rows li:last-child .workspace-record { border-bottom-color: transparent; }
.workspace-group { min-width: 0; }
.workspace-group-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 8px; margin-bottom: 5px; }
.workspace-group h3 { margin: 0; font-size: .84rem; color: var(--cw-muted); }
.workspace-dashboard-rows { list-style: none; display: grid; gap: 3px; margin: 0; padding: 0; }
.workspace-record {
    display: flex; flex-wrap: wrap; align-items: center; gap: 5px 9px; min-width: 0; padding: 7px 6px;
    border-bottom: 1px solid var(--cw-border); border-radius: 4px; text-decoration: none; color: var(--cw-text); overflow-wrap: anywhere;
}
.workspace-record:is(:hover,:focus-visible) { background: var(--cw-accent-bg); }
.workspace-record strong { flex: 1 1 55%; font-size: .875rem; }
.workspace-record small { margin-inline-start: auto; font-size: .765rem; color: var(--cw-muted); font-variant-numeric: tabular-nums; }
.workspace-record-mark { display: inline-flex; color: var(--cw-tone); }
.workspace-record-mark svg { inline-size: 15px; block-size: 15px; }
.workspace-record:is([data-tone=ok], [data-tone=error]) small { color: var(--cw-tone); }
.workspace-finance { padding: 3px 0; }
.workspace-finance .workspace-card-head { padding-inline: 2px; margin-bottom: 8px; }
.workspace-balance-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.workspace-balance { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; min-height: 100%; gap: 3px 9px; padding: 9px; border: 1px solid var(--cw-border); border-radius: 8px; background: var(--cw-surface); }
.workspace-balance .workspace-glyph { grid-row: span 2; inline-size: 32px; block-size: 32px; }
.workspace-balance small { grid-area: 2 / 2; margin: 0; color: var(--cw-text); font-size: .98rem; font-weight: 750; }
.workspace-balance-link { grid-area: 1 / 3 / span 2; color: var(--cw-accent); }
.mf-v3-area[id^="finance-area-"] { scroll-margin-top: 130px; }
.workspace-record progress { flex: 1 0 100%; width: 100%; height: 5px; border: 0; border-radius: 4px; overflow: hidden; appearance: none; background: var(--cw-soft); }
.workspace-record progress::-webkit-progress-bar { background: var(--cw-border); }
.workspace-record progress::-webkit-progress-value { background: var(--cw-tone, var(--cw-accent)); }
.workspace-record progress::-moz-progress-bar { background: var(--cw-tone, var(--cw-accent)); }
.workspace-muted { margin: 0; font-size: .875rem; color: var(--cw-muted); }
.workspace-overview .dashboard-agent { border-radius: 8px; padding: 14px; background: var(--cw-surface); color: var(--cw-text); }
.workspace-overview .dashboard-agent::before, .workspace-overview .dashboard-agent::after { display: none; }
.workspace-overview .dashboard-weather { padding: 14px; margin: 0; border-radius: 8px; background: var(--cw-surface); color: var(--cw-text); }
.workspace-overview .dashboard-weather__days { grid-template-columns: repeat(auto-fit, minmax(min(105px, 100%), 1fr)); gap: 5px; grid-auto-flow: row; overflow: visible; }
.workspace-overview .dashboard-weather-day { padding: 6px; min-width: 0; border-radius: 8px; }
.workspace-overview .dashboard-weather-day__icon svg { inline-size: 33px; block-size: 33px; }
.workspace-overview .dashboard-weather-day__date { flex-wrap: wrap; }
.workspace-overview .dashboard-weather-day__meta { flex-wrap: wrap; gap: 2px 5px; }
.workspace-overview :is(.dashboard-weather__header .yc-btn, .dashboard-weather__empty, .dashboard-update-card__icon, .dashboard-shared-alert__icon) svg {
    fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}

dialog.workspace-dashboard-layout[open] { display: grid; grid-template-rows: auto minmax(0, 1fr); overflow: hidden; inline-size: min(860px, calc(100% - 24px)); }
.workspace-dashboard-layout form { display: grid; grid-template-rows: minmax(0, 1fr) auto; min-height: 0; }
.workspace-layout-body { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-content: start; gap: 16px; padding: 12px 16px; overflow-y: auto; overscroll-behavior: contain; }
.workspace-layout-group { min-width: 0; }
.workspace-layout-group h3 { margin: 0 0 8px; font-size: .9rem; color: var(--cw-text); }
.workspace-layout-group:has(.workspace-layout-row) .workspace-layout-empty { display: none; }
.workspace-layout-list { display: grid; gap: 5px; margin: 0; padding: 0; list-style: none; }
.workspace-layout-row { display: flex; align-items: center; min-width: 0; padding: 2px 6px; border: 1px solid var(--cw-border); border-radius: 8px; background: var(--cw-soft); }
.workspace-layout-row label { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 7px; flex: 1; min-width: 0; min-height: 42px; padding: 3px 3px 3px 0; overflow-wrap: anywhere; cursor: pointer; }
.workspace-layout-row .workspace-glyph { inline-size: 29px; block-size: 29px; }
.workspace-layout-row .workspace-glyph svg { inline-size: 17px; block-size: 17px; }
.workspace-layout-copy :is(strong,small) { display: block; line-height: 1.2; }
.workspace-layout-copy strong { font-size: .8125rem; }
.workspace-layout-copy small { margin-top: 2px; font-size: .72rem; color: var(--cw-muted); }
.workspace-layout-row input[type=checkbox] { flex: none; accent-color: var(--cw-accent); inline-size: 17px; block-size: 17px; margin: 0; }
.workspace-layout-row .workspace-layout-grip { min-inline-size: 32px; block-size: 40px; margin-inline-end: 3px; color: var(--cw-accent); cursor: grab; touch-action: none; user-select: none; background: transparent; border: 0; }
.workspace-layout-row .workspace-layout-grip[hidden] { display: none; }
.workspace-layout-grip svg { inline-size: 18px; block-size: 18px; pointer-events: none; }
.workspace-layout-row.is-dragging { outline: 2px dashed var(--cw-accent); outline-offset: -2px; background: var(--cw-accent-bg); }
.workspace-layout-row.is-dragging .workspace-layout-grip { cursor: grabbing; }
.workspace-layout-actions { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; padding: 10px 16px; border-top: 1px solid var(--cw-border); background: var(--cw-surface); }
.workspace-finance-report.mf-analytics--compact { margin-top: 0; }
.workspace-spending.mf-spending { gap: 10px; }
.workspace-spending .mf-spending__figure { margin: 0; padding: 6px 0 0; border: 0; }
.workspace-spending :is(.mf-spending__axis,.mf-spending__plot) { height: 156px; }
[data-workspace-block=meals] .workspace-dashboard-groups, [data-workspace-block=budgets] .workspace-dashboard-groups { grid-template-columns: repeat(auto-fit, minmax(min(190px, 100%), 1fr)); }
@media (max-width: 669px) {
    .workspace-layout-body { grid-template-columns: minmax(0, 1fr); padding-inline: 10px; }
    .workspace-layout-actions { padding-inline: 10px; }
    .workspace-layout-actions .yc-btn { min-width: 0; padding-inline: 10px; }
    .workspace-layout-row .workspace-layout-grip { min-inline-size: 38px; }
}

.workspace-health { padding: 14px; }
.workspace-health-summary { padding: 14px; }
.workspace-health-summary h2 { margin: 0 0 4px; font-size: 1.06rem; }
.workspace-health-summary p { margin: 0; font-size: .825rem; color: var(--cw-muted); }
.workspace-health-summary dl { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(150px, 100%), 1fr)); gap: 8px; margin: 12px 0 0; }
.workspace-health-summary dl > div { display: grid; grid-template-columns: minmax(0, 1fr) auto; min-width: 0; align-items: center; gap: 5px; padding: 7px 9px; background: var(--cw-tone-bg); border-radius: 8px; color: var(--cw-tone); }
.workspace-health-summary dt { display: flex; align-items: center; gap: 5px; overflow-wrap: anywhere; font-size: .78rem; font-weight: 650; }
.workspace-health-summary dt .workspace-glyph { inline-size: 21px; block-size: 21px; }
.workspace-health-summary dt svg, .workspace-health-badge svg { inline-size: 14px; block-size: 14px; }
.workspace-health-summary dd { margin: 0; padding-inline-start: 4px; font-weight: 750; }
.workspace-health-grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(min(270px, 100%), 1fr)); container-type: inline-size; }
.workspace-health-row { display: flex; flex-direction: column; min-width: 0; padding: 13px; scroll-margin-block-start: 105px; }
.workspace-health-row p { margin: 0 0 4px; font-size: .84rem; color: var(--cw-muted); overflow-wrap: anywhere; }
.workspace-health-row footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px; margin-top: auto; padding-top: 9px; }
.workspace-health-row footer :is(time,small) { font-size: .75rem; color: var(--cw-muted); }
.workspace-health-details { margin-top: 6px; color: var(--cw-muted); font-size: .84rem; }
.workspace-health-details summary { color: var(--cw-text); cursor: pointer; font-weight: 650; }
.workspace-health-details dl { display: grid; gap: 6px; margin: 8px 0 2px; padding-top: 8px; border-top: 1px solid var(--cw-border); }
.workspace-health-details dl > div { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 6px; }
.workspace-health-details dd { text-align: end; color: var(--cw-text); margin: 0; }
.workspace-health-details :is(dt,dd), .workspace-health-summary p { overflow-wrap: anywhere; }
.workspace-health-keyfacts { display: grid; gap: 7px; margin: 8px 0 0; font-size: .84rem; }
.workspace-health-keyfacts > div { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 8px; padding-block-start: 7px; border-top: 1px solid var(--cw-border); }
.workspace-health-keyfacts dt { color: var(--cw-muted); }
.workspace-health-keyfacts dd { margin: 0; color: var(--cw-text); text-align: end; }
.workspace-health-keyfacts :is(dt, dd) { overflow-wrap: anywhere; }
@container (min-width: 550px) {
    .workspace-health-row--backup { grid-column: span 2; }
}
.workspace-health-badge { display: inline-flex; align-items: center; gap: 5px; line-height: 1.25; font-size: .75rem; font-weight: 700; color: var(--cw-tone); background: var(--cw-tone-bg); border-radius: 6px; padding: 4px 6px; }

@media (max-width: 899px) {
    .workspace-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .workspace-overview .dashboard-topbar { display: grid; grid-template-columns: minmax(0, 1fr) auto; padding: 12px; }
    .workspace-overview .dashboard-title-lockup { min-width: 0; justify-content: flex-start; gap: 8px; }
    .workspace-overview .dashboard-title-lockup h1 { font-size: 1.18rem; white-space: nowrap; }
    .workspace-overview .dashboard-main-icon { flex: 0 0 34px; min-width: 0; width: 34px; height: 34px; border-radius: 8px; }
    .workspace-customize { font-size: .8rem; padding-inline: 8px; }
}
@media (max-width: 767px) {
    .workspace-balance-grid, [data-workspace-block=today] .workspace-dashboard-groups { grid-template-columns: minmax(0, 1fr); }
    [data-workspace-block=today] .workspace-group + .workspace-group { padding-top: 8px; border-inline-start: 0; border-top: 1px solid var(--cw-border); }
    .workspace-kpis, .workspace-health-summary dl { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .workspace-kpi { padding: 9px; gap: 7px; }
    .workspace-kpi .workspace-glyph { inline-size: 30px; block-size: 30px; }
    .workspace-kpi .workspace-glyph svg { inline-size: 16px; block-size: 16px; }
}
@media (max-width: 349px) {
    .workspace-customize span { display: none; }
    .workspace-health-keyfacts > div { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}

.yc-theme-dark :is(.workspace-overview, .workspace-health-page, .workspace-dialog),
.yc-theme-dark[data-workspace-embed] {
        --cw-surface: var(--yc-surface); --cw-soft: var(--yc-night-soft); --cw-text: var(--yc-text); --cw-muted: var(--yc-muted); --cw-border: var(--yc-border);
        --cw-accent: color-mix(in srgb, var(--yc-primary) 32%, white);
        --cw-accent-bg: color-mix(in srgb, var(--yc-primary) 28%, #242a34);
        --cw-green: #8be2b6; --cw-green-bg: #243c34; --cw-blue: #a1caff; --cw-blue-bg: #293d57;
        --cw-warning: #ffd08e; --cw-warning-bg: #49382a; --cw-error: #ffabb3; --cw-error-bg: #492a33;
}
.yc-theme-dark :is(.workspace-overview .dashboard-topbar, .workspace-health-page .work-hero, .workspace-overview .dashboard-update-card, .workspace-overview .dashboard-shared-alert) {
        background: var(--cw-surface); border-color: var(--cw-border); color: var(--cw-text);
}
.yc-theme-dark :is(.workspace-overview .dashboard-title-lockup h1, .workspace-health-page .yc-page-title, .workspace-overview .dashboard-update-card h2, .workspace-overview .dashboard-shared-alert h2) { color: var(--cw-text); }
.yc-theme-dark .workspace-overview :is(.dashboard-update-card p, .dashboard-shared-alert p, .dashboard-weather h2, .dashboard-agent h2, .dashboard-weather__empty strong) { color: var(--cw-text); }
.yc-theme-dark .workspace-overview :is(.dashboard-weather-day, .dashboard-weather__empty, .dashboard-agent__usage) { background: var(--cw-soft); border-color: var(--cw-border); color: var(--cw-text); }
.yc-theme-dark .workspace-overview :is(.dashboard-weather-day__date strong, .dashboard-weather-day__temperature strong, .dashboard-weather-day__label) { color: var(--cw-text); }
.yc-theme-dark .workspace-overview :is(.dashboard-weather__header p, .dashboard-weather__empty p, .dashboard-weather-day__date span, .dashboard-weather__footer, .dashboard-agent__heading p, .dashboard-agent__usage-label) { color: var(--cw-muted); }
.yc-theme-dark :is(.workspace-overview .workspace-customize, .workspace-dialog .workspace-layout-actions .yc-btn--secondary, .workspace-dialog-head .yc-modal-close, .workspace-layout-row button) {
        background: var(--cw-soft); color: var(--cw-text); border-color: var(--cw-border);
}
.yc-theme-dark .workspace-health-page .finance-tab:not(.is-active) { background: var(--cw-soft); color: var(--cw-text); border-color: var(--cw-border); }
.yc-theme-dark .workspace-health-page .yc-sticky-tabs { border-radius: 8px; }
.yc-theme-dark .workspace-health-page .yc-sticky-tabs:not(.is-tabs-fixed) > .finance-controls { background: var(--cw-soft); }
.yc-theme-dark[data-workspace-embed] :is(body,.app-shell,.yc-card,.yc-panel,.modal-sheet,.modal-sheet__scroll,.modal-sheet__footer,.calendar-form,.mf-daily,.mf-daily-entry) {
        background: var(--cw-surface); color: var(--cw-text); border-color: var(--cw-border);
}
.yc-theme-dark[data-workspace-embed] :is(.yc-label,.yc-input,.yc-select,.yc-textarea) { color: var(--cw-text); }
.yc-theme-dark[data-workspace-embed] :is(.yc-input,.yc-select,.yc-textarea) { background: var(--cw-soft); border-color: var(--cw-border); }
.yc-theme-dark[data-workspace-embed] body .calendar-form :is(.yc-input,.modal-toggle-row,.modal-sheet__footer),
.yc-theme-dark[data-workspace-embed] body .calendar-form .yc-btn--secondary {
        background: var(--cw-soft) !important; color: var(--cw-text) !important; border-color: var(--cw-border) !important;
}
.yc-theme-dark[data-workspace-embed] body .calendar-form .modal-toggle-row :is(strong,span:not(.yc-toggle__slider)) { color: var(--cw-text); }
html[data-workspace-embed] :is(.mobile-topbar,.sidebar-overlay,.app-sidebar,.system-help-button,.yc-sticky-tabs,.work-back,.my-finance-tabs,.meal-planner__tabs-bar,.yc-page-header,.work-hero) { display: none !important; }
html[data-workspace-embed] body { margin: 0; padding: 0; min-height: 0; background: var(--cw-surface); }
html[data-workspace-embed] body .app-shell {
    display: flow-root; margin: 0; padding: 12px !important; width: 100%; max-width: none; min-height: 0;
}
html[data-workspace-embed] .app-shell > :is(.work-page,.shopping-page,.consumption-page,.meal-planner) {
    width: 100%; min-height: 0; margin: 0; padding: 0; box-shadow: none; background: transparent; border: 0;
}
html[data-workspace-embed] :is(.work-client-form > h2,.meal-planner:has(> [data-meal-cooking]) > h2,.my-finance-page:has(> .my-finance-form) > .my-finance-heading) { display: none; }
html[data-workspace-embed] :is(.work-client-form,.consumption-form-card) { width: 100%; min-width: 0; margin: 0; padding: 0; border: 0; box-shadow: none; background: transparent; }
html[data-workspace-embed="income"] .my-finance-page > .my-finance-forecast-basis { display: none; }
html[data-workspace-embed="income"] .my-finance-form { padding: 0; border: 0; box-shadow: none; background: transparent; }

/* Keep the canonical modal active, but let the outer workspace own its frame and header. */
html:is([data-workspace-embed="task"],[data-workspace-embed="event"],[data-workspace-embed="transfer"]) body > main { visibility: hidden; }
html:is([data-workspace-embed="task"],[data-workspace-embed="event"]) main :is(.schedule-error,.calendar-error) { visibility: visible; }
html[data-workspace-embed] :is(#schedule-create-modal,[data-calendar-modal]):not([hidden]) {
    position: fixed; inset: 0; height: auto; padding: 0; place-items: start stretch;
    visibility: visible; background: transparent; backdrop-filter: none;
}
html[data-workspace-embed] :is(#schedule-create-modal,[data-calendar-modal]) > .modal-sheet,
html[data-workspace-embed] dialog[data-mf-transfer-dialog][open] {
    width: 100%; height: auto; max-height: 100dvh; margin: 0; padding: 0;
    visibility: visible; border: 0; border-radius: 0; box-shadow: none;
}
html[data-workspace-embed] dialog[data-mf-transfer-dialog][open] { position: fixed; inset: 0 0 auto; transform: none; }
html[data-workspace-embed] :is(#schedule-create-modal,[data-calendar-modal],[data-mf-transfer-dialog]) .modal-sheet__header { display: none; }
html[data-workspace-embed] :is(#schedule-create-modal,[data-calendar-modal],[data-mf-transfer-dialog]) .modal-sheet__scroll { border-radius: 0; }
html[data-workspace-embed] dialog[data-mf-transfer-dialog]::backdrop { background: transparent; backdrop-filter: none; }

html[data-workspace-embed="daily"] .my-finance-page > :not([data-mf-operations]),
html[data-workspace-embed="daily"] [data-mf-operations] > :not([data-mf-daily-panel]),
html[data-workspace-embed="daily"] :is(.mf-daily-entry__heading h2, [data-mf-daily-history]) { display: none; }
html[data-workspace-embed="daily"] [data-mf-operations] > [data-mf-daily-panel] { padding: 0; border: 0; box-shadow: none; }
html[data-workspace-embed="daily"] .mf-daily-entry__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
html[data-workspace-embed="daily"] .mf-daily-entry__heading { margin: 0; }
html[data-workspace-embed="shopping"] .shopping-page > :not(.shopping-workspace-layout,.yc-alert),
html[data-workspace-embed="shopping"] .shopping-workspace-layout > :not(.shopping-current-card),
html[data-workspace-embed="shopping"] .shopping-current-card :is(.shopping-checklist,.shopping-management-card__actions,.shopping-management-card__meta,.shopping-management-card__content > span,.shopping-management-card__content > small:not(.shopping-owner-badge)),
html[data-workspace-embed="shopping"] .shopping-list-detail::after { display: none; }
html[data-workspace-embed="shopping"] .shopping-workspace-layout { display: block; }
html[data-workspace-embed="shopping"] :is(.shopping-workspace-layout,.shopping-current-card,.shopping-list-detail,.shopping-quick-add) { margin: 0; min-height: 0; }
html[data-workspace-embed="shopping"] :is(.shopping-current-card,.shopping-list-detail) { padding: 0; border: 0; box-shadow: none; background: transparent; }
html[data-workspace-embed="shopping"] .shopping-management-list { gap: 8px; }
html[data-workspace-embed="shopping"] .shopping-management-card--current { display: block; padding: 6px 8px; }

/* Monthly finance report: the overview and detail use the same presentation. */
html:is([data-native-offline="true"],[data-native-network-unavailable]) [data-mf-analytics-online] { display: none !important; }
.mf-analytics { min-width: 0; }
.mf-analytics--compact { margin-top: 16px; }
.mf-analytics__header { align-items: center; flex-wrap: wrap; gap: 10px; }
.mf-analytics :is(h2,h3,p,dl,figure) { margin: 0; }
.mf-analytics__filters { display: flex; align-items: end; flex-wrap: wrap; gap: 10px; }
.mf-analytics__range { flex: 1 1 100%; margin: 0; padding: 0; border: 0; min-width: 0; }
.mf-analytics__range legend { margin-bottom: 5px; }
.mf-analytics__filters .yc-field { flex: 1 1 130px; min-width: 0; margin: 0; }
.mf-analytics__filters .yc-field:nth-child(2) { flex-basis: 230px; }
.mf-analytics__period { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.mf-analytics__period .app-icon-btn { flex: none; }
.mf-analytics__period .app-icon-btn svg { rotate: -90deg; }
.mf-analytics__period .app-icon-btn:last-child svg { rotate: 90deg; }
.mf-analytics [data-mf-analytics-retry][hidden] { display: none; }
.mf-analytics__report,.mf-analytics__currency { display: grid; gap: 12px; min-width: 0; }
.mf-analytics--compact .mf-analytics__currency + .mf-analytics__currency { padding-top: 12px; border-top: 1px solid var(--yc-night-border, #e2e8f0); }
.mf-analytics__scope { font-size: 16px; overflow-wrap: anywhere; }
.mf-analytics__status,.mf-analytics__chart small,.mf-analytics__delta { color: var(--yc-night-muted, #526076); font-size: 13px; }
.mf-analytics__metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.mf-analytics__metrics--two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.mf-analytics__metrics > div { min-width: 0; padding: 9px; border: 1px solid var(--yc-night-border, #e2e8f0); border-radius: 8px; background: var(--yc-night-soft, #f6f8fc); }
.mf-analytics__metrics dt { color: var(--yc-night-muted, #526076); font-size: 13px; }
.mf-analytics__metrics dd { margin: 4px 0 0; font-variant-numeric: tabular-nums; font-weight: 700; overflow-wrap: anywhere; }
.mf-analytics__metrics .mf-analytics__delta { font-weight: 500; }
.mf-analytics__charts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.mf-analytics--compact .mf-analytics__charts { grid-template-columns: minmax(0, 1fr); }
.mf-bars {
    --mf-bars-height: 176px;
    --mf-bars-income: #18834d;
    --mf-bars-expense: #c13d54;
    --mf-bars-grid: var(--yc-night-border, #dbe3ed);
    --mf-bars-zero: var(--yc-night-muted, #67758a);
    min-width: 0; padding: 14px; border: 1px solid var(--mf-bars-grid); border-radius: 8px;
    background: var(--yc-surface);
}
.yc-theme-dark .mf-bars { --mf-bars-income: #55d58c; --mf-bars-expense: #ff8294; }
.mf-analytics--compact .mf-bars { --mf-bars-height: 144px; }
.mf-bars figcaption { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; }
.mf-bars__legend { display: flex; flex-wrap: wrap; gap: 5px 14px; margin-block-start: 7px; color: var(--yc-night-muted, #526076); font-size: 13px; }
.mf-bars__legend span { display: inline-flex; align-items: center; gap: 6px; }
.mf-bars [data-series="income"] { --mf-bars-color: var(--mf-bars-income); }
.mf-bars [data-series="expense"] { --mf-bars-color: var(--mf-bars-expense); }
.mf-bars__legend span::before { content: ""; inline-size: 9px; block-size: 9px; border-radius: 2px; background: var(--mf-bars-color); }
.mf-bars__canvas { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px; margin-block-start: 14px; }
.mf-bars__axis { display: grid; grid-template-rows: var(--mf-bars-height); justify-items: end; }
.mf-bars__axis span { position: relative; grid-area: 1 / 1; align-self: start; top: var(--mf-at); translate: 0 -50%; white-space: nowrap; }
.mf-bars__axis,.mf-bars .mf-bars__periods small { font-size: 11px; font-variant-numeric: tabular-nums; color: var(--yc-night-muted, #526076); }
.mf-bars [data-mf-bar-zero-label] { font-weight: 700; color: var(--mf-bars-zero); }
.mf-bars__viewport { position: relative; min-width: 0; container-type: inline-size; }
.mf-bars__grid { position: absolute; inset: 0 0 auto; height: var(--mf-bars-height); pointer-events: none; }
.mf-bars__grid span { position: absolute; top: var(--mf-at); inset-inline: 0; border-block-start: 1px dashed var(--mf-bars-grid); }
.mf-bars__grid [data-mf-bar-zero] { border-block-start: 1px solid var(--mf-bars-zero); }
.mf-bars__periods { position: relative; display: grid; grid-template-columns: repeat(var(--mf-months), minmax(0, 1fr)); margin: 0; padding: 0; list-style: none; }
.mf-bars__periods li { display: grid; grid-template-rows: var(--mf-bars-height) auto; gap: 6px; text-align: center; min-width: 0; }
.mf-bars__point { position: relative; width: 100%; min-width: 0; margin: 0; padding: 0; border: 0; border-radius: 4px; background: transparent; cursor: pointer; }
.mf-bars__point.is-active { background: color-mix(in srgb, var(--app-accent) 9%, transparent); }
.mf-bars__point:focus-visible { outline: 2px solid var(--app-accent); outline-offset: -2px; }
.mf-bars__columns { position: absolute; inset: 0; width: min(82%, 48px); margin-inline: auto; display: flex; gap: 12%; }
.mf-bars__track { position: relative; flex: 1; }
.mf-bars__bar { position: absolute; inset-inline: 0; top: var(--mf-at); height: var(--mf-size); background: var(--mf-bars-color); border-radius: 4px 4px 0 0; }
.mf-bars__bar[data-sign="negative"] { border-radius: 0 0 4px 4px; }
[data-mf-bar-chart="balance"] .mf-bars__columns { width: min(58%, 26px); }
.mf-bars__baseline-mark { position: absolute; top: var(--mf-zero); left: 35%; width: 30%; border-top: 2px solid var(--mf-bars-zero); translate: 0 -1px; }
[data-mf-bar-empty] .mf-bars__baseline-mark { opacity: .5; border-top-style: dashed; }
.mf-bars__empty { position: absolute; inset: calc(var(--mf-bars-height) / 2) 0 auto; translate: 0 -50%; text-align: center; color: var(--yc-night-muted, #526076); pointer-events: none; }
.mf-bars__viewport:has(.mf-bars__point.is-active) .mf-bars__empty { visibility: hidden; }
.mf-bars__tooltip { position: absolute; z-index: 2; top: 6px; width: max-content; max-width: calc(100% - 8px); padding: 8px 10px; border: 1px solid var(--mf-bars-grid); border-radius: 8px; background: var(--yc-surface); box-shadow: var(--yc-shadow-sm); font-size: 12px; pointer-events: none; overflow-wrap: anywhere; }
.mf-bars__tooltip[hidden] { display: none; }
.mf-bars__tooltip :is(strong,span) { display: block; }
.mf-bars__tooltip strong { text-transform: capitalize; }
.mf-bars__tooltip span { white-space: pre-line; font-variant-numeric: tabular-nums; }
@container (max-width: 237px) {
    .mf-bars__periods:has(li:nth-child(12)) li:is(:nth-child(even):not(:last-child), :nth-last-child(2)) small { visibility: hidden; }
}
.mf-analytics__summary { margin: 0; padding-inline-start: 1.2rem; color: var(--yc-night-muted, #526076); }
.mf-analytics__detail-card {
    min-width: 0;
    padding: 14px;
    border: 1px solid var(--yc-night-border, #dbe2ed);
    border-radius: 8px;
    background: var(--yc-surface);
}
.mf-analytics__detail-card h3 { font-size: 16px; margin-bottom: 10px; }

.mf-spending {
    --spend-edge: var(--yc-night-border, #dbe2eb);
    --spend-panel: var(--yc-night-surface, #fff);
    --spend-soft: var(--yc-night-soft, #f5f7fc);
    --spend-muted: var(--yc-night-muted, #526076);
    --spend-color-sl: 68% 32%;
    display: grid; min-width: 0; gap: 16px; scroll-margin-top: 84px;
}
.yc-theme-dark .mf-spending { --spend-color-sl: 76% 68%; }
.mf-spending :is([data-mf-spending-series],[data-mf-spending-category],.mf-spending__line,.mf-spending__bar) { --spend-color: hsl(var(--spend-hue) var(--spend-color-sl)); }
.mf-spending__bar { fill: var(--spend-color); stroke: none; }
.mf-spending__header,.mf-spending__unit { display: grid; min-width: 0; gap: 12px; }
.mf-spending__header { gap: 4px; }
.mf-spending h2 { font-size: 20px; }
.mf-spending h3,.mf-spending h4 { font-size: 15px; margin: 0; overflow-wrap: anywhere; }
.mf-spending__filters { display: flex; align-items: end; gap: 8px; flex-wrap: wrap; }
.mf-spending__filters .yc-field { flex: 1 1 132px; min-width: 0; margin: 0; }
.mf-spending__filters :is(select,input[type="date"]) { min-width: 0; max-width: 100%; }
.mf-spending__dates { flex: 1 1 100%; display: flex; flex-wrap: wrap; gap: 8px; }
.mf-spending [hidden] { display: none; }
.mf-spending__category-filter { position: relative; flex: 1 1 156px; min-width: 0; }
.mf-spending summary { cursor: pointer; overflow-wrap: anywhere; }
.mf-spending__category-filter summary { padding: 9px 12px; border: 1px solid var(--spend-edge); border-radius: 8px; background: var(--spend-panel); }
.mf-spending__category-filter fieldset {
    position: absolute; inset: auto 0 auto auto; z-index: 3; margin: 4px 0 0; padding: 8px;
    width: min(300px, 86vw); max-height: 280px; overflow: auto;
    background: var(--spend-panel); border: 1px solid var(--spend-edge); border-radius: 8px; box-shadow: 0 8px 20px #0002;
}
.mf-spending__category-filter label { display: flex; align-items: start; gap: 8px; padding: 5px; overflow-wrap: anywhere; }
.mf-spending input[type="checkbox"],.mf-spending progress { accent-color: var(--app-accent); }
.mf-spending small,.mf-spending figcaption span { color: var(--spend-muted); font-size: 12px; }
.mf-spending small { display: block; }
.mf-spending__unit + .mf-spending__unit { padding-top: 14px; border-top: 1px solid var(--spend-edge); }
.mf-spending__metrics { grid-template-columns: repeat(auto-fit, minmax(min(150px, 100%), 1fr)); }
.mf-spending__figure,.mf-spending__card { padding: 12px; min-width: 0; border: 1px solid var(--spend-edge); border-radius: 8px; }
.mf-spending__figure { display: grid; gap: 8px; }
.mf-spending__figure figcaption { display: flex; justify-content: space-between; gap: 4px 12px; flex-wrap: wrap; }
.mf-spending__legend { display: flex; flex-wrap: wrap; gap: 6px; }
.mf-spending__legend button {
    display: inline-flex; align-items: start; gap: 6px; text-align: start; max-width: 100%; padding: 5px 8px;
    color: inherit; font: inherit; font-size: 13px; overflow-wrap: anywhere;
    border: 1px solid var(--spend-edge); border-radius: 8px; background: var(--spend-soft); cursor: pointer;
}
.mf-spending__legend button::before { content: ""; flex: 0 0 9px; height: 9px; margin-top: 4px; border-radius: 50%; background: var(--spend-color); }
.mf-spending__legend button[aria-pressed="false"] { color: var(--spend-muted); background: transparent; text-decoration: line-through; }
.mf-spending__legend button[aria-pressed="false"]::before { background: transparent; border: 1px solid var(--spend-color); }
.mf-spending__chart { display: grid; grid-template-columns: 54px minmax(0, 1fr); gap: 3px 5px; }
.mf-spending__axis,.mf-spending__plot { position: relative; min-width: 0; height: 228px; }
.mf-spending__axis span { position: absolute; right: 0; translate: 0 -50%; }
.mf-spending__axis,.mf-spending__time { color: var(--spend-muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.mf-spending__time { grid-column: 2; position: relative; min-height: 17px; }
.mf-spending__time span { position: absolute; translate: -50% 0; white-space: nowrap; }
.mf-spending__time span:first-child:not(:only-child) { translate: 0 0; }
.mf-spending__time span:last-child:not(:only-child) { translate: -100% 0; }
.mf-spending__figure--monthly .mf-spending__time span:is(:first-child, :last-child):not(:only-child) { translate: -50% 0; }
.mf-spending [data-mf-spending-status] {
    position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
    clip-path: inset(50%); overflow: hidden; white-space: nowrap;
}
.mf-spending__plot svg,.mf-spending__trend svg { display: block; width: 100%; height: 100%; }
.mf-spending__gridline,.mf-spending__line,.mf-spending__trend path { fill: none; vector-effect: non-scaling-stroke; }
.mf-spending__gridline { stroke: var(--spend-edge); stroke-width: 1; }
.mf-spending__line,.mf-spending__trend path { stroke: var(--spend-color); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.mf-spending__line.mf-spending__point { stroke-width: 7; }
.mf-spending__empty { position: absolute; inset: 33% 0 auto; text-align: center; color: var(--spend-muted); background: var(--spend-panel); padding: 8px; }
.mf-spending__tooltip {
    position: absolute; z-index: 2; top: 4px; max-width: calc(100% - 8px); padding: 8px;
    width: max-content; background: var(--spend-panel); border: 1px solid var(--spend-edge);
    border-radius: 8px; pointer-events: none; font-size: 12px; overflow-wrap: anywhere;
}
.mf-spending__tooltip :is(strong,span) { display: block; }
.mf-spending__cards { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 245px), 1fr)); }
.mf-spending__card { display: grid; align-content: start; gap: 8px; }
.mf-spending__card dl > div { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; gap: 6px; }
.mf-spending__card dt,.mf-spending__trend figcaption { font-size: 13px; color: var(--spend-muted); }
.mf-spending__card dd { margin: 0; text-align: end; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.mf-spending__trend { padding: 5px 7px; border-radius: 8px; background: var(--spend-soft); }
.mf-spending__trend svg { height: 40px; }
.mf-spending__budget-now { padding-top: 6px; border-top: 1px solid var(--spend-edge); }
.mf-spending progress { width: 100%; height: 5px; }
@media (max-width: 600px) {
    .mf-spending__filters .yc-field { flex-basis: calc(50% - 8px); }
    .mf-spending__category-filter fieldset { position: static; width: 100%; }
    .mf-spending__category-filter[open] { flex-basis: 100%; }
    .mf-analytics .mf-spending__metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .mf-spending__metrics > div:last-child { grid-column: 1 / -1; }
    .mf-spending__chart { grid-template-columns: 41px minmax(0, 1fr); }
    .mf-spending__axis,.mf-spending__plot { height: 176px; }
}
.mf-breakdown {
    container-type: inline-size;
    --mf-swatch-0: #6d28d9; --mf-swatch-1: #127c80; --mf-swatch-2: #bc512a; --mf-swatch-3: #2563c9;
    --mf-swatch-4: #8a6a15; --mf-swatch-5: #af3c72; --mf-swatch-6: #45804a; --mf-swatch-7: #576880;
    --mf-swatch-8: #926126; --mf-swatch-9: #a9424a; --mf-swatch-10: #386783; --mf-swatch-11: #8754a7;
}
.yc-theme-dark .mf-breakdown {
    --mf-swatch-0: #b69af1; --mf-swatch-1: #58c4b8; --mf-swatch-2: #f0aa78; --mf-swatch-3: #83b0f5;
    --mf-swatch-4: #d2be64; --mf-swatch-5: #e58cb8; --mf-swatch-6: #93c886; --mf-swatch-7: #a6adbd;
    --mf-swatch-8: #cfa375; --mf-swatch-9: #f38f98; --mf-swatch-10: #76b8d3; --mf-swatch-11: #d291da;
}
.mf-breakdown [data-mf-swatch="0"] { --mf-swatch: var(--mf-swatch-0); }
.mf-breakdown [data-mf-swatch="1"] { --mf-swatch: var(--mf-swatch-1); }
.mf-breakdown [data-mf-swatch="2"] { --mf-swatch: var(--mf-swatch-2); }
.mf-breakdown [data-mf-swatch="3"] { --mf-swatch: var(--mf-swatch-3); }
.mf-breakdown [data-mf-swatch="4"] { --mf-swatch: var(--mf-swatch-4); }
.mf-breakdown [data-mf-swatch="5"] { --mf-swatch: var(--mf-swatch-5); }
.mf-breakdown [data-mf-swatch="6"] { --mf-swatch: var(--mf-swatch-6); }
.mf-breakdown [data-mf-swatch="7"] { --mf-swatch: var(--mf-swatch-7); }
.mf-breakdown [data-mf-swatch="8"] { --mf-swatch: var(--mf-swatch-8); }
.mf-breakdown [data-mf-swatch="9"] { --mf-swatch: var(--mf-swatch-9); }
.mf-breakdown [data-mf-swatch="10"] { --mf-swatch: var(--mf-swatch-10); }
.mf-breakdown [data-mf-swatch="11"] { --mf-swatch: var(--mf-swatch-11); }
.mf-breakdown__body { display: grid; grid-template-columns: minmax(0, 1fr); align-items: center; gap: 10px 14px; }
.mf-breakdown__stage { min-width: 0; position: relative; }
.mf-breakdown__ring { position: relative; display: grid; place-items: center; width: min(100%, 285px); aspect-ratio: 1; margin-inline: auto; }
.mf-breakdown__ring > svg { width: 100%; height: 100%; display: block; position: absolute; inset: 0; }
.mf-breakdown .mf-breakdown__plot :is(circle,path) { fill: none; stroke-width: 21; }
.mf-breakdown .mf-breakdown__track { stroke: var(--yc-night-border, #e6eaf1); }
.mf-breakdown .mf-breakdown__slice { stroke: var(--mf-swatch); pointer-events: visibleStroke; cursor: pointer; }
.mf-breakdown .mf-breakdown__slice.is-active { stroke-width: 26; }
.mf-breakdown :is([data-mf-slice],[data-mf-key]) { -webkit-tap-highlight-color: transparent; }
.mf-breakdown__total { position: absolute; inset-inline: 16%; display: grid; gap: 2px; text-align: center; pointer-events: none; overflow-wrap: anywhere; }
.mf-breakdown__total strong { font-variant-numeric: tabular-nums; line-height: 1.2; }
.mf-breakdown__total small,.mf-breakdown__key [data-mf-share],.mf-breakdown__empty { color: var(--yc-night-muted, #526076); }
.mf-breakdown__total small,.mf-breakdown__key,.mf-breakdown__tooltip,.mf-breakdown__empty { font-size: 13px; }
.mf-breakdown__empty { text-align: center; }
.mf-breakdown__legend { list-style: none; padding: 0; margin: 0; min-width: 0; }
.mf-breakdown__legend li + li { border-top: 1px solid var(--yc-night-border, #e2e8f0); }
.mf-breakdown__key {
    display: grid; grid-template-columns: 9px minmax(0, 1fr) minmax(0, auto) minmax(40px, auto);
    align-items: center; text-align: start; gap: 7px; width: 100%; min-height: 44px; padding: 5px;
    background: transparent; color: inherit; border: 0; border-radius: 6px; font-variant-numeric: tabular-nums; cursor: pointer;
    overflow-wrap: anywhere;
}
.mf-breakdown__key :is([data-mf-value],[data-mf-share]) { text-align: end; }
.mf-breakdown__key [data-mf-value] { max-width: 13ch; }
.mf-breakdown__key.is-active,.mf-breakdown__key:focus-visible { background: var(--yc-night-soft, #f0f3f9); }
.mf-breakdown__swatch { width: 9px; height: 9px; border-radius: 2px; background: var(--mf-swatch); }
.mf-breakdown__tooltip {
    position: absolute; z-index: 1; inset-inline: 0; inset-block-end: 0; width: max-content; max-width: 100%; margin-inline: auto;
    display: grid; gap: 2px; padding: 7px 10px; border: 1px solid var(--yc-night-border, #dbe2ed); border-radius: 6px;
    background: var(--yc-surface); box-shadow: 0 4px 12px rgb(0 0 0 / 16%); overflow-wrap: anywhere;
}
.mf-breakdown__tooltip[hidden] { display: none; }
@container (min-width: 590px) {
    .mf-breakdown__body { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .mf-breakdown__empty { text-align: start; }
}
@media (max-width: 767px) {
    .mf-analytics__metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .mf-analytics__charts { grid-template-columns: minmax(0, 1fr); }
    .mf-bars { --mf-bars-height: 152px; padding-inline: 9px; }
}

.change-history-filters {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr)) auto;
    gap: 10px;
    align-items: end;
    margin-block: 12px;
}
.change-history-filters .yc-field { min-width: 0; margin: 0; }
.change-history-filters .yc-input { width: 100%; min-width: 0; }
.yc-theme-dark .change-history-page .change-history-filters .yc-input,
.yc-theme-dark .change-history-page .finance-tab:not(.is-active) {
    background: var(--yc-night-soft);
    color: var(--yc-text);
    border-color: var(--yc-border);
}
.change-history-list { padding: 0 14px; }
.change-history-list > p { padding: 14px 0; }
.change-history-row {
    display: grid;
    grid-template-columns: 34px minmax(0, 1.1fr) minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding-block: 10px;
    overflow-wrap: anywhere;
}
.change-history-row + .change-history-row { border-top: 1px solid var(--yc-night-border, #dce2eb); }
.change-history-row > div { display: grid; gap: 2px; min-width: 0; }
.change-history-row .yc-page-header__icon { width: 34px; height: 34px; border-radius: 8px; }
.change-history-row .yc-page-header__icon svg { width: 16px; height: 16px; }
.change-history-row time { font-variant-numeric: tabular-nums; }
.change-history-row :is(div > span, time) { font-size: .875rem; }
.change-history-pagination { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px; margin-block: 12px; }
.change-history-pagination svg { width: 16px; height: 16px; }

/* Keep keyboard focus independent of the subdued resting edges. */
.yc-theme-dark :is(.yc-btn--secondary, .yc-btn--danger, .yc-modal-btn--cancel, .yc-modal-btn--danger,
    .app-icon-btn, .yc-icon-btn, .yc-btn--icon, .yc-modal-close, .finance-search-submit):where(:not(.yc-btn--primary, :disabled, [aria-disabled="true"])):focus-visible {
    outline: 2px solid var(--yc-night-accent);
    outline-offset: 2px;
}

.yc-theme-dark :is(.yc-btn--danger, .yc-modal-btn--danger, [data-calendar-delete]):where(:not(:disabled, [aria-disabled="true"])):is(:hover, :active, :focus-visible) {
    --yc-night-button-danger-state: var(--yc-night-button-danger-hover-border);
}

.yc-theme-dark :is(.schedule-more-trigger, .yc-modal-close, .workspace-trigger):where(:not(:disabled, [aria-disabled="true"])):is(:hover, :active) {
    border-color: var(--yc-night-button-hover-border);
}

@media (max-width: 1050px) {
    .change-history-filters { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
    .change-history-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .change-history-row { grid-template-columns: 34px minmax(0, 1fr); gap: 6px 10px; }
    .change-history-row > :is(div, time) { grid-column: 2; }
    .change-history-row > div:nth-child(3) { display: flex; flex-wrap: wrap; gap: 2px 8px; }
}

.document-manager-toolbar { display: grid; gap: 10px; margin-block: 0 14px; }
.document-manager-crumbs, .document-manager-controls, .document-manager-tools, .document-manager-views {
    display: flex; align-items: center; flex-wrap: wrap; gap: 8px;
}
.document-manager-crumbs { font-size: .875rem; overflow-wrap: anywhere; }
.document-manager-crumbs > [aria-current] { font-weight: 750; }
.document-manager-stats { margin: 0; font-size: .875rem; color: var(--yc-muted); overflow-wrap: anywhere; }
.settings-storage-panel { margin-block: 12px; padding: 14px 16px; }
.settings-storage-panel h2 { font-size: 1.125rem; margin: 0 0 12px; }
.settings-storage-panel progress { width: 100%; accent-color: var(--app-accent); }
.settings-storage-heading { display: flex; gap: 12px; justify-content: space-between; align-items: start; flex-wrap: wrap; }
.settings-storage-totals { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 145px), 1fr)); gap: 10px; }
.settings-storage-totals > div { padding: 10px 12px; border: 1px solid var(--yc-border); border-radius: 8px; background: var(--yc-night-soft, #f7f8fc); }
.settings-storage-totals dt { color: var(--yc-muted); font-size: .875rem; }
.settings-storage-totals dd { margin: 4px 0; font-weight: 750; }
.settings-storage-category { border-top: 1px solid var(--yc-border); padding-block: 9px; }
.settings-storage-category summary { cursor: pointer; }
.settings-storage-breakdown { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 24px; }
.settings-storage-breakdown--admin .settings-storage-chart { grid-column: 2; grid-row: 1; }
.settings-storage-chart { margin: 4px 0; text-align: center; }
.settings-storage-ring { display: grid; width: min(100%, 250px); aspect-ratio: 1; margin: 0 auto; }
.settings-storage-ring > * { grid-area: 1 / 1; }
.settings-storage-ring > div { display: grid; place-content: center; gap: 4px; pointer-events: none; }
.settings-storage-ring > div span, .settings-storage-chart figcaption { color: var(--yc-muted); }
.settings-storage-ring > div strong { font-size: 1.25rem; }
.settings-storage-ring svg { display: block; width: 100%; height: 100%; }
.settings-storage-ring__track { stroke: var(--yc-border); }
[data-storage-slice] { cursor: pointer; }
[data-storage-slice]:is(:focus-visible, :hover) { stroke-width: 31; }
.settings-storage-chart figcaption { min-height: 2.5em; }
.settings-storage-category summary { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; align-items: center; gap: 8px; }
.settings-storage-category summary::-webkit-details-marker { display: none; }
.settings-storage-category summary strong { overflow-wrap: anywhere; }
.settings-storage-category summary > span:last-child { text-align: right; }
.settings-storage-category summary strong::after { content: ' +'; color: var(--yc-muted); }
.settings-storage-category[open] summary strong::after { content: ' −'; }
.settings-storage-dot { width: 10px; height: 10px; border-radius: 50%; }
.settings-storage-plans { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.settings-storage-plan { display: grid; justify-items: start; align-content: start; gap: 5px; min-width: 0; padding: 12px; border: 1px solid var(--yc-border); border-radius: 8px; cursor: pointer; overflow-wrap: anywhere; }
.settings-storage-plan:has(input:checked) { border-color: var(--yc-night-accent, var(--app-accent)); background: var(--yc-night-accent-bg, color-mix(in srgb, var(--app-accent) 7%, white)); }
.settings-storage-plan input { accent-color: var(--app-accent); }
.settings-storage-plan small { color: var(--yc-muted); }
.settings-storage-individual { display: grid; grid-template-columns: minmax(0, 16rem) auto; justify-content: start; gap: 12px; margin-block: 12px; }
.settings-storage-confirm { color: var(--yc-night-warning, #92400e); }
.settings-storage-panel .finance-form-actions { justify-content: flex-start; }
.settings-user-form-page { grid-template-columns: minmax(0, 1fr); }
.settings-user-form-page > * { min-width: 0; }
.settings-user-form-page > .finance-tabs { margin-inline: 0; padding-inline: 0; max-width: 100%; }
.settings-user-form-page .yc-page-header__title > div { min-width: 0; overflow-wrap: anywhere; }
.settings-permissions-groups { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.settings-permission-group { display: grid; gap: 6px; align-content: start; min-width: 0; }
.settings-permission-group h4 { margin: 8px 0 2px; }
.settings-user-form-page :is(.settings-agent-cycle-summary, .settings-agent-usage-summary) {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px 16px;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid var(--yc-border);
}
.settings-user-form-page :is(.settings-agent-cycle-summary, .settings-agent-usage-summary) > div { display: grid; gap: 4px; overflow-wrap: anywhere; }
.settings-user-form-page :is(.settings-agent-cycle-summary, .settings-agent-usage-summary) > div > span { color: var(--yc-muted); font-size: .875rem; }
.settings-user-form-page .settings-agent-usage-summary > .yc-badge { justify-self: start; }
@media (max-width: 767px) {
    .settings-user-form-page .yc-page-header { flex-direction: column; align-items: flex-start; }
    .settings-user-form-page .yc-page-header .yc-page-title { white-space: normal; overflow-wrap: anywhere; }
    .settings-storage-breakdown, .settings-permissions-groups { grid-template-columns: minmax(0, 1fr); gap: 12px; }
    .settings-storage-breakdown--admin .settings-storage-chart { grid-column: auto; grid-row: 2; }
    .settings-storage-plans { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .settings-user-form-page :is(.settings-agent-cycle-summary, .settings-agent-usage-summary) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.settings-storage-level[data-level="warning"], .settings-storage-level[data-level="urgent"] { color: var(--yc-night-warning, #92400e); }
.settings-storage-level[data-level="full"] { color: var(--yc-night-error, #991b1b); }
.document-manager-search { flex: 1 1 14rem; min-width: 0; }
.document-manager-search input { width: 100%; min-width: 0; }
.document-manager-controls > select { flex: 0 1 11rem; width: auto; min-width: 0; max-width: 100%; }
.document-manager-tools { flex: 0 0 auto; max-width: 100%; gap: 5px; }
.document-manager-views { flex-wrap: nowrap; gap: 5px; }
.document-manager-tools button { width: 40px; min-width: 40px; padding: 0; }
.document-manager-controls :is(button, select, input) { min-height: 40px; }
.document-manager-controls button[aria-pressed="true"] { border-color: var(--app-accent); color: var(--yc-night-accent, var(--app-accent)); background: var(--yc-night-accent-bg, var(--yc-primary-soft)); }
.document-manager-toolbar :is(a, button, input, select):focus-visible,
[data-document-manager] :is(.document-manager-preview, .work-document-title-row a, .work-folder-card__link):focus-visible {
    outline: 2px solid var(--yc-night-accent, var(--app-accent)); outline-offset: 2px;
}
[data-document-manager] [data-work-document-scope] { min-height: 96px; border-radius: 8px; }
[data-document-manager] :is([data-work-document-scope], [data-work-folder-row]).is-document-drop-target {
    outline: 2px dashed var(--app-accent);
    outline-offset: -3px;
    background: var(--yc-night-accent-bg, var(--yc-primary-soft));
}
.document-manager-drop { padding: 9px 12px; margin-block: 0 10px; font-weight: 750; overflow-wrap: anywhere; }
.document-manager-results, .document-manager-transfers { display: grid; gap: 8px; margin-block: 0 12px; }
.document-manager-bulk, .document-manager-dialog-row {
    display: flex; flex-wrap: wrap; justify-content: flex-start; align-items: center; gap: 8px; margin-block: 8px;
}
.document-manager-dialog { width: min(660px, calc(100% - 24px)); max-height: calc(100dvh - 24px); padding: 16px; }
.document-manager-dialog { background: var(--yc-surface); color: var(--yc-text); border: 1px solid var(--yc-border); }
[data-document-manager] :is([data-manager-bulk], [data-document-results], [data-document-transfers], [data-document-upload-queue],
    [data-work-document-scope], .document-manager-selection)[hidden],
[data-document-manager]:not(.is-document-list) [data-document-list-meta] { display: none !important; }
[data-document-create-actions][hidden] { display: none !important; }
.document-manager-dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.document-manager-dialog-head h2 { font-size: 1.125rem; margin: 0; }
.document-manager-dialog-head .yc-btn--icon { flex: none; }
.document-manager-dialog-head .yc-btn-icon--close::before { display: block; width: 16px; height: 16px; }
.document-manager-dialog-content { display: grid; gap: 8px; overflow-wrap: anywhere; }
.document-manager-dialog.document-manager-rename { width: min(460px, calc(100% - 24px)); padding: 16px; }
.document-manager-rename .document-manager-dialog-content { gap: 12px; min-width: 0; }
.document-manager-rename .document-manager-item-status { margin: 0; }
.document-manager-rename .document-manager-item-status:empty { display: none; }
.document-photo-pdf .document-manager-dialog-content { gap: 12px; }
.document-photo-pdf .document-manager-item-status { margin: 0; }
.document-photo-pdf :is(.document-manager-item-status, .document-photo-progress):empty { display: none; }
.document-photo-pages { display: grid; gap: 6px; list-style: none; margin: 0; padding: 0; }
.document-photo-page {
    display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; align-items: center; gap: 8px;
    padding: 6px; border: 1px solid var(--yc-border); border-radius: 8px; background: var(--yc-night-soft, var(--yc-surface));
}
.document-photo-page[draggable="true"] { cursor: grab; }
.document-photo-thumb { position: relative; aspect-ratio: 1; overflow: hidden; }
.document-photo-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.document-photo-details { display: grid; overflow-wrap: anywhere; }
.document-photo-details small { color: var(--yc-muted); }
.document-photo-details .document-photo-error { color: var(--yc-danger); }
.document-photo-tools { display: flex; flex-wrap: wrap; gap: 4px; }
.document-photo-progress progress { width: 100%; }
.document-photo-pdf .document-photo-actions {
    position: sticky; bottom: 0; padding-block: 6px 0; background: var(--yc-surface);
}
@media (max-width: 480px) {
    .document-photo-page { grid-template-columns: 48px minmax(0, 1fr); }
    .document-photo-tools { grid-column: 2; }
    .document-photo-tools .yc-btn { min-width: 36px; min-height: 36px; }
    .document-photo-pdf .document-photo-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .document-photo-actions > .yc-btn--primary { grid-column: 1 / -1; }
}
.document-manager-dialog.document-manager-folder-color { width: min(350px, calc(100% - 24px)); padding: 12px; }
.document-manager-folder-color .mf-account-appearance__choices {
    display: grid;
    grid-template-columns: repeat(auto-fill, 40px);
}
.document-manager-item-status:empty { display: none; }
.document-manager-color-footer { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.document-manager-color-footer > span { color: var(--yc-night-muted, var(--yc-muted)); font-size: 13px; }
.document-manager-folder-color .mf-account-appearance__choice svg {
    fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
.document-manager-dialog-row { border-top: 1px solid var(--yc-border); padding-block: 8px; }
.document-manager-dialog-row :is(strong, small) { flex-basis: 100%; }
.document-manager-selection { position: relative; z-index: 2; display: inline-flex; flex: 0 0 26px; min-height: 35px; align-items: center; margin: 0; }
.document-manager-selection input { width: 18px; height: 18px; accent-color: var(--app-accent); }
[data-manager-bulk] [data-manager-count] { order: -2; }
[data-manager-bulk] [data-manager-page="select"] { margin-inline-start: auto; order: 1; }
[data-document-manager] .work-document-action-menu { display: block; }
[data-document-manager] .work-documents-grid .work-sub-actions--header > .work-document-action-menu,
[data-document-manager] .work-documents-grid .work-sub-actions--header > .work-document-action-menu > .schedule-more-trigger { display: inline-flex !important; }
[data-document-manager] .work-folder-card__icon { color: var(--mf-account-color, var(--yc-night-accent, var(--app-accent))); }
.document-manager-transfer { display: grid; grid-template-columns: minmax(0, 1fr) minmax(7rem, .45fr); align-items: center; gap: 8px; }
.document-manager-transfer small { overflow-wrap: anywhere; }
.document-manager-transfer progress { width: 100%; accent-color: var(--app-accent); }
.document-manager-results { padding: 12px; background: var(--yc-surface); border: 1px solid var(--yc-border); border-radius: 8px; }
.document-manager-results > :is(h3,p) { margin: 0; }
.document-manager-results [data-manager-status]:empty { display: none; }
.document-manager-result-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, var(--document-tile-track)), 1fr)); gap: 10px; }
.is-document-list .document-manager-result-grid { grid-template-columns: minmax(0, 1fr); gap: 6px; }
.document-manager-result { position: relative; display: flex; align-items: center; gap: 8px; padding: 8px; border: 1px solid var(--yc-border); border-radius: 8px; }
.document-manager-result > a { display: grid; flex: 1; min-width: 0; gap: 8px; color: inherit; text-decoration: none; }
.is-document-list .document-manager-result > a { grid-template-columns: auto minmax(0, 1fr); align-items: center; }
.document-manager-result > a:hover { color: var(--yc-night-accent, var(--app-accent)); text-decoration: underline; }
.document-manager-result strong { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.document-manager-result small { color: var(--yc-muted); }
.document-manager-result-preview {
    position: relative; display: grid; place-items: center; height: var(--document-tile-preview-height); overflow: hidden;
    border-radius: 6px; font-weight: 800; background: var(--yc-night-accent-bg, #f3e8ff); color: var(--yc-night-accent, #6d28d9);
}
.document-manager-result-preview img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.document-manager-result-preview svg { width: 40px; height: 40px; stroke: currentColor; fill: none; }
.is-document-list .document-manager-result-preview { width: var(--document-thumb-size); height: var(--document-thumb-size); font-size: 11px; }
.is-document-list .document-manager-result-preview svg { width: 22px; height: 22px; }
[data-document-manager]:not(.is-document-list) .document-manager-result > button {
    position: absolute; top: 12px; right: 12px; background: var(--yc-night-surface, var(--yc-surface));
}
.document-manager-filter-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.document-manager-filter-actions select { flex: 1 1 12rem; min-width: 0; }
.work-page [data-document-manager] {
    --document-thumb-size: 36px;
    --document-tile-preview-height: 112px;
    --document-tile-track: max(180px, calc((100% - 40px) / 5));
}
.work-page [data-document-manager] .work-documents-grid { display: grid; gap: 10px; }
.work-page [data-document-manager] .work-documents-grid + .work-documents-grid { margin-top: 10px; }
.work-page [data-document-manager]:not(.is-document-list) .work-documents-grid {
    grid-template-columns: repeat(auto-fill, minmax(min(100%, var(--document-tile-track)), 1fr)) !important;
}
.work-page [data-document-manager].is-document-list .work-documents-grid { grid-template-columns: minmax(0, 1fr) !important; gap: 6px; }
.work-page [data-document-manager].is-document-list .work-documents-grid + .work-documents-grid { margin-top: 6px; }
.work-page [data-document-manager] .work-documents-grid > .work-sub-card {
    position: relative; min-height: 0; padding: 8px; border-radius: 8px; overflow: visible;
}
.work-page [data-document-manager] .work-documents-grid > .work-sub-card:has(.work-document-action-menu[open]) { z-index: 20; }
.work-page [data-document-manager] .work-documents-grid .work-sub-card__header {
    display: flex; flex-wrap: nowrap; align-items: center; gap: 8px; min-width: 0;
}
.work-page [data-document-manager] .work-documents-grid :is(.work-sub-card__main, .work-folder-card__identity) {
    flex: 1 1 0; min-width: 0; gap: 8px;
}
.work-page [data-document-manager] .work-documents-grid .work-folder-card__identity .work-folder-card__link {
    display: grid; flex: 1 1 0; max-width: 100%; gap: 8px;
}
.work-page [data-document-manager] .document-manager-item-copy { display: grid; grid-template-columns: minmax(0, 1fr); min-width: 0; gap: 3px; }
.work-page [data-document-manager] .work-document-card .work-sub-card__main > .document-manager-item-copy { flex: 1 1 0; }
.work-page [data-document-manager] .document-manager-item-copy h3 { margin: 0; }
.work-page [data-document-manager] .document-manager-item-meta {
    display: flex; flex-wrap: wrap; gap: 0 8px; color: var(--yc-night-muted, var(--yc-muted));
    font-size: 12px; line-height: 1.35; white-space: normal;
}
.work-page [data-document-manager] .document-manager-item-meta > span { white-space: nowrap; }
.document-manager-preview { flex: none; text-decoration: none; }
.work-page [data-document-manager] .work-documents-grid :is(.work-document-icon, .work-folder-card__icon) {
    display: grid; place-items: center; flex: none; width: var(--document-thumb-size); height: var(--document-thumb-size);
    min-width: 0; min-height: 0; max-width: none; max-height: none;
    border-radius: 6px; overflow: hidden;
}
.work-page [data-document-manager] .work-documents-grid .work-folder-card__icon { background: color-mix(in srgb, currentColor 12%, transparent); }
.work-page [data-document-manager] .work-documents-grid .work-sub-actions--header {
    flex: 0 0 auto; flex-wrap: nowrap; width: auto; margin: 0 0 0 auto; gap: 4px;
}
[data-document-manager] .work-document-title-row { width: 100%; }
[data-document-manager] .work-document-title-row > a { color: inherit; text-decoration: none; min-width: 0; }
[data-document-manager] .work-document-title-row > a > strong { display: block; }
[data-document-manager] .work-document-title-row > a:is(:hover, :focus-visible) { color: var(--yc-night-accent, var(--app-accent)); text-decoration: underline; }
[data-document-manager] .work-folder-card__icon svg { width: 22px; height: 22px; stroke: currentColor; fill: none; }
.work-page [data-document-manager]:not(.is-document-list) .work-documents-grid :is(.work-sub-card__main, .work-folder-card__identity) {
    display: block; width: 100%;
}
.work-page [data-document-manager]:not(.is-document-list) .work-documents-grid .work-folder-card__identity .work-folder-card__link {
    grid-template-columns: minmax(0, 1fr);
}
.work-page [data-document-manager]:not(.is-document-list) .work-documents-grid .document-manager-preview { display: block; margin-bottom: 8px; }
.work-page [data-document-manager]:not(.is-document-list) .work-documents-grid :is(.work-document-icon, .work-folder-card__icon) {
    width: 100%; height: var(--document-tile-preview-height); aspect-ratio: auto; font-size: 16px;
}
.work-page [data-document-manager]:not(.is-document-list) .work-folder-card__icon svg { width: 40px; height: 40px; }
.work-page [data-document-manager]:not(.is-document-list) .work-folder-card__identity > .shared-indicator { position: absolute; bottom: 10px; right: 8px; }
.work-page [data-document-manager]:not(.is-document-list) .work-folder-card__identity:has(> .shared-indicator) .document-manager-item-copy { padding-inline-end: 24px; }
.work-page [data-document-manager]:not(.is-document-list) .work-documents-grid .document-manager-selection {
    position: absolute; inset: 12px auto auto 12px; z-index: 3; min-height: 28px;
}
.work-page [data-document-manager]:not(.is-document-list) .work-documents-grid .work-sub-actions--header {
    position: absolute; inset: 12px 12px auto auto; z-index: 4;
}
.work-page [data-document-manager]:not(.is-document-list) .work-documents-grid .work-sub-actions--header > :is(.work-document-action--overflowable, .shopping-share-trigger--standalone) {
    display: none !important;
}
.work-page [data-document-manager]:not(.is-document-list) .work-documents-grid :is(.schedule-more-trigger, .work-document-drag-handle, .work-folder-drag-handle) {
    background: var(--yc-night-surface, var(--yc-surface));
}
.work-page [data-document-manager].is-document-sorted .work-documents-grid .work-sub-actions--header > :is(.work-document-drag-handle, .work-folder-drag-handle) { display: none !important; }
.yc-theme-dark .work-page [data-document-manager] :is(.work-sub-card, .yc-modal, .documents-page__split-box, .work-folder-view__header, .work-document-action-menu-panel, .document-manager-results, .document-manager-result),
.yc-theme-dark .document-manager-dialog {
    border-color: var(--yc-night-button-border, #384659);
}
@media (max-width: 1199px) {
    .work-page [data-document-manager] { --document-tile-track: max(166px, calc((100% - 20px) / 3)); }
}
@media (641px <= width <= 899px) {
    .work-detail-page .work-detail-documents-actions[data-document-create-actions] .documents-page__action {
        width: auto !important; min-width: 0 !important; max-width: none !important;
        flex: 0 0 auto !important; padding-inline: 14px !important; white-space: nowrap;
    }
}
@media (max-width: 1024px) {
    .work-page [data-document-manager] .work-documents-grid .work-sub-actions--header > .work-document-action--overflowable { display: none !important; }
    .work-page [data-document-manager] .work-documents-grid .work-document-action-menu { flex: 0 0 40px; width: 40px; }
    .work-page [data-document-manager] .work-documents-grid :is(.schedule-more-trigger, .work-document-drag-handle, .work-folder-drag-handle) { width: 40px; min-width: 40px; height: 40px; }
}
@media (max-width: 640px) {
    .work-page [data-document-manager] {
        --document-tile-track: max(125px, calc((100% - 10px) / 2));
        --document-tile-preview-height: 88px;
    }
    .work-page [data-document-manager]:not(.is-document-list) .work-documents-grid :is(.work-document-icon:not(.work-document-icon--image), .work-folder-card__icon) {
        padding-top: 32px;
    }
}
@media (max-width: 560px) {
    .document-manager-controls { display: grid; grid-template-columns: minmax(0, 1fr) minmax(7.5rem, .65fr); gap: 6px; }
    .document-manager-controls > select { width: 100%; }
    .document-manager-tools { grid-column: 1 / -1; }
    .document-manager-transfer { grid-template-columns: minmax(0, 1fr); }
}
