.toolbar.content-wrapper {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 999;


    padding: 12px;

    background: linear-gradient(180deg, var(--sectionBG) 0%, rgba(255, 255, 255, 0) 100%);
}

.toolbar.content-wrapper.panel {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 999;


    padding: 0px;

    background: transparent;
}

.toolbar.controller-wrapper {
    display: flex;
    flex-direction: row;
    align-items: center;

    cursor: pointer;

    padding: 4px 18px 4px 10px;
    gap: 6px;

    background-color: var(--toolbar-buttonBG);
    border-radius: 99px;

    box-shadow: 0px 1px 8px rgba(0, 0, 0, 0.025), 0px 2px 15px rgba(0, 0, 0, 0.025);

    transition: all 0.25s cubic-bezier(0.00, 1.13, 0.00, 0.97);
}

.toolbar.controller-wrapper:hover {
    scale: 1.01;
    background-color: var(--toolbarBG);
}

.toolbar.location-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1/1;

    padding: 6px;

    font-size: 12px;
    font-weight: 900;
    letter-spacing: -0.5px;
    color: var(--primary-accent);
    background-color: transparent;
    border-radius: 99px;
}

.toolbar.controller-details {
    display: flex;
    flex-direction: column;

    font-size: 12px;
}

.controller.active-window {
    font-weight: 700;
    color: var(--primary-text);
}

.controller.active-location {
    font-weight: 700;
    color: var(--secondary-text);
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

.toolbar.border-wrapper {
    padding: 1px;
    border-radius: 99px;

    background: linear-gradient(135deg, var(--toolbar-border1) 0%, var(--toolbar-border2) 50%, var(--toolbar-border1) 100%);
}

.toolbar.button-wrapper {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;

    gap: 6px;
}

.button.toolbar {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: auto;
    height: 35.83px;

    margin-top: 0px;
    padding: 0px;
    aspect-ratio: 1/1;

    color: var(--primary-accent);
    background-color: var(--toolbar-buttonBG);
    border-radius: 99px;

    box-shadow: 0px 1px 8px rgba(0, 0, 0, 0.025), 0px 2px 15px rgba(0, 0, 0, 0.025);

    transition: all 0.25s cubic-bezier(0.00, 1.13, 0.00, 0.97);
}

.button.toolbar:hover {
    scale: 1.01;
    background-color: var(--toolbarBG);
}

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

.button.toolbar.warning {
    color: var(--warning);
}

.button.toolbar.pages {
    padding: 0px 12px;
    aspect-ratio: auto;
}

.button.toolbar.pages.icon {
    padding: 0px;
    aspect-ratio: 1 / 1;
}

.button.toolbar.pages.icon-text {
    flex-direction: row;

    gap: 12px;
    padding: 0px 12px;
    aspect-ratio: auto;
}

.button.toolbar.pages.view-only {
    cursor: default;
}

.button.toolbar.pages.view-only:hover {
    scale: 1;
    background-color: var(--toolbar-buttonBG);
}

.input.toolbar {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 212px;
    height: 35.83px;

    margin-top: 0px;
    padding: 0px 16px;
    aspect-ratio: 1/1;

    border: none;
    color: var(--primary-accent);
    background-color: var(--toolbar-buttonBG);
    border-radius: 99px;

    box-shadow: 0px 1px 8px rgba(0, 0, 0, 0.025), 0px 2px 15px rgba(0, 0, 0, 0.025);

    transition: all 0.25s cubic-bezier(0.00, 1.13, 0.00, 0.97);
}

.input.toolbar:hover {
    scale: 1.01;
    background-color: var(--toolbarBG);
}

.toolbar.home.timeframe-wrapper {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    height: 35.83px;
    min-width: 213.66px;
    max-width: 512px;
    width: 40%;

    padding: 0px 3px;
    gap: 6px;

    font-size: 12px;
    font-weight: 500;
    color: var(--primary-text);
    background-color: var(--toolbar-buttonBG);
    border-radius: 99px;

    box-shadow: 0px 1px 8px rgba(0, 0, 0, 0.025), 0px 2px 15px rgba(0, 0, 0, 0.025);
}

.timeframe-current {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;

    height: 29.83px;
    width: 100%;
    min-width: 128px;
    padding: 0px 18px;

    font-weight: 700;
    color: var(--primary-text);
    background-color: var(--toolbar-insetBG);
    border-radius: 99px;

}

.timeframe-current[role="button"] {
    cursor: pointer;
    user-select: none;
    transition: all 0.25s cubic-bezier(0.00, 1.13, 0.00, 0.97);
}

.timeframe-current[role="button"]:hover {
    scale: 1.01;
    background-color: var(--toolbar-insetBG-hover);
}

.timeframe-current[role="button"]:focus-visible {
    outline: 2px solid var(--primary-accent);
    outline-offset: 2px;
}

.timeframe-shift {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;

    aspect-ratio: 1/1;
    height: 29.83px;

    background-color: var(--toolbar-insetBG);
    border-radius: 99px;
    cursor: pointer;
    user-select: none;

    transition: all 0.25s cubic-bezier(0.00, 1.13, 0.00, 0.97);
}

.timeframe-shift:hover {
    scale: 1.01;
    background-color: var(--toolbar-insetBG-hover);
}

.timeframe-icon {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;

    width: 12px;
    height: 12px;
}

.timeframe-icon.previous {
    transform: rotate(180deg);
}

.home-timeframe.dialog {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    max-width: 860px;
    margin: 0 auto;
    color: var(--primary-text);
}

#homeTimeframePanel {
    z-index: 1200;
    --app-panel-bg: color-mix(in srgb, var(--cardBG) 92%, var(--bodyBG));
    --app-panel-border: color-mix(in srgb, var(--primary-border) 85%, transparent);
    --app-panel-backdrop: color-mix(in srgb, var(--primary-text) 38%, transparent);
    --app-panel-shadow: 0 20px 48px rgba(0, 0, 0, 0.18);
}

#homeTimeframePanel::part(body) {
    padding: 0 1rem calc(1rem + env(safe-area-inset-bottom));
    padding-bottom: 40px;
}

.home-timeframe.dialog-header {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.home-timeframe.dialog-title {
    margin: 0;
    font-size: 22px;
    font-weight: 800;
    line-height: 1.1;
    color: var(--primary-text);
}

.home-timeframe.dialog-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border: 1px solid var(--primary-border);
    border-radius: 999px;
    background: var(--bodyBG);
    color: var(--primary-text);
    cursor: pointer;
}

.home-timeframe.dialog-close:hover {
    background: var(--sectionBG);
}

.home-timeframe.panel-shell {
    margin-top: 16px;
    width: 100%;
}

.home-timeframe.panel-content {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 0;
}

.home-timeframe.field-row {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.home-timeframe.segmented {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: stretch;
    min-height: 42px;
    border: 1px solid var(--primary-border);
    border-radius: 99px;
    padding: 0px 3px;
    background-color: var(--sidebar-segmentedBG);
}

.home-timeframe.segmented-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    min-width: 0;
    height: 34px;
    border: none;
    border-radius: 99px;
    background: transparent;
    color: var(--primary-text);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0;
    cursor: pointer;
}

.home-timeframe.segmented-tab:hover {
    background: var(--sectionBG);
}

.home-timeframe.segmented-tab.active {
    background: var(--primary-accent);
    color: var(--primary-text-alt);
}

.home-timeframe.segmented-splitter {
    width: 1px;
    height: 18px;
    flex: 0 0 1px;
    background: var(--primary-border);
}

.home-timeframe.date-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.home-timeframe.field-label {
    font-size: 12px;
    font-weight: 700;
    color: var(--secondary-text);
    text-transform: uppercase;
}

.home-timeframe.date-input {
    min-height: 40px;
    border: 1px solid var(--primary-border);
    border-radius: 12px;
    padding: 0 12px;
    font-size: 14px;
    font-weight: 600;
    color: var(--primary-text);
    background: var(--bodyBG);
}

.home-timeframe.date-input:focus-visible {
    outline: 2px solid color-mix(in srgb, var(--primary-accent) 65%, white);
    outline-offset: 1px;
}

.home-timeframe.range-preview {
    margin: 0;
    font-size: 13px;
    font-weight: 700;
    color: var(--secondary-text);
}

.home-timeframe.actions {
    display: flex;
    justify-content: flex-end;
}

@media (max-width: 900px) {
    .home-timeframe.dialog-title {
        font-size: 20px;
    }

    .home-timeframe.segmented-tab {
        font-size: 12px;
    }
}


[data-location-picker-trigger] {
    cursor: pointer;
}

.location-picker.overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: transparent;
}

.location-picker.popover {
    position: fixed;
    z-index: 1001;
    width: min(512px, calc(100vw - 24px));
    max-height: min(70vh, 620px);
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 14px;
    border-radius: 26px;
    border: 1px solid var(--primary-border);
    background-color: color-mix(in srgb, var(--bodyBG) 90%);
    box-shadow: 0 16px 42px rgba(0, 0, 0, 0.12);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    background-blend-mode: saturation;
}

.location-picker.popover[hidden] {
    display: none;
}

.location-picker.caret {
    position: absolute;
    width: 20px;
    height: 20px;
    background-color: color-mix(in srgb, var(--bodyBG) 90%);
    border-left: 1px solid var(--primary-border);
    border-top: 1px solid var(--primary-border);
    transform: rotate(45deg);
    top: -11px;
    left: 40px;
    border-top-left-radius: 6px;
    pointer-events: none;
    background-blend-mode: saturation;
}

.location-picker.search {
    position: relative;
    width: 100%;
    height: 38px;
    border-radius: 20px;
    border: 1px solid var(--primary-border);
    background-color: color-mix(in srgb, var(--bodyBG) 90%);
    background-blend-mode: saturation;
    display: flex;
    align-items: center;
    padding-left: 40px;
    padding-right: 12px;
    box-sizing: border-box;
}

.location-picker.search-icon {
    position: absolute;
    left: 16px;
    width: 16px;
    height: 16px;
    color: var(--secondary-text);
}

.location-picker.search-input {
    width: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--primary-text);
    font-size: 16px;
    font-weight: 600;
}

.location-picker.search-input::placeholder {
    color: var(--secondary-text);
    font-weight: 500;
}

.location-picker.subtitle {
    margin: 0;
    color: var(--secondary-text);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.location-picker.list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: min(50vh, 420px);
    overflow: auto;
    padding-right: 2px;
}

.location-picker.item {
    width: 100%;
    border: 1px solid var(--primary-border);
    border-radius: 16px;
    background-color: var(--sectionBG);
    color: inherit;
    padding: 10px 12px;
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) 22px;
    align-items: center;
    gap: 12px;
    text-align: left;
    cursor: pointer;
}

.location-picker.item.selected {
    border-color: color-mix(in srgb, var(--primary-accent) 35%, var(--primary-border));
    background-color: color-mix(in srgb, var(--primary-accent) 10%, var(--sectionBG));
}

.location-picker.item-initials {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 900;
    color: var(--primary-text-alt);
    background-color: var(--primary-accent);
    border: none;
}

.location-picker.item-text {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.location-picker.item-name {
    color: var(--primary-text);
    font-size: 16px;
    font-weight: 800;
    line-height: 1.1;
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
}

.location-picker.item-subtitle {
    color: var(--secondary-text);
    font-size: 14px;
    font-weight: 500;
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
}

.location-picker.item-check {
    width: 22px;
    height: 22px;
    border-radius: 99px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: transparent;
    background-color: transparent;
    border: 1px solid var(--primary-border);
    transition: all 140ms ease;
    font-size: 18px;
    font-weight: 900;
    line-height: 1;
}

.location-picker.item.selected .location-picker.item-check {
    color: var(--primary-accent);
    border-color: color-mix(in srgb, var(--primary-accent) 35%, var(--primary-border));
    background-color: color-mix(in srgb, var(--primary-accent) 12%, var(--sectionBG));
}

.location-picker.empty {
    border-radius: 16px;
    border: 1px dashed var(--primary-border);
    background-color: var(--sectionBG);
    padding: 14px;
    color: var(--secondary-text);
    font-size: 13px;
    font-weight: 700;
}

@media (max-width: 720px) {
    .location-picker.popover {
        border-radius: 20px;
        padding: 12px;
    }

    .location-picker.item-name {
        font-size: 18px;
    }
}