/* ==== _reset.css ==== */
* {
    margin: 0;
    padding: 0;
    list-style: none;
    text-decoration: none;
    box-sizing: border-box;
    outline: none;
 }

/* ==== _base.css ==== */
html {
    
}

body {
    font-family: var(--font-family-base);
    background-color: var(--bg-dropface);
    -webkit-font-smoothing: antialiased;
}

a {}

p {}

form {}

input {}

textarea {
    height: 60px;
    min-height: 60px;
    max-height: 120px;
    width: 360px;
    min-width: 260px;
    max-width: 680px;
}

main {
    background-color: var(--bg-dropface);
}

div {}

section {}

article {}

header {}

footer {}

nav {}

button {}


p,
li {
    font-family: var(--font-family-base);
}

p {
    color: var(--text-color);
    font-size: var(--font-size-sm);
}

i {}

label {}


i[class*="icon-"] {
    display: none;
}

[search] {
    margin-left: 12px;
}

ul {}

li {}

span {}

img {}


/* hgroup */
h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--title-color);
    font-family: var(--font-family-heading);
    font-weight: 700;
    letter-spacing: var(--letter-spacing-heading);
}

h1 {
    font-size: calc(var(--font-size-lg));
    padding: 0px 10px;
    font-weight: 700;
}

h2 {
    font-size: calc(var(--font-size-lg) * 0.95);
}

h3 {
    font-size: calc(var(--font-size-lg) * 0.88);
}

h4 {
    font-size: calc(var(--font-size-lg) * 0.80);
}

h5 {
    font-size: calc(var(--font-size-lg) * 0.70);
}

h6 {
    font-size: calc(var(--font-size-lg) * 0.60);
}

/* ESTILIZAÇÃO SCROLL */
::-webkit-scrollbar {
    width: 12px;
    height: 12px;
    background: transparent;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 999px;
}

::-webkit-scrollbar-thumb {
    background: var(--text-color);
    border-radius: 999px;
    border: 3px solid transparent;
    background-clip: padding-box;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--title-color);
}

::-webkit-scrollbar-corner {
    background: transparent;
}

* {
    scrollbar-width: thin;
    scrollbar-color: var(--text-color) rgba(0, 0, 0, 0.05);
}

/* ==== _layout.css ==== */
.d-none {
    display: none !important;
}

.d-flex {
    display: flex;

    &.row {
        flex-direction: row;
    }

    &.column {
        flex-direction: column;
    }

    &.wrap {
        flex-wrap: wrap;
    }

    &.nowrap {
        flex-wrap: nowrap;
    }

    &.flex {
        flex: 1;
    }

    .overflow {
        overflow: auto;
    }


    &.ac-baseline {
        align-content: baseline;
    }


    &.ai-start {
        align-items: start;
    }
    
    &.ai-center {
        align-items: center;
    }

    &.ai-baseline {
        align-items: baseline;
    }

    &.ai-end {
        align-items: flex-end;
    }


    &.jc-end {
        justify-content: flex-end;
    }

    &.jc-center {
        justify-content: center;
    }

    &.jc-between {
        justify-content: space-between;
    }

}


/* Margins */

.m-1 {
    margin-left: calc(var(--margin-reset) * 1);
    margin-right: calc(var(--margin-reset) * 1);
    margin-top: calc(var(--margin-reset) * 1);
    margin-bottom: calc(var(--margin-reset) * 1);
}
.m-2 {
    margin-left: calc(var(--margin-reset) * 2);
    margin-right: calc(var(--margin-reset) * 2);
    margin-top: calc(var(--margin-reset) * 2);
    margin-bottom: calc(var(--margin-reset) * 2);
}
.m-3 {
    margin-left: calc(var(--margin-reset) * 3);
    margin-right: calc(var(--margin-reset) * 3);
    margin-top: calc(var(--margin-reset) * 3);
    margin-bottom: calc(var(--margin-reset) * 3);
}
.m-4 {
    margin-left: calc(var(--margin-reset) * 4);
    margin-right: calc(var(--margin-reset) * 4);
    margin-top: calc(var(--margin-reset) * 4);
    margin-bottom: calc(var(--margin-reset) * 4);
}


.ml-1 {
    margin-left: calc(var(--margin-reset) * 1);
}

.ml-2 {
    margin-left: calc(var(--margin-reset) * 2);
}

.ml-3 {
    margin-left: calc(var(--margin-reset) * 3);
}

.ml-4 {
    margin-left: calc(var(--margin-reset) * 4);
}

.mr-1 {
    margin-right: calc(var(--margin-reset) * 1);
}


.mr-2 {
    margin-right: calc(var(--margin-reset) * 2);
}

.mr-3 {
    margin-right: calc(var(--margin-reset) * 3);
}

.mr-4 {
    margin-right: calc(var(--margin-reset) * 4);
}


.mt-1 {
    margin-top: calc(var(--margin-reset) * 1);
}

.mt-2 {
    margin-top: calc(var(--margin-reset) * 2);
}

.mt-3 {
    margin-top: calc(var(--margin-reset) * 3);
}

.mt-4 {
    margin-top: calc(var(--margin-reset) * 4);
}


.mb-1 {
    margin-bottom: calc(var(--margin-reset) * 1);
}

.mb-2 {
    margin-bottom: calc(var(--margin-reset) * 2);
}

.mb-3 {
    margin-bottom: calc(var(--margin-reset) * 3);
}

.mb-4 {
    margin-bottom: calc(var(--margin-reset) * 4);
}


/* Pseudoclasses */
*.hover:hover {
    cursor: pointer;
}

/* ==== _global.css ==== */
.content {
    /* background-color: var(--bg-dropface); */
    background-color: var(--bg-dropface);
    padding: var(--padding-global-content);
    height: calc(100vh - (var(--height-header) + var(--height-footer)));
    overflow: auto;
}

.content-toggle {
    margin-bottom: 2px;
}

.content-title {
    margin-bottom: 20px;
}

.content-title>* {
    color: var(--title-color);
}

/* Título da página: Plus Jakarta Sans 800, maior, com letter-spacing negativo */
.content-title h1 {
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: -.03em;
    line-height: 1.2;
}

/* Subtítulo genérico exibido abaixo do título de qualquer página,
   carregado dinamicamente a partir da descrição do item no mock-menu. */
.response-data-subtitle {
    color: var(--text-muted);
    font-size: .92rem;
    margin-top: 4px;
    padding: 0 10px;
}

.content-loading {
    /* width: 100%; */
    align-items: center;
    justify-content: center;
    /* height: 100%; */

    width: stretch;
    position: absolute;
    height: stretch;
}


/* Carregamento do logotipo */
.custom-content-logotipo {
    align-items: center;

    .logotipo-preview {
        width: 120px;
        height: 40px;
        margin-left: 12px;
        object-fit: cover;
    }
}


/* Carregamento de anexos */
.style-label-attach {
    font-size: .8rem;
    margin-left: 10px;
    font-family: var(--font-family-base);
    color: var(--text-color);
}

.custom-file-loaded {
    margin-top: 8px;
    max-height: 100px;
    overflow: auto;

    .li {
        font-size: calc(var(--font-size-sm) * .9);
    }
}

.content-fieldset {
    border-radius: var(--border-radius-reset);
    padding: var(--padding-reset-contents);
    border: 1px solid var(--color-border-inputs);

    .legend {
        padding: 2px 4px;
        margin-left: 6px;
    }
}

/* Visualização dos anexos */
.content-anexos {
    margin-top: 6px;

    .ul-anexos {
        .li {

            width: var(--width-card-icons);
            border: 1px solid var(--color-separator-border);
            border-radius: var(--border-radius-reset);
            padding: 6px;
            margin-right: 8px;
            margin-bottom: 6px;

            .content-image-attach {
                .image-attach-type {
                    width: 60px;
                    height: 60px;
                }

                .text.text-description {
                    font-size: calc(var(--font-size-sm) * .9);

                    &.text-nome {
                        overflow: hidden;
                        white-space: nowrap;
                        text-overflow: ellipsis;
                    }

                    &.text-extensao {}

                    &.text-tamanho {
                        font-size: calc(var(--font-size-sm) * .8);
                        color: var(--text-muted);
                    }
                }

            }

            .content-buttons-attach {
                margin-top: 15px;
            }
        }
    }
}



/* Trash Modal Confirm */
.modal-excluded {

    display: none;

    &.show {
        display: flex;
        width: 100%;
        height: 100vh;
        position: absolute;
        z-index: 99988;
        top: 0;
        left: 0;
        background-color: var(--color-modal-trash);
    }


    .submodal-excluded {
        width: 400px;
        height: 200px;
        border-radius: var(--border-radius-reset);
        /* box-shadow: var(--box-shadow-reset); */
        background-color: var(--bg-app);

        h4 {
            padding: 10px 8px;
            border-bottom: 1px solid var(--color-border-inputs);
        }

        .content-info-excluded {
            padding: var(--padding-subcontent);
        }
    }

}


/* Element Contatos Forms */
.element-inputs,
.element-input-clone {
    margin-right: 4px;
}

/* ==== _componentes/_buttons.css ==== */
/* Componentes/buttons */
.content-buttons {
    align-items: flex-end;

    &.buttons-actions {
        width: 100%;
        justify-content: flex-end;
        padding: 4px 0;
    }

    &.content-buttons-search {
        margin-left: 12px;
    }
}

.button {

    padding: 5px 8px;
    border-radius: var(--border-radius-reset);
    font-size: var(--font-size-sm);
    color: var(--text-inverse);
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    background-color: var(--bg-surface);
    font-family: var(--font-family-base);
    margin-right: 4px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    font-weight: var(--font-weight-500);
    border: 1px solid var(--color-border-inputs);
    transition: transform var(--transition-fast), box-shadow var(--transition-fast), background-color var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast);

    &:hover {
        transform: translateY(-1px);
    }

    &:active {
        transform: translateY(0);
    }

    .icon {
        font-size: var(--icon-size);
        margin: 0 4px 0 4px;
    }

    /* Principal: gradiente azul com brilho que passa ao passar o mouse */
    &.button-primary {
        color: #fff;
        background: var(--gradient-btn);
        border: 1px solid transparent;
        box-shadow: var(--shadow-btn);

        &::after {
            content: "";
            position: absolute;
            inset: 0;
            background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .35) 50%, transparent 70%);
            transform: translateX(-120%);
            pointer-events: none;
        }

        &:hover {
            box-shadow: var(--shadow-btn-hover);
        }

        &:hover::after {
            animation: btn-brilho .8s ease;
        }

        .icon {
            color: var(--icon-reset-buttons);
        }
    }
    &.button-secondary {
        color: #fff;
        background-color: var(--color-secondary);
        border: 1px solid var(--color-secondary);

        .icon {
            color: var(--icon-reset-buttons);
        }
    }
    &.button-info {
        color: #fff;
        background-color: var(--color-highlight);
        border: 1px solid var(--color-highlight);

        .icon {
            color: var(--icon-reset-buttons);
        }
    }
    &.button-danger {
        color: #fff;
        background-color: var(--color-danger);
        border: 1px solid var(--color-danger);

        .icon {
            color: var(--icon-reset-buttons);
        }
    }

    &.button-primary-outline {
        background-color: var(--bg-surface);
        border: 1px solid var(--color-border-inputs);
        color: var(--title-color);

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

        &:hover {
            border-color: var(--border-hover);
            background-color: var(--bg-chip);
        }
    }
    &.button-secondary-outline {
        background-color: var(--bg-app);
        border: 1px solid var(--color-secondary);
        color: var(--color-secondary);

        .icon {
            color: var(--color-secondary);
        }
    }
    &.button-info-outline {
        background-color: var(--bg-app);
        border: 1px solid var(--color-highlight);
        color: var(--color-highlight);

        .icon {
            color: var(--color-highlight);
        }
    }
    &.button-danger-outline {
        background-color: var(--bg-app);
        border: 1px solid var(--color-danger);
        color: var(--color-danger);

        .icon {
            color: var(--color-danger);
        }
    }

    &.button-small {
        font-size: calc(var(--font-size-sm) * 0.80);
        padding: 5px 6px;
    }

    &.button-medium {
        font-size: calc(var(--font-size-sm) * 0.90);
        padding: 5px 8px;
    }

    &.button-larger {
        font-size: calc(var(--font-size-sm) * 1.1);
        padding: 5px 14px;
    }


    &.button-table {
        background-color: transparent;
        border: none;
        box-shadow: none;

        &:hover {
            transition: var(--transition-normal);
        }
    }


    /* button transaction */
    &.btn-transaction {
        &.btn-loading {
            pointer-events: none;
            background-color: #bfbfbf;
            border: none;
            color: #dad9d9;

            .icon {
                color: #dad9d9;;
            }
        }
    }

}

@keyframes btn-brilho {
    to { transform: translateX(120%); }
}

:root.reduzir-movimento {
    .button,
    .button::after {
        transition: none !important;
        animation: none !important;
    }

    .button:hover {
        transform: none;
    }
}

/* ==== _componentes/_tipograph.css ==== */
.text {
    font-family: var(--font-family-base);
    color: var(--text-color);

    &.fs-ssm {
        font-size: calc(var(--font-size-sm) - 0.1rem);
    }

    &.fs-sm {
        font-size: var(--font-size-sm);
    }

    &.fs-md {
        font-size: calc(var(--font-size-sm) + 0.1rem);
    }

    &.fs-lg {
        font-size: calc(var(--font-size-sm) + 0.2rem);
    }
}

.title {
    font-family: var(--font-family-heading);
    font-weight: var(--font-weight-500);

    &.fs-sm {}

    &.fs-md {}

    &.fs-lg {}
}

.label {
    font-family: var(--font-family-base);
    color: '';

    &.fs-sm {}

    &.fs-md {}

    &.fs-lg {}
}

/* ==== _componentes/_overloads.css ==== */
.form-overload {
    margin-top: 5px;
    padding: 0;
    max-height: 0px;
    transition: .3s ease-in-out;
    overflow: hidden;

    &.overload {
        max-height: 100%;
        transition:  .3s ease, padding .4s ease;
        padding: 0 10px 2px 10px;
    }

}

.title-overload {
    padding: 10px 15px;
    border-radius: 3px;
    justify-content: space-between;
    /* background-color: var(--color-primary); */
    background-color: var(--background-color-title-overload);
    color: var(--color-title-overload);
    font-weight: var(--font-weight-400);
    border: none;

    &:hover {
        cursor: pointer;
    }
}

/* ==== _componentes/_forms.css ==== */
.content-form {

    background-color: var(--bg-surface);
    padding: var(--padding-subcontent);
    margin-bottom: var(--margin-bottom-subcontent);
    border-radius: var(--border-radius-contents);
    box-shadow: var(--box-shadow-reset);
}

.content-input {
    margin-right: 12px;
    margin-top: 4px;
}


.form {

    .sub-form {
        position: relative;
        border: 1px solid var(--color-separator-border);
        border-radius: var(--border-radius-contents);
        margin-bottom: 6px;
        padding: 10px 8px;
        border-left: 3px solid var(--bg-surface-hover);
        /* background-color: var(--bg-surface); */
        background-color: var(--bg-app);
    }

}


.input {
    border-radius: var(--border-radius-inputs);
    padding: 5px 3px;
    border: 1px solid var(--color-border-inputs);
    text-indent: 6px;
    color: var(--input-color);
    background-color: var(--bg-input);
    width: 100%;


    &.input-slg {
        min-width: 410px;
    }

    &.input-exlg {
        min-width: 380px;
    }

    &.input-lg {
        width: 260px;
    }

    &.input-md {
        width: 180px;
    }

    &.input-sm {
        width: 94px;
    }

    &.input-exsm {
        max-width: 90px;
        font-size: small;
    }

    &.input-ssm {
        max-width: 50px;
    }


    &.input-read {
        pointer-events: none;
        border: none;
    }

    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);

    &:hover:not(:focus):not(.input-read) {
        border-color: var(--color-border-strong);
    }

    &:focus {
        outline: none;
        border-color: var(--color-border-inputs-focus);
        box-shadow: var(--ring-accent);
    }

    &[type="checkbox"],
    &[type="radio"] {
        width: 18px;
        height: 18px;
        accent-color: var(--color-primary);
        margin-right: 6px;
    }


}

.label {
    font-size: var(--font-size-sm);
    font-family: var(--font-family-base);
    color: var(--text-muted);
    margin-bottom: 4px;
}

/* Tema escuro: a lista que abre no select é do navegador e vinha branca com o texto claro
   do tema (opções ilegíveis). color-scheme faz a lista abrir escura; as cores do option
   cobrem o Chrome no Windows, que usa as do próprio option. Vale para todos os selects. */
:root.dark-theme select {
    color-scheme: dark;
}

:root.dark-theme select option,
:root.dark-theme select optgroup {
    color: var(--title-color);
    background-color: var(--bg-surface);
}

/* ==== _componentes/_tabs.css ==== */
.content-tabs {
  padding: var(--padding-content-tabs);
}

/* Abas em pílula; a selecionada fica preenchida com o gradiente azul */
.tab {
  padding: 5px 12px;
  margin-right: 6px;
  border: 1px solid var(--color-border-tabs);
  color: var(--text-color);
  font-family: var(--font-family-base);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-500);
  border-radius: var(--border-radius-pill);
  background: var(--bg-surface);
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background-color var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);

  &:hover {
    background-color: var(--bg-chip);
    border-color: var(--border-chip);
    color: var(--title-color);
  }
}

.tab[aria-selected="true"] {
  color: #fff;
  background: var(--gradient-btn);
  border-color: transparent;
  box-shadow: var(--shadow-btn);

  .icon,
  .material-symbols-outlined {
    color: #fff;
  }
}

.panel-tab {
  display: none;
  opacity: 0;
  visibility: hidden;

  &.active {
    display: flex; /* layout when visible */
    opacity: 1;
    visibility: visible;
    animation: painel-entrar .3s cubic-bezier(.2, .8, .2, 1);
  }

}

@keyframes painel-entrar {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

:root.reduzir-movimento {
  .panel-tab.active { animation: none; }
}

/* ==== _componentes/_filters.css ==== */
.content-filters {
    padding: var(--padding-subcontent);
    border-radius: var(--border-radius-contents);
    background-color: var(--bg-surface);
    margin-bottom: var(--margin-bottom-subcontent);
    box-shadow: var(--box-shadow-reset);
}

.content-modal-filters {
    padding: var(--padding-subcontent);
    border-radius: var(--border-radius-reset);
    margin-bottom: var(--margin-bottom-subcontent);
    border: 1px solid var(--color-separator-border);
}

/* ==== _componentes/_modal.css ==== */
.modal {
    display: none;
    position: fixed;
    overflow: auto;

    &.show {
        display: flex;
        flex-direction: column;
        width: 100%;
        height: 100vh;
        flex: 1;
        background-color: var(--color-modal);
        backdrop-filter: blur(6px);
        -webkit-backdrop-filter: blur(6px);
        justify-content: center;
        align-items: center;
        overflow: hidden;
        top: 0px;
        z-index: 77700;
        animation: slide 0.5s ease-in-out forwards;


        &[data-element="attachment"] {
            z-index: 77800 ;
        }


    }

    .sub-modal-content {
        display: flex;
        flex-direction: column;
        width: 70%;
        height: 60%;
        background-color: var(--bg-glass-modal);
        backdrop-filter: blur(var(--blur-glass));
        -webkit-backdrop-filter: blur(var(--blur-glass));
        padding: 14px;
        border: 1px solid var(--color-separator-border);
        border-radius: var(--border-radius-card-lg);
        box-shadow: var(--box-shadow-lg);
        transform: translateY(-50px);
        opacity: 0;
        animation: slide 0.3s ease-in-out forwards;
        animation-delay: 0.1s;

        .response-modal {
            padding: 10px;
            display: flex;
            /* flex: 1; */
            overflow: auto;
            flex-direction: column;
        }

        .h3 {
            border-bottom: 1px solid var(--color-separator-border);
            padding: 4px 2px 10px;
        }



        &.slg {
            width: 94%;
            height: 90%;
        }

        &.lg {
            width: 82%;
            height: 80%;
        }

        &.md {
            width: 70%;
            height: 60%;
        }

        &.sm {
            width: 48%;
            height: 45%;
            max-width: 700px;
        }
        &.ssm {
            width: 30%;
            height: 30%;
            max-width: 400px;
        }
    }
}


@keyframes slide {
    from {
        top: -100%;
    }
    to {
        top: 0;
    }
}

@keyframes slide {
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* ==== _componentes/_toastr.css ==== */
/* --------------------------------------------------------------------------
   Aviso flutuante (ToastrService): cartão no canto de cima, no visual dos cartões do projeto.
   O tipo (success, error, alert) só muda a cor do ícone e da barrinha do tempo.
   -------------------------------------------------------------------------- */
.toastr {
    --toastr-cor: var(--color-primary-500);
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 88899;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: start;
    gap: 12px;
    width: min(380px, calc(100vw - 32px));
    padding: 14px 12px 16px 14px;
    overflow: hidden;
    border: 1px solid var(--color-separator-border);
    border-radius: var(--border-radius-contents);
    background: var(--bg-surface);
    box-shadow: var(--box-shadow-lg);
    font-family: var(--font-family-base);
    animation: toastr-entrar .32s cubic-bezier(.2, .8, .2, 1) both;

    &.success { --toastr-cor: var(--color-success); }
    &.error { --toastr-cor: var(--color-danger); }
    &.alert { --toastr-cor: var(--color-warning); }

    /* Criado vazio pelo inject(): só aparece quando tem um aviso */
    &:not(.success):not(.error):not(.alert) {
        display: none;
    }

    &.saindo {
        animation: toastr-sair .2s ease forwards;
    }
}

.toastr-icone {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    color: var(--toastr-cor);
    background: color-mix(in srgb, var(--toastr-cor) 14%, transparent);

    svg {
        width: 17px;
        height: 17px;
    }
}

.toastr-texto {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    padding-top: 1px;
}

.toastr-titulo {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.35;
    color: var(--title-color);
}

.toastr-mensagem {
    font-size: 13px;
    line-height: 1.45;
    color: var(--text-color);
    overflow-wrap: anywhere;
}

.toastr-fechar {
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    margin: -2px -2px 0 0;
    padding: 0;
    border: 0;
    border-radius: var(--border-radius-pill);
    color: var(--text-muted);
    background: transparent;
    cursor: pointer;
    transition: var(--transition-fast);

    svg {
        width: 15px;
        height: 15px;
    }

    &:hover {
        color: var(--title-color);
        background: color-mix(in srgb, var(--text-muted) 14%, transparent);
    }

    &:focus-visible {
        outline: 2px solid var(--color-primary-500);
        outline-offset: 1px;
    }
}

/* Barrinha que mostra o tempo até o aviso sumir */
.toastr-tempo {
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 3px;
    background: var(--toastr-cor);
    opacity: .75;
    transform-origin: left;
    animation: toastr-tempo var(--toastr-tempo, 5s) linear forwards;
}

@keyframes toastr-entrar {
    from { opacity: 0; transform: translateY(-10px) scale(.97); }
    to { opacity: 1; transform: none; }
}

@keyframes toastr-sair {
    to { opacity: 0; transform: translateX(16px); }
}

@keyframes toastr-tempo {
    from { transform: scaleX(1); }
    to { transform: scaleX(0); }
}

:root.reduzir-movimento {
    .toastr,
    .toastr.saindo {
        animation: none;
    }
}

@media (max-width: 600px) {
    .toastr {
        top: 12px;
        right: 16px;
    }
}


.handler {
    &.text-error {
        padding: 4px;
        font-size: 1rem;
        font-family: var(--font-family-base);
        position: absolute;
        margin-top: 10px;
    }
}

/* ==== _componentes/_icons.css ==== */
.icon {
    font-size: var(--icon-size);
    margin: 0 8px 0 8px;

    &.default {
        color: var(--icon-default-color);
        font-size: calc(var(--icon-size) * 1.1);
    }

    &.bordered {
        font-size: calc(var(--icon-size) * 1.1);
        color: var(--color-highlight);
        margin: 0 4px 0 4px;
        border-radius: 4px;
        padding: 4px;
        border: 1px solid var(--color-highlight);
    }

    &.circle {
        font-size: calc(var(--icon-size) * 1.2);
        color: var(--color-highlight);
        margin: 0 4px 0 4px;
        border-radius: 15px;
        justify-content: center;
        width: 30px;
        height: 30px;
        border: 1px solid var(--color-highlight);
        align-items: center;
        background-color: var(--bg-app);
        transition: background-color .3s ease-in-out, color .4s ease-in-out;

        &.small {
            font-size: calc(var(--icon-size) * 1.1);
            width: 24px;
            height: 24px;
        }

        &.medium {
            width: 28px;
            height: 28px;
        }

        &.large {
            width: 34px;
            height: 34px;
        }

        &:hover {
            color: var(--color-highlight);
            transition: color .2s ease-in-out;
        }


        &.valid {
            color: var(--background-color-success);
            border-color: var(--background-color-success);
        }

        &.plus {
            background-color: var(--background-color-iconplus);
            border-color: var(--background-color-iconplus);
        }

        &.trash {
            color: var(--background-color-icontrash);
            border-color: var(--background-color-icontrash);
        }

        &:hover,
        &.valid:hover {
            background-color: var(--color-highlight);
            color: var(--icon-white-color);
            transition: background-color .3s ease-in-out, color .4s ease-in-out;
        }

        &.valid:hover,
        &.download:hover {
            background-color: var(--background-color-success);
            border-color: var(--background-color-success);
        }

        &.trash:hover {
            background-color: var(--background-color-icontrash);
            border-color: var(--background-color-icontrash);
            color: var(--icon-white-color);
        }
    }

    &.small {
        font-size: calc(var(--icon-size) * 1);
    }

    &.medium {
        font-size: calc(var(--icon-size) * 1.3);
    }

    &.large {
        font-size: calc(var(--icon-size) * 1.8);
    }

    &:hover {
        color: var(--color-highlight);
        transition: color .2s ease-in-out;
    }


    &.valid:hover,
    &.download:hover {
        color: var(--background-color-success);
    }

    &.trash:hover {
        color: var(--background-color-icontrash);
    }


    /* ICON TABLES */
    &.table {
        display: inline;

        /* STATUS */
        &.aguardando {
            color: var(--color-warning);
        }

        &.liberado {
            color: var(--color-pending);
        }

        &.enviada {
            color: var(--color-info);
        }

        &.concluido {
            color: var(--color-success);
        }

    }
}

.icone-tab {
    font-size: 14px;
    margin-right: 4px;
}

.controllers.controller-vendas {
    position: absolute;
    z-index: 1000;
    bottom: 14px;
    right: 4px;
    row-gap: 6px;
    padding: 8px 5px;
}

/* ==== _componentes/_kanban.css ==== */
.wrapper-lanes {
  gap: 1rem;
  overflow-x: auto;
  height: 100%;

  .lanes {
    min-width: 280px;
    width: 295px;
    height: 100%;

    display: flex;
    flex-direction: column;

    padding: var(--padding-reset-contents);
    gap: 1rem;

    /* Coluna um tom abaixo dos cartões, com borda fina */
    background: var(--bg-surface-2);
    border: 1px solid var(--color-separator-border);
    border-radius: var(--border-radius-card-lg);

    .head-lanes {
      flex-shrink: 0;
      gap: .4rem;

      .title-lane {
        font-family: var(--font-family-heading);
        font-size: var(--font-size-md);
        font-weight: var(--font-weight-bold);
        letter-spacing: var(--letter-spacing-heading);
        color: var(--title-color);
      }

      .counter-leads {
        min-width: 24px;
        height: 22px;
        padding: 0 7px;
        border-radius: var(--border-radius-pill);
        background: #FF5722;
        color: #fff;
        box-shadow: 0 6px 14px -6px rgba(255, 87, 34, .7);
        font-size: var(--font-size-xs);
        font-weight: var(--font-weight-bold);
        margin-left: 12px;
      }

      .text-total-lane {
        color: var(--text-muted);
        font-size: var(--font-size-sm);
        font-weight: var(--font-weight-500);
      }
    }

    .body-lanes {
      flex: 1;
      min-height: 0;
      /* overflow-y: auto; */

      .body-cards {
        gap: .2rem;
        max-height: calc(100vh - 316px);
        overflow: auto;
        scrollbar-width: none;

        .card-lead {
          gap: 1rem;
          padding: 10px;
          background: var(--bg-surface);
          border: 1px solid var(--color-separator-border);
          border-radius: var(--border-radius-contents);
          transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
          box-shadow: var(--box-shadow-reset);
          margin-bottom: 3px;

          /* Ao passar o mouse a borda acende em azul */
          &:hover {
            border-color: var(--border-hover);
            box-shadow: var(--box-shadow-hover);
          }

          .head-card {

            .icon-head-company {
              width: 50px;
              height: 50px;

              border-radius: var(--border-radius-contents);

              background: var(--bg-dropface);
              color: #e6714c;
              /* color: var(--color-primary-500); */

              font-size: 28px;
            }

          }

          .info-card {
            gap: .75rem;

            .head-info-card {

              .title-card {
                font-family: var(--font-family-heading);
                font-size: var(--font-size-md);
                font-weight: var(--font-weight-bold);
                color: var(--title-color);
              }

              .price-card {
                font-size: var(--font-size-md);
                font-weight: var(--font-weight-bold);
                color: var(--color-primary-contrast);
                white-space: nowrap;
              }

              .lead-status {
                /* display: inline-flex; */
                display: none;
                align-items: center;
                justify-content: center;
                gap: .35rem;
                padding: 3px 10px;
                border-radius: 999px;
                background: var(--bg-dropface);
                color: var(--color-success);

                font-size: var(--font-size-xs);
                font-weight: var(--font-weight-500);

                white-space: nowrap;
                user-select: none;
              }

              .icon-lead-estrela {
                flex-shrink: 0;
                margin-left: .35rem;
                font-size: 18px;
                color: #F5B301;
                font-variation-settings: 'FILL' 1;
                cursor: default;
              }

              .button-card-menu {
                flex-shrink: 0;
                width: 26px;
                height: 26px;
                padding: 0;
                margin-left: .35rem;

                display: flex;
                align-items: center;
                justify-content: center;

                border: none;
                border-radius: 50%;
                background: transparent;
                color: var(--icon-default-color);
                cursor: pointer;

                transition: var(--transition-fast);

                &:hover,
                &.is-active {
                  background: var(--bg-dropface);
                  color: var(--icon-white-color);
                }

                .icon-card-menu {
                  font-size: 18px;
                }
              }

            }

            .body-info-card {
              gap: .35rem;

              .company-name {
                color: var(--text-main);
                font-size: var(--font-size-sm);
              }

              .badge {
                display: inline-flex;
                align-items: center;
                padding: 2px 8px;
                border-radius: 10px;

                font-size: var(--font-size-xs);
                font-weight: var(--font-weight-500);
                line-height: 1.2;

                white-space: nowrap;

                &.facebook {
                  color: #1877F2;
                  background: rgba(24, 119, 242, .08);
                }

                &.instagram {
                  color: #E1306C;
                  background: rgba(225, 48, 108, .08);
                }

                &.whatsapp {
                  color: #25D366;
                  background: rgba(37, 211, 102, .08);
                }

                &.google {
                  color: #EA4335;
                  background: rgba(234, 67, 53, .08);
                }

                &.linkedin {
                  color: #0A66C2;
                  background: rgba(10, 102, 194, .08);
                }

                &.site {
                  color: var(--color-primary-500);
                  background: rgba(57, 120, 170, .08);
                }

                &.email {
                  color: var(--text-main);
                  background: rgba(115, 115, 115, .08);
                }

                &.indicacao {
                  color: #B8860B;
                  background: rgba(184, 134, 11, .08);
                }
              }

              .content-contact-card {
                gap: .2rem;

                .email-card,
                .phone-card {
                  font-size: var(--font-size-xs);
                  color: var(--text-muted);
                }

                .icone-detail {
                  font-size: 14px;
                  margin-right: 4px;
                }
              }

            }

            .footer-card {
              margin-top: .25rem;

              .content-icons-card {
                gap: .5rem;

                .icon-social {
                  width: 28px;
                  height: 28px;

                  display: flex;
                  align-items: center;
                  justify-content: center;

                  border-radius: 50%;

                  background: var(--bg-app);
                  color: var(--icon-default-color);

                  transition: var(--transition-fast);

                  &:hover {
                    background: var(--bg-surface-hover);
                    color: var(--icon-white-color);

                  }
                }

              }

              .button-step-placeholder {
                width: 26px;
                height: 26px;
              }

              .button-step {
                width: 26px;
                height: 26px;
                padding: 0;
                border-radius: 50%;

                display: flex;
                align-items: center;
                justify-content: center;

                cursor: pointer;
                transition: var(--transition-fast);

                background: var(--gradient-btn);
                box-shadow: var(--shadow-btn);
                color: #ffffff;
                border: none;
                .icon-step {
                  font-size: 16px;
                }

                .step-spinner {
                  display: none;
                  width: 12px;
                  height: 12px;

                  border: 2px solid rgba(255, 255, 255, .35);
                  border-top-color: var(--text-inverse);
                  border-radius: 50%;

                  animation: kanban-step-spin .6s linear infinite;
                }

                &:hover {
                  transform: translateY(-1px);
                  box-shadow: var(--shadow-btn-hover);
                }
                

                /* &.button-step-prev:hover {
                  background: var(--color-secondary);
                  color: var(--text-inverse);
                } */

                &:disabled {
                  opacity: .6;
                  cursor: not-allowed;
                }

                &.is-loading {
                  cursor: wait;

                  .icon-step {
                    display: none;
                  }

                  .step-spinner {
                    display: block;
                  }
                }

              }

            }

          }

          .card-move-menu {
            position: fixed;
            z-index: 20;
            min-width: 190px;

            padding: .5rem;

            background: var(--bg-surface);
            border: 1px solid var(--color-separator-border);
            border-radius: var(--border-radius-contents);
            box-shadow: var(--box-shadow-dropdown, 0 8px 24px rgba(0, 0, 0, .35));

            .move-menu-header {
              padding: .35rem .5rem;
              color: var(--text-muted);
              font-size: var(--font-size-xs);
              font-weight: var(--font-weight-bold);
              text-transform: uppercase;
              letter-spacing: .04em;
            }

            .move-menu-list {
              display: flex;
              flex-direction: column;
              gap: .15rem;
              max-height: 240px;
              overflow-y: auto;
            }

            .move-menu-item {
              display: flex;
              align-items: center;
              gap: .5rem;

              padding: .5rem .6rem;
              border-radius: var(--border-radius-inputs);

              color: var(--text-main);
              font-size: var(--font-size-sm);

              cursor: pointer;
              transition: var(--transition-fast);
              user-select: none;

              .move-menu-dot {
                flex-shrink: 0;
                width: 10px;
                height: 10px;
                border-radius: 50%;
                background: var(--color-primary-500);
              }

              &:hover {
                background: var(--bg-surface-hover);
              }
            }

            .move-menu-empty {
              padding: .5rem .6rem;
              color: var(--text-muted);
              font-size: var(--font-size-sm);
            }
          }

        }

      }

    }

  }

}

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

/* =====================================================================
   Kanban em vidro (inspirado no site da Undersky)
   - Cada coluna tem uma cor (--lane-cor), usada na barra do topo, no ponto
     ao lado do nome e na borda do cartão.
   - Colunas de vidro com reflexo; cartões entram em cascata, sobem no hover
     e acendem uma luz no canto.
   ===================================================================== */

.wrapper-lanes {
  gap: 14px;
  padding: 2px 2px 8px;
}

.wrapper-lanes .lanes {
  --lane-cor: #3b82f6;
  position: relative;
  padding: 14px 10px 10px;
  background-color: color-mix(in srgb, var(--bg-surface-2) 82%, transparent);
  border: 1px solid var(--color-separator-border);
  border-radius: var(--border-radius-card-lg);
  box-shadow: var(--vidro-borda-topo), var(--box-shadow-reset);
  animation: lane-subir .5s cubic-bezier(.2, .8, .2, 1) both;
}

/* Uma cor por etapa, em sequência */
.wrapper-lanes .lanes:nth-child(6n+2) { --lane-cor: #8b5cf6; }
.wrapper-lanes .lanes:nth-child(6n+3) { --lane-cor: #f59e0b; }
.wrapper-lanes .lanes:nth-child(6n+4) { --lane-cor: #06b6d4; }
.wrapper-lanes .lanes:nth-child(6n+5) { --lane-cor: #22c55e; }
.wrapper-lanes .lanes:nth-child(6n+6) { --lane-cor: #ec4899; }

.wrapper-lanes .lanes:nth-child(2) { animation-delay: .06s; }
.wrapper-lanes .lanes:nth-child(3) { animation-delay: .12s; }
.wrapper-lanes .lanes:nth-child(4) { animation-delay: .18s; }
.wrapper-lanes .lanes:nth-child(5) { animation-delay: .24s; }
.wrapper-lanes .lanes:nth-child(n+6) { animation-delay: .3s; }

/* Barra colorida no topo da coluna, com reflexo de vidro por cima */
.wrapper-lanes .lanes::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 18px;
  right: 18px;
  height: 3px;
  border-radius: 0 0 4px 4px;
  background: var(--lane-cor);
  box-shadow: 0 0 16px var(--lane-cor);
  opacity: .9;
  pointer-events: none;
}

.wrapper-lanes .lanes::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: var(--vidro-reflexo);
  pointer-events: none;
}

.wrapper-lanes .lanes > * {
  position: relative;
  z-index: 1;
}

/* Cabeçalho: ponto colorido, nome e contador */
.wrapper-lanes .lanes .head-lanes {
  padding: 2px 4px 10px;
  border-bottom: 1px dashed var(--color-separator-border);

  .title-lane {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: .95rem;

    &::before {
      content: "";
      flex-shrink: 0;
      width: 8px;
      height: 8px;
      border-radius: 50%;
      background: var(--lane-cor);
      box-shadow: 0 0 0 3px color-mix(in srgb, var(--lane-cor) 22%, transparent);
    }
  }

  .counter-leads {
    min-width: 24px;
    height: 22px;
    padding: 0 7px;
    border-radius: 999px;
    margin-left: 10px;
    color: #fff;
    background: #FF5722;
    box-shadow: 0 0 0 3px rgba(255, 87, 34, .14), 0 6px 14px -6px rgba(255, 87, 34, .8);
  }

  /* "Total negociado R$ ..." na linha de baixo do nome, alinhado com o texto (depois do ponto) */
  flex-wrap: wrap;
  row-gap: 7px;

  .info-price-lead {
    flex: 1 0 100%;
    padding-left: 16px;
  }

  .text-total-lane {
    font-size: 12px;
    color: var(--text-muted);

    strong {
      font-weight: var(--font-weight-bold);
      color: var(--title-color);
    }
  }
}

/* Menu "Mover para": separação entre as etapas e os outros quadros */
.card-move-menu .move-menu-header-quadro {
  margin-top: .35rem;
  padding-top: .55rem !important;
  border-top: 1px solid var(--color-separator-border);
}

.card-move-menu .move-menu-icone {
  font-size: 16px;
  color: var(--text-muted);
}

/* Menu "Mover para" aberto: a coluna e o card ficam acima das colunas vizinhas */
.wrapper-lanes .lanes.menu-aberto {
  position: relative;
  z-index: 40;
}

.wrapper-lanes .lanes .body-lanes .body-cards .card-lead.menu-aberto {
  z-index: 40;
}

/* Cartão de vidro */
.wrapper-lanes .lanes .body-lanes .body-cards {
  gap: 8px;
  padding-top: 2px;

  .card-lead {
    position: relative;
    isolation: isolate;
    padding: 12px 12px 10px 14px;
    background-color: var(--bg-surface);
    background-image: var(--vidro-reflexo);
    border: 1px solid var(--color-separator-border);
    border-radius: 16px;
    box-shadow: var(--vidro-borda-topo), var(--box-shadow-reset);
    animation: card-entrar .4s cubic-bezier(.2, .8, .2, 1) both;
    transition: transform .25s cubic-bezier(.2, .8, .2, 1), border-color var(--transition-fast), box-shadow var(--transition-fast);

    /* Faixa da cor da etapa na lateral */
    &::before {
      content: "";
      position: absolute;
      left: 0;
      top: 14px;
      bottom: 14px;
      width: 3px;
      border-radius: 0 3px 3px 0;
      background: var(--lane-cor);
      opacity: .85;
    }

    /* Luz no canto (dentro do cartão: nada passa da borda) */
    &::after {
      content: "";
      position: absolute;
      z-index: -1;
      inset: 0;
      border-radius: inherit;
      background: radial-gradient(circle at 100% 100%, var(--glow), transparent 55%);
      opacity: 0;
      transition: opacity .35s ease;
      pointer-events: none;
    }

    .info-card {
      position: relative;
      overflow: hidden;
      border-radius: 10px;
    }

    &:hover {
      transform: translateY(-3px);
      border-color: color-mix(in srgb, var(--lane-cor) 55%, transparent);
      box-shadow: var(--vidro-borda-topo), 0 18px 40px -18px color-mix(in srgb, var(--lane-cor) 70%, transparent);

      &::after {
        opacity: 1;
      }
    }

    /* Com o menu "Mover para" aberto o cartão não se mexe (o menu é fixo na tela) */
    &:has(.card-move-menu:not(.d-none)) {
      transform: none;
      animation: none;
    }

    /* Lead Premium (anúncio caro, formulário "Estrela"): borda multicolorida
       girando, brilho próprio e etiqueta "Lead Premium". Não usa uma cor só, para não se
       confundir com nenhuma etapa; a faixa lateral continua na cor da etapa. */
    &.is-featured {
      border: 1.5px solid transparent;
      background:
        var(--vidro-reflexo) padding-box,
        linear-gradient(135deg, color-mix(in srgb, #f472b6 7%, var(--bg-surface)), var(--bg-surface) 55%, color-mix(in srgb, #fbbf24 6%, var(--bg-surface))) padding-box,
        conic-gradient(from var(--premium-giro), #fbbf24, #f472b6, #a78bfa, #60a5fa, #34d399, #fbbf24) border-box;
      box-shadow:
        var(--vidro-borda-topo),
        0 10px 28px -14px rgba(244, 114, 182, .6),
        0 8px 26px -16px rgba(251, 191, 36, .7);
      animation: card-entrar .4s cubic-bezier(.2, .8, .2, 1) both, card-premium-giro 6s linear infinite;

      &:hover {
        border-color: transparent;
        box-shadow:
          var(--vidro-borda-topo),
          0 18px 40px -16px rgba(244, 114, 182, .75),
          0 14px 36px -18px rgba(167, 139, 250, .8);
      }
    }

    .title-card {
      font-size: .98rem;
      letter-spacing: -.01em;
    }

    .footer-card {
      margin-top: 2px;
      padding-top: 8px;
      border-top: 1px solid var(--color-separator-border);
    }
  }
}

@keyframes lane-subir {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

/* --------------------------------------------------------------------------
   "Tem mais cartões abaixo": degradê no fim da coluna e pílula "N mais" na cor
   da etapa; no fim de uma coluna rolada a pílula vira "Topo" (.no-fim) e volta
   ao começo. Classes e pílula postas pelo IndicadorMaisCards
   (Pages/Leads/table-component/script.js).
   -------------------------------------------------------------------------- */
.wrapper-lanes .lanes .body-lanes {
  position: relative;

  &::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 64px;
    border-radius: 0 0 14px 14px;
    background: linear-gradient(to bottom, transparent, color-mix(in srgb, var(--bg-surface-2) 92%, transparent) 85%);
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s ease;
  }

  &.tem-mais::after {
    opacity: 1;
  }
}

.lane-mais {
  position: absolute;
  left: 50%;
  bottom: 8px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px 10px 3px 8px;
  border: 0;
  border-radius: 999px;
  font-family: var(--font-family-base);
  font-size: 11.5px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, color-mix(in srgb, var(--lane-cor) 75%, #fff), var(--lane-cor));
  box-shadow: 0 6px 16px -6px var(--lane-cor), 0 0 0 3px color-mix(in srgb, var(--lane-cor) 18%, transparent);
  cursor: pointer;
  transform: translate(-50%, 8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease, transform .25s cubic-bezier(.2, .8, .2, 1);

  .material-symbols-outlined {
    font-size: 17px;
    animation: lane-mais-seta 1.4s ease-in-out infinite;
  }

  &:hover {
    filter: brightness(1.08);
  }
}

.wrapper-lanes .lanes .body-lanes.tem-mais .lane-mais,
.wrapper-lanes .lanes .body-lanes.no-fim .lane-mais {
  transform: translate(-50%, 0);
  opacity: 1;
  pointer-events: auto;
}

/* No fim da coluna a pílula vira "Topo": a seta aponta para cima e para de balançar */
.wrapper-lanes .lanes .body-lanes.no-fim .lane-mais .material-symbols-outlined {
  animation: none;
}

/* Giro de caça-níquel ao voltar ao topo (classe posta pelo IndicadorMaisCards) */
.wrapper-lanes .lanes .body-lanes .body-cards.lane-girando > .card-lead {
  animation: lane-cacaniquel 1s cubic-bezier(.3, 0, .2, 1) both;
}

.wrapper-lanes .lanes .body-lanes .body-cards.lane-girando > .card-lead.is-featured {
  animation: lane-cacaniquel 1s cubic-bezier(.3, 0, .2, 1) both, card-premium-giro 6s linear infinite;
}

@keyframes lane-cacaniquel {
  0% { transform: translateY(var(--giro)); filter: blur(0); }
  20% { filter: blur(3px); }
  62% { transform: translateY(22px); filter: blur(1.5px); }
  78% { transform: translateY(-8px); filter: blur(0); }
  90% { transform: translateY(3px); }
  100% { transform: none; filter: none; }
}

@keyframes lane-mais-seta {
  0%, 100% { transform: translateY(-1px); }
  50% { transform: translateY(2px); }
}

:root.reduzir-movimento {
  .lane-mais .material-symbols-outlined {
    animation: none;
  }
}

@property --premium-giro {
  syntax: '<angle>';
  inherits: false;
  initial-value: 0deg;
}

@keyframes card-premium-giro {
  to { --premium-giro: 360deg; }
}

@keyframes card-entrar {
  from { opacity: 0; transform: translateY(8px) scale(.985); }
  to { opacity: 1; transform: none; }
}

:root.reduzir-movimento {
  .wrapper-lanes .lanes,
  .wrapper-lanes .lanes .body-lanes .body-cards .card-lead,
  .wrapper-lanes .lanes .body-lanes .body-cards .card-lead.is-featured {
    animation: none;
  }

  .wrapper-lanes .lanes .body-lanes .body-cards .card-lead:hover {
    transform: none;
  }
}

/* --------------------------------------------------------------------------
   Card do lead: o nome ganha a linha inteira (etiqueta e ícones ficam em cima)
   e o vendedor responsável aparece separado, com rótulo, perto do rodapé.
   -------------------------------------------------------------------------- */
.wrapper-lanes .card-lead .info-card .head-info-card {
  flex-wrap: wrap;
  align-items: center;
  row-gap: 6px;

  > .card-tag-lead {
    margin: 0;
  }

  > .d-flex {
    margin-left: auto;
  }

  .title-card {
    order: 1;
    flex: 1 0 100%;
    min-width: 0;
    margin: 0;
    line-height: 1.25;
    overflow-wrap: anywhere;
  }

  /* "Chegou em 01/11/2026 às 14:44", logo abaixo do nome */
  .card-chegada {
    order: 2;
    display: flex;
    flex: 1 0 100%;
    align-items: center;
    gap: 4px;
    margin-top: -3px;
    font-size: 11.5px;
    color: var(--text-muted);

    .material-symbols-outlined {
      font-size: 14px;
      color: var(--lane-cor, var(--text-muted));
    }
  }

  .card-ultima-nota {
    order: 3;
    margin-top: -5px;
  }
}

/* Linha discreta: avatar pequeno + "Vendedor: Nome" */
.card-vendedor {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  opacity: .85;

  .card-vendedor-avatar {
    display: flex;
    flex: none;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    font-size: 7.5px;
    font-weight: 700;
    color: #fff;
    background: var(--lane-cor, #3b82f6);

    .material-symbols-outlined {
      font-size: 11px;
    }
  }

  .card-vendedor-texto {
    display: flex;
    align-items: baseline;
    gap: 4px;
    min-width: 0;
    font-size: 11.5px;
    line-height: 1.2;
    color: var(--text-muted, #8a8f98);

    small {
      flex: none;
      font-size: inherit;
    }

    small::after {
      content: ":";
    }

    strong {
      overflow: hidden;
      font-weight: 500;
      white-space: nowrap;
      text-overflow: ellipsis;
    }
  }

  &.sem .card-vendedor-avatar {
    color: var(--text-muted, #8a8f98);
    background: color-mix(in srgb, var(--text-muted, #8a8f98) 18%, transparent);
  }
}

/* --------------------------------------------------------------------------
   Recarga do quadro com animação (Pages/Leads/table-component/animacao-quadro.js):
   sem a entrada de colunas e cartões, e a cópia do cartão que voa entre colunas.
   -------------------------------------------------------------------------- */
.kanban-sem-entrada .wrapper-lanes .lanes,
.kanban-sem-entrada .wrapper-lanes .lanes .body-lanes .body-cards .card-lead:not(.is-featured) {
  animation: none;
}

.kanban-sem-entrada .wrapper-lanes .lanes .body-lanes .body-cards .card-lead.is-featured {
  animation: card-premium-giro 6s linear infinite;
}

/* Palco da cópia: mesma estrutura do quadro (o estilo do cartão é aninhado), sem nada visível além do cartão */
.wrapper-lanes.kanban-voo {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: block;
  height: auto;
  padding: 0;
  overflow: visible;
  pointer-events: none;

  .lanes,
  .lanes .body-lanes,
  .lanes .body-lanes .body-cards {
    position: static;
    width: auto;
    min-width: 0;
    height: auto;
    max-height: none;
    padding: 0;
    border: 0;
    background: none;
    box-shadow: none;
    overflow: visible;
    animation: none;
  }

  .lanes::before,
  .lanes::after,
  .lanes .body-lanes::after,
  .lane-mais {
    display: none;
  }

  .lanes .body-lanes .body-cards .card-lead.kanban-voo-cartao {
    position: fixed;
    box-sizing: border-box;
    margin: 0;
    animation: none;
    transition: none;
    will-change: transform;
  }
}

/* --------------------------------------------------------------------------
   Busca, filtro de percepção e ordem acima do quadro (table-component/filtro-quadro.js)
   -------------------------------------------------------------------------- */
.kanban-filtros {
  flex-wrap: wrap;
  gap: 8px 12px;
  margin-bottom: 12px;
}

.kanban-busca {
  flex: 1 1 260px;
  max-width: 420px;
  gap: 6px;
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--color-separator-border);
  border-radius: 999px;
  background: var(--bg-surface);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);

  .material-symbols-outlined {
    font-size: 20px;
    color: var(--text-muted);
  }

  &:focus-within {
    border-color: var(--color-primary-500);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-primary-500) 18%, transparent);
  }
}

.kanban-busca-input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  outline: 0;
  font: inherit;
  font-size: 13.5px;
  color: var(--title-color);
  background: transparent;
}

.kanban-filtro-percepcao {
  flex-wrap: wrap;
  gap: 6px;
}

.kanban-filtro-rotulo {
  font-size: 12px;
  color: var(--text-muted);
}

.kanban-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 28px;
  padding: 0 11px;
  border: 1px solid var(--color-separator-border);
  border-radius: 999px;
  font: inherit;
  font-size: 12.5px;
  color: var(--title-color);
  background: var(--bg-surface);
  cursor: pointer;
  transition: var(--transition-fast);

  &:hover {
    border-color: color-mix(in srgb, var(--color-primary-500) 45%, var(--color-separator-border));
  }

  &[aria-pressed="true"] {
    border-color: var(--color-primary-500);
    color: var(--color-primary-500);
    background: color-mix(in srgb, var(--color-primary-500) 10%, var(--bg-surface));
    font-weight: 600;
  }
}

.kanban-chip-ponto {
  width: 8px;
  height: 8px;
  border-radius: 50%;

  &.quente { background: #ef4444; }
  &.morno { background: #f59e0b; }
  &.frio { background: #3b82f6; }
}

.kanban-ordem {
  gap: 4px;
  height: 28px;
  padding: 0 4px 0 9px;
  border: 1px solid var(--color-separator-border);
  border-radius: 999px;
  background: var(--bg-surface);

  .material-symbols-outlined {
    font-size: 17px;
    color: var(--text-muted);
  }
}

.kanban-ordem-select {
  height: 100%;
  padding-right: 4px;
  border: 0;
  outline: 0;
  font: inherit;
  font-size: 12.5px;
  color: var(--title-color);
  background: transparent;
  cursor: pointer;
}

.kanban-filtro-resumo {
  font-size: 12px;
  color: var(--text-muted);

  &:empty {
    display: none;
  }
}

.kanban-filtro-limpar {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  height: 28px;
  padding: 0 10px 0 6px;
  border: 0;
  border-radius: 999px;
  font: inherit;
  font-size: 12.5px;
  color: var(--color-primary-500);
  background: transparent;
  cursor: pointer;

  .material-symbols-outlined {
    font-size: 16px;
  }

  &:hover {
    background: color-mix(in srgb, var(--color-primary-500) 10%, transparent);
  }

  &[hidden] {
    display: none;
  }
}

/* Card que não passa no filtro some da etapa */
.wrapper-lanes .lanes .body-lanes .body-cards .card-lead.kanban-filtrado {
  display: none !important;
}

.kanban-filtro-vazio {
  padding: 14px 8px;
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
}

@media (max-width: 600px) {
  .kanban-busca {
    max-width: none;
    flex-basis: 100%;
  }
}

/* --------------------------------------------------------------------------
   Card compacto (2026-11-20): tudo menor, WhatsApp junto dos ícones do topo,
   sem rodapé de botões. As setas de passar de etapa ficam no meio das laterais
   do card e só aparecem ao passar o mouse (ou com foco pelo teclado).
   -------------------------------------------------------------------------- */
.wrapper-lanes .lanes .body-lanes .body-cards {
  gap: 6px;
  /* Folga lateral para a seta sair um pouco do card sem ser cortada pela rolagem da coluna */
  margin-inline: -10px;
  padding-inline: 10px;

  .card-lead {
    padding: 9px 12px 8px 14px;
    /* Linha de separação do card: fina, na cor da etapa, sumindo nas pontas */
    --card-linha: linear-gradient(90deg, transparent, color-mix(in srgb, var(--lane-cor, var(--color-separator-border)) 38%, var(--color-separator-border)) 14%, color-mix(in srgb, var(--lane-cor, var(--color-separator-border)) 38%, var(--color-separator-border)) 86%, transparent) top / 100% 1px no-repeat;

    .info-card {
      gap: .4rem;
      /* a luz e o texto continuam presos ao card; as setas ficam fora deste bloco */
    }

    .head-info-card {
      row-gap: 3px;

      /* Linha entre os ícones do topo e o nome */
      .title-card {
        padding-top: 6px;
        font-size: .9rem;
        background: var(--card-linha);
      }

      .card-chegada {
        margin-top: -1px;
        font-size: 11px;

        .material-symbols-outlined {
          font-size: 13px;
        }
      }

      .card-ultima-nota {
        margin-top: -2px;
      }

      .button-card-menu,
      .button-card-notas {
        width: 24px;
        height: 24px;
        margin-left: .15rem;

        .icon-card-menu {
          font-size: 17px;
        }
      }

      /* WhatsApp: abre a conversa (antes ficava no rodapé) */
      .card-wa {
        display: flex;
        flex: none;
        align-items: center;
        justify-content: center;
        width: 24px;
        height: 24px;
        border-radius: 50%;
        font-size: 15px;
        color: var(--icon-default-color);
        background: var(--bg-app);
        cursor: pointer;
        transition: var(--transition-fast);

        &:hover {
          color: #fff;
          background: #25d366;
        }
      }
    }

    .card-tag-lead {
      margin-bottom: 0;
      padding: 0 7px;
      font-size: 10px;
      line-height: 1.6;
    }

    /* Linha entre o cabeçalho (nome, chegada, avisos) e os dados */
    .info-card .body-info-card {
      gap: 1px;
      padding-top: 6px;
      background: var(--card-linha);

      .card-resumo-atendimento {
        gap: 1px;
        margin: 0;
        font-size: 12px;
        line-height: 1.35;
      }

      /* A origem vira mais uma linha do resumo */
      .company-name.card-origem {
        align-items: center;
        font-size: 12px;
        line-height: 1.35;
        color: var(--text-main);

        .card-origem-rede {
          width: 13px;
          margin-top: 0;
          font-size: 12px;
        }
      }
    }

    .card-vendedor {
      margin-top: 1px;
      padding-top: 6px;
      background: var(--card-linha);

      .card-vendedor-texto {
        font-size: 11px;
      }
    }

    /* Setas de passar de etapa */
    > .button-step {
      position: absolute;
      top: 50%;
      z-index: 2;
      display: flex;
      align-items: center;
      justify-content: center;
      width: 24px;
      height: 24px;
      padding: 0;
      border: none;
      border-radius: 50%;
      color: #fff;
      background: var(--gradient-btn);
      box-shadow: var(--shadow-btn);
      cursor: pointer;
      opacity: 0;
      pointer-events: none;
      transform: translateY(-50%) scale(.8);
      transition: opacity .15s ease, transform .15s ease, box-shadow var(--transition-fast);

      &.button-step-prev { left: -10px; }
      &.button-step-next { right: -10px; }

      .icon-step {
        font-size: 15px;
      }

      .step-spinner {
        display: none;
        width: 11px;
        height: 11px;
        border: 2px solid rgba(255, 255, 255, .35);
        border-top-color: var(--text-inverse);
        border-radius: 50%;
        animation: kanban-step-spin .6s linear infinite;
      }

      &:hover {
        box-shadow: var(--shadow-btn-hover);
        transform: translateY(-50%) scale(1.08);
      }

      &:disabled {
        cursor: not-allowed;
      }

      /* Movendo o lead: a seta fica visível com o giro até o quadro recarregar */
      &.is-loading {
        opacity: .85;
        cursor: wait;
        transform: translateY(-50%);

        .icon-step { display: none; }
        .step-spinner { display: block; }
      }
    }

    &:hover > .button-step,
    &:focus-within > .button-step,
    > .button-step:focus-visible {
      opacity: 1;
      pointer-events: auto;
      transform: translateY(-50%);
    }

    &:hover > .button-step:hover {
      transform: translateY(-50%) scale(1.08);
    }
  }
}

/* Tela de toque não tem "passar o mouse": as setas ficam sempre à vista */
@media (hover: none) {
  .wrapper-lanes .lanes .body-lanes .body-cards .card-lead > .button-step {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(-50%);
  }
}

/* --------------------------------------------------------------------------
   Barra de filtros no meio da tela (2026-11-20), embaixo dos quadros: busca,
   percepção e ordem juntas e centralizadas; "Incluir lead" fica sozinho à direita.
   -------------------------------------------------------------------------- */
.kanban-filtros {
  position: relative;
  justify-content: center;
  /* reserva o espaço do botão "Incluir lead" dos dois lados, para o grupo ficar no centro da tela */
  padding-inline: 150px;

  .kanban-busca {
    flex: 0 1 385px;
    max-width: 385px;
  }

  /* O botão fica no canto direito, na altura da linha (sem transform: o menu dele abre para baixo) */
  .kanban-acoes-lead {
    position: absolute;
    top: 0;
    bottom: 0;
    right: 0;
    display: flex;
    align-items: center;
    margin-left: 0;
  }
}

/* Tela estreita: volta ao fluxo normal, com o botão no fim */
@media (max-width: 1280px) {
  .kanban-filtros {
    justify-content: flex-start;
    padding-inline: 0;

    .kanban-busca {
      flex: 1 1 260px;
      max-width: 420px;
    }

    .kanban-acoes-lead {
      position: relative;
      top: auto;
      bottom: auto;
      right: auto;
      margin-left: auto;
    }
  }
}

/* --------------------------------------------------------------------------
   Arrastar o card para outra etapa (table-component/arrastar-card.js).
   -------------------------------------------------------------------------- */
.wrapper-lanes .lanes .body-lanes .body-cards .card-lead {
  /* o card que está sendo arrastado fica apagado no lugar de origem */
  &.arrastando {
    opacity: .35;
    transform: none;
  }

  /* solto na coluna nova, esperando a gravação */
  &.movendo {
    opacity: .6;
    animation: none;
  }
}

/* Durante o arrasto os cards não reagem ao mouse (sem setas nem subidinha) */
.wrapper-lanes.kanban-arrastando .card-lead {
  transform: none !important;

  > .button-step {
    opacity: 0 !important;
    pointer-events: none !important;
  }
}

/* Coluna em que o card vai cair: contorno na cor da etapa e o aviso "Solte aqui" no topo */
.wrapper-lanes .lanes.lane-alvo {
  outline: 2px dashed var(--lane-cor);
  outline-offset: -2px;
  background-image: linear-gradient(color-mix(in srgb, var(--lane-cor) 9%, transparent), color-mix(in srgb, var(--lane-cor) 9%, transparent));

  .body-cards::before {
    content: "Solte aqui";
    display: grid;
    flex: none;
    place-items: center;
    height: 44px;
    margin-bottom: 2px;
    border: 1.5px dashed var(--lane-cor);
    border-radius: 12px;
    font-family: var(--font-family-base);
    font-size: 12.5px;
    font-weight: 700;
    color: var(--lane-cor);
    background: color-mix(in srgb, var(--lane-cor) 12%, transparent);
    pointer-events: none;
  }
}

/* ==== _componentes/_kpi.css ==== */
/* ==========================================================================
   KPI / Cards do Dashboard (reutilizável por outras páginas)
   Usa somente os tokens já definidos em _variaveis.css, então acompanha
   automaticamente o tema claro/escuro.
   ========================================================================== */

.dashboard-subtitle {
    color: var(--text-muted);
    font-size: var(--font-size-sm);
    margin: -6px 0 10px 10px;
}

.cards-row {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-bottom: var(--margin-bottom-subcontent);
}

/* ---------------------------- KPI Cards ---------------------------- */

.kpi-card {
    flex: 1 1 220px;
    display: flex;
    align-items: center;
    gap: 12px;
    background-color: var(--bg-surface);
    border: 1px solid var(--color-separator-border);
    border-radius: var(--border-radius-contents);
    box-shadow: var(--box-shadow-reset);
    padding: var(--padding-subcontent);
    transition: transform var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);

    &:hover {
        transform: translateY(-2px);
        border-color: var(--border-hover);
        box-shadow: var(--box-shadow-hover);
    }
}

.kpi-icon {
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    background-color: color-mix(in srgb, var(--color-highlight) 14%, transparent);
    color: var(--color-highlight);

    &.tone-success {
        background-color: color-mix(in srgb, var(--color-success) 16%, transparent);
        color: var(--color-success);
    }

    &.tone-warning {
        background-color: color-mix(in srgb, var(--color-pending) 16%, transparent);
        color: var(--color-pending);
    }

    &.tone-danger {
        background-color: color-mix(in srgb, var(--color-danger) 14%, transparent);
        color: var(--color-danger);
    }

    &.tone-info {
        background-color: color-mix(in srgb, var(--color-info) 16%, transparent);
        color: var(--color-info);
    }

    &.tone-highlight {
        background-color: color-mix(in srgb, var(--color-highlight) 14%, transparent);
        color: var(--color-highlight);
    }
}

.kpi-content {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.kpi-label {
    font-size: var(--font-size-xs);
    color: var(--text-muted);
    font-family: var(--font-family-base);
    white-space: nowrap;
}

.kpi-value {
    font-size: calc(var(--font-size-lg) * 1.15);
    font-family: var(--font-family-heading);
    font-weight: var(--font-weight-500);
    color: var(--title-color);
    line-height: 1.3;
}

.kpi-delta {
    font-size: calc(var(--font-size-xs) * 0.92);
    font-family: var(--font-family-base);
    display: flex;
    align-items: center;
    gap: 2px;
    color: var(--text-muted);

    &.up {
        color: var(--color-success);
    }

    &.down {
        color: var(--color-danger);
    }

    .icon-delta {
        font-size: 13px;
    }
}

/* ---------------------------- Chart / List Cards ---------------------------- */

.chart-card,
.list-card {
    flex: 1 1 380px;
    display: flex;
    flex-direction: column;
    background-color: var(--bg-surface);
    border: 1px solid var(--color-separator-border);
    border-radius: var(--border-radius-contents);
    box-shadow: var(--box-shadow-reset);
    padding: var(--padding-subcontent);
    min-width: 0;
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;

    h3 {
        margin: 0;
        padding: 0;
    }
}

.card-header-titles {
    display: flex;
    flex-direction: column;
}

.card-subtitle {
    font-size: calc(var(--font-size-xs) * 0.92);
    font-family: var(--font-family-base);
    color: var(--text-muted);
}

.card-filter {
    font-size: var(--font-size-xs);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 2px;
    white-space: nowrap;

    .icon {
        font-size: 14px;
        margin: 0;
    }
}

.card-link {
    font-size: var(--font-size-xs);
    color: var(--color-highlight);
    text-decoration: none;
}

.chart-card-body {
    position: relative;
    flex: 1;
    min-height: 220px;
}

.chart-card-body.small {
    min-height: 160px;
}

/* ---------------------------- Legend / Bar list (Segmentos) ---------------------------- */

.legend-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.legend-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.legend-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    flex-shrink: 0;
}

.legend-label {
    font-size: var(--font-size-xs);
    color: var(--text-color);
    width: 100px;
    flex-shrink: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.legend-bar-track {
    flex: 1;
    height: 6px;
    border-radius: 999px;
    background-color: var(--color-blue-50);
    overflow: hidden;
}

.legend-bar-fill {
    height: 100%;
    border-radius: 999px;
}

.legend-value {
    font-size: calc(var(--font-size-xs) * 0.95);
    color: var(--text-muted);
    white-space: nowrap;
    width: 92px;
    text-align: right;
    flex-shrink: 0;
}

/* ---------------------------- Rows list (recentes / atividades) ---------------------------- */

.rows-list {
    display: flex;
    flex-direction: column;
}

.rows-list .row-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid var(--color-separator-border);

    &:last-child {
        border-bottom: none;
        padding-bottom: 0;
    }

    &:first-child {
        padding-top: 0;
    }
}

.row-item-main {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-width: 0;
}

.row-item-title {
    font-size: var(--font-size-xs);
    font-family: var(--font-family-base);
    color: var(--text-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.row-item-sub {
    font-size: calc(var(--font-size-xs) * 0.88);
    color: var(--text-muted);
}

.row-item-end {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    flex-shrink: 0;
}

.tag-segmento {
    display: inline-block;
    font-size: calc(var(--font-size-xs) * 0.85);
    font-family: var(--font-family-base);
    padding: 2px 8px;
    border-radius: 999px;
    white-space: nowrap;
    background-color: color-mix(in srgb, var(--color-highlight) 14%, transparent);
    color: var(--color-highlight);
}

.tag-segmento.tone-success {
    background-color: color-mix(in srgb, var(--color-success) 16%, transparent);
    color: var(--color-success);
}

.tag-segmento.tone-warning {
    background-color: color-mix(in srgb, var(--color-pending) 16%, transparent);
    color: var(--color-pending);
}

.tag-segmento.tone-info {
    background-color: color-mix(in srgb, var(--color-info) 16%, transparent);
    color: var(--color-info);
}

.tag-segmento.tone-danger {
    background-color: color-mix(in srgb, var(--color-danger) 14%, transparent);
    color: var(--color-danger);
}

/* ---------------------------- Activity feed ---------------------------- */

.activity-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 9px 0;
    border-bottom: 1px solid var(--color-separator-border);

    &:last-child {
        border-bottom: none;
        padding-bottom: 0;
    }

    &:first-child {
        padding-top: 0;
    }
}

.activity-icon {
    flex-shrink: 0;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    background-color: color-mix(in srgb, var(--color-success) 16%, transparent);
    color: var(--color-success);

    &.tone-info {
        background-color: color-mix(in srgb, var(--color-info) 16%, transparent);
        color: var(--color-info);
    }

    &.tone-warning {
        background-color: color-mix(in srgb, var(--color-pending) 16%, transparent);
        color: var(--color-pending);
    }
}

.activity-text {
    font-size: var(--font-size-xs);
    font-family: var(--font-family-base);
    color: var(--text-color);
}

.activity-time {
    font-size: calc(var(--font-size-xs) * 0.85);
    color: var(--text-muted);
}

/* ---------------------------- Pipeline de vendas ---------------------------- */

.pipeline-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.pipeline-stage {
    flex: 1 1 90px;
    text-align: center;
    background-color: var(--bg-app);
    border-radius: var(--border-radius-reset);
    padding: 12px 4px;
}

.pipeline-stage-icon {
    width: 38px;
    height: 38px;
    margin: 0 auto 8px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    background-color: color-mix(in srgb, var(--color-highlight) 14%, transparent);
    color: var(--color-highlight);
}

.pipeline-stage-value {
    font-family: var(--font-family-heading);
    font-weight: var(--font-weight-500);
    font-size: var(--font-size-lg);
    color: var(--title-color);
}

.pipeline-stage-label {
    font-size: calc(var(--font-size-xs) * 0.92);
    color: var(--text-muted);
    margin-bottom: 2px;
}

.pipeline-stage-sub {
    font-size: calc(var(--font-size-xs) * 0.85);
    color: var(--text-muted);
}

/* ---------------------------- Stat mini blocks ---------------------------- */

.stat-mini-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.stat-mini {
    flex: 1 1 90px;
    text-align: center;
    background-color: var(--bg-app);
    border-radius: var(--border-radius-reset);
    padding: 10px 6px;
}

.stat-mini-value {
    font-family: var(--font-family-heading);
    font-weight: var(--font-weight-500);
    font-size: var(--font-size-lg);
    color: var(--title-color);
}

.stat-mini-label {
    font-size: calc(var(--font-size-xs) * 0.85);
    color: var(--text-muted);
}

.stat-mini-sub {
    font-size: calc(var(--font-size-xs) * 0.8);
    color: var(--text-muted);
}

/* ---------------------------- Mapa placeholder ---------------------------- */

.map-placeholder {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 220px;
    background-color: var(--bg-app);
    border-radius: var(--border-radius-reset);
    text-align: center;
    padding: 20px;
}

.map-placeholder .map-icon {
    font-size: 56px;
    color: var(--color-highlight);
}

.map-placeholder .map-text {
    font-size: var(--font-size-xs);
    color: var(--text-muted);
}

/* ---------------------------- Alertas / pendências ---------------------------- */

.alert-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid var(--color-separator-border);

    &:last-child {
        border-bottom: none;
        padding-bottom: 0;
    }

    &:first-child {
        padding-top: 0;
    }
}

.alert-icon {
    flex-shrink: 0;
    color: var(--color-pending);
    font-size: 18px;
}

.alert-text {
    display: flex;
    flex-direction: column;
}

.alert-title {
    font-size: var(--font-size-xs);
    color: var(--text-color);
}

.alert-sub {
    font-size: calc(var(--font-size-xs) * 0.85);
    color: var(--text-muted);
}

/* Holofote: brilho azul que segue o mouse (posição vem do SpotlightService) */
.kpi-card,
.chart-card,
.list-card,
.content-table {
    background-image: radial-gradient(380px circle at var(--mx, -999px) var(--my, -999px), var(--spot), transparent 45%);
}

/* Entrada em cascata dos KPIs */
.cards-row .kpi-card {
    animation: kpi-subir .45s cubic-bezier(.2, .8, .2, 1) both;
}

.cards-row .kpi-card:nth-child(2) { animation-delay: .05s; }
.cards-row .kpi-card:nth-child(3) { animation-delay: .1s; }
.cards-row .kpi-card:nth-child(4) { animation-delay: .15s; }
.cards-row .kpi-card:nth-child(5) { animation-delay: .2s; }

@keyframes kpi-subir {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: none; }
}

:root.reduzir-movimento {
    .cards-row .kpi-card { animation: none; }
    .kpi-card:hover { transform: none; }
}

/* ==== _componentes/_footer.css ==== */
/* Rodapé: faixa discreta no tom do trilho */
.footer {
    height: var(--height-footer);
    padding: 0 20px;
    justify-content: center;
    align-items: center;
    background-color: var(--bg-rail);
    border-top: 1px solid var(--color-separator-border);

    .text-footer {
        color: var(--text-reset-color-footer);
        font-size: calc(var(--font-size-sm) * .78);
        line-height: 1rem;
        letter-spacing: .01em;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}

/* ==== _componentes/_header.css ==== */
/* Cabeçalho: barra de vidro com desfoque, botões redondos e a empresa em pílula */
.header {
    position: relative;
    z-index: 77700;
    justify-content: space-between;
    align-items: center;
    padding: 0 14px 0 12px;
    border-bottom: 1px solid var(--border-glass);
    height: var(--height-header);
    background-color: var(--bg-glass-header);
    backdrop-filter: blur(var(--blur-glass)) saturate(1.4);
    -webkit-backdrop-filter: blur(var(--blur-glass)) saturate(1.4);

    .icon {
        width: 38px;
        height: 38px;
        border-radius: 12px;
        display: inline-grid;
        place-items: center;
        font-size: 22px;
        color: var(--text-color);
        margin: 0;
        transition: background-color var(--transition-fast), color var(--transition-fast), transform var(--transition-fast);

        &:hover {
            background-color: var(--bg-chip);
            color: var(--color-accent);
        }
    }

    .content-logotipo {
        align-items: center;
        gap: 6px;

        .icon {
            order: -1;
            margin-right: 6px;
        }
    }

    .content-controllers {
        display: flex;
        align-items: center;
        gap: 2px;
    }


}


/* --------------------------------------------------------------------------
   Logo do cabeçalho: "O" + "mniSky" (mesmos recortes do carregamento).
   O "O" tem uma luz azul que respira; a cada 6 s um brilho atravessa as
   letras e de vez em quando pisca uma estrela perto do "Sky". No hover o "O"
   dá uma volta e o brilho vem na hora. Na primeira página da sessão o nome sai de trás do
   "O" (.header-logo-intro, posta pelo LogoService). --o = altura do "O".
   -------------------------------------------------------------------------- */
.header-logo {
    --o: 20px;
    position: relative;
    display: inline-flex;
    align-items: flex-start;
    height: calc(var(--o) * 1.13);
    cursor: default;
    user-select: none;

    img {
        display: block;
        -webkit-user-drag: none;
    }

    .tema-escuro {
        display: none;
    }

    /* Estrelinha que pisca perto do "Sky" */
    &::after {
        content: "";
        position: absolute;
        right: calc(var(--o) * -.28);
        top: calc(var(--o) * -.22);
        width: calc(var(--o) * .5);
        height: calc(var(--o) * .5);
        background: radial-gradient(circle, #fff 0 22%, #93c5fd 60%);
        clip-path: polygon(50% 0, 60% 40%, 100% 50%, 60% 60%, 50% 100%, 40% 60%, 0 50%, 40% 40%);
        filter: drop-shadow(0 0 3px rgba(96, 165, 250, .9));
        transform: scale(0);
        pointer-events: none;
        animation: logo-estrela 7s ease-in-out 3.5s infinite;
    }
}

:root.dark-theme .header-logo {
    .tema-claro { display: none; }
    .tema-escuro { display: block; }
}

.header-logo-o {
    position: relative;
    z-index: 2;
    width: var(--o);
    height: var(--o);
    flex-shrink: 0;

    img {
        width: 100%;
        height: 100%;
    }

    /* Luz azul respirando atrás do "O" */
    &::before {
        content: "";
        position: absolute;
        inset: -35%;
        z-index: -1;
        border-radius: 50%;
        background: radial-gradient(circle, rgba(96, 165, 250, .45), transparent 65%);
        animation: logo-o-respira 4.5s ease-in-out infinite;
    }
}

.header-logo-nome {
    position: relative;
    margin-left: calc(var(--o) * .07);
    width: calc(var(--o) * 4.52);

    img {
        width: 100%;
        height: auto;
    }

    /* Brilho que atravessa só as letras (recortado pela máscara do nome) */
    &::after {
        content: "";
        position: absolute;
        inset: 0;
        background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, .95) 50%, transparent 65%);
        background-size: 300% 100%;
        background-position: 150% 0;
        -webkit-mask: url("../imagens/Gif/loading-nome-light.png") 0 0 / 100% auto no-repeat;
        mask: url("../imagens/Gif/loading-nome-light.png") 0 0 / 100% auto no-repeat;
        animation: logo-brilho 6s ease-in-out 2s infinite;
    }
}

:root.dark-theme .header-logo-nome {
    &::after {
        -webkit-mask-image: url("../imagens/Gif/loading-nome-dark.png");
        mask-image: url("../imagens/Gif/loading-nome-dark.png");
        background-image: linear-gradient(105deg, transparent 35%, rgba(147, 197, 253, .95) 50%, transparent 65%);
    }
}

/* Hover: o "O" gira e o brilho passa na hora */
.header-logo:hover {
    .header-logo-o img {
        animation: logo-o-gira-hover .8s cubic-bezier(.5, 0, .2, 1);
    }

    .header-logo-nome::after {
        animation: logo-brilho-hover .8s ease-in-out;
    }
}

@keyframes logo-estrela {
    0%, 70%, 100% { transform: scale(0) rotate(0deg); opacity: 0; }
    78% { transform: scale(1) rotate(45deg); opacity: 1; }
    86% { transform: scale(.35) rotate(90deg); opacity: .6; }
    92% { transform: scale(0) rotate(120deg); opacity: 0; }
}

@keyframes logo-o-respira {
    0%, 100% { opacity: .35; transform: scale(.85); }
    50% { opacity: .9; transform: scale(1.1); }
}

@keyframes logo-brilho {
    0%, 84% { background-position: 150% 0; }
    100% { background-position: -50% 0; }
}

@keyframes logo-o-gira-hover {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes logo-brilho-hover {
    from { background-position: 150% 0; }
    to { background-position: -50% 0; }
}

/* Entrada: o "O" chega girando e o nome sai de trás dele */
.header-logo-intro {
    .header-logo-o img {
        animation: logo-intro-o 1s cubic-bezier(.3, 1.3, .5, 1) both;
    }

    .header-logo-nome {
        animation: logo-intro-caixa 1s cubic-bezier(.7, 0, .2, 1) .25s both;
    }

    .header-logo-nome img {
        animation: logo-intro-nome 1s cubic-bezier(.7, 0, .2, 1) .25s both;
    }
}

@keyframes logo-intro-o {
    from { transform: rotate(-540deg) scale(.3); opacity: 0; }
    to { transform: none; opacity: 1; }
}

@keyframes logo-intro-caixa {
    from { clip-path: inset(0 100% 0 0); }
    to { clip-path: inset(0 0 0 0); }
}

@keyframes logo-intro-nome {
    from { transform: translateX(-100%); opacity: 0; }
    to { transform: none; opacity: 1; }
}

:root.reduzir-movimento {
    .header-logo,
    .header-logo::before,
    .header-logo::after,
    .header-logo *,
    .header-logo *::before,
    .header-logo *::after {
        animation: none !important;
    }

    .header-logo::after {
        display: none;
    }
}

/* Empresa logada, no centro do cabeçalho: selo com as iniciais, rótulo e nome */
.header-empresa {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: min(380px, 38vw);
    padding: 4px 16px 4px 4px;
    border: 1px solid transparent;
    border-radius: 14px;
    background:
        linear-gradient(var(--bg-surface), var(--bg-surface)) padding-box,
        linear-gradient(120deg, var(--border-chip), var(--color-separator-border) 45%, var(--border-chip)) border-box;
    box-shadow: var(--vidro-borda-topo), 0 6px 18px -10px var(--glow);
    pointer-events: none;
    isolation: isolate;
    overflow: hidden;

    /* Reflexo de vidro */
    &::before {
        content: "";
        position: absolute;
        inset: 0;
        z-index: -1;
        background: var(--vidro-reflexo);
        opacity: .6;
    }
}

/* Selo: iniciais da empresa em gradiente, com brilho */
.header-empresa-marca {
    position: relative;
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    border-radius: 10px;
    display: grid;
    place-items: center;
    overflow: hidden;
    font-family: var(--font-family-heading);
    font-size: 12.5px;
    font-weight: 800;
    letter-spacing: .02em;
    color: #fff;
    background: var(--gradient-btn);
    box-shadow: var(--shadow-btn);

    &::after {
        content: "";
        position: absolute;
        inset: 0;
        background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, .45) 50%, transparent 70%);
        transform: translateX(-120%);
        animation: header-marca-brilho 6s ease-in-out 1.2s infinite;
    }
}

@keyframes header-marca-brilho {
    0%, 80% { transform: translateX(-120%); }
    100% { transform: translateX(120%); }
}

.header-empresa-textos {
    display: flex;
    flex-direction: column;
    min-width: 0;
    line-height: 1.15;

    small {
        font-size: 10px;
        font-weight: 700;
        letter-spacing: .08em;
        text-transform: uppercase;
        color: var(--text-muted);
    }
}

.header-empresa-nome {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-family: var(--font-family-heading);
    font-size: 13.5px;
    font-weight: 700;
    color: var(--title-color);
}

/* Usuário logado, à direita dos botões */
.header-usuario {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: 8px;
    padding: 4px 12px 4px 4px;
    border-left: 1px solid var(--color-separator-border);
    padding-left: 12px;
    min-width: 0;
}

.header-usuario-avatar {
    position: relative;
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    border-radius: 50%;
    padding: 2px;
    background: var(--gradient-accent);
    box-shadow: 0 4px 14px -6px var(--glow);

    .img-profile,
    .header-usuario-iniciais {
        width: 100%;
        height: 100%;
        border-radius: 50%;
        border: 2px solid var(--bg-surface);
    }

    .img-profile {
        display: block;
        object-fit: cover;
        background: var(--bg-surface);
    }

    .header-usuario-iniciais {
        display: grid;
        place-items: center;
        font-family: var(--font-family-heading);
        font-size: 12px;
        font-weight: 800;
        color: #fff;
        background: var(--gradient-btn);
    }

    /* Bolinha verde de "online" */
    &::after {
        content: "";
        position: absolute;
        right: 0;
        bottom: 0;
        width: 10px;
        height: 10px;
        border-radius: 50%;
        background: var(--color-success);
        border: 2px solid var(--bg-surface);
    }
}

.header-usuario.com-foto .header-usuario-iniciais {
    display: none;
}

.header-usuario .img-profile[hidden] {
    display: none;
}

.header-usuario-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
    max-width: 160px;
    line-height: 1.2;

    .username {
        overflow: hidden;
        white-space: nowrap;
        text-overflow: ellipsis;
        font-family: var(--font-family-heading);
        font-size: 13.5px;
        font-weight: 700;
        color: var(--title-color);
    }

    .profile {
        font-size: 11.5px;
        color: var(--text-muted);
    }
}

@media (max-width: 1100px) {
    .header-empresa {
        max-width: min(300px, 30vw);
    }

    .header-usuario-info {
        display: none;
    }

    .header-usuario {
        padding-right: 0;
    }
}

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

    .header-logo {
        --o: 17px;
    }

    .header-usuario {
        margin-left: 2px;
        padding-left: 8px;
    }
}

:root.reduzir-movimento {
    .header-empresa-marca::after {
        animation: none;
    }
}

/* Campainha de notificações */
.notif-sino {
    position: relative;
    display: inline-flex;
}

.notif-sino .icon {
    cursor: pointer;
}

.notif-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 9px;
    font-size: 11px;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
    color: #fff;
    background: var(--color-secondary);
    border: 2px solid var(--bg-surface);
    pointer-events: none;
}

.notif-badge[hidden],
.notif-painel[hidden] {
    display: none;
}

.notif-painel {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    z-index: 100001;
    display: flex;
    flex-direction: column;
    width: min(360px, calc(100vw - 24px));
    max-height: min(480px, 70vh);
    border: 1px solid var(--color-separator-border);
    border-radius: 16px;
    color: var(--text-main);
    background: var(--bg-glass-modal);
    backdrop-filter: blur(var(--blur-glass));
    -webkit-backdrop-filter: blur(var(--blur-glass));
    box-shadow: var(--box-shadow-lg);
    animation: notif-entrar .25s cubic-bezier(.2, .8, .2, 1);
    overflow: hidden;
}

.notif-topo {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 12px 14px;
    border-bottom: 1px solid var(--color-separator-border);
}

.notif-todas {
    padding: 0;
    border: 0;
    font: inherit;
    font-size: 12.5px;
    color: var(--color-highlight);
    background: transparent;
    cursor: pointer;
}

.notif-lista {
    overflow-y: auto;
}

.notif-item {
    display: flex;
    gap: 10px;
    width: 100%;
    padding: 12px 14px;
    border: 0;
    border-bottom: 1px solid var(--color-separator-border);
    font: inherit;
    text-align: left;
    color: inherit;
    background: transparent;
    cursor: pointer;
}

.notif-item:hover {
    background: var(--bg-dropface);
}

.notif-item.nova {
    background: color-mix(in srgb, var(--color-highlight) 10%, transparent);
}

.notif-item-icone {
    flex-shrink: 0;
    font-size: 22px;
    color: var(--color-highlight);
}

.notif-item-textos {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    font-size: 13px;
}

.notif-item-textos small {
    color: var(--text-muted);
}

.notif-vazio {
    margin: 0;
    padding: 20px 14px;
    font-size: 13px;
    text-align: center;
    color: var(--text-muted);
}


@keyframes notif-entrar {
    from { opacity: 0; transform: translateY(-6px) scale(.98); }
    to { opacity: 1; transform: none; }
}

:root.reduzir-movimento {
    .notif-painel { animation: none; }
}

/* =====================================================================
   Alerta de retorno (_alerta-retornos.js): janela no meio da tela, em qualquer página
   ===================================================================== */
.alerta-retorno {
  position: fixed;
  inset: 0;
  z-index: 100001;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(0, 0, 0, .55);
  animation: alerta-retorno-fundo .2s ease both;
}

.alerta-retorno-caixa {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: min(420px, 100%);
  padding: 24px 22px 20px;
  border: 1px solid var(--color-separator-border);
  border-radius: 20px;
  background: var(--bg-surface);
  box-shadow: 0 20px 60px rgba(0, 0, 0, .35);
  color: var(--title-color);
  text-align: center;
  animation: alerta-retorno-entrar .3s cubic-bezier(.2, .8, .2, 1) both;

  strong { font-size: 19px; }
}

.alerta-retorno-icone {
  font-size: 46px;
  color: var(--color-primary-500);
  animation: alerta-retorno-tremer 1.2s ease-in-out 2;
}

.alerta-retorno-lead { font-size: 16px; font-weight: 600; }

.alerta-retorno-quando,
.alerta-retorno-outros { color: var(--text-muted); font-size: 13px; }

.alerta-retorno-obs {
  width: 100%;
  margin: 4px 0;
  padding: 8px 10px;
  border-radius: 10px;
  background: var(--bg-body, rgba(0, 0, 0, .04));
  font-size: 14px;
  text-align: left;
  white-space: pre-wrap;
}

.alerta-retorno-adiar,
.alerta-retorno-acoes {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  margin-top: 6px;
}

.alerta-retorno-adiar label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-muted);

  select {
    height: 34px;
    padding: 0 8px;
    border: 1px solid var(--color-separator-border);
    border-radius: 8px;
    background: var(--bg-surface);
    color: var(--title-color);
    font: inherit;
  }
}

.alerta-retorno-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 16px;
  border: 1px solid var(--color-primary-500);
  border-radius: 999px;
  background: var(--color-primary-500);
  color: #fff;
  font: inherit;
  font-weight: 600;
  cursor: pointer;

  .material-symbols-outlined { font-size: 18px; }

  &.secundario {
    background: transparent;
    color: var(--color-primary-500);
  }
}

.notif-item.notif-retorno .notif-item-icone { color: var(--color-primary-500); }

@keyframes alerta-retorno-fundo { from { opacity: 0; } }
@keyframes alerta-retorno-entrar { from { opacity: 0; transform: translateY(12px) scale(.97); } }
@keyframes alerta-retorno-tremer {
  0%, 100% { transform: rotate(0); }
  20%, 60% { transform: rotate(-12deg); }
  40%, 80% { transform: rotate(12deg); }
}

/* --------------------------------------------------------------------------
   Menu da conta: clicar no usuário (canto superior direito) abre "Sair da conta".
   Antes o "Encerrar Sessão" ficava no pé do menu lateral.
   -------------------------------------------------------------------------- */
.header-usuario {
    position: relative;
}

.header-usuario-botao {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    padding: 3px 6px 3px 3px;
    border: 0;
    border-radius: 999px;
    font: inherit;
    text-align: left;
    color: inherit;
    background: transparent;
    cursor: pointer;
    transition: background-color var(--transition-fast);

    &:hover,
    .header-usuario.aberto & {
        background: color-mix(in srgb, var(--color-primary-500) 10%, transparent);
    }

    &:focus-visible {
        outline: 2px solid var(--color-primary-500);
        outline-offset: 2px;
    }
}

.header-usuario-seta {
    font-size: 18px;
    color: var(--text-muted);
    transition: transform .2s ease;

    .header-usuario.aberto & {
        transform: rotate(180deg);
    }
}

.header-usuario-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    z-index: 100001;
    min-width: 190px;
    padding: 6px;
    border: 1px solid var(--color-separator-border);
    border-radius: 14px;
    background: var(--bg-glass-modal);
    backdrop-filter: blur(var(--blur-glass));
    -webkit-backdrop-filter: blur(var(--blur-glass));
    box-shadow: var(--box-shadow-lg);
    animation: notif-entrar .2s cubic-bezier(.2, .8, .2, 1);

    &[hidden] {
        display: none;
    }
}

/* Trocar de empresa: para quem tem cadastro em mais de uma, o selo da empresa é um botão que abre a lista */
.header-empresa-area {
    position: relative;
    display: flex;
    flex-shrink: 1;
    min-width: 0;
}

.header-empresa.header-empresa-trocar {
    padding-right: 8px;
    font: inherit;
    text-align: left;
    color: inherit;
    cursor: pointer;
    pointer-events: auto;
    transition: box-shadow var(--transition-fast), filter var(--transition-fast);

    &:hover,
    &:focus-visible,
    .header-empresa-area.aberto & {
        outline: 0;
        filter: brightness(1.06);
        box-shadow: var(--vidro-borda-topo), 0 0 0 2px color-mix(in srgb, var(--color-highlight) 45%, transparent), 0 6px 18px -10px var(--glow);
    }
}

.header-empresa-seta {
    flex-shrink: 0;
    font-size: 20px;
    color: var(--text-muted);
    transition: transform var(--transition-fast);

    .header-empresa-area.aberto & {
        transform: rotate(180deg);
    }
}

.header-empresa-menu {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    z-index: 100001;
    display: flex;
    flex-direction: column;
    width: max-content;
    min-width: 100%;
    max-width: min(340px, calc(100vw - 24px));
    max-height: min(420px, 70vh);
    padding: 6px;
    overflow-y: auto;
    border: 1px solid var(--color-separator-border);
    border-radius: 14px;
    background: var(--bg-glass-modal);
    backdrop-filter: blur(var(--blur-glass));
    -webkit-backdrop-filter: blur(var(--blur-glass));
    box-shadow: var(--box-shadow-lg);
    animation: notif-entrar .2s cubic-bezier(.2, .8, .2, 1);

    &[hidden] {
        display: none;
    }

    small {
        padding: 6px 12px 4px;
        font-size: 10px;
        font-weight: 700;
        letter-spacing: .08em;
        text-transform: uppercase;
        color: var(--text-muted);
    }
}

.header-empresa-opcao {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 9px 12px;
    border: 0;
    border-radius: 10px;
    font-family: var(--font-family-base);
    font-size: 13.5px;
    font-weight: var(--font-weight-500);
    text-align: left;
    color: var(--text-main);
    background: transparent;
    transition: background-color var(--transition-fast), color var(--transition-fast);

    .material-symbols-outlined {
        flex-shrink: 0;
        font-size: 19px;
    }

    /* O nome inteiro aparece aqui (no selo ele pode estar cortado) */
    span:last-child {
        min-width: 0;
        overflow-wrap: anywhere;
    }

    &.atual {
        font-weight: 700;
        color: var(--title-color);

        .material-symbols-outlined {
            color: var(--color-highlight);
        }
    }
}

button.header-empresa-opcao {
    cursor: pointer;

    &:hover,
    &:focus-visible {
        outline: 0;
        color: var(--color-highlight);
        background-color: color-mix(in srgb, var(--color-highlight) 10%, transparent);
    }

    &:disabled {
        opacity: .55;
        cursor: progress;
    }
}

:root.reduzir-movimento .header-empresa-menu {
    animation: none;
}

.header-usuario-sair {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 9px 12px;
    border: 0;
    border-radius: 10px;
    font-family: var(--font-family-base);
    font-size: 13.5px;
    font-weight: var(--font-weight-500);
    color: var(--text-main);
    background: transparent;
    cursor: pointer;
    transition: background-color var(--transition-fast), color var(--transition-fast);

    .material-symbols-outlined {
        font-size: 19px;
    }

    &:hover,
    &:focus-visible {
        outline: 0;
        color: var(--color-danger);
        background-color: color-mix(in srgb, var(--color-danger) 10%, transparent);
    }
}

:root.reduzir-movimento .header-usuario-menu {
    animation: none;
}

/* --------------------------------------------------------------------------
   Cabeçalho reorganizado (2026-11-20): ☰, logo e a empresa à esquerda; o título
   da página (ícone, nome e descrição) no meio; controles e usuário à direita.
   O bloco de título que ficava no topo de cada página (.content-title) some.
   -------------------------------------------------------------------------- */
.header {
    gap: 14px;

    .content-logotipo,
    .content-controllers {
        flex-shrink: 0;
    }

    .content-controllers {
        margin-left: auto;
    }
}

/* A empresa deixa o centro e fica ao lado do logo */
.header-empresa {
    position: relative;
    left: auto;
    top: auto;
    transform: none;
    flex-shrink: 1;
    min-width: 0;
    max-width: min(260px, 24vw);
}

.header-titulo {
    display: flex;
    flex: 1 1 0;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-width: 0;

    &:has(.header-titulo-nome:empty) {
        visibility: hidden;
    }
}

.header-titulo-icone {
    display: flex;
    flex: none;
    align-items: center;

    /* O ícone vem do menu como <span class="material-symbols-outlined"> ou <i> */
    > * {
        width: auto;
        height: auto;
        font-size: 26px;
        line-height: 1;
        color: var(--color-primary-500);
    }
}

.header-titulo-nome {
    flex: 0 1 auto;
    min-width: 0;
    margin: 0;
    overflow: hidden;
    font-family: var(--font-family-heading);
    font-size: 1.2rem;
    font-weight: 800;
    letter-spacing: -.02em;
    line-height: 1.2;
    white-space: nowrap;
    text-overflow: ellipsis;
    color: var(--title-color);
}

.header-titulo-descricao {
    flex: 0 2 auto;
    min-width: 0;
    margin: 0 0 0 6px;
    padding-left: 16px;
    border-left: 1px solid var(--color-separator-border);
    overflow: hidden;
    font-size: .86rem;
    line-height: 1.6;
    white-space: nowrap;
    text-overflow: ellipsis;
    color: var(--text-muted);

    &:empty {
        display: none;
    }
}

/* O título mora no cabeçalho: a faixa antiga de cada página não aparece mais */
.content > .content-title {
    display: none;
}

@media (max-width: 1280px) {
    .header-titulo-descricao {
        display: none;
    }
}

@media (max-width: 760px) {
    .header-titulo-icone {
        display: none;
    }

    .header-titulo-nome {
        font-size: 1rem;
    }
}

/* Administrador global (Undersky): o perfil no cabeçalho aparece em destaque */
.header-usuario.global .profile {
    font-weight: 700;
    color: var(--color-primary-500);
}

/* =====================================================================
   Reunião aguardando resultado (_alerta-retornos.js): cartão no canto e janela "Como foi a reunião?"
   ===================================================================== */
.reuniao-cobranca {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 100000;
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: min(360px, calc(100vw - 32px));
  padding: 16px;
  border: 1px solid var(--color-separator-border);
  border-radius: 16px;
  background: var(--bg-surface);
  box-shadow: 0 16px 40px rgba(0, 0, 0, .22);
  color: var(--title-color);
  font-family: var(--font-family-base);
  animation: alerta-retorno-entrar .3s cubic-bezier(.2, .8, .2, 1) both;

  header {
    display: flex;
    align-items: flex-start;
    gap: 10px;

    div { display: flex; flex: 1; flex-direction: column; gap: 2px; min-width: 0; }
    strong { font-size: 14.5px; }
    small { font-size: 12px; color: var(--text-muted); }
  }
}

.reuniao-cobranca-icone {
  flex: none;
  padding: 6px;
  border-radius: 10px;
  font-size: 20px;
  color: #ea580c;
  background: rgba(234, 88, 12, .12);
}

.reuniao-cobranca-fechar {
  display: flex;
  padding: 2px;
  border: 0;
  border-radius: 6px;
  color: var(--text-muted);
  background: transparent;
  cursor: pointer;

  &:hover { background: var(--bg-dropface); }
  .material-symbols-outlined { font-size: 18px; }
}

.reuniao-cobranca-corpo {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding-left: 2px;

  strong { font-size: 15px; }
  small { font-size: 12.5px; color: var(--text-muted); overflow-wrap: anywhere; }
}

.reuniao-cobranca-etapa {
  display: inline-flex;
  align-items: center;
  gap: 4px;

  .material-symbols-outlined { font-size: 15px; }
}

.reuniao-cobranca-acoes {
  display: flex;
  gap: 8px;
}

.reuniao-cobranca-btn {
  height: 36px;
  padding: 0 14px;
  border: 1px solid var(--color-separator-border);
  border-radius: 999px;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--title-color);
  background: transparent;
  cursor: pointer;

  &:hover { border-color: var(--color-highlight); }

  &.principal {
    flex: 1;
    border-color: var(--color-highlight);
    color: #fff;
    background: var(--color-highlight);
  }

  &.principal:hover { filter: brightness(1.08); }
}

html.dark-theme .reuniao-cobranca-btn.principal { color: #04101f; }

.reuniao-cobranca-outras {
  font-size: 12px;
  color: var(--text-muted);
}

.alerta-retorno-caixa.reuniao-resultado {
  position: relative;
  align-items: stretch;
  text-align: left;

  > .reuniao-cobranca-fechar { position: absolute; top: 14px; right: 14px; }
  > strong, > .alerta-retorno-lead, > .alerta-retorno-quando { text-align: center; }
}

.reuniao-resultado-opcoes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 8px;
}

.reuniao-resultado-opcao {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--color-separator-border);
  border-radius: 12px;
  font: inherit;
  text-align: left;
  color: var(--title-color);
  background: transparent;
  cursor: pointer;

  &:hover { border-color: var(--color-highlight); background: var(--bg-dropface); }
  &:disabled { opacity: .55; cursor: default; }
  > .material-symbols-outlined { flex: none; font-size: 22px; color: var(--color-highlight); }
  > span:last-child { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
  strong { font-size: 14px; }
  small { font-size: 12px; color: var(--text-muted); }
}

.reuniao-resultado-reagendar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 8px;
  margin-top: 6px;

  &[hidden] { display: none; }

  label {
    display: flex;
    flex: 1 1 180px;
    flex-direction: column;
    gap: 4px;
    font-size: 12.5px;
    color: var(--text-muted);
  }

  input {
    height: 38px;
    padding: 0 10px;
    border: 1px solid var(--color-separator-border);
    border-radius: 10px;
    font: inherit;
    font-size: 14px;
    color: var(--title-color);
    background: var(--bg-input);
  }
}

.reuniao-resultado-erro {
  font-size: 13px;
  color: var(--color-danger);

  &:empty { display: none; }
}

@media (max-width: 480px) {
  .reuniao-resultado-opcoes { grid-template-columns: minmax(0, 1fr); }
}

/* Sino: aviso com botões (lembrete das Minhas notas: adiar ou concluir sem abrir a nota) */
.notif-bloco { display: block; }
.notif-acoes {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 0 14px 10px 46px;
}
.notif-acoes button {
    border: 1px solid var(--border-chip);
    background: var(--bg-chip);
    color: var(--color-accent);
    border-radius: var(--border-radius-pill);
    padding: 3px 10px;
    font-size: .72rem;
    font-weight: 600;
    cursor: pointer;
}
.notif-acoes button:hover { border-color: var(--border-hover); }

/* ==== _componentes/_navbar.css ==== */
/* =====================================================================
   Menu lateral em TRILHO
   - Recolhido (padrão): trilho fino só com ícones; o ativo fica preenchido em azul.
   - Aberto (.show, pelo botão de menu do cabeçalho): painel com os nomes,
     o ativo com fundo de cartão e uma barra azul à esquerda.
   As classes (.navbar, .show, .hidden-elements, .has-children, .open...) são as
   mesmas que o _common.js e o NavbarResponse.php usam.
   ===================================================================== */
.navbar {

    width: var(--width-navbar-rail);
    height: calc(100vh - (var(--height-header) + var(--height-footer)));
    flex-shrink: 0;
    background-color: var(--bg-rail);
    border-right: 1px solid var(--color-separator-border);
    z-index: 77600;
    position: relative;
    transition: width .35s cubic-bezier(.3, .8, .2, 1);
    padding: 12px 10px;
    overflow: hidden;
    display: flex;
    flex-direction: column;


    .ul {
        margin-top: 2px;
        gap: 4px;
        flex: 1 1 auto;
        min-height: 0;
        /* Scroll somente quando os itens excederem a altura, sem exibir a barra */
        overflow-y: auto;
        overflow-x: hidden;
        scrollbar-width: none;
        -ms-overflow-style: none;

        &::-webkit-scrollbar {
            display: none;
        }

        > .li {
            flex-shrink: 0;
        }

        .li {

            .link {
                position: relative;
                gap: 12px;
                color: var(--text-color);
                padding: 10px 12px;
                border-radius: 12px;
                font-family: var(--font-family-base);
                font-weight: var(--font-weight-500);
                overflow: hidden;
                border: 1px solid transparent;
                transition: background-color var(--transition-fast), color var(--transition-fast), box-shadow var(--transition-fast);

                > .material-symbols-outlined:not(.icon-arrow) {
                    font-size: 22px;
                    width: 22px;
                    flex-shrink: 0;
                    display: flex;
                    justify-content: center;
                }

                /* Nome inteiro: quebra em até duas linhas em vez de cortar com "..." */
                .title-link {
                    font-size: 14px;
                    line-height: 1.25;
                    white-space: normal;
                    overflow: hidden;
                    display: -webkit-box;
                    -webkit-line-clamp: 2;
                    -webkit-box-orient: vertical;
                    min-width: 0;
                }

                &:hover {
                    background-color: var(--bg-chip);
                    color: var(--title-color);
                }

                &.active {
                    background-color: var(--bg-surface);
                    color: var(--title-color);
                    border-color: var(--color-separator-border);
                    box-shadow: inset 3px 0 0 var(--color-accent), var(--box-shadow-reset);

                    > .material-symbols-outlined {
                        color: var(--color-accent);
                    }
                }
            }
        }

        /* Grupo colapsável (dropdown) para itens com "children" */
        .li.has-children {

            .link.dropdown-toggle {
                cursor: pointer;

                .icon-arrow {
                    margin-left: auto;
                    font-size: 18px;
                    color: var(--text-muted);
                    transition: transform var(--transition-fast);
                }
            }

            .submenu {
                max-height: 0;
                overflow: hidden;
                margin-top: 0;
                padding-left: 14px;
                transition: max-height .35s ease-in-out;

                .li-nested .link {
                    padding: 8px 12px;

                    .title-link {
                        font-size: 13.5px;
                    }

                    > .material-symbols-outlined {
                        font-size: 19px;
                    }
                }
            }

            /* Grupo com a página aberta dentro: ícone do grupo em azul */
            &:has(.link.active) > .link.dropdown-toggle > .material-symbols-outlined:not(.icon-arrow) {
                color: var(--color-accent);
            }

            &.open {

                .link.dropdown-toggle .icon-arrow {
                    transform: rotate(180deg);
                }

                .submenu {
                    max-height: 600px;
                    margin-top: 2px;
                }
            }
        }
    }

    .hidden-elements {
        opacity: 0;
        pointer-events: none;
        transition: opacity .25s ease;

        &.show {
            pointer-events: auto;
            opacity: 1;
        }
    }


    /* Aberto */
    &.show {
        width: var(--width-navbar);
    }


    /* Recolhido: trilho com o ícone e o nome pequeno embaixo, sempre visível */
    &:not(.show) {
        padding-left: 6px;
        padding-right: 6px;

        .icon-arrow {
            display: none;
        }

        .ul .li .link,
        .content-shutdown .link {
            width: 100%;
            min-height: 58px;
            padding: 8px 2px 7px;
            flex-direction: column;
            justify-content: center;
            gap: 4px;
            border-radius: 14px;
            margin: 0;
            text-align: center;

            > .material-symbols-outlined:not(.icon-arrow),
            > .icon {
                font-size: 22px;
            }

            .title-link {
                display: -webkit-box;
                opacity: 1;
                width: 100%;
                font-size: 10.5px;
                font-weight: 600;
                line-height: 1.2;
                letter-spacing: 0;
                white-space: normal;
                overflow: hidden;
                overflow-wrap: break-word;
                -webkit-line-clamp: 2;
                -webkit-box-orient: vertical;
            }
        }

        .ul .li .link.active {
            background: var(--gradient-btn);
            color: #fff;
            border-color: transparent;
            box-shadow: var(--shadow-btn);

            > .material-symbols-outlined {
                color: #fff;
            }
        }

        /* Os filhos do grupo ficam alinhados com os demais, sem recuo */
        .li.has-children .submenu {
            padding-left: 0;
        }

        .li.has-children.open .submenu {
            padding: 4px 0;
            margin: 2px 0;
            border-radius: 16px;
            background-color: var(--bg-chip);
        }

        .li.has-children .submenu .li-nested .link {
            min-height: 52px;
            padding: 7px 2px 6px;

            .title-link {
                font-size: 10px;
            }
        }
    }


    .content-shutdown {
        flex-shrink: 0;
        width: 100%;
        margin-top: 10px;
        padding-top: 10px;
        border-top: 1px solid var(--color-separator-border);

        .link {
            gap: 12px;
            color: var(--text-color);
            padding: 10px 12px;
            border-radius: 12px;
            font-family: var(--font-family-base);
            font-weight: var(--font-weight-500);
            overflow: hidden;
            transition: background-color var(--transition-fast), color var(--transition-fast);

            &:hover {
                color: var(--color-danger);
                background-color: color-mix(in srgb, var(--color-danger) 10%, transparent);
            }

            .title-link {
                white-space: nowrap;
            }

            .icon {
                margin: 0;
                color: var(--color-danger);
                font-size: 22px;
            }
        }
    }


    /* Classe FullScreen (não usada hoje; mantida para compatibilidade) */
    &.fullmode {
        width: 0;
        position: fixed;
        padding: 0;

        &.show {
            padding: 10px;
            width: 30%;
            min-width: 600px;
        }
    }
}

/* =====================================================================
   Itens com submenu (Marketing, RH, Financeiro...) bem marcados
   - Trilho: selo com a setinha no canto do ícone, "pilha" atrás do botão
     (dá a ideia de que há mais itens dentro) e linha-guia nos filhos.
   - Menu aberto: setinha num círculo, nome em negrito e linha-guia nos filhos.
   ===================================================================== */

/* Menu aberto */
.navbar.show .ul .li.has-children {

    > .link.dropdown-toggle {
        font-weight: 600;

        .icon-arrow {
            width: 22px;
            height: 22px;
            border-radius: 50%;
            display: grid;
            place-items: center;
            font-size: 18px;
            color: var(--color-accent);
            background: var(--bg-chip);
            border: 1px solid var(--border-chip);
        }
    }

    &.open > .link.dropdown-toggle {
        background-color: var(--bg-chip);
        color: var(--title-color);
    }

    .submenu {
        position: relative;
        margin-left: 22px;
        padding-left: 10px;
        border-left: 1px solid var(--border-chip);
    }
}

/* Trilho */
.navbar:not(.show) .ul .li.has-children {

    > .link.dropdown-toggle {
        /* "Pilha": uma segunda placa logo abaixo do botão */
        box-shadow: 0 4px 0 -1px var(--bg-rail), 0 4px 0 0 var(--border-chip);

        /* Selo com a seta apontando para o lado: o submenu abre para a direita */
        .icon-arrow {
            display: grid;
            place-items: center;
            opacity: 1;
            position: absolute;
            top: 5px;
            right: 9px;
            width: 16px;
            height: 16px;
            border-radius: 50%;
            margin: 0;
            font-size: 14px;
            color: #fff;
            background: var(--gradient-btn);
            box-shadow: 0 0 0 2px var(--bg-rail);
            transform: rotate(-90deg);
            transition: transform var(--transition-fast);
        }

        &:hover {
            box-shadow: 0 4px 0 -1px var(--bg-rail), 0 4px 0 0 var(--border-hover);
        }
    }

    /* No trilho o submenu nunca abre dentro da faixa (nem o que ficou salvo como aberto) */
    &.open .submenu,
    .submenu {
        max-height: 0;
        padding: 0;
        margin: 0;
        background: none;
        box-shadow: none;
        /* sem a animação de altura: ao fechar o painel, ele some na hora em vez de encolher dentro do trilho */
        transition: none;
    }

    /* Grupo com o painel lateral aberto */
    &.flyout > .link.dropdown-toggle {
        background-color: var(--bg-chip);
        color: var(--title-color);
        box-shadow: none;

        .icon-arrow {
            transform: rotate(-90deg) scale(1.15);
        }
    }

    /* Painel lateral: posição (left/top/--seta-y) definida pelo LoadItensNavbar no JS */
    &.flyout .submenu {
        position: fixed;
        z-index: 99990;
        width: 270px;
        max-height: calc(100vh - 24px);
        padding: 8px;
        margin: 0;
        overflow: visible;
        border: 1px solid var(--border-chip);
        border-radius: 18px;
        background-color: var(--bg-glass-modal);
        background-image:
            radial-gradient(220px circle at 0% 0%, var(--glow), transparent 70%),
            var(--vidro-reflexo);
        backdrop-filter: blur(var(--blur-glass)) saturate(1.4);
        -webkit-backdrop-filter: blur(var(--blur-glass)) saturate(1.4);
        box-shadow: var(--vidro-borda-topo), 0 30px 70px -24px var(--glow), var(--box-shadow-lg);
        /* sem a animação de altura do menu: o JS precisa da altura real para posicionar */
        transition: none;
        transform-origin: 0 var(--seta-y, 24px);
        animation: flyout-abrir .32s cubic-bezier(.2, .8, .2, 1) both;

        /* Setinha apontando para o botão do grupo */
        &::after {
            content: "";
            position: absolute;
            left: -7px;
            top: var(--seta-y, 24px);
            width: 12px;
            height: 12px;
            margin-top: -6px;
            background: var(--bg-glass-modal);
            border-left: 1px solid var(--border-chip);
            border-bottom: 1px solid var(--border-chip);
            border-bottom-left-radius: 3px;
            transform: rotate(45deg);
        }

        /* Cabeçalho: ícone do grupo num quadrado azul, nome e quantidade */
        .flyout-topo {
            align-items: center;
            gap: 10px;
            padding: 6px 8px 10px;
            margin-bottom: 6px;
            border-bottom: 1px solid var(--color-separator-border);
            list-style: none;

            .flyout-topo-icone {
                width: 32px;
                height: 32px;
                flex-shrink: 0;
                border-radius: 10px;
                display: grid;
                place-items: center;
                font-size: 19px;
                color: #fff;
                background: var(--gradient-btn);
                box-shadow: var(--shadow-btn);
            }

            .flyout-topo-textos {
                display: flex;
                flex-direction: column;
                min-width: 0;
            }

            strong {
                font-family: var(--font-family-heading);
                font-size: 14px;
                font-weight: 700;
                letter-spacing: -.01em;
                color: var(--title-color);
            }

            small {
                font-size: 11.5px;
                color: var(--text-muted);
            }
        }

        /* Itens em linha: ícone num quadradinho ao lado do nome */
        .li-nested .link {
            flex-direction: row;
            justify-content: flex-start;
            width: 100%;
            min-height: 0;
            gap: 10px;
            padding: 7px 8px;
            border-radius: 12px;
            text-align: left;
            animation: flyout-item .3s cubic-bezier(.2, .8, .2, 1) both;
            transition: background-color var(--transition-fast), color var(--transition-fast);

            > .material-symbols-outlined {
                width: 30px;
                height: 30px;
                flex-shrink: 0;
                border-radius: 9px;
                display: grid;
                place-items: center;
                font-size: 18px;
                color: var(--color-accent);
                background: var(--bg-chip);
                transition: transform .2s cubic-bezier(.3, 1.4, .5, 1), background var(--transition-fast), color var(--transition-fast);
            }

            .title-link {
                display: block;
                flex: 1;
                font-size: 13.5px;
                font-weight: 500;
                white-space: nowrap;
                overflow: hidden;
                text-overflow: ellipsis;
            }

            /* Setinha que aparece à direita no hover */
            &::after {
                content: "chevron_right";
                font-family: 'Material Symbols Outlined';
                font-size: 18px;
                line-height: 1;
                color: var(--color-accent);
                opacity: 0;
                transform: translateX(-6px);
                transition: opacity var(--transition-fast), transform var(--transition-fast);
            }

            &:hover {
                background-color: var(--bg-chip);
                color: var(--title-color);

                > .material-symbols-outlined {
                    transform: scale(1.08) rotate(-4deg);
                    color: #fff;
                    background: var(--gradient-btn);
                }

                &::after {
                    opacity: 1;
                    transform: none;
                }
            }

            /* Página aberta: linha em destaque */
            &.active {
                color: var(--title-color);
                background: var(--bg-chip);
                box-shadow: inset 0 0 0 1px var(--border-chip);

                > .material-symbols-outlined {
                    color: #fff;
                    background: var(--gradient-btn);
                    box-shadow: var(--shadow-btn);
                }
            }
        }

        .li-nested:nth-child(2) .link { animation-delay: .04s; }
        .li-nested:nth-child(3) .link { animation-delay: .07s; }
        .li-nested:nth-child(4) .link { animation-delay: .1s; }
        .li-nested:nth-child(5) .link { animation-delay: .13s; }
        .li-nested:nth-child(n+6) .link { animation-delay: .16s; }
    }
}

/* Cabeçalho do painel só aparece no trilho */
.navbar .flyout-topo {
    display: none;
}

.navbar:not(.show) .ul .li.has-children.flyout .submenu .flyout-topo {
    display: flex;
}

/* Abre só para o lado: desliza da esquerda, sem desenrolar para baixo */
@keyframes flyout-abrir {
    from { opacity: 0; transform: translateX(-14px); }
    to { opacity: 1; transform: none; }
}

@keyframes flyout-item {
    from { opacity: 0; transform: translateX(-8px); }
    to { opacity: 1; transform: none; }
}

:root.reduzir-movimento {
    .navbar:not(.show) .ul .li.has-children.flyout .submenu,
    .navbar:not(.show) .ul .li.has-children.flyout .submenu .li-nested .link {
        animation: none;
    }
}

/* Celular: o trilho vira uma faixa por cima do conteúdo quando aberto */
@media (max-width: 640px) {
    .navbar {
        width: 0;
        padding: 0;
        border-right: 0;

        &:not(.show) {
            padding: 0;
        }

        &.show {
            position: absolute;
            left: 0;
            top: var(--height-header);
            width: min(280px, 86vw);
            padding: 12px 10px;
            border-right: 1px solid var(--color-separator-border);
            box-shadow: var(--box-shadow-lg);
        }
    }
}

:root.reduzir-movimento {
    .navbar,
    .navbar * {
        transition: none !important;
    }
}

/* Etiqueta com o nome do item quando o menu está recolhido no trilho.
   Fica no body (fora da navbar, que corta o que passa da borda) e é
   posicionada pelo NavbarService.initTooltip(). */
.navbar-tooltip {
    position: fixed;
    z-index: 99999;
    left: 0;
    top: 0;
    padding: 7px 12px;
    border: 1px solid var(--color-separator-border);
    border-radius: 10px;
    background: var(--bg-surface);
    box-shadow: var(--box-shadow-hover);
    color: var(--title-color);
    font-family: var(--font-family-base);
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transform: translate(-4px, -50%);
    transition: opacity .15s ease, transform .15s ease;

    /* Setinha apontando para o ícone */
    &::before {
        content: "";
        position: absolute;
        left: -5px;
        top: 50%;
        width: 8px;
        height: 8px;
        background: inherit;
        border-left: 1px solid var(--color-separator-border);
        border-bottom: 1px solid var(--color-separator-border);
        transform: translateY(-50%) rotate(45deg);
    }

    &.show {
        opacity: 1;
        transform: translate(0, -50%);
    }
}

:root.reduzir-movimento {
    .navbar-tooltip {
        transition: none;
    }
}

/* ==== _componentes/_tables.css ==== */
.content-table {

    background-color: var(--bg-surface);
    padding: var(--padding-subcontent);
    margin-bottom: var(--margin-bottom-subcontent);
    border: 1px solid var(--color-separator-border);
    border-radius: var(--border-radius-contents);
    overflow: auto;
    box-shadow: var(--box-shadow-reset);

    .subcontent-table {
        flex: 1;
        overflow: auto;
        padding: 20px;
    }


    .table {

        width: 100%;
        /* max-width: 1024px; */
        align-items: start;
        border-spacing: unset;

        .thead {
            top: 0px;
            position: sticky;
            background-color: var(--bg-glass);
            backdrop-filter: blur(var(--blur-glass));
            -webkit-backdrop-filter: blur(var(--blur-glass));
        }

        .tbody {

            .tr {
                background-color: var(--bg-surface);
                transition: background-color var(--transition-normal);


                &:nth-child(odd) {
                    background-color: var(--color-blue-50);
                }

                /* Linha em foco: fundo azul translúcido e uma barra azul à esquerda */
                &:hover {
                    background-color: var(--bg-chip);
                    transition: background-color var(--transition-fast);

                    .td {
                        color: var(--title-color);
                        cursor: default;
                    }

                    .td:first-child {
                        box-shadow: inset 3px 0 0 var(--color-accent);
                    }
                }
            }

        }

        .tr {

            .th,
            .td {
                font-family: var(--font-family-base);
                font-weight: lighter;
                color: var(--text-table-color);
                font-size: var(--font-size-sm);
                text-align: left;
                white-space: nowrap;
                font-weight: 400;
            }

            .th {
                padding: 10px 15px;
                vertical-align: top;
                border-radius: var(--border-radius-reset);
                white-space: nowrap;
                font-size: var(--font-size-xs);
                font-weight: 600;
                letter-spacing: .04em;
                text-transform: uppercase;
                color: var(--text-muted);

                &.th-slarger {
                    width: 220px;
                }

                &.th-larger {
                    width: 180px;
                }

                &.th-medium {
                    width: 100px;
                }

                &.th-small {
                    width: 50px;
                }
            }

            .td {
                padding: var(--padding-column-tables);
                /* border-radius: var(--border-radius-reset); */
                border-bottom: 1px solid var(--color-separator-border);

                &.no-border {
                    border: none;

                }


                &.td-sub {

                    .content-sub-table {
                        padding: 10px;
                    }
                }
            }



        }

    }

}

/* Footer Table Content */
.content-footer-table {

    .content-handler-counter {}


    .content-handler-values {

        .info-values {
            margin-left: 20px;

            .text.text-title {
                font-weight: bolder;
                font-size: calc(var(--font-size-sm) * .9);
            }

            .text.text-value {
                font-weight: var(--font-weight-300);
                font-size: calc(var(--font-size-sm) * 1.1);

            }
        }
    }
}

/* ==== _componentes/_login.css ==== */
/* Componentes/login
   Tela de login: painel visual (branding/benefícios) + card de formulário.
   Vive em _componentes para seguir o mesmo padrão dos outros componentes do
   projeto (import feito em Assets/css/style.css). Variáveis específicas ficam
   em Assets/css/_variaveis.css (--gradient-login-visual, --gradient-btn-login,
   --login-visual-bg-image, --color-login-badge-bg, --shadow-login-card,
   --width-login-card, --width-login-visual). */

.login-page-body {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 100vh;
    background-color: var(--bg-app);
}

.login-page {
    flex: 1;
    display: grid;
    grid-template-columns: minmax(500px, var(--width-login-visual)) 1fr;
    align-items: stretch;
}

/* Painel visual (esquerda) */
.login-visual {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 40px;
    padding: 56px;
    background-color: #040508;
    background-image: var(--login-visual-bg-image);
    background-size: cover;
    background-position: center;
    align-items: center;
    border-right: 1px solid #1a1f2c;

    /* Grade fina que some nas bordas */
    &::after {
        content: "";
        position: absolute;
        inset: 0;
        z-index: 0;
        background-image:
            linear-gradient(rgba(148, 163, 184, .06) 1px, transparent 1px),
            linear-gradient(90deg, rgba(148, 163, 184, .06) 1px, transparent 1px);
        background-size: 44px 44px;
        -webkit-mask-image: radial-gradient(ellipse at 50% 45%, #000 20%, transparent 75%);
        mask-image: radial-gradient(ellipse at 50% 45%, #000 20%, transparent 75%);
    }
}

.login-visual__shapes {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;

    /* Manchas de luz azul que flutuam devagar */
    span {
        position: absolute;
        border-radius: 50%;
        filter: blur(60px);
        animation: login-flutuar 14s ease-in-out infinite alternate;
    }

    span:nth-child(1) {
        width: 360px;
        height: 360px;
        top: -120px;
        left: -100px;
        background: rgba(37, 99, 235, .45);
    }

    span:nth-child(2) {
        width: 300px;
        height: 300px;
        bottom: -110px;
        right: -80px;
        background: rgba(96, 165, 250, .28);
        animation-delay: -7s;
    }
}

@keyframes login-flutuar {
    to { transform: translate(40px, 30px) scale(1.1); }
}

.login-visual__content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 32px;
    max-width: 420px;
}

.login-visual__logo {
    height: 34px;
    width: auto;
}

.login-visual__heading h1 {
    font-family: var(--font-family-heading);
    font-size: 1.9rem;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -.03em;
    color: #f5f7fb;
}

.login-visual__heading h1 span {
    display: block;
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.login-visual__heading p {
    margin-top: 12px;
    font-size: .9rem;
    line-height: 1.6;
    color: #a0a8b8;
}

.login-visual__features {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.login-visual__feature {
    display: flex;
    align-items: flex-start;
    gap: 14px;

    h4 {
        font-size: .9rem;
        font-weight: 600;
        color: #f5f7fb;
        margin-bottom: 2px;
    }

    p {
        font-size: .78rem;
        line-height: 1.5;
        color: #7d8597;
    }
}

.login-visual__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background-color: rgba(59, 130, 246, .13);
    border: 1px solid rgba(59, 130, 246, .38);
    color: #93c5fd;
    font-size: 15px;
}

.login-visual__footer {
    margin-top: 8px;
}

.login-visual__divider {
    display: block;
    width: 40px;
    height: 3px;
    margin-bottom: 10px;
    border-radius: 2px;
    background: var(--gradient-accent);
}

.login-visual__footer p {
    font-size: .7rem;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #6b7385;
}

/* Painel do formulário (direita) */
.login-panel {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
    background-color: var(--bg-app);
}

.login-panel__shapes {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;

    span {
        position: absolute;
        border-radius: 50%;
        background: radial-gradient(circle at 30% 30%, rgba(59, 130, 246, .14), rgba(59, 130, 246, 0) 70%);
    }

    span:nth-child(1) {
        width: 220px;
        height: 220px;
        top: -60px;
        right: 8%;
    }

    span:nth-child(2) {
        width: 320px;
        height: 320px;
        bottom: -140px;
        right: -80px;
    }
}

.login-card {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: var(--width-login-card);
    padding: 50px 50px 40px;
    background-color: var(--bg-surface);
    border: 1px solid var(--color-separator-border);
    border-radius: var(--border-radius-card-lg);
    box-shadow: var(--shadow-login-card);
    animation: login-entrar .5s cubic-bezier(.2, .8, .2, 1);
}

@keyframes login-entrar {
    from { opacity: 0; transform: translateY(14px) scale(.99); }
    to { opacity: 1; transform: none; }
}

.login-card__header {
    margin-bottom: 35px;
    text-align: center;
}

.login-card__logo {
    height: 40px;
    width: auto;
    margin-bottom: 20px;
}

.login-card__title {
    font-size: 1.69rem;
    font-weight: 800;
    letter-spacing: -.03em;
    color: var(--title-color);
    margin-bottom: 5px;
}

.login-card__subtitle {
    font-size: 1.09rem;
    color: var(--text-muted);
}

.login-card__form {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.login-field__label {
    display: block;
    margin-bottom: 8px;
    font-family: var(--font-family-base);
    font-size: .94rem;
    font-weight: 600;
    color: var(--text-muted);
}

.login-field__control {
    position: relative;
    display: flex;
    align-items: center;
}

.login-field__icon {
    position: absolute;
    left: 18px;
    font-size: 17px;
    color: var(--text-muted);
    pointer-events: none;
}

.login-field__input {
    width: 100%;
    padding: 15px 18px 15px 50px;
    font-family: var(--font-family-base);
    font-size: 1.09rem;
    color: var(--input-color);
    background-color: var(--bg-input);
    border: 1px solid var(--color-border-inputs);
    border-radius: var(--border-radius-inputs);
    transition: var(--transition-fast);

    &:focus {
        outline: none;
        border-color: var(--color-border-inputs-focus);
        box-shadow: var(--ring-accent);
    }
}

/* Campo de senha reserva espaço à direita para o botão de mostrar/ocultar */
.login-field--password .login-field__input {
    padding-right: 52px;
}

.login-field__toggle {
    position: absolute;
    right: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    color: var(--text-muted);
    background: none;
    border: none;
    cursor: pointer;

    &:hover {
        color: var(--color-accent);
    }
}

.login-card__forgot {
    margin-top: -10px;
    text-align: right;

    a {
        font-family: var(--font-family-base);
        font-size: .94rem;
        color: var(--color-highlight);
        text-decoration: none;

        &:hover {
            text-decoration: underline;
        }
    }
}

.login-card__submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 16px 20px;
    font-family: var(--font-family-base);
    font-size: 1.09rem;
    font-weight: 600;
    color: #ffffff;
    background: var(--gradient-btn-login);
    border: none;
    border-radius: var(--border-radius-inputs);
    box-shadow: var(--shadow-btn);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);

    /* Brilho que atravessa o botão ao passar o mouse */
    &::after {
        content: "";
        position: absolute;
        inset: 0;
        background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .35) 50%, transparent 70%);
        transform: translateX(-120%);
        pointer-events: none;
    }

    &:hover::after {
        animation: btn-brilho .8s ease;
    }

    /* Ícone via ::before (não é nó filho real) para não ser apagado quando o
       TransactionService troca o textContent do botão durante o loading. */
    &::before {
        content: "\f2f6";
        font-family: "Font Awesome 6 Free";
        font-weight: 900;
    }

    &:hover {
        transform: translateY(-1px);
        box-shadow: var(--shadow-btn-hover);
    }

    &:disabled,
    &.transaction-loading {
        cursor: not-allowed;
        opacity: .75;
    }
}

.login-card__divider {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 30px;
    font-family: var(--font-family-base);
    font-size: .94rem;
    color: var(--text-muted);

    &::before,
    &::after {
        content: "";
        flex: 1;
        height: 1px;
        background-color: var(--color-border-inputs);
    }

    a {
        font-family: var(--font-family-base);
        font-weight: 600;
        color: var(--color-highlight);
        text-decoration: none;
        white-space: nowrap;

        &:hover {
            text-decoration: underline;
        }
    }
}

/* Responsividade */
@media (max-width: 992px) {
    .login-page {
        grid-template-columns: minmax(280px, 38%) 1fr;
    }

    .login-visual {
        padding: 44px 32px;
        gap: 32px;
    }

    .login-card {
        padding: 40px 35px 30px;
    }
}

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

    .login-visual {
        padding: 36px 28px;
    }

    .login-visual__content {
        max-width: 100%;
    }

    .login-panel {
        padding: 32px 20px;
    }

    .login-card {
        padding: 35px 30px 25px;
    }
}

@media (max-width: 576px) {
    .login-visual__features,
    .login-visual__footer {
        display: none;
    }

    .login-visual {
        padding: 28px 20px;
        gap: 20px;
    }

    .login-visual__heading h1 {
        font-size: 1.4rem;
    }

    .login-card {
        padding: 30px 22px 22px;
    }

    .login-card__title {
        font-size: 1.44rem;
    }
}

:root.reduzir-movimento {
    .login-visual__shapes span,
    .login-card,
    .login-card__submit::after {
        animation: none !important;
    }
}

/* ==== _componentes/_validacao.css ==== */
/* Avisos dos formulários de cadastro (Assets/javascript/_validacao.service.js) */

.campo-invalido,
.content-input-affix:has(.campo-invalido),
.content-cep-group:has(.campo-invalido) .input {
    border-color: var(--color-danger) !important;
}

.campo-invalido:focus {
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--color-danger) 25%, transparent) !important;
}

.campo-aviso {
    display: flex;
    align-items: flex-start;
    gap: 4px;
    max-width: 280px;
    margin-top: 4px;
    font-size: var(--font-size-xs);
    line-height: 1.3;
    color: var(--color-danger);
}

.campo-aviso::before {
    content: "\f06a";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 0.7rem;
    line-height: 1.3;
}

.campo-contador {
    align-self: flex-end;
    margin-top: 2px;
    font-size: var(--font-size-xs);
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;

    &.no-limite {
        color: var(--color-danger);
    }
}

/* ==== _componentes/_vidro.css ==== */
/* =====================================================================
   Reflexo de vidro
   - Brilho em diagonal no canto de cima (--vidro-reflexo) e um fio de luz
     na borda de cima (--vidro-borda-topo).
   - Nos cartões, uma faixa de luz atravessa ao passar o mouse.
   Cores em _variaveis.css; nada aqui muda o layout.
   ===================================================================== */

/* Superfícies com o brilho fixo */
.header,
.kpi-card,
.chart-card,
.list-card,
.content-table,
.content-filters,
.modal .sub-modal-content,
.wrapper-lanes .lanes,
.wa-chat,
.wa-card,
.wa-resumo-cartao,
.wa-resumo-bloco,
.login-card {
    --vidro-sombra: var(--vidro-borda-topo);
}

.header,
.content-filters,
.modal .sub-modal-content,
.wa-card,
.wa-resumo-bloco,
.login-card {
    background-image: var(--vidro-reflexo);
    box-shadow: var(--vidro-borda-topo), var(--box-shadow-reset);
}

/* Nos cards com holofote o brilho entra como mais uma camada */
.kpi-card,
.chart-card,
.list-card,
.content-table {
    background-image:
        radial-gradient(380px circle at var(--mx, -999px) var(--my, -999px), var(--spot), transparent 45%),
        var(--vidro-reflexo);
}

.kpi-card:not(:hover),
.chart-card,
.list-card,
.content-table {
    box-shadow: var(--vidro-borda-topo), var(--box-shadow-reset);
}

/* Faixa de luz que atravessa o cartão no hover */
.kpi-card,
.wa-resumo-cartao {
    position: relative;
    overflow: hidden;
}

.kpi-card::before,
.wa-resumo-cartao::before,
.wrapper-lanes .lanes .body-lanes .body-cards .card-lead .info-card::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: -60%;
    width: 45%;
    background: linear-gradient(105deg, transparent, var(--vidro-faixa), transparent);
    transform: skewX(-18deg);
    pointer-events: none;
    opacity: 0;
}

.kpi-card:hover::before,
.wa-resumo-cartao:not(:disabled):hover::before,
.wrapper-lanes .lanes .body-lanes .body-cards .card-lead:hover .info-card::before {
    animation: vidro-faixa .9s ease;
}

@keyframes vidro-faixa {
    0% { left: -60%; opacity: 1; }
    100% { left: 130%; opacity: 1; }
}

:root.reduzir-movimento {
    .kpi-card::before,
    .wa-resumo-cartao::before,
    .wrapper-lanes .lanes .body-lanes .body-cards .card-lead .info-card::before {
        display: none;
    }
}

/* ==== _componentes/_tema.css ==== */
/* ==========================================================================
   Troca de tema: anoitecer (claro -> escuro) e amanhecer (escuro -> claro)
   Camada .tema-ceu criada pelo ThemeService (_common.js) por cima da tela.
   O tema troca no meio da animação, escondido pela cortina de noite ou pela
   luz do sol. --sol-x/--sol-y: centro do botão de tema.
   ========================================================================== */

.tema-ceu {
    --tema-dur: 1.7s;
    position: fixed;
    inset: 0;
    z-index: 2147483000;
    pointer-events: none;
    overflow: hidden;
    contain: strict;

    > div {
        position: absolute;
    }

    > .tema-ceu-cor,
    > .tema-ceu-luz {
        inset: 0;
    }
}

/* Céu do entardecer/alvorada: laranja e rosa subindo do horizonte */
.tema-ceu-cor {
    background:
        radial-gradient(120% 70% at var(--sol-x) 100%, rgba(251, 146, 60, .55), transparent 60%),
        linear-gradient(to top, rgba(249, 115, 22, .45), rgba(236, 72, 153, .28) 35%, rgba(67, 56, 202, .12) 65%, transparent 85%);
    opacity: 0;
}

/* Sol: disco quente com halo */
.tema-ceu-sol {
    left: var(--sol-x);
    top: var(--sol-y);
    width: 120px;
    height: 120px;
    margin: -60px 0 0 -60px;
    border-radius: 50%;
    background: radial-gradient(circle, #fffbeb 0%, #fde68a 35%, #fbbf24 60%, #f97316 100%);
    box-shadow:
        0 0 40px 12px rgba(251, 191, 36, .65),
        0 0 120px 50px rgba(249, 115, 22, .35),
        0 0 260px 120px rgba(251, 146, 60, .18);
    opacity: 0;
}

/* Lua: crescente prateada com brilho, perto do botão de tema */
.tema-ceu-lua {
    left: var(--sol-x);
    top: var(--sol-y);
    width: 90px;
    height: 90px;
    margin: -45px 0 0 -45px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, #ffffff 0%, #f1f5f9 40%, #cbd5e1 75%, #94a3b8 100%);
    box-shadow:
        inset -18px -10px 0 0 rgba(148, 163, 184, .55),
        0 0 30px 8px rgba(226, 232, 240, .55),
        0 0 110px 40px rgba(148, 163, 184, .25);
    opacity: 0;
}

/* Estrelas: um ponto com muitas sombras (geradas no JS) */
.tema-ceu-estrelas {
    left: 0;
    top: 0;
    width: 2px;
    height: 2px;
    border-radius: 50%;
    background: transparent;
    opacity: 0;
}

/* Cortina da noite: desce do topo com a borda de baixo suave */
.tema-ceu-veu {
    left: 0;
    right: 0;
    top: 0;
    height: 160%;
    background: linear-gradient(to bottom, #040508 0%, #0a0f24 45%, #111a3a 62%, rgba(17, 26, 58, 0) 100%);
    transform: translateY(-100%);
}

/* Luz da manhã: abre em círculo a partir do sol */
.tema-ceu-luz {
    background: radial-gradient(circle at var(--sol-x) var(--sol-y), #fffdf5 0%, #fdf6e3 25%, #eef2f7 60%, #e8edf5 100%);
    clip-path: circle(0 at var(--sol-x) var(--sol-y));
    opacity: 0;
}

/* -------------------------------------------------------------- Anoitecer */
.tema-ceu.tema-anoitecer {
    .tema-ceu-cor { animation: ceu-cor-anoitecer var(--tema-dur) ease-in-out both; }
    .tema-ceu-sol { animation: sol-se-pondo var(--tema-dur) cubic-bezier(.45, 0, .55, 1) both; }
    .tema-ceu-veu { animation: veu-cai var(--tema-dur) cubic-bezier(.6, 0, .3, 1) both; }
    .tema-ceu-estrelas { animation: estrelas-surgem var(--tema-dur) ease-out both; }
    .tema-ceu-lua { animation: lua-nascendo var(--tema-dur) cubic-bezier(.3, 0, .3, 1) both; }
    .tema-ceu-luz { display: none; }
}

@keyframes lua-nascendo {
    0%, 35% { opacity: 0; transform: translate(-4vw, 60vh) scale(.8); }
    55% { opacity: 1; }
    75% { opacity: 1; transform: translate(0, 0) scale(1); }
    100% { opacity: 0; transform: translate(0, 0) scale(1.05); }
}

@keyframes ceu-cor-anoitecer {
    0% { opacity: 0; }
    30% { opacity: 1; }
    55% { opacity: .8; }
    100% { opacity: 0; }
}

@keyframes sol-se-pondo {
    0% { opacity: 0; transform: translate(0, 0) scale(.35); }
    12% { opacity: 1; transform: translate(0, 0) scale(1); filter: hue-rotate(0deg); }
    55% { opacity: 1; transform: translate(-6vw, 110vh) scale(1.25); filter: hue-rotate(-18deg) saturate(1.3); }
    100% { opacity: 0; transform: translate(-6vw, 120vh) scale(1.25); }
}

@keyframes veu-cai {
    0%, 12% { transform: translateY(-100%); opacity: 1; }
    52% { transform: translateY(0); opacity: 1; }
    62% { transform: translateY(0); opacity: 1; }
    100% { transform: translateY(0); opacity: 0; }
}

@keyframes estrelas-surgem {
    0%, 40% { opacity: 0; transform: translateY(6px); }
    62% { opacity: 1; transform: none; }
    80% { opacity: .9; }
    100% { opacity: 0; }
}

/* -------------------------------------------------------------- Amanhecer */
.tema-ceu.tema-amanhecer {
    .tema-ceu-cor { animation: ceu-cor-amanhecer var(--tema-dur) ease-in-out both; }
    .tema-ceu-sol { animation: sol-nascendo var(--tema-dur) cubic-bezier(.3, 0, .3, 1) both; }
    .tema-ceu-estrelas { animation: estrelas-somem var(--tema-dur) ease-in both; }
    .tema-ceu-luz { animation: luz-espalha var(--tema-dur) cubic-bezier(.55, 0, .35, 1) both; }
    .tema-ceu-lua { animation: lua-se-pondo var(--tema-dur) cubic-bezier(.45, 0, .55, 1) both; }
    .tema-ceu-veu { display: none; }
}

@keyframes lua-se-pondo {
    0% { opacity: 0; transform: translate(0, 0) scale(.6); }
    10% { opacity: 1; transform: translate(0, 0) scale(1); }
    40% { opacity: 1; transform: translate(-4vw, 60vh) scale(.9); }
    50%, 100% { opacity: 0; transform: translate(-4vw, 70vh) scale(.9); }
}

@keyframes ceu-cor-amanhecer {
    0% { opacity: 0; }
    30% { opacity: 1; }
    60% { opacity: .6; }
    100% { opacity: 0; }
}

@keyframes sol-nascendo {
    0% { opacity: 0; transform: translate(-6vw, 110vh) scale(1.2); filter: hue-rotate(-18deg) saturate(1.3); }
    10% { opacity: 1; }
    45% { opacity: 1; transform: translate(0, 0) scale(1); filter: none; }
    60% { opacity: 1; transform: translate(0, 0) scale(1.6); }
    100% { opacity: 0; transform: translate(0, 0) scale(2.4); }
}

@keyframes estrelas-somem {
    0% { opacity: 1; }
    30% { opacity: 0; transform: translateY(-6px); }
    100% { opacity: 0; }
}

@keyframes luz-espalha {
    0%, 30% { opacity: 0; clip-path: circle(0 at var(--sol-x) var(--sol-y)); }
    36% { opacity: 1; }
    54% { opacity: 1; clip-path: circle(150vmax at var(--sol-x) var(--sol-y)); }
    64% { opacity: 1; clip-path: circle(150vmax at var(--sol-x) var(--sol-y)); }
    100% { opacity: 0; clip-path: circle(150vmax at var(--sol-x) var(--sol-y)); }
}

/* Botão de tema: o ícone gira ao trocar */
#theme-toggle-icon.tema-girando {
    animation: tema-icone-gira .7s cubic-bezier(.3, 1.4, .5, 1);
}

@keyframes tema-icone-gira {
    from { transform: rotate(-120deg) scale(.6); opacity: .3; }
    to { transform: none; opacity: 1; }
}

/* ==== _componentes/_loading.css ==== */
/* ==========================================================================
   Carregamento: o "O" do OmniSky gira e o "mniSky" sai de trás dele e volta.
   Markup gerado pelo LoadingService (_loading.service.js). --o = altura do "O".
   ========================================================================== */

.omni-loader {
    --dur: 2.8s;
    position: relative;
    display: inline-flex;
    align-items: flex-start;
    height: calc(var(--o) * 1.13);

    img {
        display: block;
        user-select: none;
        -webkit-user-drag: none;
    }

    .tema-escuro {
        display: none;
    }
}

:root.dark-theme .omni-loader {
    .tema-claro { display: none; }
    .tema-escuro { display: block; }
}

/* O "O": gira no próprio eixo, com um brilho azul embaixo */
.omni-loader-o {
    position: relative;
    z-index: 2;
    width: var(--o);
    height: var(--o);
    flex-shrink: 0;
    filter: drop-shadow(0 4px 10px rgba(37, 99, 235, .35));

    img {
        width: 100%;
        height: 100%;
        animation: omni-o-gira var(--dur) cubic-bezier(.6, 0, .3, 1) infinite;
    }

    /* Anel de luz pulsando atrás do "O" */
    &::before {
        content: "";
        position: absolute;
        inset: -18%;
        z-index: -1;
        border-radius: 50%;
        background: radial-gradient(circle, rgba(96, 165, 250, .35), transparent 65%);
        animation: omni-o-pulsa var(--dur) ease-in-out infinite;
    }
}

/* O resto do nome: a caixa começa escondida atrás do "O" e abre para a direita */
.omni-loader-nome {
    position: relative;
    z-index: 1;
    display: block;
    overflow: hidden;
    margin-left: calc(var(--o) * -.5);
    padding-left: calc(var(--o) * .57);
    width: calc(var(--o) * .57);
    box-sizing: border-box;
    animation: omni-nome-abre var(--dur) cubic-bezier(.7, 0, .2, 1) infinite;
}

.omni-loader-nome-dentro {
    display: block;
    width: calc(var(--o) * 4.52);
    animation: omni-nome-desliza var(--dur) cubic-bezier(.7, 0, .2, 1) infinite;

    img {
        width: 100%;
        height: auto;
    }
}

/* Gira rápido sozinho, desacelera enquanto o nome aparece e volta a girar quando ele some */
@keyframes omni-o-gira {
    0% { transform: rotate(0deg); }
    22% { transform: rotate(360deg); }
    76% { transform: rotate(450deg); }
    100% { transform: rotate(720deg); }
}

@keyframes omni-o-pulsa {
    0%, 100% { opacity: .4; transform: scale(.85); }
    25% { opacity: 1; transform: scale(1.1); }
    60% { opacity: .55; transform: scale(1); }
}

@keyframes omni-nome-abre {
    0%, 3% { width: calc(var(--o) * .57); }
    24%, 74% { width: calc(var(--o) * 5.09); }
    94%, 100% { width: calc(var(--o) * .57); }
}

@keyframes omni-nome-desliza {
    0%, 3% { transform: translateX(-100%); opacity: 0; }
    24%, 74% { transform: none; opacity: 1; }
    94%, 100% { transform: translateX(-100%); opacity: 0; }
}

/* Sem animação: o logo inteiro parado, com o "O" pulsando de leve */
:root.reduzir-movimento {
    .omni-loader-o img,
    .omni-loader-nome,
    .omni-loader-nome-dentro {
        animation: none;
    }

    .omni-loader-nome {
        width: calc(var(--o) * 5.09);
    }
}

/* ==== _componentes/_minhas-notas.css ==== */
/* =====================================================================
   Minhas notas (_minhas-notas.js): botão no cabeçalho e painel lateral à direita.
   Só variáveis de _variaveis.css, para valer nos temas claro e escuro.
   ===================================================================== */

/* Botão do cabeçalho: igual ao sino */
.notas-botao {
    position: relative;
    display: inline-flex;
}

.notas-botao .icon {
    cursor: pointer;
}

.notas-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 9px;
    font-size: 11px;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
    color: #fff;
    background: var(--color-secondary);
    border: 2px solid var(--bg-surface);
    pointer-events: none;
}

.notas-botao[hidden],
.notas-badge[hidden] {
    display: none;
}

/* ---------------------------------------------------------------- Painel */
/* Fica abaixo do cabeçalho (77700) na altura, mas por cima da página e dos modais (77800); o aviso (toastr, 88899) passa por cima */
.mn-painel {
    position: fixed;
    top: var(--height-header);
    right: 0;
    bottom: 0;
    z-index: 77900;
    display: flex;
    flex-direction: column;
    width: min(480px, 100vw);
    border-left: 1px solid var(--color-separator-border);
    font-family: var(--font-family-base);
    font-size: 14px;
    color: var(--text-main);
    background: var(--bg-surface);
    box-shadow: var(--box-shadow-lg);
    animation: mn-entrar .25s cubic-bezier(.2, .8, .2, 1);
}

.mn-painel[hidden],
.mn-painel [hidden],
.mn-dialogo [hidden] {
    display: none !important;
}

.mn-painel *,
.mn-menu *,
.mn-dialogo-fundo * {
    box-sizing: border-box;
}

.mn-painel .material-symbols-outlined,
.mn-menu .material-symbols-outlined,
.mn-dialogo .material-symbols-outlined {
    font-size: 20px;
    line-height: 1;
}

.mn-topo {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 12px 10px 6px 16px;
}

.mn-titulo {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-family-heading);
    font-size: 17px;
    font-weight: 700;
    letter-spacing: var(--letter-spacing-heading);
    color: var(--text-title);
}

.mn-titulo .material-symbols-outlined {
    color: var(--color-accent);
}

.mn-topo-botoes {
    display: flex;
    align-items: center;
    gap: 2px;
}

/* Botão só com ícone */
.mn-icone {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 0;
    border-radius: var(--border-radius-reset);
    color: var(--text-muted);
    background: transparent;
    cursor: pointer;
    transition: background var(--transition-fast), color var(--transition-fast);
}

.mn-icone:hover,
.mn-icone.ativo {
    color: var(--color-accent);
    background: var(--bg-chip);
}

.mn-aviso {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    padding: 0 16px 10px;
    font-size: 12px;
    color: var(--text-muted);
}

.mn-aviso .material-symbols-outlined {
    font-size: 15px;
}

/* Resumo do dia: sempre à vista, acima das abas */
.mn-resumo {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0 12px 10px;
    padding: 4px 4px 4px 12px;
    border: 1px solid var(--color-separator-border);
    border-radius: var(--border-radius-inputs);
    font-size: 12.5px;
    color: var(--text-muted);
    background: var(--bg-surface-2);
}

.mn-resumo-item {
    display: inline-flex;
    align-items: baseline;
    gap: 5px;
    flex: 1;
    min-width: 0;
    white-space: nowrap;
}

.mn-resumo-item + .mn-resumo-item {
    padding-left: 10px;
    border-left: 1px solid var(--color-separator-border);
}

.mn-resumo-item strong {
    font-family: var(--font-family-heading);
    font-size: 17px;
    color: var(--text-title);
}

.mn-resumo .mn-icone {
    width: 28px;
    height: 28px;
}

.mn-painel .mn-resumo .mn-icone .material-symbols-outlined {
    font-size: 17px;
}

/* Busca */
.mn-busca {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 12px 10px;
    padding: 0 6px 0 12px;
    height: 40px;
    border: 1px solid var(--color-border-inputs);
    border-radius: var(--border-radius-inputs);
    background: var(--bg-input);
}

.mn-busca:focus-within {
    border-color: var(--color-border-inputs-focus);
    box-shadow: var(--ring-accent);
}

.mn-busca > .material-symbols-outlined {
    flex: none;
    color: var(--text-muted);
}

.mn-busca input {
    flex: 1;
    min-width: 0;
    height: 100%;
    padding: 0;
    border: 0;
    outline: 0;
    font: inherit;
    color: var(--text-title);
    background: transparent;
}

.mn-busca input::placeholder {
    color: var(--text-muted);
}

/* ---------------------------------------------------------------- Incluir nota e espaço de escrita */
.mn-incluir {
    margin: 0 12px 10px;
}

.mn-incluir-botao {
    width: 100%;
}

.mn-escrita {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 62vh;
    margin: 0;
    padding: 10px 12px 12px;
    border: 1px solid var(--color-border-inputs-focus);
    border-radius: var(--border-radius-contents);
    background: var(--bg-surface-2);
    box-shadow: var(--ring-accent);
    overflow-y: auto;
    scrollbar-width: thin;
}

.mn-e-titulo {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13.5px;
    color: var(--text-title);
}

.mn-e-titulo .material-symbols-outlined {
    color: var(--color-accent);
}

.mn-e-texto {
    width: 100%;
    min-height: 58px;
    max-height: 180px;
    padding: 9px 11px;
    border: 1px solid var(--color-border-inputs);
    border-radius: var(--border-radius-inputs);
    outline: 0;
    font: inherit;
    line-height: 1.45;
    resize: vertical;
    color: var(--text-title);
    background: var(--bg-input);
}

.mn-e-texto:focus,
.mn-e-sub-campo:focus,
.mn-e-data:focus {
    border-color: var(--color-border-inputs-focus);
    box-shadow: var(--ring-accent);
}

.mn-e-texto::placeholder,
.mn-e-sub-campo::placeholder {
    color: var(--text-muted);
}

.mn-e-dica {
    margin-top: -4px;
    font-size: 11.5px;
    color: var(--text-muted);
}

.mn-e-subs {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.mn-e-subs:empty {
    display: none;
}

.mn-e-sub {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-muted);
}

.mn-e-sub-campo,
.mn-e-data {
    height: 30px;
    padding: 0 8px;
    border: 1px solid var(--color-border-inputs);
    border-radius: 8px;
    outline: 0;
    font: inherit;
    font-size: 13px;
    color: var(--text-title);
    background: var(--bg-input);
}

.mn-e-sub-campo {
    flex: 1;
    min-width: 0;
}

:root.dark-theme .mn-e-data,
:root.dark-theme .mn-filtro input {
    color-scheme: dark;
}

.mn-e-linha {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
}

.mn-e-linha > small {
    min-width: 62px;
    font-size: 12px;
    color: var(--text-muted);
}

.mn-e-lembrete {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 10px;
    border: 1px dashed var(--color-separator-border);
    border-radius: var(--border-radius-inputs);
}

.mn-e-lembrete .mn-campo {
    margin: 0;
}

.mn-e-lembrete .mn-dupla {
    gap: 8px;
}

.mn-e-lembrete .mn-caixa {
    height: 34px;
    padding: 0 10px;
}

.mn-e-erro {
    margin: 0;
    padding: 7px 10px;
    border-radius: 8px;
    font-size: 12.5px;
    color: var(--color-danger);
    background: color-mix(in srgb, var(--color-danger) 10%, transparent);
}

.mn-e-pe {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 2px;
}

.mn-e-pe .mn-botao {
    height: 34px;
}

/* Opção em pílula (prioridade, aba, lembrete, sub-item) */
.mn-opcao {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    height: 26px;
    padding: 0 9px;
    border: 1px solid var(--color-separator-border);
    border-radius: var(--border-radius-pill);
    font: inherit;
    font-size: 12px;
    white-space: nowrap;
    color: var(--text-main);
    background: var(--bg-surface);
    cursor: pointer;
}

.mn-painel .mn-opcao .material-symbols-outlined {
    font-size: 15px;
}

.mn-opcao:hover,
.mn-opcao.ativa {
    border-color: var(--border-chip);
    color: var(--color-accent);
    background: var(--bg-chip);
}

.mn-opcao.mn-p1 { border-color: color-mix(in srgb, var(--color-pending) 55%, transparent); }
.mn-opcao.mn-p2 { border-color: color-mix(in srgb, var(--color-danger) 55%, transparent); }

.mn-opcao.ativa {
    font-weight: 700;
}

.mn-opcao.mn-p1.ativa {
    border-color: var(--color-pending);
    color: var(--text-title);
    background: color-mix(in srgb, var(--color-pending) 18%, transparent);
}

.mn-opcao.mn-p2.ativa {
    border-color: var(--color-danger);
    color: var(--color-danger);
    background: color-mix(in srgb, var(--color-danger) 12%, transparent);
}

.mn-opcao:disabled {
    opacity: .6;
    cursor: default;
}

/* Filtro de datas de "Próximos dias" */
.mn-filtro {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin: 0 12px 8px;
    font-size: 12.5px;
    color: var(--text-muted);
}

.mn-painel .mn-filtro > .material-symbols-outlined {
    font-size: 17px;
}

.mn-filtro label {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin: 0;
}

.mn-filtro input {
    width: 128px;
    height: 28px;
    padding: 0 6px;
    border: 1px solid var(--color-border-inputs);
    border-radius: 8px;
    outline: 0;
    font: inherit;
    font-size: 12.5px;
    color: var(--text-title);
    background: var(--bg-input);
}

.mn-filtro input:focus {
    border-color: var(--color-border-inputs-focus);
    box-shadow: var(--ring-accent);
}

/* ---------------------------------------------------------------- Abas */
/* As cinco ficam sempre à vista: se não couberem numa linha, quebram */
.mn-abas {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 10px;
    padding: 2px 12px 8px;
    border-bottom: 1px solid var(--color-separator-border);
}

.mn-aba {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex: none;
    height: 30px;
    padding: 0 8px;
    border: 1px solid var(--color-separator-border);
    border-radius: var(--border-radius-pill);
    font: inherit;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
    color: var(--text-main);
    background: var(--bg-surface-2);
    cursor: pointer;
    user-select: none;
    transition: border-color var(--transition-fast), color var(--transition-fast), background var(--transition-fast);
}

.mn-aba:hover {
    border-color: var(--border-hover);
}

.mn-aba.ativa {
    border-color: var(--border-chip);
    font-weight: 600;
    color: var(--color-accent);
    background: var(--bg-chip);
}

.mn-aba-num {
    min-width: 18px;
    padding: 0 5px;
    border-radius: 9px;
    font-size: 11px;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
    color: var(--text-muted);
    background: var(--color-separator-border);
}

.mn-aba.ativa .mn-aba-num {
    color: var(--color-white);
    background: var(--color-accent);
}

:root.dark-theme .mn-aba.ativa .mn-aba-num {
    color: var(--bg-surface);
}

.mn-aba-campo {
    width: 110px;
    padding: 0;
    border: 0;
    outline: 0;
    font: inherit;
    color: var(--text-title);
    background: transparent;
}

/* ---------------------------------------------------------------- Corpo e lista */
.mn-corpo {
    flex: 1;
    min-height: 0;
    padding: 0 8px 16px;
    overflow-y: auto;
    scrollbar-width: thin;
}

.mn-vazio {
    margin: 0;
    padding: 28px 16px;
    font-size: 13px;
    text-align: center;
    color: var(--text-muted);
}

.mn-lista {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.mn-nota {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 6px;
    padding: 7px 4px 7px 2px;
    border: 1px solid transparent;
    border-left: 3px solid transparent;
    border-radius: var(--border-radius-reset);
    transition: background var(--transition-fast);
}

.mn-nota:hover {
    background: var(--bg-surface-2);
}

/* Cor conforme a prioridade: importante (laranja) e urgente (vermelho) */
.mn-nota.mn-p1 {
    border-left-color: var(--color-pending);
    background: color-mix(in srgb, var(--color-pending) 7%, transparent);
}

.mn-nota.mn-p2 {
    border-left-color: var(--color-danger);
    background: color-mix(in srgb, var(--color-danger) 7%, transparent);
}

.mn-nota.mn-feita {
    border-left-color: transparent;
    background: transparent;
}

.mn-nota.mn-enviando {
    opacity: .6;
}

.mn-nota.mn-destaque {
    border-color: var(--border-chip);
    background: var(--bg-chip);
    box-shadow: var(--ring-accent);
}

.mn-nota.mn-arrastando {
    opacity: .45;
}

/* Editando uma nota, só ela fica na tela (a lista some): o espaço de escrita pode usar a altura toda */
.mn-painel.mn-so-edicao .mn-incluir {
    display: flex;
    flex: 1;
    flex-direction: column;
    min-height: 0;
}

.mn-painel.mn-so-edicao .mn-escrita {
    max-height: 100%;
}

/* Data de inclusão da nota: discreta, depois das outras etiquetas */
.mn-etiqueta.mn-incluida {
    opacity: .8;
}

/* Nota aberta no espaço de escrita */
.mn-nota.mn-em-edicao {
    border-color: var(--border-chip);
    border-left-color: var(--color-accent);
}

/* Linha que mostra onde a nota arrastada vai cair */
.mn-nota.mn-solta-antes::before,
.mn-nota.mn-solta-depois::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    height: 2px;
    border-radius: 2px;
    background: var(--color-accent);
}

.mn-nota.mn-solta-antes::before { top: -3px; }
.mn-nota.mn-solta-depois::after { bottom: -3px; }

.mn-alca {
    flex: none;
    width: 18px;
    margin-top: 2px;
    color: var(--text-muted);
    opacity: 0;
    cursor: grab;
    transition: opacity var(--transition-fast);
}

.mn-alca:active {
    cursor: grabbing;
}

.mn-nota:hover .mn-alca {
    opacity: .7;
}

.mn-alca.mn-alca-vazia {
    cursor: default;
}

/* Caixa de concluir */
.mn-marca {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;
    width: 20px;
    height: 20px;
    margin-top: 1px;
    padding: 0;
    border: 2px solid var(--color-border-strong);
    border-radius: 6px;
    color: transparent;
    background: var(--bg-input);
    cursor: pointer;
    transition: border-color var(--transition-fast), background var(--transition-fast), color var(--transition-fast);
}

.mn-marca .material-symbols-outlined {
    font-size: 16px;
    font-weight: 700;
}

.mn-marca:hover {
    border-color: var(--color-accent);
    color: var(--color-accent);
}

.mn-p1 > .mn-marca { border-color: var(--color-pending); }
.mn-p2 > .mn-marca { border-color: var(--color-danger); }

.mn-feita > .mn-marca {
    border-color: var(--color-success);
    color: var(--color-white);
    background: var(--color-success);
}

.mn-conteudo {
    flex: 1;
    min-width: 0;
}

.mn-texto {
    line-height: 1.45;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    color: var(--text-title);
}

.mn-p2 .mn-texto {
    font-weight: 600;
}

.mn-feita .mn-texto {
    font-weight: 400;
    text-decoration: line-through;
    color: var(--text-muted);
}

.mn-sub-campo {
    width: 100%;
    height: 30px;
    padding: 0 8px;
    border: 1px solid var(--color-border-inputs-focus);
    border-radius: 8px;
    outline: 0;
    font: inherit;
    color: var(--text-title);
    background: var(--bg-input);
    box-shadow: var(--ring-accent);
}

.mn-mais {
    width: 26px;
    height: 26px;
    opacity: 0;
}

.mn-nota:hover .mn-mais,
.mn-mais:focus-visible {
    opacity: 1;
}

/* Etiquetas */
.mn-etiquetas {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 4px;
}

.mn-etiqueta {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    max-width: 100%;
    height: 20px;
    padding: 0 7px;
    border: 1px solid var(--color-separator-border);
    border-radius: var(--border-radius-pill);
    font: inherit;
    font-size: 11.5px;
    line-height: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text-muted);
    background: var(--bg-surface-2);
}

.mn-painel .mn-etiqueta .material-symbols-outlined {
    font-size: 13px;
}

button.mn-etiqueta {
    cursor: pointer;
}

.mn-etiqueta.mn-lembrete,
.mn-etiqueta.mn-onde {
    border-color: var(--border-chip);
    color: var(--color-accent);
    background: var(--bg-chip);
}

/* Selo da nota concluída */
.mn-etiqueta.mn-selo-feita {
    border-color: color-mix(in srgb, var(--color-success) 45%, transparent);
    font-weight: 600;
    color: var(--color-success);
    background: color-mix(in srgb, var(--color-success) 12%, transparent);
}

.mn-etiqueta.mn-atrasada {
    border-color: color-mix(in srgb, var(--color-danger) 45%, transparent);
    font-weight: 600;
    color: var(--color-danger);
    background: color-mix(in srgb, var(--color-danger) 12%, transparent);
}

/* Sub-itens */
.mn-subs {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin: 2px 0 4px 26px;
    padding-left: 6px;
    border-left: 1px dashed var(--color-separator-border);
}

.mn-nota.mn-sub {
    padding-top: 4px;
    padding-bottom: 4px;
    font-size: 13.5px;
}

.mn-sub-novo {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 4px 4px 22px;
    color: var(--text-muted);
}

/* Concluídas hoje, atalho de ontem, títulos de dia (Próximos dias e Concluídas) */
.mn-dobra {
    display: flex;
    align-items: center;
    gap: 4px;
    width: 100%;
    margin-top: 14px;
    padding: 8px 6px;
    border: 0;
    border-top: 1px solid var(--color-separator-border);
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    text-align: left;
    color: var(--text-muted);
    background: transparent;
    cursor: pointer;
}

.mn-dobra:hover {
    color: var(--color-accent);
}

.mn-ontem,
.mn-nota-rodape {
    margin: 12px 8px 0;
    font-size: 12.5px;
    color: var(--text-muted);
}

.mn-link {
    padding: 0;
    border: 0;
    font: inherit;
    font-weight: 600;
    color: var(--color-accent);
    background: transparent;
    cursor: pointer;
}

.mn-link:hover {
    text-decoration: underline;
}

.mn-secao-topo {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
    padding: 0 2px;
    font-size: 15px;
    color: var(--text-title);
}

.mn-dia {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 14px 8px 6px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.mn-painel .mn-dia .material-symbols-outlined {
    font-size: 15px;
}

.mn-dia small {
    padding: 0 6px;
    border-radius: 9px;
    font-size: 11px;
    line-height: 18px;
    background: var(--color-separator-border);
}

/* Rascunho */
.mn-rascunho {
    display: flex;
    flex-direction: column;
    gap: 4px;
    height: 100%;
    padding: 0 4px;
}

.mn-rascunho-campo {
    flex: 1;
    min-height: 200px;
    padding: 12px;
    border: 1px solid var(--color-border-inputs);
    border-radius: var(--border-radius-contents);
    outline: 0;
    font: inherit;
    line-height: 1.5;
    resize: none;
    color: var(--text-title);
    background: var(--bg-input);
}

.mn-rascunho-campo:focus {
    border-color: var(--color-border-inputs-focus);
    box-shadow: var(--ring-accent);
}

.mn-rascunho-estado {
    min-height: 16px;
    font-size: 12px;
    text-align: right;
    color: var(--text-muted);
}

/* Aviso no pé: "Nota apagada — Desfazer" */
.mn-rodape {
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 14px;
    border: 1px solid var(--color-separator-border);
    border-radius: var(--border-radius-contents);
    font-size: 13px;
    color: var(--text-title);
    background: var(--bg-surface-2);
    box-shadow: var(--box-shadow-hover);
    animation: mn-subir .2s ease;
}

.mn-rodape button {
    padding: 0;
    border: 0;
    font: inherit;
    font-weight: 700;
    color: var(--color-accent);
    background: transparent;
    cursor: pointer;
}

/* ---------------------------------------------------------------- Campos e botões (configurações e diálogos) */
.mn-campo {
    display: flex;
    flex-direction: column;
    min-width: 0;
    margin: 0 4px 12px;
}

.mn-dialogo .mn-campo {
    margin: 0;
}

.mn-campo > small,
.mn-grupo-campos > legend {
    display: block;
    margin-bottom: 4px;
    padding: 0;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-title);
}

.mn-caixa,
.mn-campo textarea {
    border: 1px solid var(--color-border-inputs);
    border-radius: var(--border-radius-inputs);
    color: var(--text-title);
    background: var(--bg-input);
}

.mn-caixa {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 40px;
    padding: 0 12px;
}

.mn-caixa:focus-within,
.mn-campo textarea:focus {
    border-color: var(--color-border-inputs-focus);
    box-shadow: var(--ring-accent);
}

.mn-caixa > .material-symbols-outlined {
    flex: none;
    color: var(--text-muted);
}

.mn-caixa input,
.mn-caixa select {
    flex: 1;
    min-width: 0;
    height: 100%;
    padding: 0;
    border: 0;
    outline: 0;
    font: inherit;
    font-size: 14px;
    color: inherit;
    background: transparent;
}

.mn-caixa select {
    cursor: pointer;
}

.mn-caixa select option {
    color: var(--text-title);
    background: var(--bg-surface);
}

:root.dark-theme .mn-caixa input {
    color-scheme: dark;
}

.mn-campo textarea {
    min-height: 70px;
    padding: 10px 12px;
    outline: 0;
    font: inherit;
    font-size: 14px;
    line-height: 1.45;
    resize: vertical;
}

.mn-ajuda {
    margin-top: 4px;
    font-size: 12px;
    color: var(--text-muted);
}

.mn-ajuda:empty {
    display: none;
}

.mn-dupla {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.mn-grupo-campos {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
    margin: 0;
    padding: 10px 12px 12px;
    border: 1px solid var(--color-separator-border);
    border-radius: var(--border-radius-contents);
}

.mn-grupo-campos > legend {
    margin: 0;
    padding: 0 6px;
    color: var(--text-muted);
}

/* Liga/desliga do resumo às 8h */
.mn-chave {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 0 4px;
    padding: 12px;
    border: 1px solid var(--color-separator-border);
    border-radius: var(--border-radius-contents);
    background: var(--bg-surface-2);
    cursor: pointer;
}

.mn-chave input {
    flex: none;
    width: 18px;
    height: 18px;
    margin: 1px 0 0;
    accent-color: var(--color-accent);
    cursor: pointer;
}

.mn-chave span {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.mn-chave strong {
    font-size: 14px;
    color: var(--text-title);
}

.mn-chave small {
    font-size: 12.5px;
    color: var(--text-muted);
}

.mn-botao {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 38px;
    padding: 0 16px;
    border: 1px solid var(--color-separator-border);
    border-radius: var(--border-radius-inputs);
    font: inherit;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--text-title);
    background: var(--bg-surface-2);
    cursor: pointer;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.mn-botao:hover {
    border-color: var(--border-hover);
}

.mn-botao:disabled {
    opacity: .6;
    cursor: default;
}

.mn-botao.mn-principal {
    border-color: transparent;
    color: var(--color-white);
    background: var(--gradient-btn);
    box-shadow: var(--shadow-btn);
}

.mn-botao.mn-principal:hover {
    box-shadow: var(--shadow-btn-hover);
}

.mn-botao.mn-perigo {
    border-color: color-mix(in srgb, var(--color-danger) 40%, transparent);
    color: var(--color-danger);
    background: transparent;
}

/* ---------------------------------------------------------------- Menu da nota */
.mn-menu {
    position: fixed;
    z-index: 77960;
    display: flex;
    flex-direction: column;
    width: 230px;
    padding: 6px;
    border: 1px solid var(--color-separator-border);
    border-radius: 14px;
    font-family: var(--font-family-base);
    font-size: 13.5px;
    color: var(--text-main);
    background: var(--bg-glass-modal);
    backdrop-filter: blur(var(--blur-glass));
    -webkit-backdrop-filter: blur(var(--blur-glass));
    box-shadow: var(--box-shadow-lg);
    animation: mn-subir .15s ease;
}

.mn-menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 8px 10px;
    border: 0;
    border-radius: 9px;
    font: inherit;
    text-align: left;
    color: var(--text-title);
    background: transparent;
    cursor: pointer;
}

.mn-menu-item .material-symbols-outlined {
    font-size: 18px;
    color: var(--text-muted);
}

.mn-menu-item:hover {
    background: var(--bg-chip);
}

.mn-menu-item.mn-perigo,
.mn-menu-item.mn-perigo .material-symbols-outlined {
    color: var(--color-danger);
}

/* ---------------------------------------------------------------- Diálogos (lembrete e "Adicionar às minhas notas") */
.mn-dialogo-fundo {
    position: fixed;
    inset: 0;
    z-index: 77950;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    font-family: var(--font-family-base);
    background: var(--color-modal);
    animation: mn-fundo .2s ease both;
}

.mn-dialogo {
    display: flex;
    flex-direction: column;
    width: min(440px, 100%);
    max-height: calc(100vh - 32px);
    margin: 0;
    border: 1px solid var(--color-separator-border);
    border-radius: 16px;
    font-size: 14px;
    color: var(--text-main);
    background: var(--bg-glass-modal);
    backdrop-filter: blur(var(--blur-glass));
    -webkit-backdrop-filter: blur(var(--blur-glass));
    box-shadow: var(--box-shadow-lg);
    animation: mn-subir .22s cubic-bezier(.2, .8, .2, 1);
    overflow: hidden;
}

.mn-dialogo-topo {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 14px 12px 8px 20px;
    font-family: var(--font-family-heading);
    font-size: 18px;
    color: var(--text-title);
}

.mn-dialogo-corpo {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 6px 20px 12px;
    overflow-y: auto;
}

.mn-dialogo-nota {
    margin: 0;
    padding: 8px 12px;
    border-left: 3px solid var(--color-accent);
    border-radius: 8px;
    font-size: 13.5px;
    overflow-wrap: anywhere;
    color: var(--text-title);
    background: var(--bg-chip);
}

.mn-atalhos {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.mn-atalho {
    height: 32px;
    padding: 0 12px;
    border: 1px solid var(--border-chip);
    border-radius: var(--border-radius-pill);
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    color: var(--color-accent);
    background: var(--bg-chip);
    cursor: pointer;
}

.mn-atalho:hover {
    border-color: var(--color-accent);
}

.mn-dialogo-erro {
    margin: 0 20px 10px;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 13px;
    color: var(--color-danger);
    background: color-mix(in srgb, var(--color-danger) 10%, transparent);
}

.mn-dialogo-pe {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px 16px;
    border-top: 1px solid var(--color-separator-border);
}

.mn-espaco {
    flex: 1;
}

/* ---------------------------------------------------------------- Animações e telas pequenas */
@keyframes mn-entrar {
    from { opacity: 0; transform: translateX(24px); }
    to { opacity: 1; transform: none; }
}

@keyframes mn-subir {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: none; }
}

@keyframes mn-fundo {
    from { opacity: 0; }
}

:root.reduzir-movimento {
    .mn-painel,
    .mn-menu,
    .mn-dialogo,
    .mn-dialogo-fundo,
    .mn-rodape { animation: none; }
}

/* Celular: tela cheia, por cima do cabeçalho; alça e "..." sempre à vista (não há hover) */
@media (max-width: 600px) {
    .mn-painel {
        top: 0;
        width: 100vw;
        border-left: 0;
    }

    .mn-mais {
        opacity: 1;
    }

    .mn-alca {
        display: none;
    }

    .mn-dupla {
        grid-template-columns: minmax(0, 1fr);
    }

    .mn-dialogo-pe {
        flex-wrap: wrap;
    }
}

@media (hover: none) {
    .mn-mais {
        opacity: 1;
    }
}

/* ==== _componentes/_chat-equipe.css ==== */
/* Chat da equipe: o que vale em qualquer página (conversa, linha de canal, barra, janelinhas,
   faixa do celular, menu e diálogos). A disposição da tela cheia fica no style.css da página.
   Camadas: barra e janelinhas (77500) ficam acima da página e abaixo do menu lateral (77600),
   do cabeçalho e dos modais (77700); os diálogos do próprio chat ficam logo acima (77750). */

[class^="ce-"],
[class*=" ce-"] {
    box-sizing: border-box;
}

.ce-pagina [hidden],
.ce-conversa [hidden],
.ce-barra [hidden],
.ce-dialogo [hidden],
.ce-doca[hidden] {
    display: none !important;
}

/* ------------------------------------------------------------ Peças comuns */

.ce-avatar {
    position: relative;
    flex: none;
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: .02em;
    color: var(--color-white);
    background: hsl(var(--ce-matiz, 215) 55% 46%);
    user-select: none;
}

.ce-avatar.geral {
    background: var(--gradient-btn);
}

.ce-avatar .material-symbols-outlined {
    font-size: 22px;
}

.ce-online {
    position: absolute;
    right: -1px;
    bottom: -1px;
    width: 12px;
    height: 12px;
    border: 2px solid var(--bg-surface);
    border-radius: 50%;
    background: var(--text-muted);
}

.ce-online.sim {
    background: var(--color-success);
}

.ce-contador {
    display: inline-grid;
    place-items: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: var(--border-radius-pill);
    font-size: 11.5px;
    font-weight: 700;
    line-height: 1;
    color: var(--color-white);
    background: var(--gradient-btn);
}

.ce-icone {
    flex: none;
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    color: var(--text-muted);
    background: none;
    cursor: pointer;
    text-decoration: none;
    transition: var(--transition-fast);
}

.ce-icone .material-symbols-outlined {
    font-size: 22px;
}

.ce-icone:hover {
    color: var(--color-accent);
    background: var(--bg-chip);
}

.ce-icone.perigo:hover {
    color: var(--color-danger);
    background: color-mix(in srgb, var(--color-danger) 12%, transparent);
}

.ce-enviar {
    flex: none;
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    color: var(--color-white);
    background: var(--gradient-btn);
    cursor: pointer;
    transition: var(--transition-fast);
}

.ce-enviar .material-symbols-outlined {
    font-size: 21px;
}

.ce-enviar:hover {
    box-shadow: var(--shadow-btn);
}

.ce-botao {
    padding: 7px 16px;
    border: 1px solid var(--color-separator-border);
    border-radius: var(--border-radius-pill);
    font: inherit;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--text-main);
    background: var(--bg-surface);
    cursor: pointer;
    transition: var(--transition-fast);
}

.ce-botao:hover {
    border-color: var(--border-hover);
    color: var(--color-accent);
}

.ce-botao.principal {
    border-color: transparent;
    color: var(--color-white);
    background: var(--gradient-btn);
}

.ce-botao.perigo {
    border-color: transparent;
    color: var(--color-white);
    background: var(--color-danger);
}

.ce-botao.principal:hover,
.ce-botao.perigo:hover {
    color: var(--color-white);
    filter: brightness(1.08);
}

.ce-giro {
    flex: none;
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-chip);
    border-top-color: var(--color-accent);
    border-radius: 50%;
    animation: ce-giro .7s linear infinite;
}

@keyframes ce-giro {
    to { transform: rotate(360deg); }
}

/* Carregando, vazio e erro (lista de canais e conversa) */
.ce-estado {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: auto;
    padding: 28px 16px;
    font-size: 13.5px;
    text-align: center;
    color: var(--text-muted);
}

.ce-estado > .material-symbols-outlined {
    font-size: 34px;
    color: var(--color-accent);
}

/* ------------------------------------------------------------ Linha de canal */

.ce-canal {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 9px 10px;
    border: 0;
    border-radius: 12px;
    font: inherit;
    text-align: left;
    color: inherit;
    background: none;
    cursor: pointer;
    transition: background var(--transition-fast);
}

.ce-canal:hover {
    background: var(--bg-surface-2);
}

.ce-canal.ativo {
    background: var(--bg-chip);
}

.ce-canal-meio {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.ce-canal-meio strong,
.ce-canal-meio small {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.ce-canal-meio strong {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-title);
}

.ce-canal-meio small {
    font-size: 12.5px;
    color: var(--text-muted);
}

.ce-canal-lado {
    flex: none;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    min-height: 34px;
}

.ce-canal-lado time {
    font-size: 11px;
    color: var(--text-muted);
}

.ce-canal.nao-lida .ce-canal-meio strong {
    font-weight: 800;
}

.ce-canal.nao-lida .ce-canal-meio small {
    color: var(--text-main);
}

.ce-canal.nao-lida .ce-canal-lado time {
    font-weight: 700;
    color: var(--color-accent);
}

/* ------------------------------------------------------------ Conversa */

.ce-conversa {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
    height: 100%;
    font-family: var(--font-family-base);
    background: var(--bg-surface-2);
}

.ce-msgs {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    padding: 12px 14px 10px;
    overflow-x: hidden;
    overflow-y: auto;
    outline: none;
}

.ce-msgs > * {
    flex-shrink: 0;
}

.ce-mais,
.ce-inicio {
    display: flex;
    justify-content: center;
    padding: 4px 0 10px;
    font-size: 12px;
    color: var(--text-muted);
}

.ce-dia {
    display: flex;
    justify-content: center;
    margin: 12px 0 4px;
}

.ce-dia span {
    padding: 3px 12px;
    border: 1px solid var(--color-separator-border);
    border-radius: var(--border-radius-pill);
    font-size: 11.5px;
    font-weight: 600;
    color: var(--text-muted);
    background: var(--bg-surface);
}

.ce-msg {
    position: relative;
    display: flex;
    max-width: min(76%, 580px);
    margin-top: 10px;
}

.ce-msg.seguida {
    margin-top: 2px;
}

.ce-msg.in {
    align-self: flex-start;
}

.ce-msg.out {
    align-self: flex-end;
}

.ce-balao {
    min-width: 0;
    max-width: 100%;
    padding: 6px 10px 5px;
    border: 1px solid var(--color-separator-border);
    border-radius: 14px;
    font-size: 14px;
    line-height: 1.42;
    color: var(--text-title);
    background: var(--bg-surface);
    overflow-wrap: anywhere;
}

.ce-msg.in:not(.seguida) .ce-balao {
    border-top-left-radius: 4px;
}

.ce-msg.out .ce-balao {
    border-color: var(--border-chip);
    background: color-mix(in srgb, var(--color-accent) 13%, var(--bg-surface));
}

.ce-msg.out:not(.seguida) .ce-balao {
    border-top-right-radius: 4px;
}

.ce-balao.midia {
    padding: 4px 4px 5px;
}

.ce-balao.midia .ce-texto,
.ce-balao.midia .ce-autor,
.ce-balao.midia .ce-meta,
.ce-balao.midia .ce-fichas {
    padding-inline: 6px;
}

.ce-msg.destaque .ce-balao {
    animation: ce-destaque 1.7s ease;
}

@keyframes ce-destaque {
    15%, 60% { box-shadow: 0 0 0 3px var(--color-accent); }
}

.ce-autor {
    margin-bottom: 1px;
    font-size: 12.5px;
    font-weight: 700;
    color: hsl(var(--ce-matiz, 215) 62% 40%);
}

:root.dark-theme .ce-autor {
    color: hsl(var(--ce-matiz, 215) 72% 70%);
}

.ce-texto {
    white-space: pre-wrap;
}

.ce-texto:empty,
.ce-fichas:empty,
.ce-citacao-area:empty {
    display: none;
}

.ce-texto a {
    color: var(--color-accent);
    text-decoration: underline;
}

.ce-meta {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
    margin-top: 1px;
    font-size: 11px;
    line-height: 1.2;
    color: var(--text-muted);
    user-select: none;
}

.ce-meta i {
    font-style: italic;
}

.ce-tiques {
    display: inline-flex;
    color: var(--text-muted);
}

.ce-tiques .material-symbols-outlined {
    font-size: 15px;
}

.ce-tiques.todos {
    color: var(--color-accent);
}

.ce-apagada {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 13.5px;
    font-style: italic;
    color: var(--text-muted);
}

.ce-apagada .material-symbols-outlined {
    font-size: 17px;
}

/* Citação (mensagem respondida) */
.ce-citacao {
    display: flex;
    flex-direction: column;
    gap: 1px;
    width: 100%;
    min-width: 120px;
    margin-bottom: 4px;
    padding: 4px 8px;
    border: 0;
    border-left: 3px solid var(--color-accent);
    border-radius: 6px;
    font: inherit;
    text-align: left;
    background: color-mix(in srgb, var(--text-muted) 13%, transparent);
    cursor: pointer;
}

.ce-citacao strong {
    font-size: 12px;
    font-weight: 700;
    color: var(--color-accent);
}

.ce-citacao span {
    max-width: 100%;
    overflow: hidden;
    font-size: 12.5px;
    white-space: nowrap;
    text-overflow: ellipsis;
    color: var(--text-main);
}

.ce-citacao span.apagada {
    font-style: italic;
    color: var(--text-muted);
}

/* Arquivos */
.ce-img {
    display: block;
    max-width: 100%;
    padding: 0;
    border: 0;
    background: none;
    cursor: zoom-in;
}

.ce-img img {
    display: block;
    max-width: 100%;
    min-width: 90px;
    min-height: 60px;
    max-height: 300px;
    border-radius: 10px;
    object-fit: cover;
    background: var(--bg-surface-2);
}

.ce-video {
    display: block;
    max-width: 100%;
    max-height: 300px;
    border-radius: 10px;
    background: var(--bg-overlay);
}

.ce-audio {
    display: flex;
    align-items: center;
    gap: 6px;
    max-width: 100%;
}

.ce-audio > .material-symbols-outlined {
    flex: none;
    font-size: 20px;
    color: var(--color-accent);
}

.ce-audio audio {
    flex: 1;
    width: 240px;
    min-width: 0;
    max-width: 100%;
    height: 36px;
}

.ce-audio small {
    flex: none;
    font-size: 11.5px;
    color: var(--text-muted);
}

.ce-audio-nome {
    margin-top: 2px;
    font-size: 12px;
    color: var(--text-muted);
}

.ce-doc {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 190px;
    margin: 2px 0;
    padding: 8px 10px;
    border-radius: 10px;
    color: inherit;
    text-decoration: none;
    background: color-mix(in srgb, var(--text-muted) 12%, transparent);
    transition: var(--transition-fast);
}

.ce-doc:hover {
    background: var(--bg-chip);
}

.ce-doc > .material-symbols-outlined {
    flex: none;
    font-size: 28px;
    color: var(--color-accent);
}

.ce-doc .ce-doc-baixar {
    font-size: 20px;
    color: var(--text-muted);
}

.ce-doc-texto {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.ce-doc-texto strong {
    overflow: hidden;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.ce-doc-texto small {
    font-size: 11.5px;
    color: var(--text-muted);
}

/* Reações em fichas */
.ce-fichas {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 4px;
}

.ce-ficha {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 1px 8px;
    border: 1px solid var(--color-separator-border);
    border-radius: var(--border-radius-pill);
    font: inherit;
    font-size: 13px;
    line-height: 1.5;
    color: var(--text-main);
    background: var(--bg-surface-2);
    cursor: pointer;
}

.ce-ficha b {
    font-size: 11.5px;
    font-weight: 700;
    color: var(--text-muted);
}

.ce-ficha.minha {
    border-color: var(--border-chip);
    background: var(--bg-chip);
}

.ce-ficha.minha b {
    color: var(--color-accent);
}

/* Ações rápidas ao passar o mouse */
.ce-acoes {
    position: absolute;
    top: -32px;
    z-index: 2;
    display: none;
    align-items: center;
    padding: 2px 4px;
    border: 1px solid var(--color-separator-border);
    border-radius: var(--border-radius-pill);
    white-space: nowrap;
    background: var(--bg-surface);
    box-shadow: var(--box-shadow-reset);
}

.ce-msg.in .ce-acoes {
    left: 0;
}

.ce-msg.out .ce-acoes {
    right: 0;
}

.ce-msg:hover .ce-acoes,
.ce-msg:focus-within .ce-acoes {
    display: flex;
}

.ce-acoes button {
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    font-size: 16px;
    line-height: 1;
    color: var(--text-muted);
    background: none;
    cursor: pointer;
    transition: transform var(--transition-fast), background var(--transition-fast);
}

.ce-acoes button:hover {
    color: var(--color-accent);
    background: var(--bg-chip);
}

.ce-acoes .ce-acao-emoji:hover {
    transform: scale(1.2);
}

.ce-acoes .material-symbols-outlined {
    font-size: 19px;
}

/* Tela de toque: não há "passar o mouse"; fica só o botão do menu ao lado do balão */
@media (hover: none) {
    .ce-msg.out {
        flex-direction: row-reverse;
    }

    .ce-acoes,
    .ce-msg:hover .ce-acoes {
        position: static;
        display: flex;
        align-self: center;
        padding: 0;
        border: 0;
        background: none;
        box-shadow: none;
    }

    .ce-acoes .ce-acao-emoji,
    .ce-acoes [data-acao="responder"] {
        display: none;
    }
}

/* Aviso de "solte os arquivos" */
.ce-solta {
    position: absolute;
    inset: 8px;
    z-index: 5;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 2px dashed var(--color-accent);
    border-radius: 14px;
    font-size: 14px;
    font-weight: 600;
    color: var(--color-accent);
    background: color-mix(in srgb, var(--bg-surface) 90%, transparent);
    pointer-events: none;
}

.ce-solta .material-symbols-outlined {
    font-size: 38px;
}

/* Seletor simples de emoji (abre acima do campo) */
.ce-emojis {
    flex: none;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(34px, 1fr));
    gap: 2px;
    max-height: 176px;
    padding: 6px 8px;
    border-top: 1px solid var(--color-separator-border);
    overflow-y: auto;
    background: var(--bg-surface);
}

.ce-emojis button {
    height: 34px;
    padding: 0;
    border: 0;
    border-radius: 8px;
    font-size: 20px;
    line-height: 1;
    background: none;
    cursor: pointer;
}

.ce-emojis button:hover {
    background: var(--bg-chip);
}

/* Lista de marcar pessoas ("@Nome" e "@all"), só em grupo (abre acima do campo) */
.ce-marcar {
    position: relative;
    flex: none;
    display: flex;
    flex-direction: column;
    gap: 1px;
    max-height: 196px;
    padding: 5px 6px;
    border-top: 1px solid var(--color-separator-border);
    overflow-y: auto;
    background: var(--bg-surface);
}

.ce-marcar-item {
    flex: none;
    display: flex;
    align-items: center;
    gap: 9px;
    width: 100%;
    min-width: 0;
    padding: 5px 8px;
    border: 0;
    border-radius: 9px;
    font: inherit;
    font-size: 13.5px;
    text-align: left;
    color: var(--text-title);
    background: none;
    cursor: pointer;
}

.ce-marcar-item > span:last-child {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ce-marcar-item:hover {
    background: var(--bg-surface-2);
}

.ce-marcar-item.ativo {
    background: var(--bg-chip);
    box-shadow: inset 0 0 0 1px var(--border-chip);
}

.ce-marcar .ce-avatar {
    width: 28px;
    height: 28px;
    font-size: 11px;
}

.ce-marcar .ce-avatar .material-symbols-outlined {
    font-size: 18px;
}

/* Marcação dentro da mensagem; "eu": a marcação é de quem está lendo */
.ce-marca {
    font-weight: 600;
    color: var(--color-accent);
}

.ce-marca.eu {
    padding: 0 3px;
    border-radius: 5px;
    background: color-mix(in srgb, var(--color-accent) 18%, transparent);
}

/* Mensagem que marcou quem está lendo */
.ce-msg.marcado .ce-balao {
    border-color: var(--color-accent);
    box-shadow: inset 3px 0 0 var(--color-accent);
    background: color-mix(in srgb, var(--color-accent) 7%, var(--bg-surface));
}

/* Barra "Respondendo a Fulano" / "Editando mensagem" */
.ce-contexto {
    flex: none;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px 6px 12px;
    border-top: 1px solid var(--color-separator-border);
    background: var(--bg-surface);
}

.ce-contexto-icone {
    flex: none;
    font-size: 20px;
    color: var(--color-accent);
}

.ce-contexto-texto {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding-left: 8px;
    border-left: 3px solid var(--color-accent);
}

.ce-contexto-texto strong {
    font-size: 12.5px;
    font-weight: 700;
    color: var(--color-accent);
}

.ce-contexto-texto span {
    overflow: hidden;
    font-size: 12.5px;
    white-space: nowrap;
    text-overflow: ellipsis;
    color: var(--text-muted);
}

.ce-contexto .ce-icone {
    width: 30px;
    height: 30px;
}

/* Campo de mensagem */
.ce-campo {
    flex: none;
    display: flex;
    align-items: flex-end;
    gap: 2px;
    padding: 8px;
    border-top: 1px solid var(--color-separator-border);
    background: var(--bg-surface);
}

.ce-campo .ce-icone {
    width: 38px;
    height: 38px;
}

.ce-campo textarea {
    flex: 1;
    min-width: 0;
    height: 38px;
    max-height: 138px;
    margin: 0 4px;
    padding: 8px 14px;
    border: 1px solid var(--color-border-inputs);
    border-radius: 19px;
    font: inherit;
    font-size: 14px;
    line-height: 20px;
    color: var(--text-title);
    background: var(--bg-input);
    outline: none;
    resize: none;
    overflow-y: hidden;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.ce-campo textarea::placeholder {
    color: var(--text-muted);
}

.ce-campo textarea:focus {
    border-color: var(--color-border-inputs-focus);
    box-shadow: var(--ring-accent);
}

/* Gravando mensagem de voz (toma o lugar do campo) */
.ce-conversa.gravando .ce-campo {
    display: none;
}

.ce-gravando {
    flex: none;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    border-top: 1px solid var(--color-separator-border);
    background: var(--bg-surface);
}

.ce-gravando-ponto {
    flex: none;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--color-danger);
    animation: ce-pulso 1s ease-in-out infinite;
}

@keyframes ce-pulso {
    50% { opacity: .25; }
}

.ce-gravando-tempo {
    font-size: 14px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: var(--text-title);
}

.ce-gravando-dica {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    font-size: 12.5px;
    white-space: nowrap;
    text-overflow: ellipsis;
    color: var(--text-muted);
}

/* Prévia dos anexos (cobre a conversa) */
.ce-previa {
    position: absolute;
    inset: 0;
    z-index: 6;
    display: flex;
    flex-direction: column;
    background: var(--bg-surface);
}

.ce-previa-topo {
    flex: none;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px 6px 6px;
    border-bottom: 1px solid var(--color-separator-border);
}

.ce-previa-topo strong {
    font-size: 14px;
    color: var(--text-title);
}

.ce-previa-estado {
    margin-left: auto;
    font-size: 12px;
    color: var(--color-accent);
}

.ce-previa-palco {
    flex: 1;
    display: grid;
    place-items: center;
    min-height: 0;
    padding: 10px;
    overflow: hidden;
    background: var(--bg-surface-2);
}

.ce-previa-palco img,
.ce-previa-palco video {
    max-width: 100%;
    max-height: 100%;
    border-radius: 10px;
    object-fit: contain;
}

.ce-previa-doc .material-symbols-outlined {
    font-size: 72px;
    color: var(--color-accent);
}

.ce-previa-nome {
    flex: none;
    padding: 6px 12px 0;
    overflow: hidden;
    font-size: 12px;
    text-align: center;
    white-space: nowrap;
    text-overflow: ellipsis;
    color: var(--text-muted);
}

.ce-previa-legenda,
.ce-dialogo-campo input {
    height: 38px;
    padding: 0 14px;
    border: 1px solid var(--color-border-inputs);
    border-radius: 19px;
    font: inherit;
    font-size: 14px;
    color: var(--text-title);
    background: var(--bg-input);
    outline: none;
}

.ce-previa-legenda:focus,
.ce-dialogo-campo input:focus {
    border-color: var(--color-border-inputs-focus);
    box-shadow: var(--ring-accent);
}

.ce-previa-legenda {
    flex: none;
    margin: 8px 10px;
}

.ce-previa-rodape {
    flex: none;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 10px 10px;
}

.ce-previa-tiras {
    flex: 1;
    display: flex;
    gap: 6px;
    min-width: 0;
    padding: 2px;
    overflow-x: auto;
}

.ce-tira {
    position: relative;
    flex: none;
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    padding: 0;
    border: 2px solid transparent;
    border-radius: 9px;
    color: var(--text-muted);
    background: var(--bg-surface-2);
    cursor: pointer;
    overflow: hidden;
}

.ce-tira.ativa {
    border-color: var(--color-accent);
}

.ce-tira img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ce-tira [data-remover] {
    position: absolute;
    top: 0;
    right: 0;
    display: grid;
    place-items: center;
    width: 17px;
    height: 17px;
    padding: 0;
    border: 0;
    border-radius: 0 0 0 7px;
    color: var(--color-white);
    background: var(--bg-overlay);
    cursor: pointer;
}

.ce-tira [data-remover] .material-symbols-outlined {
    font-size: 13px;
}

.ce-tira-mais {
    border: 2px dashed var(--color-separator-border);
}

.ce-tira-mais:hover {
    border-color: var(--color-accent);
    color: var(--color-accent);
}

.ce-previa.enviando .ce-previa-rodape,
.ce-previa.enviando .ce-previa-legenda {
    opacity: .55;
    pointer-events: none;
}

/* ------------------------------------------------------------ Barra e janelinhas (computador) */

.ce-doca {
    position: fixed;
    right: 16px;
    bottom: 0;
    z-index: 77500;
    display: flex;
    flex-direction: row-reverse;
    align-items: flex-end;
    gap: 10px;
    font-family: var(--font-family-base);
    pointer-events: none;
}

.ce-doca > * {
    pointer-events: auto;
}

.ce-barra,
.ce-janela {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--color-separator-border);
    border-bottom: 0;
    border-radius: 14px 14px 0 0;
    background: var(--bg-surface);
    box-shadow: var(--box-shadow-lg);
    overflow: hidden;
}

.ce-barra {
    width: 300px;
}

.ce-barra-topo {
    flex: none;
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    height: 44px;
    padding: 0 10px 0 12px;
    border: 0;
    font: inherit;
    color: var(--text-title);
    background: none;
    cursor: pointer;
}

.ce-barra-topo > .material-symbols-outlined:first-child {
    font-size: 21px;
    color: var(--color-accent);
}

.ce-barra-topo strong {
    font-size: 14px;
    font-weight: 700;
}

.ce-barra-online {
    margin-left: auto;
    font-size: 12px;
    color: var(--text-muted);
}

.ce-barra-online::before {
    content: "";
    display: inline-block;
    width: 8px;
    height: 8px;
    margin-right: 5px;
    border-radius: 50%;
    background: var(--color-success);
}

.ce-barra-seta {
    font-size: 22px;
    color: var(--text-muted);
    transition: transform var(--transition-fast);
}

.ce-barra.aberta .ce-barra-seta {
    transform: rotate(180deg);
}

/* Com .ce-barra na frente para valer mais que o display da .ce-conversas (a lista é as duas coisas) */
.ce-barra .ce-barra-lista {
    display: none;
    max-height: min(430px, calc(100vh - var(--height-header) - 80px));
    padding: 4px;
    border-top: 1px solid var(--color-separator-border);
    overflow-y: auto;
}

.ce-barra.aberta .ce-barra-lista {
    display: flex;
    padding: 0;
    overflow: hidden;
}

.ce-barra-lista .ce-avatar {
    width: 36px;
    height: 36px;
    font-size: 13px;
}

.ce-janela {
    width: 340px;
    height: min(470px, calc(100vh - var(--height-header) - 24px));
}

.ce-janela.min {
    width: 230px;
    height: auto;
}

.ce-janela.min .ce-janela-corpo {
    display: none;
}

.ce-janela-topo {
    flex: none;
    display: flex;
    align-items: center;
    gap: 8px;
    height: 44px;
    padding: 0 4px 0 10px;
    border-bottom: 1px solid var(--color-separator-border);
    cursor: pointer;
    user-select: none;
}

.ce-janela.min .ce-janela-topo {
    border-bottom: 0;
}

.ce-janela-topo .ce-avatar {
    width: 28px;
    height: 28px;
    font-size: 11px;
}

.ce-janela-topo .ce-avatar .material-symbols-outlined {
    font-size: 17px;
}

.ce-janela-topo .ce-online {
    width: 10px;
    height: 10px;
}

.ce-janela-nome {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    font-size: 13.5px;
    font-weight: 700;
    white-space: nowrap;
    text-overflow: ellipsis;
    color: var(--text-title);
}

.ce-janela-topo .ce-icone {
    width: 30px;
    height: 30px;
}

.ce-janela-topo .ce-icone .material-symbols-outlined {
    font-size: 18px;
}

/* Mensagem direta não lida: o cabeçalho pisca */
.ce-janela.piscando .ce-janela-topo {
    animation: ce-pisca 1.1s ease-in-out infinite;
}

@keyframes ce-pisca {
    50% { background: color-mix(in srgb, var(--color-accent) 28%, var(--bg-surface)); }
}

.ce-janela-corpo {
    flex: 1;
    min-height: 0;
}

/* Na janelinha tudo é um pouco mais justo */
.ce-janela .ce-msgs {
    padding: 10px 10px 8px;
}

.ce-janela .ce-msg {
    max-width: 86%;
}

.ce-janela .ce-balao {
    font-size: 13.5px;
}

.ce-janela .ce-audio audio {
    width: 200px;
}

.ce-janela .ce-img img,
.ce-janela .ce-video {
    max-height: 220px;
}

.ce-janela .ce-campo {
    padding: 6px;
}

.ce-janela .ce-campo .ce-icone {
    width: 32px;
}

.ce-janela .ce-campo textarea {
    margin: 0 2px;
    padding-inline: 12px;
}

/* No celular não há barra nem janelinhas */
@media (max-width: 899px) {
    .ce-doca {
        display: none;
    }
}

/* ------------------------------------------------------------ Faixa de aviso (celular) */

.ce-faixa {
    position: fixed;
    top: calc(var(--height-header) + 8px);
    right: 10px;
    left: 10px;
    z-index: 77650;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 10px 10px 12px;
    border: 1px solid var(--border-chip);
    border-radius: 16px;
    font: inherit;
    font-family: var(--font-family-base);
    text-align: left;
    color: var(--text-main);
    background: var(--bg-surface);
    box-shadow: var(--box-shadow-lg);
    cursor: pointer;
    animation: ce-faixa .25s ease;
}

@keyframes ce-faixa {
    from { opacity: 0; transform: translateY(-12px); }
}

.ce-faixa-texto {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.ce-faixa-texto strong {
    font-size: 14px;
    color: var(--text-title);
}

.ce-faixa-texto span {
    overflow: hidden;
    font-size: 13px;
    white-space: nowrap;
    text-overflow: ellipsis;
    color: var(--text-muted);
}

.ce-faixa > .material-symbols-outlined {
    flex: none;
    color: var(--text-muted);
}

/* ------------------------------------------------------------ Menu de contexto */

.ce-menu {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 77760;
    min-width: 210px;
    padding: 4px;
    border: 1px solid var(--color-separator-border);
    border-radius: 14px;
    font-family: var(--font-family-base);
    background: var(--bg-surface);
    box-shadow: var(--box-shadow-lg);
}

.ce-menu-reacoes {
    display: flex;
    justify-content: space-between;
    gap: 2px;
    margin-bottom: 4px;
    padding: 2px 2px 6px;
    border-bottom: 1px solid var(--color-separator-border);
}

.ce-menu-reacoes button {
    width: 34px;
    height: 34px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    font-size: 19px;
    line-height: 1;
    background: none;
    cursor: pointer;
    transition: transform var(--transition-fast);
}

.ce-menu-reacoes button:hover {
    transform: scale(1.18);
    background: var(--bg-surface-2);
}

.ce-menu-reacoes button.ativa {
    background: var(--bg-chip);
    box-shadow: inset 0 0 0 1px var(--border-chip);
}

.ce-menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 8px 10px;
    border: 0;
    border-radius: 9px;
    font: inherit;
    font-size: 13.5px;
    text-align: left;
    color: var(--text-title);
    background: none;
    cursor: pointer;
}

.ce-menu-item .material-symbols-outlined {
    font-size: 19px;
    color: var(--text-muted);
}

.ce-menu-item:hover {
    background: var(--bg-surface-2);
}

.ce-menu-item.perigo,
.ce-menu-item.perigo .material-symbols-outlined {
    color: var(--color-danger);
}

/* ------------------------------------------------------------ Diálogos e imagem ampliada */

.ce-dialogo-fundo {
    position: fixed;
    inset: 0;
    z-index: 77750;
    display: grid;
    place-items: center;
    padding: 16px;
    font-family: var(--font-family-base);
    background: var(--color-modal);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.ce-dialogo {
    display: flex;
    flex-direction: column;
    width: min(420px, 100%);
    max-height: 82vh;
    padding: 18px 18px 16px;
    border: 1px solid var(--color-separator-border);
    border-radius: var(--border-radius-card-lg);
    background: var(--bg-surface);
    box-shadow: var(--box-shadow-lg);
}

.ce-dialogo h3 {
    margin: 0 0 10px;
    font-family: var(--font-family-heading);
    font-size: 1.08rem;
    font-weight: 800;
    letter-spacing: var(--letter-spacing-heading);
    color: var(--text-title);
}

.ce-dialogo-corpo {
    min-height: 0;
    overflow-y: auto;
    font-size: 14px;
    line-height: 1.45;
    color: var(--text-main);
}

.ce-dialogo-corpo p {
    margin: 0;
}

.ce-dialogo-corpo h4 {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 10px 0 6px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.ce-dialogo-corpo h4:first-child {
    margin-top: 0;
}

.ce-dialogo-corpo h4 .material-symbols-outlined {
    font-size: 17px;
}

.ce-visto-sim {
    color: var(--color-accent);
}

.ce-dialogo-vazio {
    font-size: 13px;
    color: var(--text-muted);
}

.ce-pessoas {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.ce-pessoas li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: var(--text-title);
}

.ce-pessoas .ce-avatar {
    width: 30px;
    height: 30px;
    font-size: 11.5px;
}

.ce-dialogo-campo {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 12.5px;
    color: var(--text-muted);
}

.ce-dialogo-campo input {
    border-radius: var(--border-radius-inputs);
}

.ce-dialogo-erro {
    margin-top: 6px !important;
    font-size: 12.5px;
    color: var(--color-danger);
}

.ce-dialogo-botoes {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.ce-visor {
    position: fixed;
    inset: 0;
    z-index: 77750;
    display: grid;
    place-items: center;
    padding: 56px 16px 16px;
    background: var(--bg-overlay);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    cursor: zoom-out;
}

.ce-visor img {
    max-width: 100%;
    max-height: calc(100vh - 80px);
    border-radius: 10px;
    object-fit: contain;
    box-shadow: var(--box-shadow-lg);
    cursor: default;
}

.ce-visor-topo {
    position: absolute;
    top: 8px;
    right: 10px;
    left: 16px;
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 13.5px;
    color: var(--color-white);
    cursor: default;
}

.ce-visor-topo span:first-child {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.ce-visor-topo .ce-icone {
    color: var(--color-white);
}

.ce-visor-topo .ce-icone:hover {
    color: var(--color-white);
    background: color-mix(in srgb, var(--color-white) 18%, transparent);
}

/* ------------------------------------------------------------ Lista de conversas: pesquisa, canais e conversas
   (tela cheia e barra). Os canais são filtros pelos agrupamentos, não conversas em grupo. */

.ce-conversas {
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.ce-conversas [hidden],
.ce-varios [hidden] {
    display: none !important;
}

.ce-conversas-topo {
    flex: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 8px 8px 7px;
    border-bottom: 1px solid var(--color-separator-border);
}

.ce-busca {
    display: flex;
    align-items: center;
    gap: 6px;
    height: 36px;
    padding: 0 12px;
    border: 1px solid var(--color-border-inputs);
    border-radius: 18px;
    background: var(--bg-input);
    cursor: text;
}

.ce-busca:focus-within {
    border-color: var(--color-border-inputs-focus);
    box-shadow: var(--ring-accent);
}

.ce-busca .material-symbols-outlined {
    font-size: 19px;
    color: var(--text-muted);
}

.ce-busca input {
    flex: 1;
    min-width: 0;
    height: 100%;
    padding: 0;
    border: 0;
    outline: 0;
    font: inherit;
    font-size: 13.5px;
    color: var(--text-title);
    background: none;
    box-shadow: none;
}

.ce-filtros {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    max-height: 90px;
    overflow-y: auto;
    scrollbar-width: thin;
}

.ce-filtro {
    flex: none;
    max-width: 200px;
    height: 26px;
    padding: 0 11px;
    border: 1px solid var(--color-separator-border);
    border-radius: 13px;
    font: inherit;
    font-size: 12px;
    font-weight: 600;
    line-height: 24px;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
    color: var(--text-main);
    background: none;
    cursor: pointer;
    transition: var(--transition-fast);
}

.ce-filtro:hover {
    border-color: var(--border-hover);
    color: var(--color-accent);
}

.ce-filtro.ativo,
.ce-filtro.ativo:hover {
    border-color: transparent;
    color: var(--color-white);
    background: var(--gradient-btn);
}

.ce-para-todos {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 30px;
    border: 1px dashed var(--color-separator-border);
    border-radius: 10px;
    font: inherit;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--color-accent);
    background: none;
    cursor: pointer;
    transition: var(--transition-fast);
}

.ce-para-todos:hover {
    border-color: var(--border-hover);
    background: var(--bg-surface-2);
}

.ce-para-todos .material-symbols-outlined {
    font-size: 18px;
}

.ce-conversas-itens {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-height: 0;
    padding: 6px;
    overflow-y: auto;
}

.ce-conversas-itens .ce-canal {
    flex: none;
}

/* Depois do nome: "PJ" e a empresa de quem é de fora */
.ce-selo {
    display: inline-block;
    max-width: 150px;
    margin-left: 6px;
    padding: 0 6px;
    border-radius: 8px;
    font-size: 10.5px;
    font-style: normal;
    font-weight: 700;
    line-height: 16px;
    letter-spacing: .02em;
    vertical-align: middle;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
    color: var(--color-accent);
    background: var(--bg-chip);
}

.ce-selo.empresa {
    font-weight: 600;
    color: var(--text-muted);
    background: var(--bg-surface-2);
}

.ce-canal.so-leitura .ce-avatar,
.ce-canal.so-leitura .ce-canal-meio {
    opacity: .68;
}

.ce-canal-cadeado {
    font-size: 15px;
    color: var(--text-muted);
}

/* Conversa só para leitura: sai o campo de mensagem e as ações de reagir e responder */
.ce-so-leitura {
    flex: none;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-top: 1px solid var(--color-separator-border);
    font-size: 12.5px;
    line-height: 1.35;
    color: var(--text-muted);
    background: var(--bg-surface-2);
}

.ce-so-leitura .material-symbols-outlined {
    flex: none;
    font-size: 18px;
}

.ce-conversa.so-leitura .ce-campo,
.ce-conversa.so-leitura .ce-gravando,
.ce-conversa.so-leitura .ce-contexto,
.ce-conversa.so-leitura .ce-acoes {
    display: none !important;
}

/* Janela do "Enviar para todos" */
.ce-varios {
    width: min(520px, 100%);
}

.ce-varios-canal {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px;
    margin: 0 0 10px;
    font-size: 13px;
    color: var(--text-muted);
}

.ce-varios-canal .material-symbols-outlined {
    font-size: 17px;
    color: var(--color-accent);
}

.ce-varios-canal strong {
    color: var(--text-title);
}

.ce-varios textarea {
    width: 100%;
    min-height: 96px;
    max-height: 40vh;
    padding: 10px 12px;
    border: 1px solid var(--color-border-inputs);
    border-radius: 12px;
    font: inherit;
    font-size: 14px;
    line-height: 1.4;
    color: var(--text-title);
    background: var(--bg-input);
    resize: vertical;
    outline: 0;
}

.ce-varios textarea:focus {
    border-color: var(--color-border-inputs-focus);
    box-shadow: var(--ring-accent);
}

.ce-varios .ce-marcar {
    margin-top: 6px;
    border: 1px solid var(--color-separator-border);
    border-radius: 12px;
}

.ce-varios-dica {
    margin: 8px 0 0;
    font-size: 12.5px;
    line-height: 1.4;
    color: var(--text-muted);
}

.ce-botao:disabled {
    opacity: .6;
    cursor: default;
}

/* ------------------------------------------------------------ Pesquisa dentro da conversa */

.ce-lupa {
    position: absolute;
    top: 8px;
    right: 14px;
    z-index: 3;
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 1px solid var(--color-separator-border);
    border-radius: 50%;
    color: var(--text-muted);
    background: var(--bg-surface);
    box-shadow: var(--box-shadow-reset);
    cursor: pointer;
    opacity: .85;
    transition: var(--transition-fast);
}

.ce-lupa:hover {
    color: var(--color-accent);
    opacity: 1;
}

.ce-lupa .material-symbols-outlined {
    font-size: 19px;
}

.ce-conversa.pesquisando .ce-lupa {
    display: none;
}

.ce-pesquisa {
    flex: none;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 8px 6px 12px;
    border-bottom: 1px solid var(--color-separator-border);
    background: var(--bg-surface);
}

.ce-pesquisa > .material-symbols-outlined {
    font-size: 19px;
    color: var(--text-muted);
}

.ce-pesquisa input {
    flex: 1;
    min-width: 0;
    height: 32px;
    padding: 0 6px;
    border: 0;
    outline: 0;
    font: inherit;
    font-size: 13.5px;
    color: var(--text-title);
    background: none;
    box-shadow: none;
}

.ce-pesquisa-conta {
    flex: none;
    font-size: 12px;
    white-space: nowrap;
    color: var(--text-muted);
}

.ce-pesquisa .ce-icone {
    width: 30px;
    height: 30px;
}

/* "Enviar para todos": para quem vai */
.ce-varios-destino {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    margin: 8px 0 0 !important;
    padding: 8px 10px;
    border-radius: 10px;
    font-size: 12.5px;
    line-height: 1.4;
    color: var(--text-muted);
    background: var(--bg-surface-2);
}

.ce-varios-destino .material-symbols-outlined {
    flex: none;
    font-size: 17px;
}

.ce-varios-destino.com {
    color: var(--text-main);
    background: var(--bg-chip);
}

.ce-varios-destino.com .material-symbols-outlined {
    color: var(--color-accent);
}

/* ==== _componentes/_rodizio.css ==== */
/* Chave "participa do rodízio de leads" (Assets/javascript/_rodizio.js): botão pequeno, com cara de
   etiqueta, nas listas de colaboradores que recebem leads. Desligada: "Não habilitada". Ligada: "No rodízio". */

.chave-rodizio {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    margin: 0;
    padding: 2px 8px 2px 4px;
    border-radius: var(--border-radius-pill);
    border: 1px solid var(--color-pending);
    background: transparent;
    color: var(--color-pending);
    font-family: var(--font-family-base);
    font-size: 0.6875rem;
    font-style: normal;
    font-weight: var(--font-weight-500);
    line-height: 1.4;
    white-space: nowrap;
    cursor: pointer;
    transition: background var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast), box-shadow var(--transition-fast);
}

.chave-rodizio:hover {
    background: color-mix(in srgb, currentColor 12%, transparent);
}

.chave-rodizio:focus-visible {
    outline: none;
    box-shadow: var(--ring-accent);
}

.chave-rodizio.ligado {
    border-color: var(--color-success);
    color: var(--color-success);
}

.chave-rodizio:disabled {
    opacity: .5;
    cursor: progress;
}

/* Trilho e bolinha da chave */
.chave-rodizio-trilho {
    position: relative;
    flex-shrink: 0;
    width: 22px;
    height: 12px;
    border-radius: var(--border-radius-pill);
    background: color-mix(in srgb, currentColor 30%, transparent);
    transition: background var(--transition-fast);
}

.chave-rodizio-trilho::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
    transition: transform var(--transition-fast), background var(--transition-fast);
}

.chave-rodizio.ligado .chave-rodizio-trilho {
    background: currentColor;
}

.chave-rodizio.ligado .chave-rodizio-trilho::after {
    background: var(--bg-surface);
    transform: translateX(10px);
}

/* ==== _variaveis.css ==== */
/* root */
/* Visual "Meia-noite" com menu em trilho: quase preto com azul elétrico no escuro,
   zinco e branco no claro. Cantos arredondados, superfícies com borda fina e sombra em camadas. */
:root {

    /* Colors Pallets */
    --color-primary: #0F172A;
    --color-primary-500: #3b82f6;
    --color-secondary: #FF5722;


    /* Destaque (azul elétrico) */
    --color-cyan: #3b82f6;
    /* Azul usado como texto/ícone: mais escuro no claro para ter contraste sobre branco */
    --color-accent: #2563eb;
    --gradient-accent: linear-gradient(120deg, #93c5fd 0%, #3b82f6 50%, #2563eb 100%);
    --gradient-btn: linear-gradient(90deg, #2563eb 0%, #3b82f6 100%);
    --shadow-btn: 0 10px 24px -10px rgba(37, 99, 235, .6);
    --shadow-btn-hover: 0 16px 30px -12px rgba(37, 99, 235, .75);
    /* Pílula/ícone com fundo azul translúcido */
    --bg-chip: rgba(37, 99, 235, .08);
    --border-chip: rgba(37, 99, 235, .26);
    --border-hover: rgba(37, 99, 235, .4);
    --ring-accent: 0 0 0 3px rgba(37, 99, 235, .12);
    --glow: rgba(59, 130, 246, .16);
    --grid-line: rgba(9, 9, 11, .05);
    /* Holofote que segue o mouse nos cards */
    --spot: rgba(37, 99, 235, .07);
    /* Reflexo de vidro: brilho em diagonal por cima das superfícies,
       fio de luz na borda de cima e a faixa que atravessa no hover */
    --vidro-reflexo: linear-gradient(135deg, rgba(255, 255, 255, .9) 0%, rgba(255, 255, 255, .25) 28%, transparent 55%);
    --vidro-borda-topo: inset 0 1px 0 rgba(255, 255, 255, .9);
    --vidro-faixa: rgba(37, 99, 235, .08);


    /* Colors Neutras */
    --color-white: #FFFFFF;
    --color-blue-50: #f4f4f5;
    --color-gray-50: #f7f7f8;
    --color-gray-200: #e7e7ea;
    --color-gray-500: #71717a;
    --color-gray-600: #52525b;
    --color-gray-900: #09090b;

    --color-modal: rgba(9, 9, 11, .45);
    --color-modal-trash: rgba(9, 9, 11, .6);
    --color-default-icons: #52525b;
    --color-hover-row: #2563eb;

    --background-color-icontrash: #FF1744;
    --background-color-success: #22c55e;
    --background-color-iconplus: #22c55e;
    --background-color-title-overload: #FFFFFF;

    /* Tokens Semânticos */
    --bg-app: var(--color-gray-50);
    --bg-surface: var(--color-white);
    /* Superfície um tom abaixo (colunas do kanban, cabeçalho de tabela, chips) */
    --bg-surface-2: #f7f7f8;
    /* Fundo da página (main/.content) */
    --bg-dropface: #fafafa;
    /* Fundo do trilho do menu */
    --bg-rail: #f4f4f5;
    --bg-surface-hover: var(--color-primary-500);
    --bg-overlay: rgba(9, 9, 11, .6);


    /* Colors Feedback*/
    --color-danger: #FF1744;
    --color-warning: hsla(53, 67%, 50%, 1);
    --color-pending: #FF9800;
    --color-highlight: #2563eb;
    --color-info: #03A9F4;
    --color-success: #22c55e;
    --color-separator-border: var(--color-gray-200);
    --color-text-footer: #80808a;

    --color-border-inputs: #dedee3;
    --color-border-strong: #d8d8dd;
    --color-border-tabs: #e7e7ea;
    --color-border-inputs-focus: #3b82f6;
    --color-title-overload: #09090b;

    --title-color: #09090b;
    --text-color: var(--color-gray-600);
    --icon-link-color: var(--color-gray-600);
    --icon-default-color: var(--color-gray-600);
    /* Sempre brancos: usados sobre fundos de destaque (botões/badges) que não mudam com o tema */
    --icon-white-color: var(--color-white);
    --icon-reset-buttons: var(--color-white);

    /* Glass: header e modais translúcidos com desfoque */
    --bg-input: var(--color-white);
    --bg-glass: rgba(255, 255, 255, .75);
    --bg-glass-header: rgba(255, 255, 255, .75);
    --blur-glass: 16px;
    --border-glass: #e7e7ea;
    --bg-glass-modal: rgba(255, 255, 255, .97);


    /* Variante de --color-primary usada como texto/borda (não como fundo). */
    --color-primary-contrast: var(--color-primary);


    /* Borders, Borders Radius and Box Shadows */
    --box-shadow-reset: 0 1px 2px rgba(9, 9, 11, .04), 0 12px 32px -14px rgba(9, 9, 11, .14);
    --box-shadow-hover: 0 1px 2px rgba(9, 9, 11, .05), 0 18px 40px -16px rgba(9, 9, 11, .22);
    --box-shadow-lg: 0 30px 80px -24px rgba(9, 9, 11, .25);
    --box-shadow-navbar-reset: none;
    --border-radius-reset: 10px;
    --border-radius-inputs: 10px;
    --border-radius-contents: 14px;
    --border-radius-card-lg: 22px;
    --border-radius-pill: 999px;


    /* Fonts Tipography*/
    --font-family-heading: 'Plus Jakarta Sans', sans-serif;
    --font-family-base: 'Inter', 'Segoe UI', system-ui, sans-serif;
    --letter-spacing-heading: -.02em;

    --font-weight-lighter: lighter;
    --font-weight-300: 300;
    --font-weight-400: 400;
    --font-weight-500: 500;
    --font-weight-bold: bold;
    --font-weight-bolder: bolder;

    --text-main: var(--color-gray-600);
    --text-muted: var(--color-gray-500);
    --text-inverse: var(--color-gray-500);
    --text-title: var(--title-color);

    --label-color: var(--color-gray-500);
    --input-color: var(--color-gray-600);
    --text-table-color: var(--color-gray-600);

    --text-reset-color-footer: var(--color-text-footer);

    --icon-size: 0.7625rem;
    /* 12.2px ÷ 16 */
    --font-size-xs: 0.75rem;
    /* 12px */
    --font-size-sm: 0.875rem;
    /* 14px */
    --font-size-md: 0.9rem;
    /* ~14.4px */
    --font-size-lg: 1.1rem;


    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.5s ease;


    /* Dimensions */
    --logotipo-size: 28px;

    --padding-reset-contents: 8px 10px;
    --padding-subcontent: 12px 15px;
    --padding-content-tabs: 5px 10px 12px 10px;
    --padding-link-navbar: 9px 6px;
    --margin-bottom-subcontent: 14px;
    --padding-global-content: 16px 20px;
    --padding-column-tables: 8px 15px;

    /* Config message Toastr */
    --padding-toastr: 8px 24px;
    --border-radius-toastr: 6px;
    --text-color-troastr: #ffffff;
    --background-color-success-trastr: hsl(120 71 46);
    --background-color-error-trastr: red;
    --background-color-alert-trastr: hsl(48 100 50);

    --width-navbar: 264px;
    --width-navbar-rail: 96px;
    --width-navbar-icons: 180px;
    --width-card-icons: 140px;

    --height-header: 56px;
    --height-footer: 30px;
    --height-controllers-grid: 40px;
    --margin-reset: 16px;

    /* Tela de Login */
    --login-visual-bg-image: none;
    --gradient-login-visual: #040508;
    --gradient-btn-login: var(--gradient-btn);
    --color-login-badge-bg: rgba(255, 255, 255, 0.06);
    --shadow-login-card: 0 30px 80px -24px rgba(9, 9, 11, .3);
    --width-login-card: 525px;
    --width-login-visual: 25%;

}

/* DARK THEME: Meia-noite (quase preto com azul elétrico) */
:root.dark-theme {

    /* Fundos */
    --bg-dropface: #040508;
    /* fundo da página (main/.content) */
    --bg-app: #0b0e16;
    --bg-surface: #0b0e16;
    /* cards: header, navbar, tabelas, forms, filtros, tabs, kanban */
    --bg-surface-2: #10141f;
    --bg-input: #07090f;
    --bg-rail: #07090f;

    /* Paleta neutra: os tokens semânticos que dependem dela se ajustam sozinhos.
       --color-white NÃO é sobrescrito: é o branco fixo sobre botões e badges. */
    --color-gray-50: #10141f;
    --color-gray-200: #1a1f2c;
    --color-gray-500: #7d8597;
    --color-gray-600: #a0a8b8;
    --color-gray-900: #f5f7fb;
    /* Listras de tabela (zebra) */
    --color-blue-50: #0e121b;

    /* Destaque */
    --color-accent: #60a5fa;
    --bg-chip: rgba(59, 130, 246, .13);
    --border-chip: rgba(59, 130, 246, .38);
    --border-hover: rgba(59, 130, 246, .5);
    --ring-accent: 0 0 0 3px rgba(59, 130, 246, .18);
    --glow: rgba(59, 130, 246, .28);
    --grid-line: rgba(148, 163, 184, .05);
    --spot: rgba(96, 165, 250, .12);
    --vidro-reflexo: linear-gradient(135deg, rgba(255, 255, 255, .075) 0%, rgba(255, 255, 255, .02) 30%, transparent 55%);
    --vidro-borda-topo: inset 0 1px 0 rgba(255, 255, 255, .07);
    --vidro-faixa: rgba(255, 255, 255, .07);
    --color-highlight: #60a5fa;
    --shadow-btn: 0 12px 28px -10px rgba(37, 99, 235, .8);

    /* Tokens com valor fixo */
    --title-color: #f5f7fb;
    --color-border-inputs: #242b3b;
    --color-border-strong: #242b3b;
    --color-border-tabs: #1a1f2c;
    --color-title-overload: #f5f7fb;
    --background-color-title-overload: #0b0e16;
    --color-default-icons: #a0a8b8;
    --color-text-footer: #6b7385;

    /* Sombras sobre fundo escuro */
    --box-shadow-reset: 0 1px 0 rgba(255, 255, 255, .03) inset, 0 16px 40px -16px rgba(0, 0, 0, .7);
    --box-shadow-hover: 0 0 0 1px rgba(59, 130, 246, .38), 0 20px 50px -20px rgba(59, 130, 246, .45);
    --box-shadow-lg: 0 40px 100px -30px rgba(0, 0, 0, .9);
    --box-shadow-navbar-reset: none;
    --text-inverse: var(--color-white);

    /* Glass */
    --bg-glass: rgba(8, 10, 16, .72);
    --bg-glass-header: rgba(8, 10, 16, .72);
    --bg-glass-modal: rgba(11, 14, 22, .97);
    --blur-glass: 16px;
    --border-glass: #1a1f2c;

    --color-modal: rgba(0, 0, 0, .6);
    --color-modal-trash: rgba(0, 0, 0, .7);
    --bg-overlay: rgba(0, 0, 0, .7);

    /* Azul da marca clareado, legível sobre fundo escuro */
    --color-primary-contrast: #b9cdf0;
}
