/* Index toolbar: one shared size and type scale for the report actions. */
#dashboardContent .header-content { gap: 16px; }
#dashboardContent .user-info { gap: 14px; min-width: 0; }
#dashboardAccountActions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 8px; min-width: 0; }
#dashboardAccountActions #demoModeResetButton { flex: 0 0 auto; width: auto; min-height: 34px; }

#dashboardToolbar {
    --toolbar-width: 150px;
    --toolbar-height: 34px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
    min-width: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}

#dashboardToolbar .dashboard-toolbar__action {
    display: inline-flex;
    flex: 0 0 var(--toolbar-width);
    width: var(--toolbar-width);
    height: var(--toolbar-height);
    min-height: var(--toolbar-height);
    align-items: center;
    justify-content: center;
    gap: 7px;
    margin: 0;
    padding: 0 8px;
    border: 1px solid #dadde2;
    border-radius: 4px;
    background: #fff;
    color: #353b44;
    font-family: inherit;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.2;
    letter-spacing: normal;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    box-shadow: none;
    transform: none;
    order: 0;
    transition: background-color 120ms, border-color 120ms;
}

#dashboardToolbar .dashboard-toolbar__action:hover { background: #f4f5f7; border-color: #aeb5be; }
#dashboardToolbar .dashboard-toolbar__action:focus-visible { outline: 2px solid #677c96; outline-offset: 3px; }
#dashboardToolbar .dashboard-toolbar__action--primary { background: #30363e; border-color: #30363e; color: #fff; }
#dashboardToolbar .dashboard-toolbar__action--primary:hover { background: #20262e; border-color: #20262e; }
#dashboardToolbar .dashboard-toolbar__action:disabled { cursor: wait; opacity: .55; }
#dashboardToolbar svg { width: 15px; height: 15px; flex: 0 0 15px; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; }

#dashboardToolbar .dashboard-toolbar__scope { position: relative; flex: 0 0 var(--toolbar-width); width: var(--toolbar-width); color: #353b44; }
#dashboardToolbar select { appearance: none; -webkit-appearance: none; text-align: center; padding: 0 27px; }
#dashboardToolbar .dashboard-toolbar__scope > svg { position: absolute; top: 50%; transform: translateY(-50%); pointer-events: none; }
#dashboardToolbar .dashboard-toolbar__calendar { left: 13px; }
#dashboardToolbar .dashboard-toolbar__chevron { right: 11px; width: 13px; }
#dashboardToolbar .dashboard-toolbar__trash { flex-basis: var(--toolbar-height); width: var(--toolbar-height); padding: 0; }
#dashboardToolbar .dashboard-toolbar__trash[aria-pressed="true"] { background: #30363e; color: #fff; border-color: #30363e; }

/* Give the account and actions their own line when a single header row is too narrow. */
@media (min-width: 769px) and (max-width: 1540px) {
    #dashboardContent .header-content { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px 16px; padding-bottom: 6px; }
    #dashboardContent .user-info { display: contents !important; }
    #dashboardAccountActions { justify-self: end; }
    #dashboardToolbar { grid-column: 1 / -1; }
}

@media (max-width: 768px) {
    #dashboardAccountActions { width: 100%; }
    #dashboardAccountActions #demoModeResetButton { min-height: 44px; }
    #dashboardToolbar { width: 100%; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); justify-content: stretch; }
    #dashboardToolbar .dashboard-toolbar__scope,
    #dashboardToolbar .dashboard-toolbar__action { width: 100%; min-width: 0; --toolbar-height: 44px; }
    /* Existing shared mobile button rules are important; limit their override to this toolbar. */
    #dashboardToolbar .dashboard-toolbar__action { padding: 0 7px !important; font-size: 13px !important; }
    #dashboardToolbar select { padding: 0 22px 0 8px !important; }
    #dashboardToolbar .dashboard-toolbar__calendar { display: none; }
    #dashboardToolbar .dashboard-toolbar__trash { width: 44px; justify-self: end; grid-column: 2; }
}

@media (pointer: coarse) and (min-width: 769px) { #dashboardToolbar { --toolbar-height: 44px; } }
@media (prefers-reduced-motion: reduce) { #dashboardToolbar .dashboard-toolbar__action { transition: none; } }
