/* ==== root.css (variáveis e base) — inlinado aqui para evitar a cadeia @import → segundo download bloqueante ==== */
:root {
    --font-sans: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

    /* Orange */
    --orange-25: #fef8f6;
    --orange-50: #fdf0eb;
    --orange-100: #f9d2c0;
    --orange-200: #f6bca2;
    --orange-300: #f29d78;
    --orange-400: #f08a5d;
    --orange-500: #ec6d35;
    --orange-600: #d76330;
    --orange-700: #a84d26;
    --orange-800: #823c1d;
    --orange-900: #632e16;

    /* Green */
    --green-50: #e7fef4;
    --green-100: #b3e7d2;
    --green-200: #96d4bb;
    --green-300: #66c09c;
    --green-400: #48b489;
    --green-500: #1aa16b;
    --green-600: #189361;
    --green-700: #12724c;
    --green-800: #0e593b;
    --green-900: #0b442d;

    /* Red */
    --red-50: #feecf1;
    --red-100: #fac5d2;
    --red-200: #f8a9bc;
    --red-300: #f5819e;
    --red-400: #f3698b;
    --red-500: #f0436e;
    --red-600: #da3d64;
    --red-700: #aa304e;
    --red-800: #84253d;
    --red-900: #651c2e;

    /* Blue */
    --blue-50: #e9f7fc;
    --blue-100: #bee4f4;
    --blue-200: #8abdd3;
    --blue-300: #549fbf;
    --blue-400: #338db2;
    --blue-500: #00709f;
    --blue-600: #006691;
    --blue-700: #005071;
    --blue-800: #003e57;
    --blue-900: #002f43;

    /* Yellow (atenção: avisos, estrelas de qualidade) */
    --yellow-50: #fefce8;
    --yellow-100: #fef9c3;
    --yellow-200: #fef08a;
    --yellow-300: #fde047;
    --yellow-400: #facc15;
    --yellow-500: #eab308;
    --yellow-600: #ca8a04;
    --yellow-700: #a16207;
    --yellow-800: #854d0e;
    --yellow-900: #713f12;

    /* Purple */
    --purple-50: #f0eaf6;
    --purple-100: #cfbee4;
    --purple-200: #b89ed7;
    --purple-300: #9872c5;
    --purple-400: #8457ba;
    --purple-500: #652da9;
    --purple-600: #5c299a;
    --purple-700: #482078;
    --purple-800: #38195d;
    --purple-900: #2a1347;

    /* Typography */
    --heading-01: 2.4rem;
    --heading-02: 2rem;
    --heading-03: 1.6rem;
    --heading-04: 1.4rem;
    --heading-05: 1.2rem;
    --body-01: 1.6rem;
    --body-02: 1.4rem;
    --body-03: 1.2rem;

    /* Raios, espaçamentos e alturas de controle — a mesma régua em todas as telas */
    --radius-sm: 0.4rem;
    --radius-md: 0.8rem;
    --radius-lg: 1.2rem;
    --radius-pill: 999px;
    --space-1: 0.4rem;
    --space-2: 0.8rem;
    --space-3: 1.2rem;
    --space-4: 1.6rem;
    --space-5: 2.4rem;
    --space-6: 3.2rem;
    --control-h-xs: 28px;
    --control-h-sm: 32px;
    --control-h-md: 40px;
    --control-h-lg: 48px;

    /* Estrutura: cabeçalho fino no topo + menu lateral à direita (base.html) */
    --header-h: 56px;
    /* Larguras que contêm texto ficam em rem: acompanham o tamanho de fonte do usuário (data-fonte) */
    --sidebar-w: 22.4rem;
    --sidebar-w-min: 6.4rem;
    --sidebar-atual: 0px;

    /* Camadas */
    --z-sidebar: 20;
    --z-header: 30;
    --z-banner: 31;
    --z-menu: 100;
    --z-modal: 1000;
    --z-toast: 1100;
    --z-dialogo: 10000; /* Listagens.avisar/confirmar: acima de qualquer modal ou overlay da tela */

    /* Transitions */
    --transition-fast: 0.12s ease;
    --transition-normal: 0.2s ease;
    --transition-slow: 0.3s ease;

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
    --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.16);

    /* Theme - Light (default) */
    --bg-primary: #ffffff;
    --bg-secondary: #fafafa;
    --bg-tertiary: #f0efef;
    --bg-card: #ffffff;
    --bg-input: #ffffff;
    --text-primary: #1e1c1a;
    --text-secondary: #504e4e;
    --text-tertiary: #676564;
    --text-muted: #848180;
    --border-color: #e1e0e0;
    --border-color-light: #e1e0e0;
    --border-color-dark: #676564;
    --shadow-color: rgba(0, 0, 0, 0.16);

    /* Neutral (keep for compatibility) */
    --neutral-00: #ffffff;
    --neutral-50: #fafafa;
    --neutral-100: #f0efef;
    --neutral-200: #e1e0e0;
    --neutral-300: #cdcbcb;
    --neutral-400: #a7a5a4;
    --neutral-500: #918e8d;
    --neutral-600: #848180;
    --neutral-700: #676564;
    --neutral-800: #504e4e;
    --neutral-900: #3d3c3b;
    --neutral-1000: #1e1c1a;
}

/* Dark Theme */
[data-theme="dark"] {
    --bg-primary: #1a1a1a;
    --bg-secondary: #242424;
    --bg-tertiary: #2d2d2d;
    --bg-card: #242424;
    --bg-input: #2d2d2d;
    --text-primary: #f5f5f5;
    --text-secondary: #d4d4d4;
    --text-tertiary: #a3a3a3;
    --text-muted: #737373;
    --border-color: #404040;
    --border-color-light: #404040;
    --border-color-dark: #525252;
    --shadow-color: rgba(0, 0, 0, 0.4);

    /* Override neutrals for dark theme */
    --neutral-00: #1a1a1a;
    --neutral-50: #242424;
    --neutral-100: #2d2d2d;
    --neutral-200: #404040;
    --neutral-300: #525252;
    --neutral-400: #737373;
    --neutral-500: #a3a3a3;
    --neutral-600: #d4d4d4;
    --neutral-700: #e5e5e5;
    --neutral-800: #f5f5f5;
    --neutral-900: #fafafa;
    --neutral-1000: #ffffff;

    /* Adjust colors for dark theme */
    --orange-25: #2a1f1a;
    --orange-50: #3d2a1f;
    --orange-100: #5a3520;
    --orange-700: #fdba74;
    --green-50: #1a2a22;
    --green-100: #1f3d2d;
    --green-700: #6ee7b7;
    --red-50: #2a1a1f;
    --red-100: #3d1f27;
    --red-700: #fca5a5;
    --blue-50: #1a2429;
    --blue-100: #1f2d3d;
    --blue-700: #7dd3fc;
    --purple-50: #221a29;
    --purple-100: #352a42;
    --yellow-50: #2a2614;
    --yellow-100: #3d3517;
    --yellow-700: #fde047;

    /* Shadows - dark */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.15);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.25);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.35);
    --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.45);
}

/* System preference (auto) */
@media (prefers-color-scheme: dark) {
    [data-theme="system"] {
        --bg-primary: #1a1a1a;
        --bg-secondary: #242424;
        --bg-tertiary: #2d2d2d;
        --bg-card: #242424;
        --bg-input: #2d2d2d;
        --text-primary: #f5f5f5;
        --text-secondary: #d4d4d4;
        --text-tertiary: #a3a3a3;
        --text-muted: #737373;
        --border-color: #404040;
        --border-color-light: #404040;
        --border-color-dark: #525252;
        --shadow-color: rgba(0, 0, 0, 0.4);

        --neutral-00: #1a1a1a;
        --neutral-50: #242424;
        --neutral-100: #2d2d2d;
        --neutral-200: #404040;
        --neutral-300: #525252;
        --neutral-400: #737373;
        --neutral-500: #a3a3a3;
        --neutral-600: #d4d4d4;
        --neutral-700: #e5e5e5;
        --neutral-800: #f5f5f5;
        --neutral-900: #fafafa;
        --neutral-1000: #ffffff;

        --orange-25: #2a1f1a;
        --orange-50: #3d2a1f;
        --orange-100: #5a3520;
        --orange-700: #fdba74;
        --green-50: #1a2a22;
        --green-100: #1f3d2d;
        --green-700: #6ee7b7;
        --red-50: #2a1a1f;
        --red-100: #3d1f27;
        --red-700: #fca5a5;
        --blue-50: #1a2429;
        --blue-100: #1f2d3d;
        --blue-700: #7dd3fc;
        --purple-50: #221a29;
        --purple-100: #352a42;
        --yellow-50: #2a2614;
        --yellow-100: #3d3517;
        --yellow-700: #fde047;

        /* Shadows - dark */
        --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.15);
        --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.25);
        --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.35);
        --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.45);
    }
}

.text-green {
    color: var(--green-500) !important;
}

.text-red {
    color: var(--red-500) !important;
}

.text-orange {
    color: var(--orange-500) !important;
}

.text-blue {
    color: var(--blue-500) !important;
}

/* ==== BOTÕES ====
   Um só sistema em todas as telas: `.btn` + variante (primary, secondary, ghost, danger, danger-text, text)
   + tamanho (xs, sm, md, lg). Sem tamanho, o botão fica no `md`. */
.btn {
    align-items: center;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-family: var(--font-sans);
    display: inline-flex;
    flex-shrink: 0;
    font-weight: 500;
    justify-content: center;
    line-height: 1;
    outline: none;
    text-decoration: none;
    transition: background-color var(--transition-normal), border-color var(--transition-normal),
        color var(--transition-normal), box-shadow var(--transition-normal), transform var(--transition-fast);
    user-select: none;
    white-space: nowrap;
}

.btn:hover {
    text-decoration: none;
}

.btn:focus-visible {
    outline: 2px solid var(--orange-500);
    outline-offset: 2px;
}

/* Tamanho padrão (md) para botão sem modificador de tamanho — :where() não soma especificidade */
.btn:where(:not(.btn--xs, .btn--sm, .btn--md, .btn--lg, .btn--icon)) {
    font-size: 1.4rem;
    gap: 0.8rem;
    height: var(--control-h-md);
    padding: 0 1.6rem;
}

.btn:where(:not(.btn--xs, .btn--sm, .btn--md, .btn--lg, .btn--icon)) > svg {
    width: 1.8rem;
}

.btn--xs {
    font-size: 1.2rem;
    gap: 0.4rem;
    height: var(--control-h-xs);
    padding: 0 0.6rem;
}

.btn--xs > svg {
    width: 1.4rem;
}

.btn--sm {
    font-size: 1.3rem;
    gap: 0.6rem;
    height: var(--control-h-sm);
    padding: 0 1rem;
}

.btn--md {
    font-size: 1.4rem;
    gap: 0.8rem;
    height: var(--control-h-md);
    padding: 0 1.6rem;
}

.btn--md > svg {
    width: 1.8rem;
}

.btn--sm > svg {
    width: 1.6rem;
}

.btn--lg {
    font-size: 1.6rem;
    gap: 1rem;
    height: var(--control-h-lg);
    padding: 0 2.4rem;
}

.btn--lg > svg {
    width: 2.2rem;
}

.btn--icon {
    width: var(--control-h-md);
    height: var(--control-h-md);
    padding: 0;
}

.btn--icon > svg {
    width: 2rem;
}

.btn--icon.btn--sm,
.btn--icon-sm {
    width: var(--control-h-sm);
    height: var(--control-h-sm);
    padding: 0;
}

.btn--icon.btn--xs {
    width: var(--control-h-xs);
    height: var(--control-h-xs);
    padding: 0;
}

.btn--icon.btn--xs > svg {
    width: 1.6rem;
}

.btn--icon-sm > svg {
    width: 20px;
}

.btn--icon-lg {
    width: var(--control-h-lg);
    height: var(--control-h-lg);
    padding: 0;
}

.btn--icon-lg > svg {
    width: 28px;
}

.btn--primary {
    background: var(--orange-500);
    border: 1px solid var(--orange-500);
    color: var(--neutral-00);
}

.btn--primary:hover {
    background: var(--orange-600);
    border: 1px solid var(--orange-700);
}

.btn--primary:active {
    background: var(--orange-800);
}

.btn--secondary {
    background-color: var(--neutral-00);
    border: 1px solid var(--neutral-200);
    color: var(--neutral-1000);
}

.btn--secondary:hover {
    background-color: var(--orange-25);
}

.btn--secondary:active {
    background-color: var(--orange-100);
}

.btn--secondary > svg {
    color: var(--orange-500);
}

.btn--danger {
    background-color: var(--red-500);
    border: 1px solid var(--neutral-200);
    color: var(--neutral-00);
}

.btn--danger:hover {
    background-color: var(--red-600);
}

.btn--danger:active {
    background-color: var(--red-700);
}

.btn--danger > svg {
    color: var(--neutral-00);
}

.btn--ghost {
    background: transparent;
    color: var(--orange-500);
    border: 1px solid transparent;
}

.btn--ghost:hover {
    background-color: var(--orange-25);
    border-color: var(--orange-25);
}

.btn--ghost:active {
    background-color: var(--orange-100);
}

/* Ação discreta, sem fundo nem borda (ex.: "Limpar", "Remover" em listas) */
.btn--text {
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-secondary);
}

.btn--text:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.btn--text > svg {
    color: currentColor;
}

.btn--white {
    background: #ffffff;
    border: 1px solid #ffffff;
    color: var(--orange-600);
}

.btn--white:hover {
    background: #f5f5f5;
    border-color: #f5f5f5;
}

.btn--outline-white {
    background: transparent;
    border: 2px solid #ffffff;
    color: #ffffff;
}

.btn--outline-white:hover {
    background: rgba(255, 255, 255, 0.1);
}

.btn:active:not(:disabled) {
    transform: scale(0.97);
}

.btn:disabled,
.btn[disabled] {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* Loading state for submit buttons */
.btn--loading {
    pointer-events: none;
    position: relative;
    color: transparent !important;
}

/* O ícone tem cor própria (.btn--secondary > svg): sem isto ele aparece por baixo do anel */
.btn--loading > svg,
.btn--loading > i {
    visibility: hidden;
}

/* Centralizado por inset + margin, nunca por transform: a animação spin reescreve o transform e o anel
   escorregava para baixo a cada volta em vez de girar parado */
.btn--loading::after {
    animation: spin 0.6s linear infinite;
    border: 2px solid var(--text-secondary);
    border-radius: 50%;
    border-right-color: transparent;
    content: '';
    height: 1.6rem;
    inset: 0;
    margin: auto;
    position: absolute;
    width: 1.6rem;
}

.btn--primary.btn--loading::after,
.btn--danger.btn--loading::after {
    border-color: var(--neutral-00);
    border-right-color: transparent;
}

.btn--secondary.btn--loading::after {
    border-color: var(--orange-500);
    border-right-color: transparent;
}

.input {
    background: var(--neutral-00);
    background-color: var(--neutral-00);
    border: 1px solid var(--neutral-200);
    border-radius: 0.5rem;
    color: var(--neutral-1000);
    font-family: var(--font-sans);
    font-size: 1.4rem;
    height: 40px;
    outline: none;
    padding: 0 0.8rem;
    transition: border-color 0.2s ease;
}

.input::placeholder {
    color: var(--neutral-500);
}

.input:focus {
    border-color: var(--orange-500);
    box-shadow: 0 0 0 3px rgba(236, 109, 53, 0.1);
}

.input:disabled,
.input[disabled] {
    background-color: var(--neutral-100);
    cursor: not-allowed;
}

.input--search {
    padding-left: 4rem;
    background: url("../img/search.ca4a10cb3ceb.svg") var(--neutral-00) 1rem center no-repeat;
}

[data-theme="dark"] .input--search {
    background: url("../img/search-light.2cecd0324552.svg") var(--neutral-00) 1rem center no-repeat;
}

@media (prefers-color-scheme: dark) {
    [data-theme="system"] .input--search {
        background: url("../img/search-light.2cecd0324552.svg") var(--neutral-00) 1rem center no-repeat;
    }
}

.input--select {
    appearance: none;
    background: url("../img/chevron-down-orange.806cc521e1d1.svg") var(--neutral-00) right 1rem center no-repeat;
    padding-right: 3rem;
}

.input--sm {
    height: 32px;
}

/* Textarea com a mesma aparência do .input, sem a altura fixa */
textarea.input {
    height: auto;
    line-height: 1.5;
    padding: 0.8rem;
    resize: vertical;
}

/* Controles nativos (data, hora, select) com ícones legíveis no tema escuro */
[data-theme="dark"] .input {
    color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
    [data-theme="system"] .input {
        color-scheme: dark;
    }
}

.fast-filter__check {
    align-items: center;
    border: 1px solid var(--neutral-200);
    border-radius: 0.4rem;
    color: var(--neutral-700);
    cursor: pointer;
    display: flex;
    font-size: 1.4rem;
    font-weight: 400;
    gap: 0.4rem;
    height: 3.2rem;
    padding: 0 0.8rem;
    transition: all 0.2s ease;
}

.fast-filter__check > svg {
    width: 1.6rem;
    transition: all 0.2s ease;
}

.fast-filter__each input {
    display: none;
}

.fast-filter__each input:checked + .fast-filter__check {
    background-color: var(--neutral-00);
    border-color: var(--neutral-300);
    color: var(--neutral-1000);
}

.fast-filter__each input:checked + .fast-filter__check > svg {
    stroke: var(--orange-500);
    transform: scale(1.2);
}

/* TOGGLE SWITCH */

.toggle-options {
    background: var(--neutral-100);
    border: 1px solid var(--neutral-200);
    border-radius: 0.4rem;
    display: inline-flex;
    font-family: var(--font-sans);
    height: 32px;
    overflow: hidden;
}

.toggle-options input[type="radio"] {
    display: none;
}

.toggle-options .option {
    align-items: center;
    border-radius: 0.4rem;
    color: var(--neutral-600);
    cursor: pointer;
    display: flex;
    gap: 0.4rem;
    font-size: 1.4rem;
    padding: 0 1.2rem;
    transition: all 0.1s ease;
}

.toggle-options .option svg {
    width: 1.6rem;
}

.toggle-options input[type="radio"]:checked + .option {
    background: var(--neutral-00);
  color: var(--neutral-1000);
}

.toggle-options input[type="radio"]:checked + .option svg {
  color: var(--orange-500);
}

/* BADGES */

/* Altura mínima em rem (acompanha o tamanho de fonte do usuário) e texto longo quebra dentro da pílula */
.badge {
    align-items: center;
    border: 1px solid;
    border-radius: 1.2rem;
    display: inline-flex;
    font-size: 1.2rem;
    font-weight: 500;
    gap: 0.8rem;
    line-height: 1.25;
    min-height: 2.4rem;
    padding: 0.2rem 1.2rem;
    outline: none;
}

/* Ícone lucide dentro do badge (status "Conectada", "Exclusivo VSI"…) */
.badge > svg {
    flex: none;
    height: 1.4rem;
    width: 1.4rem;
}

.badge-icon {
    width: 1.6rem;
    height: 1.6rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.badge-icon-only {
    align-items: center;
    border: 1px solid;
    border-radius: 50%;
    height: 24px;
    min-height: 0;
    display: flex;
    justify-content: center;
    outline: none;
    padding: 0;
    width: 24px;
}

.badge-icon-only svg {
    width: 1.6rem;
    height: 1.6rem;
}

/* Color Variants - Outlined */
.badge-green-outlined {
    background: var(--green-50);
    border-color: var(--green-100);
    color: var(--green-500);
}

.badge-purple-outlined {
    background: var(--purple-50);
    border-color: var(--purple-100);
    color: var(--purple-500);
}

.badge-blue-outlined {
    background: var(--blue-50);
    border-color: var(--blue-100);
    color: var(--blue-500);
}

.badge-pink-outlined {
    background: var(--red-50);
    border-color: var(--red-100);
    color: var(--red-500);
}

.badge-orange-outlined {
    background: var(--orange-50);
    border-color: var(--orange-100);
    color: var(--orange-500);
}

.badge-red-outlined {
    background: var(--red-50);
    border-color: var(--red-200);
    color: var(--red-700);
}

.badge-red-outlined svg {
    stroke: currentColor;
}

.badge-gray-outlined {
    background: var(--neutral-50);
    border-color: var(--neutral-100);
    color: var(--neutral-500);
}

/* Color Variants - Filled */
.badge-green-filled {
    background: var(--green-500);
    color: var(--neutral-00);
}

.badge-purple-filled {
    background: var(--purple-500);
    color: var(--neutral-00);
}

.badge-blue-filled {
    background: var(--blue-500);
    color: var(--neutral-00);
}

.badge-pink-filled {
    background: var(--red-500);
    color: var(--neutral-00);
}

.badge-gray-filled {
    background: var(--neutral-500);
    color: var(--neutral-00);
}

/* SVG Icon Styles */

.badge-green-outlined svg,
.badge-green-filled svg {
    stroke: currentColor;
}

.badge-purple-outlined svg,
.badge-purple-filled svg {
    stroke: currentColor;
}

.badge-blue-outlined svg,
.badge-blue-filled svg {
    stroke: currentColor;
}

.badge-pink-outlined svg,
.badge-pink-filled svg {
    stroke: currentColor;
}

.badge-orange-outlined svg {
    stroke: currentColor;
}

.badge-gray-outlined svg,
.badge-gray-filled svg {
    stroke: currentColor;
}

/* CHECKBOXES */

.chk {
    align-items: center;
    cursor: pointer;
    display: inline-flex;
    gap: 0.8rem;
    user-select: none;
}

.chk__input {
    opacity: 0;
    pointer-events: none;
    position: absolute;
}

.chk__box {
    align-items: center;
    background: var(--neutral-00);
    border: 1px solid var(--border-color-light);
    border-radius: 0.4rem;
    display: flex;
    height: 20px;
    justify-content: center;
    transition: all .18s ease;
    width: 20px;
}

.chk__icon {
  width: 14px;
  height: 14px;
  color: var(--neutral-00);
  opacity: 0;
  transform: scale(0.6);
  transition: all .18s ease;
}

.chk__input:checked + .chk__box {
  background: var(--orange-500);
  border-color: var(--orange-500);
}

.chk__input:checked + .chk__box .chk__icon {
  opacity: 1;
  transform: scale(1);
}

.chk:hover .chk__box {
  border-color: var(--orange-500);
}

.chk__label {
  font-size: 1.4rem;
  color: var(--neutral-900);
}

/* EMPTY STATE */

.empty-state {
    align-items: center;
    display: flex;
    flex-direction: column;
    gap: 1.6rem;
    padding: 4rem 2rem;
    text-align: center;
}

.empty-state__icon {
    animation: float 3s ease-in-out infinite;
    color: var(--neutral-400);
    width: 6rem;
    height: 6rem;
}

.empty-state__title {
    color: var(--neutral-800);
    font-size: var(--heading-03);
    font-weight: 600;
}

.empty-state__description {
    color: var(--neutral-600);
    font-size: var(--body-02);
    max-width: 400px;
}

/* LOADING */

.loading {
    align-items: center;
    display: flex;
    justify-content: center;
    padding: 4rem;
}

.loading__spinner {
    animation: spin 1s linear infinite;
    border: 3px solid var(--neutral-200);
    border-radius: 50%;
    border-top-color: var(--orange-500);
    height: 40px;
    width: 40px;
}

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

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(1.2rem); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-1.2rem); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

/* Focus Visible */
:focus-visible {
    outline: 2px solid var(--orange-500);
    outline-offset: 2px;
}

:focus:not(:focus-visible) {
    outline: none;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--neutral-300);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--neutral-400);
}

/* ==== style.css ==== */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Raiz em 10px (1rem = 10px). Tamanho da fonte do usuário (Meu Perfil → `data-fonte` no <html>): como fontes,
   espaçamentos e raios estão em rem, mudar a raiz escala o site inteiro. Alturas de controle (--control-h-*),
   --header-h e .input ficam em px de propósito — a fonte maior ainda cabe neles. */
html {
  font-size: 62.5%;
}

html[data-fonte="grande"] {
  font-size: 68.75%; /* 11px: +10% */
}

html[data-fonte="muito_grande"] {
  font-size: 75%; /* 12px: +20% */
}

html, body {
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}


body {
  background-color: var(--neutral-100);
  color: var(--text-primary);
  display: flex;
  flex-direction: column;
  font-size: 1.6rem;
  min-height: 100vh;
  min-width: 800px;
}

/* Controles de formulário herdam a fonte da página (o navegador usa a do sistema) */
button,
input,
select,
textarea {
  font-family: inherit;
}

a {
  color: var(--orange-500);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* Demo banner */
.demo-banner {
  align-items: center;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #fff;
  display: flex;
  font-size: 1.2rem;
  font-weight: 500;
  gap: 0.8rem;
  justify-content: center;
  letter-spacing: 0.02em;
  padding: 0.6rem 1.6rem;
  position: sticky;
  text-transform: uppercase;
  top: 0;
  z-index: var(--z-banner);
}

.header {
  align-items: center;
  background-color: var(--neutral-00);
  border-bottom: 1px solid var(--border-color-light);
  display: flex;
  height: var(--header-h);
  position: sticky;
  top: 0;
  z-index: var(--z-header);
}

.header--demo {
  top: 3rem;
}

.header__container {
  align-items: center;
  display: grid;
  grid-template-columns: auto 1fr auto;
  height: 100%;
  margin: 0 auto;
  padding: 0 2.4rem;
  width: 100%;
}

.header__brand {
  align-items: center;
  display: flex;
  height: 100%;
}

.header__logo {
  height: 32px;
}

/* Logo dark mode adjustment */
[data-theme="dark"] .header__logo,
[data-theme="dark"] .login-card__logo,
[data-theme="dark"] .landing__logo {
  filter: invert(1) hue-rotate(180deg);
}

@media (prefers-color-scheme: dark) {
  [data-theme="system"] .header__logo,
  [data-theme="system"] .login-card__logo,
  [data-theme="system"] .landing__logo {
    filter: invert(1) hue-rotate(180deg);
  }
}

.nav {
  display: flex;
  height: 100%;
  justify-content: center;
}

.nav__list {
  display: flex;
  list-style: none;
  gap: 2rem;
  height: 100%;
}

.nav__link {
  align-items: center;
  color: var(--neutral-400);
  display: flex;
  font-weight: 500;
  gap: 1rem;
  height: 100%;
  position: relative;
  text-decoration: none;
  white-space: nowrap;
}

@media (max-width: 1500px) {
  .nav__list {
    gap: 1.2rem;
  }

  .nav__link {
    gap: 0.6rem;
  }

  .header__container {
    column-gap: 2rem;
    padding: 0 1.6rem;
  }
}

@media (max-width: 1400px) {
  .nav__list {
    gap: 0.8rem;
  }

  .nav__link {
    font-size: 1.4rem;
    gap: 0.5rem;
  }

  .nav__link > svg {
    width: 1.8rem;
  }

  .header__actions {
    gap: 0.8rem;
  }
}

.nav__link > svg {
  width: 2rem;
}

.nav__link:hover {
  color: var(--neutral-700);
  text-decoration: none;
}

.nav__link.active {
  color: var(--neutral-1000);
}

.nav__link.active::after {
  background-color: var(--orange-500);
  border-radius: 1rem 1rem 0 0;
  bottom: 0;
  content: "";
  height: 3px;
  left: 0;
  position: absolute;
  transition: width var(--transition-normal);
  width: 100%;
}

.nav__link::after {
  background-color: var(--orange-500);
  border-radius: 1rem 1rem 0 0;
  bottom: 0;
  content: "";
  height: 3px;
  left: 0;
  position: absolute;
  transition: width var(--transition-normal);
  width: 0;
}

.nav__link:hover::after {
  width: 100%;
}

.nav__dropdown {
  height: 100%;
  position: relative;
}

.nav__dropdown-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-sans);
  font-size: inherit;
  padding: 0;
}

.nav__dropdown-arrow {
  width: 1.4rem !important;
  transition: transform 0.2s ease;
}

.nav__dropdown-menu--open .nav__dropdown-arrow,
.nav__dropdown-btn.active ~ .nav__dropdown-menu .nav__dropdown-arrow {
  transform: rotate(180deg);
}

.nav__dropdown-menu {
  background: var(--neutral-00);
  border: 1px solid var(--border-color-light);
  border-radius: 0.8rem;
  box-shadow: var(--shadow-lg);
  min-width: 200px;
  opacity: 0;
  pointer-events: none;
  position: absolute;
  left: 0;
  top: calc(100% + 0.3rem);
  transform: scale(0.95) translateY(-4px);
  transform-origin: top left;
  transition: opacity 0.18s ease, transform 0.18s ease;
  z-index: 100;
}

.nav__dropdown-menu--open {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1) translateY(0);
}

.nav__dropdown-list {
  list-style: none;
  padding: 0.4rem;
}

.nav__dropdown-item {
  align-items: center;
  border-radius: 0.4rem;
  color: var(--neutral-800);
  display: flex;
  font-size: 1.4rem;
  gap: 0.8rem;
  padding: 1rem 1.2rem;
  text-decoration: none;
  transition: background 0.2s ease;
}

.nav__dropdown-item:hover {
  background: var(--orange-50);
  text-decoration: none;
}

.nav__dropdown-item.active {
  color: var(--neutral-1000);
  font-weight: 600;
}

.nav__dropdown-item--highlight {
  background: var(--orange-50);
  outline: 2px solid var(--orange-500);
  outline-offset: -2px;
}

.nav__dropdown-item > svg {
  color: var(--orange-500);
  width: 1.6rem;
}

/* Badges do menu (contagens) */
.nav__badge {
  font-size: 1.1rem;
  height: 20px;
  min-height: 0;
  padding: 0 0.7rem;
}

/* Item do menu com trabalho em andamento (ex.: Cópias de anúncios copiando): um anel girando no fim da linha */
.nav__andamento {
  animation: spin 0.8s linear infinite;
  border: 2px solid var(--neutral-200);
  border-radius: 50%;
  border-top-color: var(--orange-500);
  display: inline-block;
  flex-shrink: 0;
  height: 1.4rem;
  margin-left: auto;
  width: 1.4rem;
}

/* Título do grupo: só aparece no flyout do menu lateral recolhido */
.nav__dropdown-titulo {
  display: none;
}

/* ==== MENU LATERAL (à esquerda) ====
   base.html: <aside class="sidebar"> com a mesma <nav class="nav"> de sempre. O layout Desktop move a <nav>
   para a barra de menus (desktop.js) e esconde o aside — por isso tudo aqui fica sob .sidebar, e as regras
   .nav__* acima continuam valendo para a barra horizontal do Desktop.
   Estado: html[data-sidebar="expandida" | "recolhida"] (localStorage.sidebar). */

html[data-sidebar="expandida"] {
  --sidebar-atual: var(--sidebar-w);
}

html[data-sidebar="recolhida"] {
  --sidebar-atual: var(--sidebar-w-min);
}

/* Sem o aside (login, páginas públicas) o conteúdo não reserva espaço */
body:not(:has(.sidebar)) {
  --sidebar-atual: 0px;
}

.sidebar {
  background: var(--neutral-00);
  border-right: 1px solid var(--border-color-light);
  bottom: 0;
  display: flex;
  flex-direction: column;
  left: 0;
  position: fixed;
  top: var(--header-h);
  transition: width var(--transition-normal);
  width: var(--sidebar-atual);
  z-index: var(--z-sidebar);
}

/* Banner do demo fica acima do cabeçalho */
body:has(.demo-banner) .sidebar {
  top: calc(var(--header-h) + 3rem);
}

/* Rodapé fixo do menu com o controle de recolher/expandir — separado dos itens para não parecer uma opção */
.sidebar__rodape {
  align-items: center;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color-light);
  display: flex;
  flex: none;
  justify-content: flex-end;
  padding: 0.8rem 1.2rem;
}

.sidebar__toggle {
  align-items: center;
  background: var(--neutral-00);
  border: 1px solid var(--border-color-light);
  border-radius: var(--radius-sm);
  color: var(--text-tertiary);
  cursor: pointer;
  display: inline-flex;
  flex: none;
  height: var(--control-h-sm);
  justify-content: center;
  transition: background var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast);
  width: var(--control-h-sm);
}

.sidebar__toggle:hover {
  border-color: var(--border-color-dark);
  color: var(--text-primary);
}

.sidebar__toggle svg {
  height: 1.8rem;
  width: 1.8rem;
}

html[data-sidebar="recolhida"] .sidebar__rodape {
  justify-content: center;
  padding-left: 0;
  padding-right: 0;
}

html[data-sidebar="expandida"] .sidebar__toggle-icone--expandir,
html[data-sidebar="recolhida"] .sidebar__toggle-icone--recolher {
  display: none;
}

/* Os itens rolam dentro do menu; o rodapé fica sempre visível */
.sidebar .nav {
  display: block;
  flex: 1;
  height: auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 0.8rem;
}

.sidebar .nav__list {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  height: auto;
}

.sidebar .nav__list > li {
  position: relative;
}

.sidebar .nav__link {
  align-items: center;
  background: none;
  border: none;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  font-family: var(--font-sans);
  font-size: 1.4rem;
  font-weight: 500;
  gap: 1.2rem;
  height: 4rem;
  padding: 0 1.1rem;
  position: relative;
  text-align: left;
  transition: background var(--transition-fast), color var(--transition-fast);
  white-space: nowrap;
  width: 100%;
}

.sidebar .nav__link > svg {
  color: var(--text-tertiary);
  flex: none;
  height: 2rem;
  width: 2rem;
}

.sidebar .nav__link:hover {
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

.sidebar .nav__label {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Item ativo: fundo laranja claro + barra laranja na borda da tela (visível também recolhido) */
.sidebar .nav__link.active {
  background: var(--orange-50);
  color: var(--text-primary);
  font-weight: 600;
}

.sidebar .nav__link.active > svg {
  color: var(--orange-500);
}

.sidebar .nav__link::after,
.sidebar .nav__link:hover::after,
.sidebar .nav__link.active::after {
  content: none;
}

.sidebar .nav__link.active::before {
  background: var(--orange-500);
  border-radius: 0 2px 2px 0;
  bottom: 0.8rem;
  content: "";
  left: -0.8rem;
  position: absolute;
  top: 0.8rem;
  width: 3px;
}

/* Contagens do menu: a pílula abraça o número — 1 dígito vira um círculo (largura mínima = altura) e ela só
   cresce com mais dígitos, até "999+". Sem gap: o número real (texto em font-size 0) e o ::after visível são
   itens flex separados, e o gap do .badge empurraria o número para a direita */
.sidebar .nav__badge {
  flex: none;
  font-variant-numeric: tabular-nums;
  gap: 0;
  justify-content: center;
  min-width: 2rem;
  padding: 0 0.6rem;
}

.sidebar .nav__badge[data-curto] {
  font-size: 0;
}

.sidebar .nav__badge[data-curto]::after {
  content: attr(data-curto);
  font-size: 1.1rem;
}

.sidebar .nav__dropdown {
  height: auto;
}

.sidebar .nav__dropdown-arrow {
  color: var(--text-tertiary);
  flex: none;
  height: 1.6rem;
  width: 1.6rem !important;
}

.sidebar .nav__dropdown-btn[aria-expanded="true"] .nav__dropdown-arrow {
  transform: rotate(180deg);
}

/* Expandido: grupos são acordeão dentro do menu */
html[data-sidebar="expandida"] .sidebar .nav__dropdown-menu {
  background: none;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  display: none;
  min-width: 0;
  opacity: 1;
  pointer-events: auto;
  position: static;
  transform: none;
  transition: none;
}

html[data-sidebar="expandida"] .sidebar .nav__dropdown-menu--open {
  display: block;
}

html[data-sidebar="expandida"] .sidebar .nav__dropdown-list {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.2rem 0 0.4rem;
}

html[data-sidebar="expandida"] .sidebar .nav__dropdown-item {
  color: var(--text-secondary);
  font-size: 1.35rem;
  gap: 1rem;
  height: 3.4rem;
  padding: 0 1.1rem 0 2.4rem;
  white-space: nowrap;
}

.sidebar .nav__dropdown-item > svg {
  flex: none;
}

.sidebar .nav__dropdown-item:hover {
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

.sidebar .nav__dropdown-item.active {
  background: var(--orange-50);
  color: var(--text-primary);
  font-weight: 600;
}

/* Recolhido: só ícones; o nome aparece no tooltip e os grupos abrem em flyout à esquerda */
/* Recolhido: flyouts e tooltips saem para o lado, então a lista não pode cortar o que transborda */
html[data-sidebar="recolhida"] .sidebar .nav {
  overflow: visible;
}

html[data-sidebar="recolhida"] .sidebar .nav__label,
html[data-sidebar="recolhida"] .sidebar .nav__dropdown-arrow {
  display: none;
}

html[data-sidebar="recolhida"] .sidebar .nav__link {
  justify-content: center;
  padding: 0;
}

/* Recolhido: a contagem vira uma bolinha no canto do ícone, que cresce para a esquerda com mais dígitos */
html[data-sidebar="recolhida"] .sidebar .nav__badge[data-curto]::after {
  font-size: 0.95rem;
}

html[data-sidebar="recolhida"] .sidebar .nav__badge {
  background: var(--orange-500);
  border-color: var(--neutral-00);
  border-radius: var(--radius-pill);
  color: #fff;
  font-weight: 600;
  height: 1.6rem;
  min-width: 1.6rem;
  padding: 0 0.4rem;
  position: absolute;
  right: -0.4rem;
  top: -0.2rem;
}

html[data-sidebar="recolhida"] .sidebar .nav__link::after {
  background: var(--text-primary);
  border-radius: var(--radius-sm);
  bottom: auto;
  box-shadow: var(--shadow-md);
  color: var(--bg-primary);
  content: attr(data-rotulo);
  font-size: 1.2rem;
  font-weight: 500;
  height: auto;
  left: calc(100% + 1.2rem);
  opacity: 0;
  padding: 0.5rem 0.9rem;
  pointer-events: none;
  position: absolute;
  right: auto;
  top: 50%;
  transform: translate(-4px, -50%);
  transition: opacity var(--transition-fast), transform var(--transition-fast);
  white-space: nowrap;
  width: auto;
  z-index: var(--z-menu);
}

html[data-sidebar="recolhida"] .sidebar .nav__link:hover::after,
html[data-sidebar="recolhida"] .sidebar .nav__link:focus-visible::after {
  opacity: 1;
  transform: translate(0, -50%);
}

/* Com o flyout aberto o tooltip do grupo sai do caminho */
html[data-sidebar="recolhida"] .sidebar .nav__dropdown-btn[aria-expanded="true"]::after {
  content: none;
}

html[data-sidebar="recolhida"] .sidebar .nav__dropdown-menu {
  left: calc(100% + 1.2rem);
  right: auto;
  top: 0;
  transform-origin: top left;
  z-index: var(--z-menu);
}

html[data-sidebar="recolhida"] .sidebar .nav__dropdown-item {
  white-space: nowrap;
}

html[data-sidebar="recolhida"] .sidebar .nav__dropdown-titulo {
  color: var(--text-tertiary);
  display: block;
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 0.8rem 1.6rem 0.2rem;
  text-transform: uppercase;
}

/* O layout Desktop tem os próprios ícones e barra de menus */
.os .sidebar {
  display: none;
}

.header__actions {
  align-items: center;
  display: flex;
  gap: 1rem;
  grid-column: 3;
  justify-self: end;
}

.header__notifications {
  position: relative;
}

.notifications-menu {
  background: var(--neutral-00);
  border: 1px solid var(--border-color-light);
  border-radius: 0.8rem;
  box-shadow: var(--shadow-lg);
  min-width: 280px;
  position: absolute;
  right: 0;
  top: calc(100% + 0.8rem);
  z-index: 100;
  opacity: 0;
  transform: scale(0.95) translateY(-4px);
  transform-origin: top right;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.notifications-menu--open {
  opacity: 1;
  transform: scale(1) translateY(0);
  pointer-events: auto;
}

.notifications-menu__title {
  color: var(--neutral-900);
  font-size: 1.4rem;
  font-weight: 600;
}

.notifications-menu__empty {
  align-items: center;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  padding: 3rem 2rem;
}

.notifications-menu__empty-icon {
  color: var(--neutral-400);
  width: 3.2rem;
  height: 3.2rem;
}

.notifications-menu__empty-text {
  color: var(--neutral-600);
  font-size: 1.4rem;
}

/* Notifications badge */
.header__notifications-btn {
  position: relative;
}

.header__notifications-badge {
  align-items: center;
  background: var(--red-500);
  border-radius: var(--radius-pill);
  color: #fff;
  display: flex;
  font-size: 1rem;
  font-weight: 700;
  height: 1.8rem;
  justify-content: center;
  min-width: 1.8rem;
  padding: 0 0.4rem;
  position: absolute;
  right: -0.4rem;
  top: -0.4rem;
}

/* Contagem curta (até 999+) no lugar do número completo, que fica no texto para o desktop.js */
.header__notifications-badge[data-curto] {
  font-size: 0;
}

.header__notifications-badge[data-curto]::after {
  content: attr(data-curto);
  font-size: 1rem;
}

/* Novidades icon */
.header__novidades-btn {
  opacity: 0.4;
  position: relative;
}

.header__novidades-btn--active {
  background: var(--orange-50);
  border-color: var(--orange-200);
  color: var(--orange-500);
  opacity: 1;
}

.header__novidades-badge {
  align-items: center;
  background: var(--orange-500);
  border-radius: 1rem;
  color: #fff;
  display: flex;
  font-size: 1rem;
  font-weight: 700;
  height: 1.6rem;
  justify-content: center;
  min-width: 1.6rem;
  padding: 0 0.4rem;
  position: absolute;
  right: -0.4rem;
  top: -0.4rem;
}

.notifications-menu__header {
  align-items: center;
  border-bottom: 1px solid var(--border-color-light);
  display: flex;
  justify-content: space-between;
  padding: 1.2rem 1.6rem;
}

.notifications-menu__ver-todas {
  color: var(--orange-500);
  font-size: 1.2rem;
  font-weight: 500;
  text-decoration: none;
}

.notifications-menu__ver-todas:hover {
  text-decoration: underline;
}

.notifications-menu__body {
  max-height: 400px;
  overflow-y: auto;
}

/* Dropdown notification items */
.notif-dropdown-item {
  align-items: flex-start;
  border-bottom: 1px solid var(--border-color-light);
  color: inherit;
  display: flex;
  gap: 1rem;
  padding: 1.2rem 1.6rem;
  text-decoration: none;
  transition: background 0.15s ease;
}

.notif-dropdown-item:last-child {
  border-bottom: none;
}

.notif-dropdown-item:hover {
  background: var(--neutral-50);
  text-decoration: none;
}

.notif-dropdown-item__icon {
  color: var(--neutral-500);
  flex-shrink: 0;
  height: 1.6rem;
  margin-top: 0.2rem;
  width: 1.6rem;
}

/* Cores por tipo de solicitação — dropdown */
.notif-dropdown-item[data-tipo="estoque"] .notif-dropdown-item__icon { color: var(--blue-500); }
.notif-dropdown-item[data-tipo="preço"] .notif-dropdown-item__icon { color: var(--green-500); }
.notif-dropdown-item[data-tipo="ativar"] .notif-dropdown-item__icon { color: var(--purple-500); }
.notif-dropdown-item[data-tipo="pausar"] .notif-dropdown-item__icon { color: var(--orange-500); }
.notif-dropdown-item[data-tipo="sincronizar"] .notif-dropdown-item__icon { color: var(--neutral-600); }
.notif-dropdown-item[data-tipo="alterar_sku"] .notif-dropdown-item__icon { color: var(--red-600); }
.notif-dropdown-item[data-tipo="frete_gratis"] .notif-dropdown-item__icon { color: var(--yellow-600); }

/* Legenda de tipos */
.notif-legenda {
  align-items: center;
  border-bottom: 1px solid var(--border-color-light);
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  padding: 0.8rem 1.6rem;
}

.notif-legenda__item {
  align-items: center;
  color: var(--neutral-600);
  display: flex;
  font-size: 1.1rem;
  gap: 0.3rem;
}

.notif-legenda__dot {
  border-radius: 50%;
  height: 0.8rem;
  width: 0.8rem;
}

.notif-legenda__dot--estoque { background: var(--blue-500); }
.notif-legenda__dot--preco { background: var(--green-500); }
.notif-legenda__dot--ativar { background: var(--purple-500); }
.notif-legenda__dot--pausar { background: var(--orange-500); }
.notif-legenda__dot--sincronizar { background: var(--neutral-600); }
.notif-legenda__dot--alterar_sku { background: var(--red-600); }
.notif-legenda__dot--frete_gratis { background: var(--yellow-600); }

.notif-dropdown-item__content {
  flex: 1;
  min-width: 0;
}

.notif-dropdown-item__title {
  color: var(--neutral-900);
  font-size: 1.3rem;
  font-weight: 500;
  line-height: 1.3;
}

.notif-dropdown-item__desc {
  color: var(--neutral-600);
  font-size: 1.2rem;
  margin-top: 0.2rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.notif-dropdown-item__time {
  color: var(--neutral-500);
  font-size: 1.1rem;
  margin-top: 0.2rem;
}

/* Notification status badges */
.notif-status-badge {
  border-radius: 1rem;
  flex-shrink: 0;
  font-size: 1.1rem;
  font-weight: 600;
  justify-self: center;
  padding: 0.2rem 0.8rem;
  white-space: nowrap;
}

.notif-status-badge--pendente {
  background: var(--orange-50);
  color: var(--orange-500);
}

.notif-status-badge--processando {
  background: var(--blue-50);
  color: var(--blue-500);
}

.notif-status-badge--concluido {
  background: var(--green-50);
  color: var(--green-500);
}

.notif-status-badge--erro {
  background: var(--red-50);
  color: var(--red-600);
}

.notif-status-badge--cancelado {
  background: var(--neutral-100);
  color: var(--neutral-500);
}

.header__user-menu {
  position: relative;
}

.user-menu {
  background: var(--neutral-00);
  border: 1px solid var(--border-color-light);
  border-radius: 0.8rem;
  box-shadow: var(--shadow-lg);
  min-width: 220px;
  position: absolute;
  right: 0;
  top: calc(100% + 0.8rem);
  z-index: 100;
  opacity: 0;
  transform: scale(0.95) translateY(-4px);
  transform-origin: top right;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.user-menu--open {
  opacity: 1;
  transform: scale(1) translateY(0);
  pointer-events: auto;
}

@keyframes shortcut-flash {
  0% { box-shadow: 0 0 0 0 var(--orange-400); }
  40% { box-shadow: 0 0 0 6px var(--orange-200); }
  100% { box-shadow: 0 0 0 0 transparent; }
}

.header__user-btn--flash {
  animation: shortcut-flash 0.45s ease-out;
}

.user-menu__header {
  border-bottom: 1px solid var(--border-color-light);
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 1.2rem 1.6rem;
}

.user-menu__name {
  color: var(--neutral-900);
  font-size: 1.4rem;
  font-weight: 600;
}

.user-menu__email {
  color: var(--neutral-600);
  font-size: 1.2rem;
}

.user-menu__list {
  list-style: none;
  padding: 0.4rem;
}

.user-menu__item form {
  margin: 0;
}

.user-menu__btn {
  align-items: center;
  background: none;
  border: none;
  border-radius: 0.4rem;
  color: var(--neutral-800);
  cursor: pointer;
  display: flex;
  font-family: var(--font-sans);
  font-size: 1.4rem;
  gap: 0.8rem;
  padding: 1rem 1.2rem;
  text-decoration: none;
  transition: background 0.2s ease;
  width: 100%;
}

.user-menu__btn:hover {
  background: var(--orange-50);
  text-decoration: none;
}

.user-menu__icon {
  color: var(--orange-500);
  width: 1.6rem;
}

.user-menu__item--danger {
  border-top: 1px solid var(--border-color-light);
  margin-top: 0.4rem;
  padding-top: 0.4rem;
}

.user-menu__btn--danger {
  color: var(--red-600);
}

.user-menu__btn--danger:hover {
  background: var(--red-50);
}

.user-menu__btn--danger .user-menu__icon {
  color: var(--red-600);
}

.user-menu__item--theme,
.user-menu__item--setting {
  border-top: 1px solid var(--border-color-light);
  margin-top: 0.4rem;
  padding-top: 0.4rem;
}

.toggle {
  cursor: pointer;
  display: inline-block;
  position: relative;
}

.toggle__input {
  height: 0;
  opacity: 0;
  position: absolute;
  width: 0;
}

.toggle__slider {
  background: var(--neutral-300);
  border-radius: 1.2rem;
  display: block;
  height: 2.2rem;
  position: relative;
  transition: background 0.2s ease;
  width: 4rem;
}

.toggle__slider::after {
  background: var(--neutral-00);
  border-radius: 50%;
  box-shadow: 0 1px 3px var(--shadow-color);
  content: '';
  height: 1.8rem;
  left: 0.2rem;
  position: absolute;
  top: 0.2rem;
  transition: transform 0.2s ease;
  width: 1.8rem;
}

.toggle__input:checked + .toggle__slider {
  background: var(--orange-500);
}

.toggle__input:checked + .toggle__slider::after {
  transform: translateX(1.8rem);
}

/* Parcial (ex.: "Todos os atalhos" com só alguns ligados): bolinha no meio */
.toggle__input:indeterminate + .toggle__slider {
  background: var(--orange-300);
}

.toggle__input:indeterminate + .toggle__slider::after {
  transform: translateX(0.9rem);
}

.toggle--sm .toggle__input:indeterminate + .toggle__slider::after {
  transform: translateX(0.7rem);
}

.toggle__input:focus-visible + .toggle__slider {
  outline: 2px solid var(--orange-500);
  outline-offset: 2px;
}

.user-menu__theme {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.8rem 1.2rem;
}

.user-menu__theme-label {
  align-items: center;
  color: var(--neutral-800);
  display: flex;
  font-size: 1.4rem;
  gap: 0.8rem;
}

.user-menu__shortcut-group {
  padding: 0.8rem 1.2rem;
}

.user-menu__shortcut-row {
  align-items: center;
  display: flex;
  gap: 0.6rem;
  padding: 0.4rem 0;
}

.user-menu__shortcut-key {
  background: var(--neutral-100);
  border: 1px solid var(--border-color-light);
  border-radius: 0.4rem;
  color: var(--neutral-700);
  font-family: var(--font-mono, monospace);
  font-size: 1.1rem;
  font-weight: 600;
  min-width: 2.8rem;
  padding: 0.2rem 0.4rem;
  text-align: center;
}

.user-menu__shortcut-desc {
  color: var(--neutral-600);
  flex: 1;
  font-size: 1.3rem;
}

.user-menu__shortcut-row--sub {
  padding-left: 1.2rem;
}

.user-menu__shortcut-row--todos {
  border-bottom: 1px solid var(--border-color-light);
  margin-bottom: 0.4rem;
  padding-bottom: 0.8rem;
}

.user-menu__shortcut-row--todos .user-menu__shortcut-desc {
  color: var(--neutral-800);
  font-weight: 600;
}

.shortcut-row--disabled {
  opacity: 0.4;
  pointer-events: none;
}

.toggle--sm .toggle__slider {
  height: 1.8rem;
  width: 3.2rem;
}

.toggle--sm .toggle__slider::after {
  height: 1.4rem;
  width: 1.4rem;
}

.toggle--sm .toggle__input:checked + .toggle__slider::after {
  transform: translateX(1.4rem);
}

.theme-switcher {
  display: flex;
  background: var(--neutral-100);
  border: 1px solid var(--border-color-light);
  border-radius: 0.4rem;
  padding: 0.2rem;
}

.interface-switcher form {
  display: contents;
}

.theme-switcher__btn,
.interface-switcher__btn {
  align-items: center;
  background: transparent;
  border: none;
  border-radius: 0.3rem;
  color: var(--neutral-600);
  cursor: pointer;
  display: flex;
  height: 28px;
  justify-content: center;
  transition: all 0.2s ease;
  width: 28px;
}

.theme-switcher__btn:hover,
.interface-switcher__btn:hover {
  color: var(--neutral-800);
}

.theme-switcher__btn.active,
.interface-switcher__btn.active {
  background: var(--neutral-00);
  box-shadow: 0 1px 3px var(--shadow-color);
  color: var(--orange-500);
}

/* Tamanho da fonte no menu do usuário: um "A" em três tamanhos */
.interface-switcher__btn--fonte {
  font-family: inherit;
  font-weight: 600;
  line-height: 1;
}

.interface-switcher__btn--fonte-padrao { font-size: 1.2rem; }
.interface-switcher__btn--fonte-grande { font-size: 1.5rem; }
.interface-switcher__btn--fonte-muito_grande { font-size: 1.8rem; }

.theme-switcher__btn svg,
.interface-switcher__btn svg {
  width: 1.4rem;
  height: 1.4rem;
}

/* O lado esquerdo reserva a largura do menu lateral (--sidebar-atual: 0 no Desktop e sem menu) */
.main {
  animation: fadeIn 0.3s ease-out;
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 2.4rem 2.4rem 2.4rem calc(var(--sidebar-atual) + 2.4rem);
  gap: 2.4rem;
  transition: padding-left var(--transition-normal);
  width: 100%;
}

.container {
  max-width: 128rem;
  margin: 0 auto;
  width: 100%;
}

/* Formulários e páginas de configuração: na "Centralizada", coluna mais estreita que as listagens */
.container--sm {
  max-width: 96rem;
}

/* Largura das telas (Meu Perfil → Aparência, `data-largura` no <html>): "Tela inteira" (padrão) ocupa as
   laterais em todas as telas, formulários inclusive; "Centralizada" mantém o conteúdo no centro (128rem, ou
   96rem nos formulários), para monitores muito grandes */
html[data-largura="total"] .container {
  max-width: none;
}

/* Mensagens do Django e toasts (.alert direto no <main>, fora do .container) acompanham a largura do conteúdo */
.main > .alert {
  margin-inline: auto;
  max-width: 128rem;
  width: 100%;
}

.main:has(> .container--sm) > .alert {
  max-width: 96rem;
}

html[data-largura="total"] .main > .alert {
  max-width: none;
}

/* ==== CABEÇALHO DE PÁGINA ====
   Um só padrão em todas as telas:
   .page-header > .page-header__info (título, seletor de canal, subtítulo) + .page-header__actions (à direita).
   O título e a primeira linha das ações dividem a mesma linha de centro: os dois têm a altura de um controle md
   e começam no topo. Centralizar o bloco inteiro deixava o título acima dos botões sempre que havia subtítulo. */
.page-header {
  align-items: flex-start;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1.2rem 2.4rem;
  margin-bottom: 1.6rem;
}

.page-header__info {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  min-width: 0;
}

.page-header__actions {
  align-items: center;
  display: flex;
  flex: 1 1 auto;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: flex-end;
  min-height: var(--control-h-md);
  min-width: 0;
}

/* Com o link de volta acima do título, as ações descem a altura dele (+ o gap do __info) para seguir o título */
.page-header:has(> .page-header__info > .page-header__voltar:first-child) > .page-header__actions {
  margin-top: calc(2rem + 0.6rem);
}

/* A busca encolhe antes de a linha quebrar — o seletor de canal com contagens deixa o título largo */
.page-header__busca {
  flex: 1 1 20rem;
  max-width: 34rem;
  min-width: 18rem;
}

/* Chip da busca: vazio, não ocupa um espaço de gap entre os itens das ações */
.page-header__actions > .active-filters:empty {
  display: none;
}

.page-header__busca .page-header__search {
  width: 100%;
}

.page-header__title {
  color: var(--neutral-1000);
  font-size: var(--heading-01);
  font-weight: 600;
  line-height: 1.2;
}

/* A linha do título ocupa a altura de um controle md (a das ações): padding em vez de min-height + flex, que
   quebraria título com texto e <span> misturados */
.page-header .page-header__title {
  padding-block: max(0px, calc((var(--control-h-md) - 1.2em) / 2));
}

.page-header__subtitle {
  color: var(--neutral-700);
  font-size: var(--body-02);
  line-height: 1.4;
}

/* Link de volta acima do título (páginas de detalhe/edição) */
.page-header__voltar {
  align-items: center;
  color: var(--text-tertiary);
  display: inline-flex;
  font-size: 1.3rem;
  gap: 0.4rem;
  height: 2rem; /* fixa: as ações descem exatamente isso (ver .page-header:has(...voltar)) */
  width: fit-content;
}

.page-header__voltar:hover {
  color: var(--orange-600);
  text-decoration: none;
}

.page-header__voltar svg {
  width: 1.4rem;
}

/* Abas logo abaixo do título (Perguntas, Notificações, Consumo) — mesmo desenho do seletor de canal.
   .page-header__tabs > a.page-header__tab[--ativa] (+ .page-header__tab-n com a contagem) */
.page-header__tabs {
  background: var(--neutral-100);
  border: 1px solid var(--border-color-light);
  border-radius: 0.6rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem;
  padding: 0.2rem;
  width: fit-content;
}

.page-header__tab {
  align-items: center;
  border-radius: var(--radius-sm);
  color: var(--neutral-600);
  display: inline-flex;
  font-size: 1.3rem;
  font-weight: 500;
  gap: 0.6rem;
  height: var(--control-h-xs);
  padding: 0 1.1rem;
  white-space: nowrap;
}

.page-header__tab:hover {
  color: var(--neutral-900);
  text-decoration: none;
}

.page-header__tab--ativa {
  background: var(--neutral-00);
  box-shadow: 0 1px 3px var(--shadow-color);
  color: var(--neutral-1000);
  font-weight: 600;
}

.page-header__tab-n {
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  font-weight: 500;
}

/* Filtros no cabeçalho ficam na altura da busca e dos botões md */
.page-header__actions .multiselect__trigger {
  height: var(--control-h-md);
}

.page-header__count--active {
  background: var(--orange-100);
  border-radius: 0.4rem;
  color: var(--orange-700);
  font-weight: 600;
  padding: 0.1rem 0.5rem;
}

.page-header__search {
  max-width: 100%;
  width: 32rem;
}

/* Título + seletor de canal (Mercado Livre | Shopee) — ver templates/_seletor_canal.html */
.page-header__linha-titulo {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 1.2rem;
}

.canal-seletor {
  background: var(--neutral-100);
  border: 1px solid var(--border-color-light);
  border-radius: 0.6rem;
  display: inline-flex;
  gap: 0.2rem;
  padding: 0.2rem;
}

.canal-seletor__opcao {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 0.4rem;
  color: var(--neutral-600);
  cursor: pointer;
  display: inline-flex;
  font-family: var(--font-sans);
  font-size: 1.3rem;
  font-weight: 500;
  gap: 0.6rem;
  height: 28px;
  line-height: 1;
  padding: 0 1.1rem;
  text-decoration: none;
  transition: color var(--transition-fast);
  white-space: nowrap;
}

.canal-seletor__opcao:hover {
  color: var(--neutral-900);
}

.canal-seletor__opcao--ativa {
  background: var(--neutral-00);
  box-shadow: 0 1px 3px var(--shadow-color);
  color: var(--neutral-1000);
  font-weight: 600;
}

/* Cor de cada canal: amarelo do ML e laranja da Shopee — as mesmas marcas das listas unificadas */
.canal-seletor__cor {
  border-radius: 0.2rem;
  flex: none;
  height: 0.9rem;
  width: 0.9rem;
}

.canal-seletor__cor--ml {
  background: #ffe600;
  box-shadow: inset 0 0 0 1px rgba(45, 50, 119, 0.35);
}

.canal-seletor__cor--shopee {
  background: #ee4d2d;
}

/* Na lista unificada o seletor vira filtro (Todos | ML | Shopee) com a contagem de cada canal */
.canal-seletor__n {
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  font-weight: 500;
}

.canal-seletor__nota {
  color: var(--orange-700);
  font-size: 1.2rem;
}

/* Interruptor "Todos os canais juntos" no cabeçalho de Vendas e Anúncios, ao lado do seletor de canal.
   O form é flex para não sobrar a linha de base do label inline e o toggle ficar no centro da linha. */
.canais-juntos-form {
  display: flex;
}

.canais-juntos {
  align-items: center;
  color: var(--text-secondary);
  cursor: pointer;
  display: inline-flex;
  font-size: 1.3rem;
  gap: 0.8rem;
  white-space: nowrap;
}

/* Marca do canal: nas linhas da lista unificada e nas opções de filtro que só existem num canal */
.canal-marca {
  align-items: center;
  border-radius: 0.3rem;
  display: inline-flex;
  flex: none;
  font-size: 1rem;
  font-weight: 700;
  height: 1.7rem;
  letter-spacing: 0.02em;
  line-height: 1;
  padding: 0 0.5rem;
  white-space: nowrap;
}

.canal-marca--ml {
  background: #ffe600;
  color: #2d3277;
}

.canal-marca--shopee {
  background: #ee4d2d;
  color: #fff;
}

/* FAIXA DE KPIs (dashboard, vendas do ML, da Shopee e unificada) */
/* Vão até o próximo bloco igual ao do cabeçalho e da barra de filtros (--space-4) */
.kpi-strip {
  background: var(--bg-card);
  border: 1px solid var(--border-color-light);
  border-radius: 0.8rem;
  display: flex;
  margin-bottom: var(--space-4);
}
.kpi-strip__item {
  flex: 1;
  padding: 1.6rem 2rem;
  position: relative;
}
.kpi-strip__item + .kpi-strip__item::before {
  background: var(--border-color-light);
  content: '';
  height: 60%;
  left: 0;
  position: absolute;
  top: 20%;
  width: 1px;
}
.kpi-strip__value {
  color: var(--text-primary);
  font-size: 2rem;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  line-height: 1.2;
}
.kpi-strip__label {
  color: var(--text-secondary);
  font-size: 1.2rem;
  margin-top: 0.2rem;
}

@media (max-width: 900px) {
  .kpi-strip--resumo { flex-wrap: wrap; }
  .kpi-strip--resumo .kpi-strip__item { flex: 1 0 50%; }
  .kpi-strip--resumo .kpi-strip__item:nth-child(odd)::before { display: none; }
}

@media (max-width: 480px) {
  .kpi-strip--resumo .kpi-strip__item { padding: 1.2rem; }
  .kpi-strip--resumo .kpi-strip__value { font-size: 1.7rem; }
}

/* KPI da lista unificada: a parte de cada canal embaixo do número */
.kpi-strip__barra {
  background: var(--bg-tertiary);
  border-radius: 0.3rem;
  display: flex;
  height: 0.5rem;
  margin-top: 0.6rem;
  overflow: hidden;
}

.kpi-strip__barra i {
  display: block;
  height: 100%;
}

.kpi-strip__barra i:first-child {
  background: #ffe600;
}

.kpi-strip__barra i:last-child {
  background: #ee4d2d;
}

/* Um canal por linha e o bloco preso na base do item: todos os itens ficam com a mesma altura de valores, e o
   ticket médio (sem linha, não é parte de um total) alinha com os demais em vez de subir */
.kpi-strip__item:has(> .kpi-strip__canais) {
  display: flex;
  flex-direction: column;
}

.kpi-strip__canais {
  align-items: flex-start;
  color: var(--text-secondary);
  display: flex;
  flex-direction: column;
  font-size: 1.15rem;
  font-variant-numeric: tabular-nums;
  gap: 0.3rem;
  margin-top: auto;
  padding-top: 0.6rem;
}

.kpi-strip__canais span {
  align-items: center;
  display: inline-flex;
  gap: 0.4rem;
}

/* Linha dos canais como o usuário escolheu na tela de Vendas (Usuario.barra_canais): normal, discreta ou oculta */
.kpi-strip--barra-discreta .kpi-strip__barra {
  height: 0.2rem;
  opacity: 0.5;
}

.kpi-strip--barra-oculta .kpi-strip__barra {
  display: none;
}

.kpi-strip--canais {
  position: relative;
}

.kpi-strip__opcoes {
  position: absolute;
  right: 0.6rem;
  top: 0.6rem;
}

.kpi-strip__opcoes .dropdown__trigger {
  color: var(--text-muted);
}

.kpi-strip__opcoes .dropdown__menu {
  min-width: 26rem;
}

.kpi-strip__opcoes form {
  display: block;
}

.kpi-strip__opcao-texto {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.kpi-strip__opcao-texto small {
  color: var(--text-muted);
  font-size: 1.2rem;
}

.dropdown__item > svg.kpi-strip__opcao-check {
  margin-left: auto;
}

/* Amostra de cada opção: a própria linha, em miniatura */
.kpi-strip__amostra {
  align-items: center;
  border-radius: 0.2rem;
  display: flex;
  flex: none;
  height: 1.2rem;
  width: 2.8rem;
}

.kpi-strip__amostra i {
  display: block;
  height: 0.5rem;
}

.kpi-strip__amostra i:first-child {
  background: #ffe600;
  border-radius: 0.2rem 0 0 0.2rem;
  width: 65%;
}

.kpi-strip__amostra i:last-child {
  background: #ee4d2d;
  border-radius: 0 0.2rem 0.2rem 0;
  width: 35%;
}

.kpi-strip__amostra--discreta i {
  height: 0.2rem;
  opacity: 0.5;
}

.kpi-strip__amostra--oculta {
  border: 1px dashed var(--border-color);
}

.kpi-strip__amostra--oculta i {
  display: none;
}

/* Rótulo "de"/"até" dos intervalos de data (Perguntas). A barra de filtros das listagens é .filtros (listagens.css). */
.filters__date-label {
  font-size: 1.3rem;
  color: var(--neutral-700);
  white-space: nowrap;
}

.section__multiple-actions.section__multiple-actions--active {
  animation: slideDown var(--transition-normal);
  display: flex;
  margin-bottom: 2rem;
}

.section__multiple-actions {
  align-items: center;
  display: none;
  gap: 0.8rem;
}

.multiple-actions__buttons {
  display: flex;
  gap: 0.8rem;
}

.section__multiple-actions p {
  font-size: 1.4rem;
  color: var(--neutral-800);
}

.ads__list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  list-style: none;
}

.ad-card {
  background: var(--neutral-00);
  border: 1px solid var(--border-color-light);
  border-radius: 0.8rem;
  display: flex;
  flex-direction: column;
  transition: all var(--transition-normal);
}

.ad-card:hover {
  box-shadow: var(--shadow-sm);
}

.ad-card:has(input[type="checkbox"]:checked) {
  background: var(--orange-25);
  border-color: var(--orange-500);
}

.ad-card:has(input[type="checkbox"]:checked) .ad-card__infos {
  background: var(--orange-50);
}

.ad-card__infos {
  align-items: center;
  background: var(--neutral-50);
  border-radius: 0.8rem 0.8rem 0 0;
  display: flex;
  justify-content: space-between;
  padding: 0.8rem 1.2rem;
}

.ad-card__basic-infos {
  align-items: center;
  display: flex;
  gap: 0.4rem;
}

.ad-card__info-description {
  align-items: center;
  color: var(--neutral-800);
  display: flex;
  font-size: 1.2rem;
  font-weight: 500;
  gap: 0.4rem;
}

.ad-card__info-description svg {
  width: 1.6rem;
  color: var(--orange-500);
}

.ad-card__basic-infos__separator {
  width: 1.6rem;
  color: var(--neutral-600);
}

.ad-card__content {
  align-items: center;
  display: flex;
  gap: 1.2rem;
  padding: 1.6rem;
  width: 100%;
}

.ad-card__checkbox {
  display: flex;
  align-items: center;
}

.ad-card__checkbox input {
  width: 16px;
  height: 16px;
}

.ad-card__thumb img {
  border-radius: 0.4rem;
  background: var(--neutral-50);
  border: 1px solid var(--border-color-light);
  height: 48px;
  object-fit: cover;
  width: 48px;
}

.ad-card__header {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}

.ad-card__category {
  font-size: 1.2rem;
  color: var(--neutral-700);
}

.ad-card__title {
  font-size: 1.6rem;
  color: var(--neutral-1000);
  font-weight: 500;
  line-height: 1.3;
}
.ad-card__title a {
  color: inherit;
  text-decoration: none;
  transition: color 0.15s ease;
}
.ad-card__title a:hover {
  color: var(--orange-500);
}

.ad-card__badges {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.2rem;
}

.ad-card__tag {
  background: var(--neutral-100);
  border-radius: 0.3rem;
  color: var(--neutral-600);
  font-size: 1.1rem;
  font-weight: 500;
  padding: 0.1rem 0.5rem;
  white-space: nowrap;
}

.ad-card__details {
  align-items: center;
  border: 1px solid var(--border-color-light);
  border-radius: 0.4rem;
  display: flex;
  gap: 0.8rem;
  height: 40px;
  padding: 0 1.6rem;
}

.ad-card__numbers {
  align-items: center;
  color: var(--neutral-1000);
  display: flex;
  font-size: 1.6rem;
  font-weight: 400;
  gap: 0.4rem;
}

.ad-card__numbers--caption {
  color: var(--neutral-700);
  font-size: 1.2rem;
}

.ad-card__price {
  font-weight: 600;
  color: var(--neutral-1000);
  margin-left: auto;
}

.ad-card__actions {
  position: relative;
}

/* ===== VENDA CARD (vista detalhada) ===== */

.vendas-cards__list {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
  list-style: none;
}

.venda-card {
  background: var(--neutral-00);
  border: 1px solid var(--border-color-light);
  border-radius: 0.8rem;
  display: flex;
  flex-direction: column;
  transition: all var(--transition-normal);
}

.venda-card:hover {
  box-shadow: var(--shadow-sm);
}

/* Border-left accent by delta */
.venda-card--positive {
  border-left: 3px solid var(--green-500);
}

.venda-card--negative {
  border-left: 3px solid var(--red-500);
}

.venda-card--neutral {
  border-left: 3px solid var(--neutral-300);
}

/* Info header bar */
.venda-card__infos {
  background: var(--neutral-50);
  border-radius: 0.8rem 0.8rem 0 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 0.8rem 1.2rem;
}

.venda-card__infos-row {
  align-items: center;
  display: flex;
  gap: 0.4rem;
}

.venda-card__basic-infos {
  align-items: center;
  display: flex;
  gap: 0.4rem;
}

.venda-card__info-description {
  align-items: center;
  color: var(--neutral-800);
  display: flex;
  font-size: 1.2rem;
  font-weight: 500;
  gap: 0.4rem;
}

.venda-card__info-description svg {
  color: var(--orange-500);
  width: 1.6rem;
}

.venda-card__separator {
  color: var(--neutral-600);
  width: 1.6rem;
}

.venda-card__id-highlight {
  color: var(--orange-500);
  font-weight: 600;
}

/* Content area */
.venda-card__content {
  align-items: center;
  display: flex;
  gap: 1.6rem;
  padding: 1.6rem;
}

.venda-card__header {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 0.4rem;
  min-width: 0;
}

.venda-card__title {
  color: var(--neutral-1000);
  font-size: 1.6rem;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.venda-card__buyer {
  align-items: center;
  color: var(--neutral-600);
  display: flex;
  font-size: 1.2rem;
  gap: 0.4rem;
}

.venda-card__buyer svg {
  height: 1.4rem;
  width: 1.4rem;
}

/* Details pills */
.venda-card__details {
  align-items: center;
  border: 1px solid var(--border-color-light);
  border-radius: 0.4rem;
  display: flex;
  flex-shrink: 0;
  gap: 0.8rem;
  height: 40px;
  padding: 0 1.6rem;
}

.venda-card__numbers {
  align-items: center;
  color: var(--neutral-1000);
  display: flex;
  font-size: 1.6rem;
  font-variant-numeric: tabular-nums;
  font-weight: 400;
  gap: 0.4rem;
}

.venda-card__numbers--caption {
  color: var(--neutral-700);
  font-size: 1.2rem;
}

.venda-card__numbers--negative {
  color: var(--red-600);
}

.venda-card__numbers--positive {
  color: var(--green-600);
}

/* Delta badge area */
.venda-card__delta {
  flex-shrink: 0;
}

/* Expand button */
.venda-card__actions {
  flex-shrink: 0;
}

.venda-card__expand-btn {
  align-items: center;
  background: var(--neutral-50);
  border: 1px solid var(--border-color-light);
  border-radius: 0.4rem;
  color: var(--neutral-600);
  cursor: pointer;
  display: flex;
  height: 3.2rem;
  justify-content: center;
  transition: all var(--transition-fast);
  width: 3.2rem;
}

.venda-card__expand-btn:hover {
  background: var(--neutral-100);
  color: var(--neutral-800);
}

.venda-card__expand-btn svg {
  height: 1.6rem;
  transition: transform var(--transition-fast);
  width: 1.6rem;
}

.venda-card__expand-btn--open svg {
  transform: rotate(180deg);
}

/* Expandable detail section */
.venda-card__detail {
  display: none;
}

.venda-card__detail--open {
  animation: fadeIn var(--transition-normal);
  border-top: 1px solid var(--border-color-light);
  display: block;
  padding: 1.6rem;
}

.pagination {
  display: flex;
  justify-content: center;
  padding: 1rem 0;
}

.pagination__list {
  list-style: none;
  display: flex;
  gap: 1.2rem;
}

.pagination__link {
  align-items: center;
  border: 1px solid var(--border-color-light);
  border-radius: 4px;
  color: var(--neutral-800);
  display: flex;
  font-size: 1.4rem;
  justify-content: center;
  height: 28px;
  padding: 0 0.8rem;
  text-decoration: none;
  transition: all var(--transition-fast);
}

.pagination__link:hover {
  background-color: var(--orange-25);
  border-color: var(--orange-200);
  text-decoration: none;
  transform: translateY(-1px);
}

.pagination__link.active {
  background-color: var(--orange-500);
  color: var(--neutral-00);
  border-color: var(--orange-500);
  box-shadow: var(--shadow-sm);
}

.pagination__link--ellipsis,
.pagination__link--ellipsis:hover {
    background: transparent;
    border-color: transparent;
    color: var(--text-muted);
    cursor: default;
}

.pagination__link svg {
  width: 1.4rem;
  height: 1.4rem;
}

.pagination__ellipsis {
  color: var(--neutral-600);
}

/* Fechado é display: none, não só transparente: invisível, ele ainda ocupava espaço e os menus dos últimos
   cards estendiam a página, deixando um vão em branco no fim da rolagem. A segunda `transition` (ignorada
   por navegador antigo) mantém o fade na troca de display; o @starting-style dá o ponto de partida ao abrir. */
.action-menu {
  background: var(--neutral-00);
  border: 1px solid var(--border-color-light);
  border-radius: 0.8rem;
  box-shadow: var(--shadow-lg);
  min-width: 160px;
  padding: 0.4rem;
  position: absolute;
  right: 0;
  top: 100%;
  z-index: 30;

  display: none;
  opacity: 0;
  transform: scale(0.95) translateY(-4px);
  transform-origin: top right;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
  transition: opacity 0.18s ease, transform 0.18s ease, display 0.18s allow-discrete;
}

.action-menu--open {
  display: block;
  opacity: 1;
  transform: scale(1) translateY(0);
  pointer-events: auto;
}

@starting-style {
  .action-menu--open {
    opacity: 0;
    transform: scale(0.95) translateY(-4px);
  }
}

.action-menu__list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.action-menu__item {
  width: 100%;
}

.action-menu__btn {
  align-items: center;
  background: none;
  border: none;
  border-radius: 0.4rem;
  color: var(--neutral-1000);
  cursor: pointer;
  display: flex;
  font-size: 1.4rem;
  gap: 0.8rem;
  height: 44px;
  padding: 0 1.2rem;
  transition: background 0.2s ease;
  width: 100%;
}

.action-menu__btn:hover {
  background: var(--orange-50);
}

.action-menu__icon {
  width: 1.6rem;
  color: var(--orange-500);
}

.action-menu__label {
  flex: 1;
}

.action-menu__item--danger .action-menu__btn:hover {
  background: var(--red-50);
}

.action-menu__icon--danger,
.action-menu__label--danger {
  color: var(--red-600);
}

/* CARDS */

.card {
  background: var(--neutral-00);
  border: 1px solid var(--border-color-light);
  border-radius: 0.8rem;
  padding: 2rem;
  transition: box-shadow var(--transition-normal), transform var(--transition-normal);
}

.card:hover {
  box-shadow: var(--shadow-md);
}

.card__header {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-bottom: 1.6rem;
}

.card__title {
  color: var(--neutral-1000);
  font-size: var(--heading-04);
  font-weight: 600;
}

.card__subtitle {
  color: var(--neutral-600);
  font-size: var(--body-03);
}

.card__body {
  display: flex;
  flex-direction: column;
  gap: 1.6rem;
}

.card__footer {
  align-items: center;
  border-top: 1px solid var(--border-color-light);
  display: flex;
  gap: 1.2rem;
  justify-content: flex-end;
  margin-top: 2rem;
  padding-top: 1.6rem;
}

/* Card sem efeito de hover (formulários, blocos estáticos) */
.card--flat:hover {
  box-shadow: none;
}

.card--sem-padding {
  padding: 0;
}

/* TABLES */

.table {
  border-collapse: collapse;
  width: 100%;
}

.table th,
.table td {
  border-bottom: 1px solid var(--border-color-light);
  padding: 1.2rem;
  text-align: left;
}

.table th {
  background: var(--neutral-50);
  color: var(--neutral-700);
  font-size: 1.2rem;
  font-weight: 600;
  position: sticky;
  text-transform: uppercase;
  top: var(--header-h);
  z-index: 2;
}

.table td {
  color: var(--neutral-800);
  font-size: 1.4rem;
  transition: background var(--transition-fast);
}

.table tr:hover td {
  background: var(--neutral-50);
}

/* ALERTS / MESSAGES */

.alert {
  animation: slideDown var(--transition-slow) ease-out;
  border-radius: 0.8rem;
  display: flex;
  gap: 1.2rem;
  padding: 1.6rem;
  position: relative;
  transition: opacity var(--transition-normal), transform var(--transition-normal);
}

.alert--dismissing {
  opacity: 0;
  transform: translateY(-0.8rem);
}

.alert__close {
  background: none;
  border: none;
  color: inherit;
  cursor: pointer;
  flex-shrink: 0;
  opacity: 0.6;
  padding: 0.4rem;
  transition: opacity var(--transition-fast);
}

.alert__close:hover {
  opacity: 1;
}

.alert__close svg {
  height: 1.6rem;
  width: 1.6rem;
}

.alert--success {
  background: var(--green-50);
  border: 1px solid var(--green-200);
  color: var(--green-700);
}

.alert--error {
  background: var(--red-50);
  border: 1px solid var(--red-200);
  color: var(--red-700);
}

.alert--warning {
  background: var(--orange-50);
  border: 1px solid var(--orange-200);
  color: var(--orange-700);
}

.alert--info {
  background: var(--blue-50);
  border: 1px solid var(--blue-200);
  color: var(--blue-700);
}

.alert__icon {
  width: 2rem;
  flex-shrink: 0;
}

.alert__content {
  flex: 1;
}

.alert__title {
  font-weight: 600;
  margin-bottom: 0.4rem;
}

.alert__message {
  font-size: 1.4rem;
}

/* FORMS */

.form-group,
.field {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-bottom: 1.6rem;
}

.field--inline {
  align-items: center;
  flex-direction: row;
  gap: 1rem;
}

.form-label,
.field__label {
  color: var(--neutral-800);
  font-size: 1.4rem;
  font-weight: 500;
}

.form-label--required::after {
  color: var(--red-500);
  content: " *";
}

.form-help,
.field__help {
  color: var(--neutral-600);
  font-size: 1.2rem;
}

.form-error,
.field__error {
  color: var(--red-500);
  font-size: 1.2rem;
}

.input--error {
  border-color: var(--red-500);
}

.input--error:focus {
  border-color: var(--red-500);
}

/* GRID LAYOUT */

.grid {
  display: grid;
  gap: 2.4rem;
}

.grid--2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid--3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid--4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

@media (max-width: 900px) {
  .grid--2,
  .grid--3,
  .grid--4 {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* STATS */

.stat-card {
  background: var(--neutral-00);
  border: 1px solid var(--border-color-light);
  border-radius: 0.8rem;
  padding: 2rem;
  transition: box-shadow var(--transition-normal), transform var(--transition-normal);
}

.stat-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.stat-card__icon {
  align-items: center;
  background: var(--orange-50);
  border-radius: 0.8rem;
  color: var(--orange-500);
  display: flex;
  height: 48px;
  justify-content: center;
  margin-bottom: 1.6rem;
  width: 48px;
}

.stat-card__icon svg {
  width: 24px;
  height: 24px;
}

.stat-card__value {
  color: var(--neutral-1000);
  font-size: var(--heading-01);
  font-weight: 700;
  margin-bottom: 0.4rem;
}

.stat-card__label {
  color: var(--neutral-600);
  font-size: var(--body-02);
}

/* LOGIN PAGE */

.login-page {
  align-items: center;
  background: linear-gradient(135deg, var(--orange-500) 0%, var(--orange-700) 100%);
  display: flex;
  justify-content: center;
  min-height: 100vh;
  padding: 2rem;
}

.login-card {
  animation: scaleIn 0.4s ease-out;
  background: var(--neutral-00);
  border-radius: 1.2rem;
  box-shadow: var(--shadow-xl);
  max-width: 400px;
  padding: 4rem;
  width: 100%;
}

.login-card__logo {
  display: block;
  height: 40px;
  margin: 0 auto 3.2rem;
}

.login-card__title {
  color: var(--neutral-1000);
  font-size: var(--heading-02);
  font-weight: 600;
  margin-bottom: 0.8rem;
  text-align: center;
}

.login-card__subtitle {
  color: var(--neutral-600);
  font-size: var(--body-02);
  margin-bottom: 3.2rem;
  text-align: center;
}

.login-card .form-group {
  margin-bottom: 2rem;
}

.login-card .input {
  width: 100%;
}

.login-card .btn {
  width: 100%;
}

/* STORES GRID */

.stores-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
}

/* STORE CARD */

.store-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color-light);
  border-radius: 1.2rem;
  display: flex;
  flex-direction: column;
  padding: 2rem;
  transition: box-shadow var(--transition-normal), transform var(--transition-normal);
}

.store-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.store-card__header {
  align-items: flex-start;
  display: flex;
  gap: 1.2rem;
  justify-content: space-between;
  margin-bottom: 1.6rem;
}

.store-card__info {
  flex: 1;
  min-width: 0;
}

.store-card__title {
  color: var(--text-primary);
  font-size: 1.8rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.store-card__id {
  color: var(--text-muted);
  font-size: 1.2rem;
}

.store-card__content {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  margin-bottom: 1.6rem;
}

.store-card__stat {
  display: flex;
  font-size: 1.4rem;
  justify-content: space-between;
}

.store-card__stat-label {
  color: var(--text-tertiary);
}

.store-card__stat-value {
  color: var(--text-primary);
  font-weight: 500;
}

.store-card__footer {
  border-top: 1px solid var(--border-color-light);
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: auto;
  padding-top: 1.6rem;
}

.store-card__footer .btn {
  white-space: nowrap;
}

.store-card__footer form {
  display: contents;
}

/* Button danger text modifier */

.btn--danger-text {
  background: transparent;
  border: 1px solid transparent;
  color: var(--red-500);
}

.btn--danger-text:hover {
  background: var(--red-50);
  color: var(--red-600);
}

/* DROPDOWN
   Abre e fecha no clique (actions.js, junto dos outros menus: Esc, clique fora e scroll fecham).
   Uso: .dropdown > button.dropdown__trigger + .dropdown__menu > (a|button).dropdown__item */

.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown__trigger {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.dropdown__trigger .dropdown__seta {
  transition: transform var(--transition-normal);
  width: 1.4rem;
}

.dropdown--open .dropdown__trigger .dropdown__seta {
  transform: rotate(180deg);
}

.dropdown__menu {
  background: var(--bg-card);
  border: 1px solid var(--border-color-light);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  display: none;
  min-width: 200px;
  opacity: 0;
  padding: 0.4rem;
  pointer-events: none;
  position: absolute;
  right: 0;
  top: calc(100% + 0.4rem);
  transform: scale(0.95) translateY(-4px);
  transform-origin: top right;
  transition: opacity 0.18s ease, transform 0.18s ease;
  /* Fechado sem ocupar espaço — ver .action-menu */
  transition: opacity 0.18s ease, transform 0.18s ease, display 0.18s allow-discrete;
  z-index: var(--z-menu);
}

/* Abre alinhado pela esquerda do gatilho (ex.: botão no meio da barra de filtros) */
.dropdown__menu--esquerda {
  left: 0;
  right: auto;
  transform-origin: top left;
}

.dropdown--open .dropdown__menu {
  display: block;
  opacity: 1;
  pointer-events: auto;
  transform: scale(1) translateY(0);
}

@starting-style {
  .dropdown--open .dropdown__menu {
    opacity: 0;
    transform: scale(0.95) translateY(-4px);
  }
}

.dropdown__item {
  align-items: center;
  background: none;
  border: none;
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  font-family: var(--font-sans);
  font-size: 1.4rem;
  gap: 0.8rem;
  padding: 0.9rem 1.2rem;
  text-align: left;
  text-decoration: none;
  transition: background 0.15s ease;
  white-space: nowrap;
  width: 100%;
}

.dropdown__item:hover,
.dropdown__item:focus-visible {
  background: var(--orange-50);
  text-decoration: none;
}

.dropdown__item > svg {
  color: var(--orange-500);
  flex: none;
  width: 1.6rem;
}

/* Item desligado (ex.: ação em massa que não vale para a seleção — o title explica o motivo) */
.dropdown__item:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}
.dropdown__item:disabled:hover { background: none; }

/* Selo de canal no fim do item (ações em massa da lista unificada) */
.dropdown__item > .canal-marca { margin-left: auto; }

.dropdown__titulo {
  align-items: center;
  color: var(--text-tertiary);
  display: flex;
  font-size: 1.1rem;
  font-weight: 600;
  gap: 0.6rem;
  letter-spacing: 0.04em;
  padding: 0.6rem 1.2rem 0.4rem;
  text-transform: uppercase;
  white-space: nowrap;
}

.dropdown__item + .dropdown__titulo {
  border-top: 1px solid var(--border-color-light);
  margin-top: 0.4rem;
  padding-top: 0.8rem;
}

.dropdown__nota {
  color: var(--text-muted);
  font-size: 1.2rem;
  font-style: italic;
  padding: 0.2rem 1.2rem 0.6rem;
  white-space: normal;
}

/* MODAL
   Um só visual em todas as telas. Abre com a classe `.open` (Listagens.abrirModal / initModais fecham
   com Esc, clique no fundo e [data-fechar-modal]). */

.modal {
  align-items: center;
  backdrop-filter: blur(4px);
  background: rgba(0, 0, 0, 0.5);
  display: none;
  inset: 0;
  justify-content: center;
  padding: 2rem;
  position: fixed;
  z-index: var(--z-modal);
}

.modal.open {
  display: flex;
}

.modal__content {
  animation: scaleIn 0.2s ease-out;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  max-height: 90vh;
  max-width: 440px;
  overflow-y: auto;
  padding: 2.4rem;
  position: relative;
  width: 100%;
}

.modal__content--sm { max-width: 360px; }
.modal__content--wide { max-width: 640px; }

.modal__header {
  align-items: center;
  display: flex;
  gap: 1.2rem;
  justify-content: space-between;
  margin-bottom: 1.6rem;
}

.modal__icon {
  align-items: center;
  background: var(--red-50);
  border-radius: 50%;
  color: var(--red-500);
  display: flex;
  height: 4.8rem;
  justify-content: center;
  margin-bottom: 1.6rem;
  width: 4.8rem;
}

.modal__icon--primary {
  background: var(--orange-50);
  color: var(--orange-500);
}

.modal__title {
  color: var(--text-primary);
  font-size: 1.8rem;
  font-weight: 600;
}

.modal__icon ~ .modal__title,
.modal__title + .modal__description {
  margin-bottom: 0.8rem;
}

.modal__subtitle {
  color: var(--text-secondary);
  font-size: var(--body-02);
}

.modal__description {
  color: var(--text-secondary);
  font-size: 1.4rem;
  line-height: 1.6;
  margin-bottom: 2.4rem;
}

.modal__store-name {
  color: var(--text-primary);
  font-weight: 600;
}

.modal__close {
  align-items: center;
  background: none;
  border: none;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  justify-content: center;
  padding: 0.4rem;
  transition: color var(--transition-normal), background var(--transition-normal);
}

.modal__close:hover {
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

.modal__close svg {
  height: 2rem;
  width: 2rem;
}

.modal__body {
  margin-bottom: 2.4rem;
}

.modal__body p {
  color: var(--text-secondary);
  line-height: 1.5;
}

.modal__body strong {
  color: var(--text-primary);
}

.modal__body > .field:last-child,
.modal__body > .form-group:last-child {
  margin-bottom: 0;
}

.modal__footer,
.modal__actions {
  display: flex;
  gap: 1.2rem;
  justify-content: flex-end;
}

/* Diálogo criado por Listagens.avisar/confirmar (no lugar de alert/confirm nativos); duas classes para vencer
   o .modal redefinido pela landing */
.modal.modal--dialogo {
  z-index: var(--z-dialogo);
}

.modal__description--pre {
  white-space: pre-line;
}

/* UTILITÁRIOS */

[hidden] {
  display: none !important;
}

.u-ml-auto {
  margin-left: auto !important;
}

.table-wrap {
  overflow-x: auto;
  width: 100%;
}

/* Dentro do .table-wrap (que rola) o th gruda no topo do wrapper, não da página — sem o deslocamento do
   cabeçalho, que cobriria a primeira linha */
.table-wrap .table th {
  top: 0;
}

/* Coluna de ações das tabelas: encolhe ao conteúdo, alinhada à direita */
.table__actions {
  text-align: right;
  white-space: nowrap;
  width: 1%;
}

.table__acoes {
  display: inline-flex;
  gap: var(--space-1);
}

/* Card com tabela encostada na borda: a borda do card fecha a tabela e o cabeçalho mantém o respiro */
.card--sem-padding .table tbody tr:last-child td {
  border-bottom: none;
}

.card--sem-padding > .card__header {
  margin: 0;
  padding: 1.6rem 2rem;
}

/* Lista vazia dentro de card */
.empty-state--sm {
  gap: var(--space-2);
  padding: 2.4rem 2rem;
}

.empty-state--sm .empty-state__icon {
  animation: none;
  height: 4rem;
  width: 4rem;
}

.pagination__info {
  align-self: center;
  color: var(--text-secondary);
  font-size: var(--body-02);
}

.text-right { text-align: right; }
.text-center { text-align: center; }
