/*
 * Camada final da toolbar operacional do SGAD.
 * Carrega por ultimo para padronizar a barra superior de busca + acoes
 * nas telas que seguem a familia *-toolbar / *-toolbar-left / *-toolbar-right.
 */

#main-content :is(
    .sgad-operational-page,
    .sgad-operational-shell,
    .tarefas-page,
    .tickets-page,
    [class$="-page"],
    [class*="-page "]
) > :is(
    .tarefas-toolbar,
    .tickets-toolbar,
    [class$="-toolbar"],
    [class*="-toolbar "]
):not(.note-toolbar):not(.wiki-editor-toolbar) {
    --sgad-toolbar-unified-surface: var(--sgad-shell-surface, #ffffff);
    --sgad-toolbar-unified-surface-alt: var(--sgad-shell-surface-alt, #f8fafc);
    --sgad-toolbar-unified-border: var(--sgad-shell-border, rgba(15, 23, 42, 0.08));
    --sgad-toolbar-unified-border-strong: rgba(15, 23, 42, 0.12);
    --sgad-toolbar-unified-text: var(--sgad-shell-text, #0f172a);
    --sgad-toolbar-unified-muted: var(--sgad-shell-muted, #64748b);
    --sgad-toolbar-unified-hover: var(--sgad-shell-hover, rgba(15, 23, 42, 0.04));
    --sgad-toolbar-unified-primary: #0d6efd;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px 24px;
    flex-wrap: wrap;
    padding: 16px 24px;
    background: var(--sgad-toolbar-unified-surface-alt);
    border-bottom: 1px solid var(--sgad-toolbar-unified-border);
}

#main-content :is(
    .sgad-operational-page,
    .sgad-operational-shell,
    .tarefas-page,
    .tickets-page,
    [class$="-page"],
    [class*="-page "]
) > :is(
    .tarefas-toolbar,
    .tickets-toolbar,
    [class$="-toolbar"],
    [class*="-toolbar "]
):not(.note-toolbar):not(.wiki-editor-toolbar) > :is(
    .tarefas-toolbar-left,
    .tickets-toolbar-left,
    [class$="-toolbar-left"],
    [class*="-toolbar-left "]
) {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1 1 440px;
    min-width: 0;
}

/* Em /tickets, 440px no bloco esquerdo comprime a busca no Safari. */
#main-content .tickets-page > .tickets-toolbar > .tickets-toolbar-left {
    flex: 0 1 320px;
}

#main-content :is(
    .sgad-operational-page,
    .sgad-operational-shell,
    .tarefas-page,
    .tickets-page,
    [class$="-page"],
    [class*="-page "]
) > :is(
    .tarefas-toolbar,
    .tickets-toolbar,
    [class$="-toolbar"],
    [class*="-toolbar "]
):not(.note-toolbar):not(.wiki-editor-toolbar) > :is(
    .tarefas-toolbar-left,
    .tickets-toolbar-left,
    [class$="-toolbar-left"],
    [class*="-toolbar-left "]
) :is(h1, h2) {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    color: var(--sgad-toolbar-unified-text);
}

#main-content :is(
    .sgad-operational-page,
    .sgad-operational-shell,
    .tarefas-page,
    .tickets-page,
    [class$="-page"],
    [class*="-page "]
) > :is(
    .tarefas-toolbar,
    .tickets-toolbar,
    [class$="-toolbar"],
    [class*="-toolbar "]
):not(.note-toolbar):not(.wiki-editor-toolbar) > :is(
    .tarefas-toolbar-left,
    .tickets-toolbar-left,
    [class$="-toolbar-left"],
    [class*="-toolbar-left "]
) :is(p, span):not([class*="chip"]):not([class*="badge"]) {
    color: var(--sgad-toolbar-unified-muted);
}

#main-content :is(
    .sgad-operational-page,
    .sgad-operational-shell,
    .tarefas-page,
    .tickets-page,
    [class$="-page"],
    [class*="-page "]
) > :is(
    .tarefas-toolbar,
    .tickets-toolbar,
    [class$="-toolbar"],
    [class*="-toolbar "]
):not(.note-toolbar):not(.wiki-editor-toolbar) > :is(
    .tarefas-toolbar-right,
    .tickets-toolbar-right,
    [class$="-toolbar-right"],
    [class*="-toolbar-right "]
) {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
    flex: 1 1 auto;
    min-width: 0;
}

#main-content :is(
    .sgad-operational-page,
    .sgad-operational-shell,
    .tarefas-page,
    .tickets-page,
    [class$="-page"],
    [class*="-page "]
) > :is(
    .tarefas-toolbar,
    .tickets-toolbar,
    [class$="-toolbar"],
    [class*="-toolbar "]
):not(.note-toolbar):not(.wiki-editor-toolbar) :is(
    .tarefas-toolbar-actions,
    .tickets-toolbar-actions,
    .sgad-operational-toolbar-actions,
    [class$="-toolbar-actions"],
    [class*="-toolbar-actions "]
) {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    flex: 0 1 auto;
    max-width: 100%;
    margin-left: auto;
    min-width: 0;
    justify-content: flex-end;
}

#main-content :is(
    .sgad-operational-page,
    .sgad-operational-shell,
    .tarefas-page,
    .tickets-page,
    [class$="-page"],
    [class*="-page "]
) > :is(
    .tarefas-toolbar,
    .tickets-toolbar,
    [class$="-toolbar"],
    [class*="-toolbar "]
):not(.note-toolbar):not(.wiki-editor-toolbar) :is(
    .tarefas-toolbar-actions,
    .tickets-toolbar-actions,
    .sgad-operational-toolbar-actions,
    [class$="-toolbar-actions"],
    [class*="-toolbar-actions "]
) > * {
    min-width: 0;
}

/* Busca global com baixa especificidade para nao sobrepor modulos com shell proprio. */
#main-content :where(
    .sgad-operational-page,
    .sgad-operational-shell,
    .tarefas-page,
    .tickets-page,
    [class$="-page"],
    [class*="-page "]
) > :where(
    .tarefas-toolbar,
    .tickets-toolbar,
    [class$="-toolbar"],
    [class*="-toolbar "]
):not(.note-toolbar):not(.wiki-editor-toolbar) :where(
    .tarefas-search-wrap,
    .tickets-search-wrap,
    .sgad-operational-search,
    [class$="-search-wrap"],
    [class*="-search-wrap "]
) {
    position: relative;
    display: inline-flex;
    align-items: center;
    isolation: isolate;
    flex: 0 1 340px;
    min-width: min(280px, 100%);
    max-width: 360px;
}

#main-content :where(
    .sgad-operational-page,
    .sgad-operational-shell,
    .tarefas-page,
    .tickets-page,
    [class$="-page"],
    [class*="-page "]
) > :where(
    .tarefas-toolbar,
    .tickets-toolbar,
    [class$="-toolbar"],
    [class*="-toolbar "]
):not(.note-toolbar):not(.wiki-editor-toolbar) :where(
    .tarefas-search-wrap,
    .tickets-search-wrap,
    [class$="-search-wrap"],
    [class*="-search-wrap "]
):not(.sgad-toolbar-search-own-shell) > i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--sgad-toolbar-unified-muted);
    font-size: 0.88rem;
    pointer-events: none;
    z-index: 2;
}

#main-content :where(
    .sgad-operational-page,
    .sgad-operational-shell,
    .tarefas-page,
    .tickets-page,
    [class$="-page"],
    [class*="-page "]
) > :where(
    .tarefas-toolbar,
    .tickets-toolbar,
    [class$="-toolbar"],
    [class*="-toolbar "]
):not(.note-toolbar):not(.wiki-editor-toolbar) :where(
    .tarefas-search-wrap,
    .tickets-search-wrap,
    .sgad-operational-search,
    [class$="-search-wrap"],
    [class*="-search-wrap "]
):not(.sgad-toolbar-search-own-shell) :where(
    input.tarefas-search,
    input.tickets-search,
    input.sgad-toolbar-search-input,
    input[class$="-search"],
    input[class*="-search "],
    input.form-control,
    input[type="text"],
    input[type="search"]
) {
    width: 100%;
    min-height: 40px;
    padding: 8px 12px 8px 36px;
    border-radius: 12px;
    border: 1px solid var(--sgad-toolbar-unified-border-strong);
    background: var(--sgad-toolbar-unified-surface);
    color: var(--sgad-toolbar-unified-text);
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    background-clip: padding-box;
    box-shadow: none;
    position: relative;
    z-index: 1;
    line-height: 1.35;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, color 0.18s ease;
}

#main-content :where(
    .sgad-operational-page,
    .sgad-operational-shell,
    .tarefas-page,
    .tickets-page,
    [class$="-page"],
    [class*="-page "]
) > :where(
    .tarefas-toolbar,
    .tickets-toolbar,
    [class$="-toolbar"],
    [class*="-toolbar "]
):not(.note-toolbar):not(.wiki-editor-toolbar) :where(
    .tarefas-search-wrap,
    .tickets-search-wrap,
    .sgad-operational-search,
    [class$="-search-wrap"],
    [class*="-search-wrap "]
):not(.sgad-toolbar-search-own-shell) :where(
    input.tarefas-search,
    input.tickets-search,
    input.sgad-toolbar-search-input,
    input[class$="-search"],
    input[class*="-search "],
    input.form-control,
    input[type="text"],
    input[type="search"]
)::placeholder {
    color: var(--sgad-toolbar-unified-muted);
}

#main-content :where(
    .sgad-operational-page,
    .sgad-operational-shell,
    .tarefas-page,
    .tickets-page,
    [class$="-page"],
    [class*="-page "]
) > :where(
    .tarefas-toolbar,
    .tickets-toolbar,
    [class$="-toolbar"],
    [class*="-toolbar "]
):not(.note-toolbar):not(.wiki-editor-toolbar) :where(
    .tarefas-search-wrap,
    .tickets-search-wrap,
    .sgad-operational-search,
    [class$="-search-wrap"],
    [class*="-search-wrap "]
):not(.sgad-toolbar-search-own-shell) :where(
    input.tarefas-search,
    input.tickets-search,
    input.sgad-toolbar-search-input,
    input[class$="-search"],
    input[class*="-search "],
    input.form-control,
    input[type="text"],
    input[type="search"]
):focus {
    border-color: rgba(13, 110, 253, 0.38);
    box-shadow: inset 0 0 0 1px rgba(13, 110, 253, 0.18);
}

#main-content :is(
    .sgad-operational-page,
    .sgad-operational-shell,
    .tarefas-page,
    .tickets-page,
    [class$="-page"],
    [class*="-page "]
) > :is(
    .tarefas-toolbar,
    .tickets-toolbar,
    [class$="-toolbar"],
    [class*="-toolbar "]
):not(.note-toolbar):not(.wiki-editor-toolbar) :is(
    .tarefas-toolbar-actions,
    .tickets-toolbar-actions,
    .sgad-operational-toolbar-actions,
    [class$="-toolbar-actions"],
    [class*="-toolbar-actions "]
) > :is(a, button, .btn),
#main-content :is(
    .sgad-operational-page,
    .sgad-operational-shell,
    .tarefas-page,
    .tickets-page,
    [class$="-page"],
    [class*="-page "]
) > :is(
    .tarefas-toolbar,
    .tickets-toolbar,
    [class$="-toolbar"],
    [class*="-toolbar "]
):not(.note-toolbar):not(.wiki-editor-toolbar) :is(
    .tarefas-toolbar-actions,
    .tickets-toolbar-actions,
    .sgad-operational-toolbar-actions,
    [class$="-toolbar-actions"],
    [class*="-toolbar-actions "]
) > .dropdown > :is(a, button, .btn),
#main-content .sgad-operational-toolbar .sgad-operational-toolbar-actions > :is(a, button, .btn) {
    min-height: 40px;
    border-radius: 12px;
    white-space: nowrap;
}

#main-content :is(
    .sgad-operational-page,
    .sgad-operational-shell,
    .tarefas-page,
    .tickets-page,
    [class$="-page"],
    [class*="-page "]
) > :is(
    .tarefas-toolbar,
    .tickets-toolbar,
    [class$="-toolbar"],
    [class*="-toolbar "]
):not(.note-toolbar):not(.wiki-editor-toolbar) :is(
    .tarefas-toolbar-actions,
    .tickets-toolbar-actions,
    .sgad-operational-toolbar-actions,
    [class$="-toolbar-actions"],
    [class*="-toolbar-actions "]
) > :is(a, button):is(
    .tarefas-btn,
    .tickets-btn,
    [class$="-btn"],
    [class*="-btn "]
) ,
#main-content :is(
    .sgad-operational-page,
    .sgad-operational-shell,
    .tarefas-page,
    .tickets-page,
    [class$="-page"],
    [class*="-page "]
) > :is(
    .tarefas-toolbar,
    .tickets-toolbar,
    [class$="-toolbar"],
    [class*="-toolbar "]
):not(.note-toolbar):not(.wiki-editor-toolbar) :is(
    .tarefas-toolbar-actions,
    .tickets-toolbar-actions,
    [class$="-toolbar-actions"],
    [class*="-toolbar-actions "]
) > .dropdown > :is(a, button):is(
    .tarefas-btn,
    .tickets-btn,
    [class$="-btn"],
    [class*="-btn "]
) {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 12px;
}

#main-content :is(
    .sgad-operational-page,
    .sgad-operational-shell,
    .tarefas-page,
    .tickets-page,
    [class$="-page"],
    [class*="-page "]
) > :is(
    .tarefas-toolbar,
    .tickets-toolbar,
    [class$="-toolbar"],
    [class*="-toolbar "]
):not(.note-toolbar):not(.wiki-editor-toolbar) :is(
    .tarefas-toolbar-actions,
    .tickets-toolbar-actions,
    [class$="-toolbar-actions"],
    [class*="-toolbar-actions "]
) > :is(a, button):is(
    .tarefas-btn-ghost,
    .tickets-btn-ghost,
    [class$="-btn-ghost"],
    [class*="-btn-ghost "]
) ,
#main-content :is(
    .sgad-operational-page,
    .sgad-operational-shell,
    .tarefas-page,
    .tickets-page,
    [class$="-page"],
    [class*="-page "]
) > :is(
    .tarefas-toolbar,
    .tickets-toolbar,
    [class$="-toolbar"],
    [class*="-toolbar "]
):not(.note-toolbar):not(.wiki-editor-toolbar) :is(
    .tarefas-toolbar-actions,
    .tickets-toolbar-actions,
    [class$="-toolbar-actions"],
    [class*="-toolbar-actions "]
) > .dropdown > :is(a, button):is(
    .tarefas-btn-ghost,
    .tickets-btn-ghost,
    [class$="-btn-ghost"],
    [class*="-btn-ghost "]
) {
    background: var(--sgad-toolbar-unified-surface);
    border-color: var(--sgad-toolbar-unified-border-strong);
    color: var(--sgad-toolbar-unified-muted);
}

#main-content :is(
    .sgad-operational-page,
    .sgad-operational-shell,
    .tarefas-page,
    .tickets-page,
    [class$="-page"],
    [class*="-page "]
) > :is(
    .tarefas-toolbar,
    .tickets-toolbar,
    [class$="-toolbar"],
    [class*="-toolbar "]
):not(.note-toolbar):not(.wiki-editor-toolbar) :is(
    .tarefas-toolbar-actions,
    .tickets-toolbar-actions,
    [class$="-toolbar-actions"],
    [class*="-toolbar-actions "]
) > :is(a, button):is(
    .tarefas-btn-ghost,
    .tickets-btn-ghost,
    [class$="-btn-ghost"],
    [class*="-btn-ghost "]
):hover,
#main-content :is(
    .sgad-operational-page,
    .sgad-operational-shell,
    .tarefas-page,
    .tickets-page,
    [class$="-page"],
    [class*="-page "]
) > :is(
    .tarefas-toolbar,
    .tickets-toolbar,
    [class$="-toolbar"],
    [class*="-toolbar "]
):not(.note-toolbar):not(.wiki-editor-toolbar) :is(
    .tarefas-toolbar-actions,
    .tickets-toolbar-actions,
    [class$="-toolbar-actions"],
    [class*="-toolbar-actions "]
) > .dropdown > :is(a, button):is(
    .tarefas-btn-ghost,
    .tickets-btn-ghost,
    [class$="-btn-ghost"],
    [class*="-btn-ghost "]
):hover,
#main-content .sgad-operational-toolbar .sgad-operational-toolbar-actions > :is(a, button, .btn):not(.btn-primary):not(.btn-success):not(.btn-danger):not(.btn-warning):not(.btn-info):hover {
    background: var(--sgad-toolbar-unified-hover);
    border-color: rgba(15, 23, 42, 0.18);
    color: var(--sgad-toolbar-unified-text);
}

#main-content :is(
    .sgad-operational-page,
    .sgad-operational-shell,
    .tarefas-page,
    .tickets-page,
    [class$="-page"],
    [class*="-page "]
) > :is(
    .tarefas-toolbar,
    .tickets-toolbar,
    [class$="-toolbar"],
    [class*="-toolbar "]
):not(.note-toolbar):not(.wiki-editor-toolbar) :is(
    .tarefas-toolbar-actions,
    .tickets-toolbar-actions,
    [class$="-toolbar-actions"],
    [class*="-toolbar-actions "]
) > :is(a, button):is(
    .tarefas-btn-primary,
    .tickets-btn-primary,
    [class$="-btn-primary"],
    [class*="-btn-primary "]
) ,
#main-content :is(
    .sgad-operational-page,
    .sgad-operational-shell,
    .tarefas-page,
    .tickets-page,
    [class$="-page"],
    [class*="-page "]
) > :is(
    .tarefas-toolbar,
    .tickets-toolbar,
    [class$="-toolbar"],
    [class*="-toolbar "]
):not(.note-toolbar):not(.wiki-editor-toolbar) :is(
    .tarefas-toolbar-actions,
    .tickets-toolbar-actions,
    [class$="-toolbar-actions"],
    [class*="-toolbar-actions "]
) > .dropdown > :is(a, button):is(
    .tarefas-btn-primary,
    .tickets-btn-primary,
    [class$="-btn-primary"],
    [class*="-btn-primary "]
) {
    background: var(--sgad-toolbar-unified-primary);
    border-color: var(--sgad-toolbar-unified-primary);
    color: #ffffff;
}

#main-content :is(
    .sgad-operational-page,
    .sgad-operational-shell,
    .tarefas-page,
    .tickets-page,
    [class$="-page"],
    [class*="-page "]
) > :is(
    .tarefas-toolbar,
    .tickets-toolbar,
    [class$="-toolbar"],
    [class*="-toolbar "]
):not(.note-toolbar):not(.wiki-editor-toolbar) :is(
    .tarefas-toolbar-actions,
    .tickets-toolbar-actions,
    [class$="-toolbar-actions"],
    [class*="-toolbar-actions "]
) > :is(a, button):is(
    .tarefas-btn-primary,
    .tickets-btn-primary,
    [class$="-btn-primary"],
    [class*="-btn-primary "]
):hover,
#main-content :is(
    .sgad-operational-page,
    .sgad-operational-shell,
    .tarefas-page,
    .tickets-page,
    [class$="-page"],
    [class*="-page "]
) > :is(
    .tarefas-toolbar,
    .tickets-toolbar,
    [class$="-toolbar"],
    [class*="-toolbar "]
):not(.note-toolbar):not(.wiki-editor-toolbar) :is(
    .tarefas-toolbar-actions,
    .tickets-toolbar-actions,
    [class$="-toolbar-actions"],
    [class*="-toolbar-actions "]
) > .dropdown > :is(a, button):is(
    .tarefas-btn-primary,
    .tickets-btn-primary,
    [class$="-btn-primary"],
    [class*="-btn-primary "]
):hover {
    background: #0b5ed7;
    border-color: #0a58ca;
    color: #ffffff;
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.18);
}

#main-content :is(
    .sgad-operational-page,
    .sgad-operational-shell,
    .tarefas-page,
    .tickets-page,
    [class$="-page"],
    [class*="-page "]
) > :is(
    .tarefas-toolbar,
    .tickets-toolbar,
    [class$="-toolbar"],
    [class*="-toolbar "]
):not(.note-toolbar):not(.wiki-editor-toolbar) :is(
    [class$="-btn-badge"],
    [class*="-btn-badge "]
) {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 700;
    line-height: 1;
}

#main-content .sgad-operational-toolbar {
    align-items: flex-start;
    gap: 16px 24px;
}

#main-content .sgad-operational-toolbar > :first-child {
    flex: 1 1 420px;
    min-width: 0;
}

#main-content .sgad-operational-toolbar > :last-child {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    justify-content: flex-end;
}

@media (min-width: 1200px) {
    #main-content :is(
        .sgad-operational-page,
        .sgad-operational-shell,
        .tarefas-page,
        .tickets-page,
        [class$="-page"],
        [class*="-page "]
    ) > :is(
        .tarefas-toolbar,
        .tickets-toolbar,
        [class$="-toolbar"],
        [class*="-toolbar "]
    ):not(.note-toolbar):not(.wiki-editor-toolbar) {
        flex-wrap: nowrap;
    }

    #main-content :is(
        .sgad-operational-page,
        .sgad-operational-shell,
        .tarefas-page,
        .tickets-page,
        [class$="-page"],
        [class*="-page "]
    ) > :is(
        .tarefas-toolbar,
        .tickets-toolbar,
        [class$="-toolbar"],
        [class*="-toolbar "]
    ):not(.note-toolbar):not(.wiki-editor-toolbar) > :is(
        .tarefas-toolbar-right,
        .tickets-toolbar-right,
        [class$="-toolbar-right"],
        [class*="-toolbar-right "]
    ) {
        flex-wrap: nowrap;
        justify-content: flex-end;
        overflow-x: auto;
        scrollbar-width: none;
    }

    #main-content :is(
        .sgad-operational-page,
        .sgad-operational-shell,
        .tarefas-page,
        .tickets-page,
        [class$="-page"],
        [class*="-page "]
    ) > :is(
        .tarefas-toolbar,
        .tickets-toolbar,
        [class$="-toolbar"],
        [class*="-toolbar "]
    ):not(.note-toolbar):not(.wiki-editor-toolbar) > :is(
        .tarefas-toolbar-right,
        .tickets-toolbar-right,
        [class$="-toolbar-right"],
        [class*="-toolbar-right "]
    )::-webkit-scrollbar {
        display: none;
    }

    #main-content :is(
        .sgad-operational-page,
        .sgad-operational-shell,
        .tarefas-page,
        .tickets-page,
        [class$="-page"],
        [class*="-page "]
    ) > :is(
        .tarefas-toolbar,
        .tickets-toolbar,
        [class$="-toolbar"],
        [class*="-toolbar "]
    ):not(.note-toolbar):not(.wiki-editor-toolbar) :is(
        .tarefas-toolbar-actions,
        .tickets-toolbar-actions,
        .sgad-operational-toolbar-actions,
        [class$="-toolbar-actions"],
        [class*="-toolbar-actions "]
    ) {
        flex-wrap: nowrap;
    }

    #main-content :is(
        .sgad-operational-page,
        .sgad-operational-shell,
        .tarefas-page,
        .tickets-page,
        [class$="-page"],
        [class*="-page "]
    ) > :is(
        .tarefas-toolbar,
        .tickets-toolbar,
        [class$="-toolbar"],
        [class*="-toolbar "]
    ):not(.note-toolbar):not(.wiki-editor-toolbar) :is(
        .tarefas-toolbar-actions,
        .tickets-toolbar-actions,
        .sgad-operational-toolbar-actions,
        [class$="-toolbar-actions"],
        [class*="-toolbar-actions "]
    ) > *:not([class*="-search-wrap"]) {
        flex-shrink: 0;
    }

    #main-content :where(
        .sgad-operational-page,
        .sgad-operational-shell,
        .tarefas-page,
        .tickets-page,
        [class$="-page"],
        [class*="-page "]
    ) > :where(
        .tarefas-toolbar,
        .tickets-toolbar,
        [class$="-toolbar"],
        [class*="-toolbar "]
    ):not(.note-toolbar):not(.wiki-editor-toolbar) :where(
        .tarefas-toolbar-actions,
        .tickets-toolbar-actions,
        .sgad-operational-toolbar-actions,
        [class$="-toolbar-actions"],
        [class*="-toolbar-actions "]
    ) > :where(
        .tarefas-search-wrap,
        .tickets-search-wrap,
        .sgad-operational-search,
        [class$="-search-wrap"],
        [class*="-search-wrap "]
    ) {
        flex-shrink: 1;
        min-width: 280px;
    }
}

@media (max-width: 767.98px) {
    #main-content :is(
        .sgad-operational-page,
        .sgad-operational-shell,
        .tarefas-page,
        .tickets-page,
        [class$="-page"],
        [class*="-page "]
    ) > :is(
        .tarefas-toolbar,
        .tickets-toolbar,
        [class$="-toolbar"],
        [class*="-toolbar "]
    ):not(.note-toolbar):not(.wiki-editor-toolbar) {
        padding-left: 16px;
        padding-right: 16px;
    }

    #main-content :is(
        .sgad-operational-page,
        .sgad-operational-shell,
        .tarefas-page,
        .tickets-page,
        [class$="-page"],
        [class*="-page "]
    ) > :is(
        .tarefas-toolbar,
        .tickets-toolbar,
        [class$="-toolbar"],
        [class*="-toolbar "]
    ):not(.note-toolbar):not(.wiki-editor-toolbar) > :is(
        .tarefas-toolbar-right,
        .tickets-toolbar-right,
        [class$="-toolbar-right"],
        [class*="-toolbar-right "]
    ) {
        width: 100%;
        flex-basis: 100%;
        justify-content: flex-start;
    }

    #main-content :is(
        .sgad-operational-page,
        .sgad-operational-shell,
        .tarefas-page,
        .tickets-page,
        [class$="-page"],
        [class*="-page "]
    ) > :is(
        .tarefas-toolbar,
        .tickets-toolbar,
        [class$="-toolbar"],
        [class*="-toolbar "]
    ):not(.note-toolbar):not(.wiki-editor-toolbar) :is(
        .tarefas-toolbar-actions,
        .tickets-toolbar-actions,
        .sgad-operational-toolbar-actions,
        [class$="-toolbar-actions"],
        [class*="-toolbar-actions "]
    ) {
        width: 100%;
        max-width: none;
        margin-left: 0;
        justify-content: stretch;
    }

    #main-content :is(
        .sgad-operational-page,
        .sgad-operational-shell,
        .tarefas-page,
        .tickets-page,
        [class$="-page"],
        [class*="-page "]
    ) > :is(
        .tarefas-toolbar,
        .tickets-toolbar,
        [class$="-toolbar"],
        [class*="-toolbar "]
    ):not(.note-toolbar):not(.wiki-editor-toolbar) :is(
        .tarefas-toolbar-actions,
        .tickets-toolbar-actions,
        .sgad-operational-toolbar-actions,
        [class$="-toolbar-actions"],
        [class*="-toolbar-actions "]
    ) > * {
        flex: 1 1 100%;
    }

    #main-content :where(
        .sgad-operational-page,
        .sgad-operational-shell,
        .tarefas-page,
        .tickets-page,
        [class$="-page"],
        [class*="-page "]
    ) > :where(
        .tarefas-toolbar,
        .tickets-toolbar,
        [class$="-toolbar"],
        [class*="-toolbar "]
    ):not(.note-toolbar):not(.wiki-editor-toolbar) :where(
        .tarefas-search-wrap,
        .tickets-search-wrap,
        .sgad-operational-search,
        [class$="-search-wrap"],
        [class*="-search-wrap "]
    ) {
        width: 100%;
        max-width: none;
    }
}

[data-theme="dark"] #main-content :is(
    .sgad-operational-page,
    .sgad-operational-shell,
    .tarefas-page,
    .tickets-page,
    [class$="-page"],
    [class*="-page "]
) > :is(
    .tarefas-toolbar,
    .tickets-toolbar,
    [class$="-toolbar"],
    [class*="-toolbar "]
):not(.note-toolbar):not(.wiki-editor-toolbar) {
    --sgad-toolbar-unified-border-strong: rgba(255, 255, 255, 0.14);
}

[data-theme="dark"] #main-content :is(
    .sgad-operational-page,
    .sgad-operational-shell,
    .tarefas-page,
    .tickets-page,
    [class$="-page"],
    [class*="-page "]
) > :is(
    .tarefas-toolbar,
    .tickets-toolbar,
    [class$="-toolbar"],
    [class*="-toolbar "]
):not(.note-toolbar):not(.wiki-editor-toolbar) :is(
    .tarefas-toolbar-actions,
    .tickets-toolbar-actions,
    [class$="-toolbar-actions"],
    [class*="-toolbar-actions "]
) > :is(a, button):is(
    .tarefas-btn-ghost,
    .tickets-btn-ghost,
    [class$="-btn-ghost"],
    [class*="-btn-ghost "]
):hover,
[data-theme="dark"] #main-content .sgad-operational-toolbar .sgad-operational-toolbar-actions > :is(a, button, .btn):not(.btn-primary):not(.btn-success):not(.btn-danger):not(.btn-warning):not(.btn-info):hover {
    border-color: rgba(255, 255, 255, 0.18);
}

[data-theme="dark"] #main-content :is(
    .sgad-operational-page,
    .sgad-operational-shell,
    .tarefas-page,
    .tickets-page,
    [class$="-page"],
    [class*="-page "]
) > :is(
    .tarefas-toolbar,
    .tickets-toolbar,
    [class$="-toolbar"],
    [class*="-toolbar "]
):not(.note-toolbar):not(.wiki-editor-toolbar) :is(
    .tarefas-toolbar-actions,
    .tickets-toolbar-actions,
    [class$="-toolbar-actions"],
    [class*="-toolbar-actions "]
) > :is(a, button):is(
    .tarefas-btn-ghost,
    .tickets-btn-ghost,
    [class$="-btn-ghost"],
    [class*="-btn-ghost "]
).is-active,
[data-theme="dark"] #main-content :is(
    .sgad-operational-page,
    .sgad-operational-shell,
    .tarefas-page,
    .tickets-page,
    [class$="-page"],
    [class*="-page "]
) > :is(
    .tarefas-toolbar,
    .tickets-toolbar,
    [class$="-toolbar"],
    [class*="-toolbar "]
):not(.note-toolbar):not(.wiki-editor-toolbar) :is(
    .tarefas-toolbar-actions,
    .tickets-toolbar-actions,
    [class$="-toolbar-actions"],
    [class*="-toolbar-actions "]
) > :is(a, button):is(
    .tarefas-btn-ghost,
    .tickets-btn-ghost,
    [class$="-btn-ghost"],
    [class*="-btn-ghost "]
)[aria-expanded="true"] {
    background: rgba(59, 130, 246, 0.16);
    border-color: rgba(96, 165, 250, 0.26);
    color: #bfdbfe;
}
