/* Sistema visual do backoffice (admin e agente), segundo o K-Invest Brand Kit 3.0.
   Carregado em último lugar: ganha ao tema (admin.css) e às folhas dos módulos. Referência ao vivo em /admin/estilo.
   Regras do kit aplicadas aqui: preto, branco e cinzas; amarelo K (#FFD100) só em ação e destaque, sempre com texto preto
   e nunca como cor de texto ou de ícone sobre branco; uma só família (Archivo); arestas vivas (4px no máximo, sem pílulas);
   separação com linhas e fundos, não com sombras; caixa-alta só em etiquetas curtas (eyebrow). */

/* Archivo servida pelo próprio site (public/fonts), variável 400–800, latim e latim estendido; itálico para a ênfase.
   Declaradas depois das do tokens.css do kit: ganham estas (a mesma letra, a que os layouts pré-carregam) */
@font-face { font-family: 'Archivo'; font-style: normal; font-weight: 400 800; font-display: swap; src: url('../../fonts/archivo-latin-ext.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Archivo'; font-style: normal; font-weight: 400 800; font-display: swap; src: url('../../fonts/archivo-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Archivo'; font-style: italic; font-weight: 400 800; font-display: swap; src: url('../../fonts/archivo-italic-latin-ext.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Archivo'; font-style: italic; font-weight: 400 800; font-display: swap; src: url('../../fonts/archivo-italic-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
    /* ---------- Tokens do Brand Kit 3.0: vêm do webkit (brand-kit/assets/tokens.css, carregado antes desta folha nos layouts).
       Aqui ficam só as diferenças do backoffice. */
    --ink-muted: #595959;   /* um pouco mais escuro do que o cinza médio do kit (#6b6b6b): legendas e metadados mais legíveis nas listas */

    /* ---------- Nomes do backoffice (usados pelas folhas dos módulos): apontam para os tokens do kit.
       O kit só tem duas cores funcionais (erro, sucesso). Aviso e informação ficam neutros: o aviso é o amarelo
       como fundo (destaque, com texto preto) e a informação é o bloco invertido. */
    --bo-ink: var(--ink);
    --bo-body-ink: var(--ink-body);
    --bo-muted: var(--ink-muted);
    --bo-line: var(--line);
    --bo-line-strong: var(--line-strong);
    --bo-bg: var(--surface);
    --bo-surface: var(--bg);
    --bo-accent: var(--accent);
    --bo-ok: var(--sucesso);
    --bo-ok-bg: #e6f2eb;
    --bo-warn: var(--ink);
    --bo-warn-bg: #fff4c2;
    --bo-danger: var(--erro);
    --bo-danger-bg: #fbeceb;
    --bo-info: var(--ink);
    --bo-info-bg: var(--surface);
    --bo-radius: var(--radius-md);
    --bo-radius-lg: var(--radius-md);
    --bo-title: var(--font-brand);
    --bo-body: var(--font-brand);

    /* As cores do tema (admin.css) passam a preto: sem roxos, azuis nem degradês */
    --theme-default: var(--ink); --theme-default2: var(--ink); --theme-default3: var(--ink); --theme-default4: var(--grafite);
    --theme-default5: var(--ink); --theme-default6: var(--ink); --theme-default7: var(--ink); --theme-default8: var(--ink);
    --theme-default9: var(--ink); --theme-default10: var(--ink);
    --theme-gradient1: none; --theme-gradient2: none; --theme-gradient3: none; --theme-gradient4: none; --theme-gradient5: none;
    --theme-gradient6: none; --theme-gradient7: none; --theme-gradient8: none; --theme-gradient9: none; --theme-gradient10: none;
    --theme-gradient11: none; --theme-gradient12: none; --theme-gradient13: none;
}

/* ---------- Letra e página: uma família, corpo `small` (14/22) por ser uma área de listas densas e fichas */
body, button, input, select, textarea, .btn, .form-control, .font-roboto, .font-rubik, .dropdown-menu, .modal, .tooltip, .popover {
    font-family: var(--font-brand) !important;
}
body {
    background: var(--surface);
    font-size: 14px;
    line-height: 22px;
    color: var(--ink-body);
    -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6,
.page-header h3, .page-header h1 {
    font-family: var(--font-brand);
    color: var(--ink);
    text-transform: none;
    letter-spacing: 0;
}
h1, .h1 { font-weight: 700; letter-spacing: -.015em; }
h2, .h2 { font-weight: 700; letter-spacing: -.01em; }
h3, h4, h5, h6, .h3, .h4, .h5, .h6 { font-weight: 600; }
.page-wrapper .page-body-wrapper .page-body,
.page-body { background: var(--surface); }
/* :where() tira a especificidade: os títulos com classe (.kd-card-title, .bo-card-title) mantêm o tamanho deles */
:where(.page-body) h1 { font-size: 28px; line-height: 34px; }
:where(.page-body) h2 { font-size: 20px; line-height: 26px; }
:where(.page-body) h3 { font-size: 18px; line-height: 24px; }
:where(.page-body) :is(h4, h5) { font-size: 16px; line-height: 22px; }
:where(.page-body) h6 { font-size: 14px; line-height: 20px; }
p { color: inherit; }
strong, b { font-weight: 600; }
small, .small { font-size: 12px; line-height: 18px; }
.text-muted, .font-roboto { color: var(--ink-muted) !important; }
table, .kl-num, .bo-num, .bo-figure-value, [data-num] { font-variant-numeric: tabular-nums; }
::selection { background: var(--amarelo-k); color: var(--on-accent); }

/* Foco: anel `focus` de 2px a 2px de distância em tudo o que é interativo; sobre preto passa a amarelo */
:focus-visible { outline: 2px solid var(--focus) !important; outline-offset: 2px; box-shadow: none !important; }
:focus:not(:focus-visible) { outline: none; }
.page-sidebar, .bo-inverse, .toastify.bo-toast { --focus: var(--amarelo-k); }

/* Ligações: `ink` sublinhado; nunca o azul do navegador ou do Bootstrap */
a { color: var(--ink); text-underline-offset: 3px; }
a:hover { color: var(--ink); }
/* Ligações no meio do texto e das tabelas das páginas antigas: sublinhadas, para se distinguirem do texto (sem tocar em botões e menus) */
:where(.page-body) :is(p, td, dd):not(:where(.kl, .bo-record, .bo-card) *) a:not([class*="btn"]):not(.nav-link):not(.dropdown-item):not(.badge):not(.kl-icon):not(:has(> i:only-child, > svg:only-child, > img:only-child)) { text-decoration: underline; text-decoration-color: rgba(0, 0, 0, .5); }
:where(.page-body) :is(p, td, dd):not(:where(.kl, .bo-record, .bo-card) *) a:not([class*="btn"]):hover { text-decoration-color: currentColor; }

/* Ícones: traço único de 1,5px em `ink` ou `ink-muted`; nunca amarelos */
svg.feather, i[data-feather] + svg, .feather { stroke-width: 1.5; }

/* ---------- Moldura: cabeçalho branco com linha, como o do site */
.page-wrapper .page-main-header {
    background: var(--bg);
    box-shadow: none;
    border-bottom: 1px solid var(--line);
}
.page-main-header .header-menu > li > a,
.page-main-header .header-menu > li > a svg,
.page-main-header .toggle-sidebar svg { color: var(--ink); stroke-width: 1.5; }
.page-main-header .header-menu > li > a:hover svg { color: var(--ink); }
.page-main-header .header-menu > li > a.bo-switch {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    min-height: 40px;
    padding: 0 var(--space-3);
    border: 1.5px solid var(--ink);
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 14px;
    color: var(--ink);
    white-space: nowrap;
    background: var(--bg);
}
.page-main-header .header-menu > li > a.bo-switch:hover { background: var(--ink); color: var(--inverse-ink); }
.page-main-header .header-menu > li > a.bo-switch:hover svg { color: var(--inverse-ink); }
.page-main-header .header-menu > li > a.bo-switch svg { width: 16px; height: 16px; }
@media (max-width: 575px) { .page-main-header .header-menu > li > a.bo-switch span { display: none; } }
/* Pesquisa do cabeçalho: o contentor (com a lupa do tema à esquerda) é o campo do kit — borda `line-strong`, `radius-sm` */
.page-main-header .search-form {
    background: var(--bg) !important;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-sm) !important;
}
.page-main-header .search-form:focus-within { border-color: var(--ink); outline: 2px solid var(--focus); outline-offset: 2px; }
.page-main-header .search-form input,
.page-main-header .search-form .form-control {
    background: transparent !important;
    border: 0 !important;
    color: var(--ink);
    font-size: 14px;
    outline: none !important;
}
.page-main-header .search-form input::placeholder { color: var(--ink-muted); text-transform: none; }
/* Avatar e menu do perfil: quadrado de arestas vivas */
.page-main-header .profile-avatar img { border-radius: var(--radius-md); }
.onhover-show-div, .profile-dropdown, .notification-dropdown, .dropdown-menu {
    border: 1px solid var(--line) !important;
    border-radius: var(--radius-md) !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, .08) !important;
    background: var(--bg) !important;
}
.profile-dropdown li a, .profile-dropdown li a span, .dropdown-item { color: var(--ink) !important; font-size: 14px; }
.profile-dropdown li a:hover, .dropdown-item:hover, .dropdown-item:focus { background: var(--surface) !important; color: var(--ink) !important; }
.dropdown-item.active, .dropdown-item:active { background: var(--ink) !important; color: var(--inverse-ink) !important; }
/* Número do sino: amarelo K com texto preto (destaque), não o vermelho do tema */
.page-main-header .notification-badge,
.page-main-header .header-menu .label-pill {
    background: var(--accent) !important;
    color: var(--on-accent) !important;
    border-radius: var(--radius-sm) !important;
    font-weight: 700;
    box-shadow: none !important;
}
.notification-dropdown .dropdown-title { border-bottom: 1px solid var(--line); }
.notification-dropdown .dropdown-title h6 { font-size: 16px; font-weight: 700; color: var(--ink); }

/* ---------- Moldura: menu lateral preto, logótipo branco (versão principal do logótipo), item ativo com o traço amarelo */
.page-wrapper .page-body-wrapper .page-sidebar {
    background: var(--preto-k);
    box-shadow: none;
    border-right: 0;
    color: var(--inverse-ink);
}
.page-wrapper .page-body-wrapper .page-sidebar .logo-wrap {
    background: var(--preto-k);
    border-bottom: 1px solid #262626;
    box-shadow: none;
}
.page-wrapper .page-body-wrapper .page-sidebar .logo-wrap .back-btn svg { color: var(--inverse-ink); }
.bo-logo { display: block; height: 40px; width: auto; min-width: 120px; }
.page-wrapper .page-body-wrapper .page-sidebar .main-sidebar { background: var(--preto-k); }
.page-wrapper .page-body-wrapper .page-sidebar .main-sidebar .user-profile {
    background: var(--preto-k);
    border-bottom: 1px solid #262626;
    box-shadow: none;
}
.page-wrapper .page-body-wrapper .page-sidebar .main-sidebar .user-profile h6 { color: var(--inverse-ink); font-weight: 600; font-size: 15px; }
.page-wrapper .page-body-wrapper .page-sidebar .main-sidebar .user-profile span,
.page-wrapper .page-body-wrapper .page-sidebar .main-sidebar .user-profile .font-roboto { color: #a8a8a8 !important; font-size: 12px; overflow-wrap: anywhere; }
.page-wrapper .page-body-wrapper .page-sidebar .main-sidebar .user-profile img { border-radius: var(--radius-md); }
.page-wrapper .page-body-wrapper .page-sidebar .main-sidebar .sidebar-menu > li > a {
    border-radius: 0;
    border-left: var(--barra-k-altura) solid transparent;
    color: #e6e6e6;
    font-family: var(--font-brand);
    font-weight: 500;
    font-size: 15px;
    letter-spacing: 0;
    text-transform: none;
    background: transparent;
}
.page-wrapper .page-body-wrapper .page-sidebar .main-sidebar .sidebar-menu > li > a span { color: inherit; text-transform: none; }
.page-wrapper .page-body-wrapper .page-sidebar .main-sidebar .sidebar-menu > li > a::after { display: none; }
.page-wrapper .page-body-wrapper .page-sidebar .main-sidebar .sidebar-menu > li > a svg,
.page-wrapper .page-body-wrapper .page-sidebar .main-sidebar .sidebar-menu > li > a .according-menu i { color: #a8a8a8 !important; stroke-width: 1.5; }
.page-wrapper .page-body-wrapper .page-sidebar .main-sidebar .sidebar-menu > li > a:hover {
    background: #141414;
    color: var(--inverse-ink);
}
.page-wrapper .page-body-wrapper .page-sidebar .main-sidebar .sidebar-menu > li > a.active {
    background: #141414;
    color: var(--inverse-ink);
    font-weight: 600;
    border-left-color: var(--accent);
}
.page-wrapper .page-body-wrapper .page-sidebar .main-sidebar .sidebar-menu > li > a:hover svg,
.page-wrapper .page-body-wrapper .page-sidebar .main-sidebar .sidebar-menu > li > a.active svg,
.page-wrapper .page-body-wrapper .page-sidebar .main-sidebar .sidebar-menu > li > a.active .according-menu i { color: var(--inverse-ink) !important; }
/* Títulos das secções do menu (Comercial, Equipa) e dos grupos do submenu Administração (Site, Regras) */
.page-wrapper .page-body-wrapper .page-sidebar .main-sidebar .sidebar-menu > li.sidebar-title {
    padding: 18px 20px 6px;
    font-family: var(--font-brand);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #8a8a8a;
}
.page-wrapper .page-body-wrapper .page-sidebar .main-sidebar .sidebar-menu .nav-submenu li.nav-submenu-title {
    padding: 12px 20px 4px 35px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #8a8a8a;
}
.page-wrapper .page-body-wrapper .page-sidebar .main-sidebar .sidebar-menu > li.sidebar-item--end { margin-top: 12px; border-top: 1px solid #262626; }
/* Número do item (App\Support\MenuCounts): amarelo da marca com texto preto, encostado à direita */
.page-wrapper .page-body-wrapper .page-sidebar .main-sidebar .sidebar-menu > li > a { position: relative; }
.bo-mc {
    position: absolute;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
    min-width: 22px;
    padding: 1px 7px;
    border-radius: 999px;
    background: var(--accent);
    color: var(--preto-k);
    font-size: 12px;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
    font-variant-numeric: tabular-nums;
}
.bo-mc i { font-style: normal; }
/* Submenu: sem as setas duplas do tema, recuado e em cinza claro; o ativo a branco e em negrito */
.page-wrapper .page-body-wrapper .page-sidebar .main-sidebar .sidebar-menu .nav-submenu { background: var(--preto-k); }
.page-wrapper .page-body-wrapper .page-sidebar .main-sidebar .sidebar-menu .nav-submenu li a {
    color: #a8a8a8;
    font-size: 14px;
    text-transform: none;
    letter-spacing: 0;
}
.page-wrapper .page-body-wrapper .page-sidebar .main-sidebar .sidebar-menu .nav-submenu li a svg { display: none; }
.page-wrapper .page-body-wrapper .page-sidebar .main-sidebar .sidebar-menu .nav-submenu li a::before { display: none; }
.page-wrapper .page-body-wrapper .page-sidebar .main-sidebar .sidebar-menu .nav-submenu li a.active,
.page-wrapper .page-body-wrapper .page-sidebar .main-sidebar .sidebar-menu .nav-submenu li a:hover { color: var(--inverse-ink); font-weight: 600; }
.page-wrapper .page-body-wrapper .page-sidebar .upgrade-box { background: #141414; border-radius: var(--radius-md); color: var(--inverse-ink); }
.page-wrapper .page-body-wrapper .page-sidebar .upgrade-box::after { display: none; }
.page-sidebar .custom-scrollbar { scrollbar-color: #333333 var(--preto-k); }
.page-sidebar .custom-scrollbar::-webkit-scrollbar-track { background: var(--preto-k); }
.page-sidebar .custom-scrollbar::-webkit-scrollbar-thumb { background: #333333; }
/* Rodapé: bloco legal em `caption` `ink-muted` (BlocoLegal do kit) */
.footer { background: transparent; color: var(--ink-muted); box-shadow: none; border-top: 1px solid var(--line); }
.footer p { font-size: 12px; line-height: 18px; color: var(--ink-muted); }

/* ---------- Título da página: barra K por cima do título (uma por vista), `h1` 28/34, migalhas discretas */
.page-header { padding-top: var(--space-4); padding-bottom: var(--space-3); }
.page-header .page-header-left h1,
.page-header .page-header-left h3 {
    position: relative;
    margin: 0;
    padding-top: calc(var(--barra-k-altura) + var(--space-3));
    font-size: 28px;
    line-height: 34px;
    font-weight: 700;
    letter-spacing: -.015em;
    color: var(--ink);
}
.page-header .page-header-left h1::before,
.page-header .page-header-left h3::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: var(--barra-k-largura);
    height: var(--barra-k-altura);
    background: var(--accent);
}
.page-header .breadcrumb { background: transparent; padding: 0; margin: 0; font-size: 13px; }
.page-header .breadcrumb a, .page-header .breadcrumb a svg, .page-header .breadcrumb .fa { color: var(--ink-muted); background: transparent; }
.page-header .breadcrumb a:hover { color: var(--ink); text-decoration: underline; }
.page-header .breadcrumb .breadcrumb-item.active { color: var(--ink); }
.page-header .breadcrumb .breadcrumb-item + .breadcrumb-item::before { color: var(--line-strong); }
.page-header .breadcrumb a::after { display: none; }
/* Etiqueta curta sobre um título (eyebrow): a única caixa-alta do kit */
.bo-eyebrow { display: block; margin: 0 0 var(--space-2); font-size: 12px; line-height: 16px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-muted); }

/* ---------- Botões (componente Botao do kit; <x-bo.button> e as classes antigas do tema)
   Primário amarelo para a ação principal da vista; secundário contornado a 1,5px; perigo contornado a `erro`; link sublinhado.
   Altura 40px (32px os pequenos) por ser uma área de trabalho densa; o site usa 48px. Sem caixa-alta nem pílulas. */
.bo-btn,
.btn-gradient, .btn-pill, .btn-solid, .btn-dashed, .btn-light-bg,
.btn.btn-primary, .btn.btn-secondary, .btn.btn-info, .btn.btn-danger, .btn.btn-dark, .btn.btn-success, .btn.btn-warning, .btn.btn-light,
.btn.btn-outline-primary, .btn.btn-outline-secondary, .btn.btn-outline-dark, .btn.btn-outline-danger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    min-height: 40px;
    padding: 0 var(--space-3);
    border: 1.5px solid transparent;
    border-radius: var(--radius-md) !important;
    font-family: var(--font-brand);
    font-weight: 600;
    font-size: 15px;
    line-height: 20px;
    letter-spacing: 0;
    text-transform: none !important;
    text-decoration: none;
    box-shadow: none !important;
    background-image: none !important;
    transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.btn-sm.btn-gradient, .btn-sm.btn-pill, .btn.btn-sm, .bo-btn--sm { min-height: 32px; padding: 0 12px; font-size: 13px; line-height: 18px; }
.btn-gradient::after, .btn-gradient::before, .btn-pill::after, .btn-pill::before, .btn-dashed::after { display: none; }
/* Primário: fundo `accent`, texto `on-accent`; no hover passa a preto com texto branco */
.bo-btn--primary,
.btn-gradient, .btn-pill.btn-gradient, .btn-solid, .btn.btn-primary, .btn.btn-success {
    background: var(--accent) !important;
    border-color: var(--accent) !important;
    color: var(--on-accent) !important;
}
.bo-btn--primary:hover,
.btn-gradient:hover, .btn-solid:hover, .btn.btn-primary:hover, .btn.btn-success:hover {
    background: var(--preto-k) !important;
    border-color: var(--preto-k) !important;
    color: var(--branco) !important;
}
/* Ação forte que não é a principal da vista (ex.: "Filtrar"): preto */
.bo-btn--dark, .btn.btn-dark {
    background: var(--preto-k) !important;
    border-color: var(--preto-k) !important;
    color: var(--branco) !important;
}
.bo-btn--dark:hover, .btn.btn-dark:hover { background: var(--grafite) !important; border-color: var(--grafite) !important; }
/* Secundário: contorno 1,5px `ink`, texto `ink`; hover invertido */
.bo-btn--secondary,
.btn-dashed, .btn-light-bg, .btn.btn-secondary, .btn.btn-info, .btn.btn-light, .btn.btn-warning,
.btn.btn-outline-primary, .btn.btn-outline-secondary, .btn.btn-outline-dark {
    background: var(--bg) !important;
    border-color: var(--ink) !important;
    color: var(--ink) !important;
}
.bo-btn--secondary:hover,
.btn-dashed:hover, .btn-light-bg:hover, .btn.btn-secondary:hover, .btn.btn-info:hover, .btn.btn-light:hover, .btn.btn-warning:hover,
.btn.btn-outline-primary:hover, .btn.btn-outline-secondary:hover, .btn.btn-outline-dark:hover {
    background: var(--ink) !important;
    border-color: var(--ink) !important;
    color: var(--inverse-ink) !important;
}
.bo-btn--danger, .btn.btn-danger, .btn.btn-outline-danger { background: var(--bg) !important; border-color: var(--erro) !important; color: var(--erro) !important; }
.bo-btn--danger:hover, .btn.btn-danger:hover, .btn.btn-outline-danger:hover { background: var(--erro) !important; border-color: var(--erro) !important; color: var(--branco) !important; }
.bo-btn--link, .btn.btn-link {
    min-height: 0; padding: 0; border: 0; background: none !important; color: var(--ink) !important;
    font-weight: 600; text-decoration: underline; text-underline-offset: 4px;
}
.bo-btn svg, .btn svg { width: 16px; height: 16px; stroke-width: 1.5; }
.bo-btn:disabled, .bo-btn.disabled, .btn:disabled, .btn.disabled { opacity: .4; pointer-events: none; }
.btn-close { border-radius: var(--radius-sm); opacity: .7; }
.btn-close:hover { opacity: 1; }

/* ---------- Campos (formulários): rótulo por cima, borda `line-strong`, `radius-sm`, foco `focus`, erro em `erro` */
.form-control, .form-select, select.form-control, .custom-select, .select2-container--default .select2-selection--single, .select2-container--default .select2-selection--multiple {
    border: 1px solid var(--line-strong) !important;
    border-radius: var(--radius-sm) !important;
    background-color: var(--bg);
    color: var(--ink);
    font-size: 15px;
    box-shadow: none !important;
}
.form-control::placeholder { color: var(--ink-muted); opacity: 1; }
.form-control:focus, .form-select:focus { border-color: var(--ink) !important; outline: 2px solid var(--focus); outline-offset: 2px; }
.form-control:disabled, .form-control[readonly], .form-select:disabled { background: var(--surface); color: var(--ink-body); border-color: var(--line) !important; }
.form-control.is-invalid, .form-select.is-invalid, .is-invalid .form-control { border-color: var(--erro) !important; background-image: none; }
.invalid-feedback, .text-danger, .help-block.text-danger { color: var(--erro) !important; font-size: 13px; }
label, .form-label, .col-form-label { color: var(--ink); font-weight: 600; font-size: 14px; }
.form-text, .help-block { color: var(--ink-muted); font-size: 12px; }
.form-check-input { border: 1.5px solid var(--line-strong); border-radius: var(--radius-sm); }
.form-check-input[type="radio"] { border-radius: 50%; }
.form-check-input:checked { background-color: var(--ink); border-color: var(--ink); }
.form-check-input:focus { box-shadow: none; outline: 2px solid var(--focus); outline-offset: 2px; }
.form-switch .form-check-input { border-radius: 2em; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--ink); }
.select2-container--default .select2-results__option--highlighted[aria-selected], .select2-container--default .select2-results__option--highlighted.select2-results__option--selectable { background: var(--ink) !important; color: var(--inverse-ink) !important; }
.select2-container--default .select2-selection--multiple .select2-selection__choice { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); color: var(--ink); }
.select2-dropdown { border-color: var(--line-strong); border-radius: var(--radius-sm); }

/* ---------- Etiquetas de estado (EtiquetaEstado do kit): `caption` 600, 4×8px, `radius-sm`, uma ou duas palavras.
   Neutra (cinza claro), invertida (preto), destaque (amarelo + preto), contornada; erro e sucesso só para estados de sistema. */
.bo-badge, .badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    padding: 3px 8px;
    border: 1px solid transparent;
    border-radius: var(--radius-sm) !important;
    background: var(--surface);
    color: var(--ink);
    font-family: var(--font-brand);
    font-size: 12px;
    line-height: 16px;
    font-weight: 600;
    letter-spacing: 0;
    text-transform: none;
    white-space: nowrap;
}
.bo-badge--inverse, .badge.bg-dark, .badge-dark, .badge.bg-primary, .badge-primary, .badge.bg-info, .badge-info, .bo-badge--info { background: var(--inverse-bg) !important; color: var(--inverse-ink) !important; }
.bo-badge--accent, .badge.bg-warning, .badge-warning, .bo-badge--warn { background: var(--accent) !important; color: var(--on-accent) !important; }
.bo-badge--outline, .badge.bg-light, .badge-light, .badge.bg-secondary, .badge-secondary { background: var(--bg) !important; border-color: var(--line-strong) !important; color: var(--ink) !important; }
.bo-badge--ok, .badge.bg-success, .badge-success { background: var(--bo-ok-bg) !important; color: var(--sucesso) !important; }
.bo-badge--danger, .badge.bg-danger, .badge-danger { background: var(--bo-danger-bg) !important; color: var(--erro) !important; }

/* ---------- Cartões: fundo branco sobre `surface`, linha `line`, `radius-md`, sem sombra (a marca separa com linhas e fundos) */
.page-body .card, .bo-card {
    background: var(--bg);
    border: 1px solid var(--line) !important;
    border-radius: var(--radius-md) !important;
    box-shadow: none !important;
}
.page-body .card .card-header { background: var(--bg); border-bottom: 1px solid var(--line); border-radius: var(--radius-md) var(--radius-md) 0 0; }
.page-body .card .card-header h5, .page-body .card .card-header h4 { font-size: 18px; font-weight: 600; color: var(--ink); text-transform: none; letter-spacing: 0; }
.page-body .card .card-footer { background: var(--bg); border-top: 1px solid var(--line); }
.bo-card {
    padding: 20px var(--space-4);
    margin-bottom: var(--space-3);
}
/* Blocos de tarefas e documentos incluídos soltos numa ficha antiga: alinham com o container-fluid à volta */
.page-body > .bo-card { margin-left: 12px; margin-right: 12px; }
.bo-card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: var(--space-3); }
/* Título de cartão: `eyebrow` (curto, caixa-alta) — o mesmo tratamento dos rótulos do site */
.bo-card-title { margin: 0; font-family: var(--font-brand); font-size: 12px; line-height: 16px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ink); }
.bo-card-count { color: var(--ink-muted); font-weight: 600; }
.bo-card-link { font-size: 13px; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(0, 0, 0, .35); }
.bo-card-link:hover { text-decoration-color: currentColor; }
.bo-empty { margin: 0; color: var(--ink-muted); }
.bo-list { list-style: none; margin: 0; padding: 0; }
.bo-list > li { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.bo-list > li:first-child { border-top: 0; padding-top: 0; }
.bo-list .bo-main { flex: 1 1 auto; min-width: 0; color: var(--ink); }
.bo-list .bo-sub { display: block; font-size: 13px; color: var(--ink-muted); }
/* Fotografias: arestas vivas (`radius-0`) */
.bo-thumb { width: 56px; height: 42px; object-fit: cover; border-radius: var(--radius-0); flex: 0 0 auto; }
.page-body img.img-thumbnail, .page-body .img-props, .page-body .img-search { border-radius: var(--radius-0); }
.bo-fields { display: grid; grid-template-columns: minmax(120px, 40%) 1fr; gap: 6px 14px; margin: 0; }
.bo-fields dt { font-weight: 400; color: var(--ink-muted); }
.bo-fields dd { margin: 0; color: var(--ink); overflow-wrap: anywhere; }

/* ---------- Ficha (<x-bo.record>) */
.bo-record { padding-bottom: var(--space-4); }
.bo-record-head {
    position: relative;
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    padding: var(--space-4);
    margin-bottom: var(--space-3);
}
.bo-record-title { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.bo-record-title h1 { margin: 0; font-size: 28px; line-height: 34px; }
.bo-record-meta { margin-top: var(--space-2); display: flex; flex-wrap: wrap; gap: 6px 18px; color: var(--ink-muted); }
.bo-record-meta a { display: inline-flex; align-items: center; gap: 5px; color: var(--ink); font-weight: 600; }
.bo-record-meta svg, .bo-card .bo-main svg, .bo-card p svg { width: 16px; height: 16px; stroke-width: 1.5; vertical-align: -3px; }
.bo-record-actions { margin-top: var(--space-3); display: flex; flex-wrap: wrap; gap: var(--space-2); }
.bo-figures { display: flex; flex-wrap: wrap; gap: 12px 32px; margin-top: var(--space-3); }
/* Valores em destaque: estilo `price` (22/28, 700, algarismos tabulares) */
.bo-figure-value { font-family: var(--font-brand); font-size: 22px; line-height: 28px; font-weight: 700; color: var(--ink); }
.bo-figure-label { font-size: 13px; color: var(--ink-muted); }
.bo-record-body { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: var(--space-3); align-items: start; }
@media (max-width: 991px) {
    .bo-record-body { grid-template-columns: minmax(0, 1fr); }
    .bo-record-head { padding: var(--space-3); }
}

/* ---------- Cronologia (<x-bo.timeline>) */
.bo-tl { list-style: none; margin: 0; padding: 0; }
.bo-tl-item { display: grid; grid-template-columns: 78px 1fr; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.bo-tl-item:first-child { border-top: 0; padding-top: 0; }
.bo-tl-when { font-size: 13px; color: var(--ink-muted); font-variant-numeric: tabular-nums; }
.bo-tl-title { font-weight: 600; color: var(--ink); }
.bo-tl-title a { color: var(--ink); }
.bo-tl-detail { display: block; font-size: 13px; color: var(--ink-muted); }
.bo-tl-more[hidden] { display: none; }

/* ---------- Tabelas: cabeçalho `cinza-claro`, linhas `cinza-tecnico`, algarismos tabulares (tabelas de documentos do kit) */
.page-body .table { color: var(--ink-body); border-color: var(--line); }
.page-body .table > :not(caption) > * > * { border-bottom-color: var(--line); }
.page-body .table thead th, .page-body .table > thead > tr > th {
    background: var(--surface);
    color: var(--ink);
    font-size: 13px;
    font-weight: 600;
    text-transform: none;
    letter-spacing: 0;
    border-bottom: 1px solid var(--line);
}
.page-body .table-striped > tbody > tr:nth-of-type(odd) > * { --bs-table-accent-bg: transparent; background: var(--bg); }
.page-body .table-hover > tbody > tr:hover > * { --bs-table-accent-bg: var(--surface); }

/* ---------- Separadores, paginação */
.nav-tabs { border-bottom: 1px solid var(--line); }
.nav-tabs .nav-link { border: 0; border-bottom: var(--barra-k-altura) solid transparent; border-radius: 0; color: var(--ink-muted); font-weight: 600; }
.nav-tabs .nav-link:hover { color: var(--ink); }
.nav-tabs .nav-link.active, .nav-tabs .nav-item.show .nav-link { color: var(--ink); background: transparent; border-bottom-color: var(--accent); }
.nav-pills .nav-link { border-radius: var(--radius-md); color: var(--ink); }
.nav-pills .nav-link.active { background: var(--ink); color: var(--inverse-ink); }
.pagination { gap: var(--space-1); }
.pagination .page-link {
    min-width: 36px;
    border: 1px solid var(--line) !important;
    border-radius: var(--radius-sm) !important;
    color: var(--ink) !important;
    background: var(--bg) !important;
    text-align: center;
    box-shadow: none !important;
}
.pagination .page-link:hover { border-color: var(--ink) !important; }
.pagination .page-item.active .page-link { background: var(--ink) !important; border-color: var(--ink) !important; color: var(--inverse-ink) !important; }
.pagination .page-item.disabled .page-link { color: var(--ink-muted) !important; opacity: .6; }

/* ---------- Janelas (modais) */
.modal-content { border: 0; border-radius: var(--radius-md); box-shadow: 0 12px 40px rgba(0, 0, 0, .2); }
.modal-header { border-bottom: 1px solid var(--line); }
.modal-header .modal-title { font-size: 20px; line-height: 26px; font-weight: 700; color: var(--ink); }
.modal-footer { border-top: 1px solid var(--line); gap: var(--space-2); }
.modal-backdrop.show { opacity: .6; }

/* ---------- Avisos na página (alert): fundo neutro com traço à esquerda pela cor funcional; o amarelo para "atenção" */
.alert {
    border: 1px solid var(--line);
    border-left-width: var(--barra-k-altura);
    border-radius: var(--radius-md);
    background: var(--bg);
    color: var(--ink);
    font-size: 14px;
}
.alert-success { border-left-color: var(--sucesso); }
.alert-danger { border-left-color: var(--erro); }
.alert-warning { border-left-color: var(--accent); }
.alert-info, .alert-primary, .alert-secondary, .alert-light, .alert-dark { border-left-color: var(--ink); }
.alert a { color: var(--ink); text-decoration: underline; }

/* ---------- Mensagens (partials/backoffice/flash): bloco invertido com ícone, como no site */
.toastify.bo-toast { background: var(--inverse-bg); color: var(--inverse-ink); border-radius: var(--radius-md); font-family: var(--font-brand); font-size: 14px; box-shadow: 0 8px 24px rgba(0, 0, 0, .2); }
.toastify.bo-toast--success { border-left: var(--barra-k-altura) solid var(--accent); }
.toastify.bo-toast--error { background: var(--erro); }
.toastify.bo-toast--info { border-left: var(--barra-k-altura) solid var(--branco); }

/* ---------- Barra de carregamento (substitui o GIF do tema): traço amarelo no topo */
.bo-loading { position: fixed; top: 0; left: 0; height: 3px; width: 0; background: var(--accent); z-index: 9999; transition: width 8s cubic-bezier(.1, .7, .2, 1); }
.bo-loading.is-on { width: 85%; }

/* ---------- Registar contacto (partials/activities/form): escolhas com `radius-sm`, nunca pílulas */
.bo-activity-kinds { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.bo-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); font-weight: 600; font-size: 13px; color: var(--ink); cursor: pointer; margin: 0; }
.bo-chip:has(input:checked) { border-color: var(--ink); background: var(--ink); color: var(--inverse-ink); }
.bo-chip input { accent-color: var(--ink); }
.bo-tl-delete { font-size: 12px; color: var(--ink-muted); margin-left: 6px; }

/* ---------- Estados vazios e de carregamento genéricos */
.bo-state { padding: var(--space-5) var(--space-4); text-align: left; color: var(--ink-muted); }
.bo-state strong { display: block; margin-bottom: var(--space-1); font-size: 16px; color: var(--ink); }

/* Botão "voltar ao topo" do tema: preto com a seta branca, arestas vivas */
.tap-top { background: var(--preto-k); color: var(--branco); border-radius: var(--radius-md); box-shadow: none; }

/* Tooltips: bloco invertido */
.tooltip .tooltip-inner { background: var(--inverse-bg); color: var(--inverse-ink); border-radius: var(--radius-sm); font-size: 12px; }
.tooltip .tooltip-arrow::before { border-top-color: var(--inverse-bg) !important; border-bottom-color: var(--inverse-bg) !important; }

/* Impressão: o menu e o cabeçalho não saem */
@media print {
    .page-sidebar, .page-main-header, .footer, .tap-top { display: none !important; }
    .page-body { background: #fff; }
}

/* ---------- Entrar e recuperar a palavra-passe (layouts/auth): painel preto da marca + formulário em branco.
   Sem o tema (admin.css): estas regras bastam por si. */
.bo-auth-body { margin: 0; background: var(--bg); color: var(--ink-body); font-size: 16px; line-height: 26px; }
.bo-auth-body *, .bo-auth-body *::before, .bo-auth-body *::after { box-sizing: border-box; }
.bo-auth { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); min-height: 100vh; }
.bo-auth-brand {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: var(--space-6);
    padding: var(--space-6);
    background: var(--preto-k);
    color: var(--inverse-ink);
}
.bo-auth-logo { display: inline-block; align-self: flex-start; }
.bo-auth-logo img { display: block; width: 160px; height: auto; }
.bo-auth-barra { display: block; width: var(--barra-k-largura); height: var(--barra-k-altura); margin-bottom: var(--space-3); background: var(--accent); }
.bo-auth-title { margin: 0; font-size: 56px; line-height: 60px; font-weight: 800; letter-spacing: -.02em; color: var(--inverse-ink); }
.bo-auth-lead { max-width: 28ch; margin: var(--space-3) 0 0; font-size: 18px; line-height: 28px; color: #e6e6e6; }
.bo-auth-legal { margin: 0; font-size: 12px; line-height: 18px; font-weight: 500; color: #a8a8a8; }
.bo-auth-panel { display: flex; align-items: center; justify-content: center; padding: var(--space-6) var(--space-4); }
.bo-auth-box { width: 100%; max-width: 400px; }
.bo-auth-h1 { margin: 0; font-size: 40px; line-height: 46px; font-weight: 700; letter-spacing: -.015em; color: var(--ink); }
.bo-auth-intro { margin: var(--space-2) 0 var(--space-5); color: var(--ink-body); }
.bo-auth-form { display: grid; gap: var(--space-4); }
.bo-auth-field { display: grid; gap: var(--space-2); }
.bo-auth-field label, .bo-auth-label-row label { margin: 0; font-size: 14px; line-height: 20px; font-weight: 600; color: var(--ink); }
.bo-auth-label-row { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-3); }
.bo-auth-label-row a, .bo-auth-back a { font-size: 14px; font-weight: 600; color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }
.bo-auth .form-control {
    display: block;
    width: 100%;
    height: 48px;
    padding: 0 var(--space-3);
    font-size: 16px;
    line-height: 24px;
}
.bo-auth-pwd { position: relative; }
.bo-auth-pwd .form-control { padding-right: 96px; }
.bo-auth-show {
    position: absolute;
    top: 6px;
    right: 6px;
    height: 36px;
    padding: 0 12px;
    border: 0;
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--ink);
    font: 600 14px/20px var(--font-brand);
    cursor: pointer;
}
.bo-auth-show:hover { background: var(--line); }
.bo-auth-check { display: flex; align-items: center; gap: var(--space-2); margin: 0; font-size: 14px; font-weight: 400; color: var(--ink-body); cursor: pointer; }
.bo-auth-check input { width: 18px; height: 18px; margin: 0; }
.bo-auth-submit { width: 100%; min-height: 48px !important; font-size: 15px; }
.bo-auth-back { margin: 0; text-align: center; }
.bo-auth-error, .bo-auth-ok {
    padding: 12px var(--space-3);
    border: 1px solid var(--line);
    border-left: var(--barra-k-altura) solid var(--erro);
    border-radius: var(--radius-md);
    font-size: 14px;
    line-height: 22px;
    color: var(--ink);
}
.bo-auth-ok { border-left-color: var(--sucesso); margin-bottom: var(--space-4); }
@media (max-width: 991px) {
    .bo-auth { grid-template-columns: 1fr; min-height: 0; }
    .bo-auth-brand { gap: var(--space-4); padding: var(--space-4) var(--space-3); }
    .bo-auth-logo img { width: 120px; }
    .bo-auth-title { font-size: 36px; line-height: 40px; }
    .bo-auth-lead { font-size: 16px; line-height: 26px; }
    .bo-auth-legal { display: none; }
    .bo-auth-panel { padding: var(--space-5) var(--space-3) var(--space-6); align-items: flex-start; }
    .bo-auth-h1 { font-size: 30px; line-height: 36px; }
}

/* ---------- Página de referência (/admin/estilo) */
.bo-swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: var(--space-3); margin: 0; padding: 0; list-style: none; }
.bo-swatch { border: 1px solid var(--line); border-radius: var(--radius-md); overflow: hidden; background: var(--bg); }
.bo-swatch-color { height: 64px; border-bottom: 1px solid var(--line); }
.bo-swatch-info { padding: 10px 12px; font-size: 13px; line-height: 18px; }
.bo-swatch-info strong { display: block; color: var(--ink); }
.bo-swatch-info code { color: var(--ink-muted); font-size: 12px; }
.bo-type-row { display: grid; grid-template-columns: 140px 1fr; gap: var(--space-3); align-items: baseline; padding: var(--space-2) 0; border-top: 1px solid var(--line); }
.bo-type-row:first-child { border-top: 0; }
.bo-type-row > code { color: var(--ink-muted); font-size: 12px; }
.bo-demo-row { display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: center; }
.bo-demo-inverse { padding: var(--space-4); background: var(--preto-k); border-radius: var(--radius-md); color: var(--inverse-ink); }
@media (max-width: 575px) { .bo-type-row { grid-template-columns: 1fr; gap: var(--space-1); } }

code, kbd, samp { color: var(--ink-muted); font-size: .9em; }
.alert { display: block; width: auto; }

/* O tema fixa Rubik, Roboto e Montserrat em muitas classes (migalhas, menus, cartões): tudo o que é texto passa a Archivo.
   Os ícones de fonte (Font Awesome: .fa, .fas, .far, .fab, fa-*) ficam de fora, para não perderem os desenhos. */
.page-wrapper :is(p, span, a, li, td, th, div, label, small, strong, b, em, h1, h2, h3, h4, h5, h6, dt, dd, legend, button, input, select, textarea, option):not(.fa):not(.fas):not(.far):not(.fab):not([class*="fa-"]) {
    font-family: var(--font-brand);
}

/* Rótulos de bloco dos modais (.kl-modal-h, "ESTADO", "OBSERVAÇÕES"): etiqueta curta (eyebrow), também quando são <label> */
:is(.page-body, .modal) label.kl-modal-h, .kl-modal-h { font-size: 12px; line-height: 16px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-muted); }

/* Cronologia das fichas: os estados comerciais (proposta aceite, rejeitada, pendente) não usam as cores de sistema.
   Aceite/fechado = invertido, pendente = destaque amarelo, rejeitado/perdido = contornado; a informação fica neutra. */
.bo-tl .bo-badge--ok { background: var(--inverse-bg) !important; color: var(--inverse-ink) !important; }
.bo-tl .bo-badge--warn { background: var(--accent) !important; color: var(--on-accent) !important; }
.bo-tl .bo-badge--danger { background: var(--bg) !important; border-color: var(--line-strong) !important; color: var(--ink-muted) !important; }
.bo-tl .bo-badge--info { background: var(--surface) !important; color: var(--ink) !important; }

/* ---------- Estados (backoffice): paleta funcional para se lerem de relance nas listas e nos resumos.
   Exceção pedida pelo dono ao Brand Kit 3.0, só na área de trabalho interna: o amarelo K continua reservado às ações
   principais; os estados usam fundos suaves com texto escuro (contraste ≥ 4,5:1) e um ponto de cor mais forte.
   novo/a tratar = âmbar · em curso = azul · agendado/marcado = verde-azulado · ganho/feito = verde · perdido/arquivado = cinza · atrasado/alerta = vermelho */
:root {
    --st-novo-c: #7a4600;    --st-novo-bg: #fff0c2;    --st-novo-bd: #efc35a;    --st-novo-dot: #e09a00;
    --st-curso-c: #1b4d9b;   --st-curso-bg: #e5edfc;   --st-curso-bd: #b4c9f1;   --st-curso-dot: #2f6fd6;
    --st-agenda-c: #0c5f55;  --st-agenda-bg: #dcf2ee;  --st-agenda-bd: #a3d8ce;  --st-agenda-dot: #12917e;
    --st-ganho-c: #13683a;   --st-ganho-bg: #dff2e5;   --st-ganho-bd: #a5d6b5;   --st-ganho-dot: #1f8a4c;
    --st-perdido-c: #4d4d4d; --st-perdido-bg: #ececec; --st-perdido-bd: #cfcfcf; --st-perdido-dot: #9a9a9a;
    --st-alerta-c: #a11a10;  --st-alerta-bg: #fde4e1;  --st-alerta-bd: #f0b2aa;  --st-alerta-dot: #d23a2c;
}
/* As etiquetas da base com nome de estado (usadas nas fichas, na cronologia e no estilo) */
.bo-badge--ok, .badge.bg-success, .badge-success, .bo-tl .bo-badge--ok { background: var(--st-ganho-bg) !important; color: var(--st-ganho-c) !important; border-color: var(--st-ganho-bg) !important; }
.bo-badge--warn, .badge.bg-warning, .badge-warning, .bo-tl .bo-badge--warn { background: var(--st-novo-bg) !important; color: var(--st-novo-c) !important; border-color: var(--st-novo-bg) !important; }
.bo-badge--info, .badge.bg-info, .badge-info, .bo-tl .bo-badge--info { background: var(--st-curso-bg) !important; color: var(--st-curso-c) !important; border-color: var(--st-curso-bg) !important; }
.bo-badge--danger, .badge.bg-danger, .badge-danger, .bo-tl .bo-badge--danger { background: var(--st-alerta-bg) !important; color: var(--st-alerta-c) !important; border-color: var(--st-alerta-bg) !important; }

/* Fecho das janelas: o tema pinta-o como um quadrado de cor no canto; volta ao "×" discreto do Bootstrap em todas as janelas */
.modal .modal-header .btn-close {
    position: static;
    flex: none;
    width: 1em;
    height: 1em;
    margin: 4px 0 0 auto;
    padding: 6px;
    border-radius: var(--radius-sm);
    background: transparent url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23000'%3e%3cpath d='M.293.293a1 1 0 011.414 0L8 6.586 14.293.293a1 1 0 111.414 1.414L9.414 8l6.293 6.293a1 1 0 01-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 01-1.414-1.414L6.586 8 .293 1.707a1 1 0 010-1.414z'/%3e%3c/svg%3e") center / 1em auto no-repeat;
    opacity: .6;
}
.modal .modal-header .btn-close:hover { opacity: 1; }
.modal .modal-header .btn-close::before, .modal .modal-header .btn-close::after { display: none; }
.modal fieldset { margin: 0; padding: 0; border: 0; }

/* Documentos das fichas: secções (do negócio, do imóvel, de cada pessoa) */
.kdoc-head { display: flex; align-items: baseline; gap: 8px; margin: 20px 0 8px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 14px; font-weight: 700; color: var(--ink); }
.kdoc-head:first-of-type { margin-top: 4px; padding-top: 0; border-top: 0; }
.kdoc-head span { font-size: 12px; font-weight: 500; color: var(--ink-muted); }
.kdoc-empty { font-size: 13px; }
.kdoc-list .bo-badge { flex: none; }
.kdoc-people { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 16px; padding: 10px 12px; background: var(--surface); border-radius: var(--radius-md); font-size: 14px; }
.kdoc-people-label { font-weight: 700; margin-right: 4px; }
.kdoc-person { display: inline-flex; align-items: center; gap: 4px; padding: 2px 4px 2px 10px; background: var(--bg, #fff); border: 1px solid var(--line); border-radius: var(--radius-md); }
.kdoc-person form { margin: 0; }
.kdoc-person-x { border: 0; background: none; padding: 0 6px; font-size: 16px; line-height: 1; color: var(--ink-muted); cursor: pointer; }
.kdoc-person-x:hover { color: var(--erro); }
.kdoc-add { flex-basis: 100%; }
.kdoc-add summary { cursor: pointer; font-weight: 600; width: max-content; }
.kdoc-add-form { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 4px; }
.kdoc-add-form .form-select { width: auto; min-width: 200px; max-width: 100%; }

/* Documentos obrigatórios (lista com exceções) */
.kchk { margin: 0 0 20px; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius-md); }
.kchk-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.kchk-title { margin: 0; font-size: 15px; font-weight: 700; }
.kchk-situations { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 12px; }
.kchk-situations form { margin: 0; }
.kchk-chip { padding: 4px 10px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--bg, #fff); font-size: 13px; color: var(--ink); cursor: pointer; }
.kchk-chip.is-on { background: var(--st-agenda-bg); border-color: var(--st-agenda-dot); color: var(--st-agenda-c); font-weight: 600; }
.kchk-chip:disabled { cursor: default; opacity: 1; }
.kchk-list { list-style: none; margin: 0; padding: 0; }
.kchk-item { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); }
.kchk-item:first-child { border-top: 0; }
.kchk-mark { flex: none; width: 22px; height: 22px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; }
.kchk-item[data-status="ok"] .kchk-mark { background: var(--st-ganho-bg); color: var(--st-ganho-c); }
.kchk-item[data-status="missing"] .kchk-mark { background: var(--st-alerta-bg); color: var(--st-alerta-c); }
.kchk-item[data-status="expired"] .kchk-mark { background: var(--st-novo-bg); color: var(--st-novo-c); }
.kchk-item[data-status="waived"] .kchk-mark { background: var(--surface); color: var(--ink-muted); }
.kchk-main { flex: 1; min-width: 200px; }
.kchk-label { display: block; font-weight: 600; color: var(--ink); }
.kchk-item[data-status="waived"] .kchk-label { color: var(--ink-muted); }
.kchk-opt { font-size: 12px; font-weight: 400; color: var(--ink-muted); }
.kchk-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.kchk-actions form { margin: 0; }
.kchk-btn { padding: 4px 10px !important; font-size: 13px !important; min-height: 0 !important; }
.kchk-waive summary { list-style: none; }
.kchk-waive summary::-webkit-details-marker { display: none; }
.kchk-form { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.kchk-form .form-select, .kchk-form .form-control { width: auto; min-width: 160px; max-width: 100%; }
.kchk-require { margin-top: 12px; }
.kchk-require summary { cursor: pointer; font-size: 13px; font-weight: 600; width: max-content; }

/* Pedidos da sede ao consultor (partials/requests/panel) */
.kreq-item { border-top: 1px solid var(--line); padding: 10px 0; }
.kreq-item:first-of-type { border-top: 0; }
.kreq-summary { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; cursor: pointer; list-style: none; }
.kreq-summary::-webkit-details-marker { display: none; }
.kreq-main { flex: 1; min-width: 0; }
.kreq-title { display: block; font-weight: 600; color: var(--ink); }
.kreq-item[data-status="2"] .kreq-title, .kreq-item[data-status="3"] .kreq-title { color: var(--ink-muted); }
.kreq-thread { list-style: none; margin: 10px 0 0; padding: 0 0 0 12px; border-left: 2px solid var(--line); }
.kreq-thread li { margin-bottom: 8px; font-size: 14px; }
.kreq-thread p { margin: 2px 0 0; white-space: pre-line; }
.kreq-system { color: var(--ink-muted); }
.kreq-file { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; }
.kreq-file svg { width: 14px; height: 14px; }
.kreq-reply { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.kreq-reply-row { display: flex; flex-wrap: wrap; gap: 6px; }
.kreq-reply-row .form-control { flex: 1; min-width: 180px; }
.kreq-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.kreq-actions form { margin: 0; }
.kreq-form { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 8px; }
.kreq-form .form-select, .kreq-form .form-control { width: auto; min-width: 160px; max-width: 100%; }
.kreq-form .kreq-wide { flex: 1 1 100%; }
.kreq-due { display: inline-flex; align-items: center; gap: 6px; margin: 0; }

/* Documentação: percentagem, estado global, filtros e níveis (partials/docs/checklist) */
.kchk-head > div { min-width: 0; }
.kchk-state { display: inline-flex; align-items: center; gap: 8px; }
.kchk-pct { font-size: 20px; font-weight: 700; color: var(--ink); }
.kchk-bar { height: 6px; border-radius: 999px; background: var(--surface); overflow: hidden; margin-bottom: 8px; }
.kchk-bar span { display: block; height: 100%; background: var(--st-ganho-dot, #2e7d32); }
.kchk-counts { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 0 0 12px; font-size: 13px; font-weight: 600; }
.kchk-counts [data-tone="ok"] { color: var(--st-ganho-c); }
.kchk-counts [data-tone="pending"] { color: var(--st-novo-c); }
.kchk-counts [data-tone="missing"] { color: var(--st-alerta-c); }
.kchk-counts [data-tone="expired"] { color: var(--st-alerta-c); }
.kchk-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 8px; }
.kchk-tools form { margin: 0; }
.kchk-filters { display: flex; flex-wrap: wrap; gap: 6px; }
.kchk-search { width: auto; min-width: 180px; flex: 1 1 180px; max-width: 280px; }
.kchk-cat { margin: 14px 0 0; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-muted); }
.kchk-level { display: inline-block; margin-left: 4px; padding: 1px 6px; border-radius: 4px; font-size: 11px; font-weight: 600; vertical-align: 1px; background: var(--surface); color: var(--ink-muted); }
.kchk-level[data-level="legal"] { background: var(--st-alerta-bg); color: var(--st-alerta-c); }
.kchk-level[data-level="internal"] { background: var(--st-novo-bg); color: var(--st-novo-c); }
.kchk-level[data-level="condition"] { background: var(--st-agenda-bg); color: var(--st-agenda-c); }
.kchk-item[data-status="pending"] .kchk-mark { background: var(--st-novo-bg); color: var(--st-novo-c); }
.kchk-item[data-status="rejected"] .kchk-mark { background: var(--st-alerta-bg); color: var(--st-alerta-c); }
.kchk-item[data-status="ok"] .kchk-status { color: var(--st-ganho-c); }
.kchk-item[data-status="missing"] .kchk-status, .kchk-item[data-status="rejected"] .kchk-status, .kchk-item[data-status="expired"] .kchk-status { color: var(--st-alerta-c); }
.kchk-item[hidden], .kchk-cat[hidden] { display: none; }
.kdoc-history { margin-top: 16px; }

/* Lista de documentos legível (2026-10-11): procurar e ordenar; categoria → tipo; tipos grandes recolhidos; anteriores à parte */
.kdoc-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0 0 12px; }
.kdoc-tools .form-control { flex: 1 1 160px; min-width: 0; max-width: 360px; }
.kdoc-tools .form-select { width: auto; }
.kdoc-group { margin-top: 12px; }
.kdoc-group[hidden], .kdoc-type[hidden], .kdoc-replaced[hidden], .kdoc-list > li[hidden] { display: none; }
.kdoc-cat { margin: 0 0 4px; font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-muted); }
.kdoc-count { display: inline-block; min-width: 20px; padding: 0 6px; border-radius: var(--radius-sm); background: var(--surface); font-size: 12px; font-weight: 600; letter-spacing: 0; text-transform: none; text-align: center; color: var(--ink); }
.kdoc-type, .kdoc-replaced { margin: 4px 0; }
.kdoc-type > summary, .kdoc-replaced > summary { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--bg); font-size: 14px; font-weight: 600; cursor: pointer; list-style: none; }
.kdoc-type > summary::-webkit-details-marker, .kdoc-replaced > summary::-webkit-details-marker { display: none; }
.kdoc-type > summary::before, .kdoc-replaced > summary::before { content: "▸"; font-size: 11px; color: var(--ink-muted); }
.kdoc-type[open] > summary::before, .kdoc-replaced[open] > summary::before { content: "▾"; }
.kdoc-type[open] > summary { border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
.kdoc-type > .kdoc-list, .kdoc-replaced > .kdoc-list { padding: 0 10px; border: 1px solid var(--line); border-top: 0; border-radius: 0 0 var(--radius-md) var(--radius-md); }
.kdoc-type > .kdoc-list > li:first-child { padding-top: 10px; }
.kdoc-replaced > summary { font-weight: 500; color: var(--ink-muted); }
.kdoc-replaced .kdoc-list { opacity: .8; }
.kdoc-list > li { padding: 8px 0; }
/* Gaveta de pré-visualização */
.kdoc-preview { width: min(900px, 92vw); }
.kdoc-preview .offcanvas-header { gap: 12px; border-bottom: 1px solid var(--line); }
.kdoc-preview .offcanvas-title { font-size: 16px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kdoc-preview-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.kdoc-preview .offcanvas-body { padding: 0; }
.kdoc-preview iframe { width: 100%; height: 100%; border: 0; background: var(--surface); }
@media (max-width: 767px) {
    /* Os formulários da lista de obrigatórios (dispensar, pedir, situações) não saem do ecrã */
    .kchk-form .form-control, .kchk-form .form-select { min-width: 0; flex: 1 1 140px; max-width: 100%; }
    .kdoc-tools { gap: 8px; }
    .kdoc-tools .form-control { flex-basis: 100%; max-width: none; }
    .kdoc-tools .form-select { flex: 1 1 auto; }
    /* No telemóvel o iframe pode mostrar só a primeira página: os botões "Abrir" e "Descarregar" ficam à mão */
    .kdoc-preview { width: 100vw; }
    .kdoc-preview .offcanvas-header { flex-wrap: wrap; }
    .kdoc-preview .offcanvas-title { flex: 1 1 100%; }
    .kdoc-preview-actions { margin-left: 0; }
    .kdoc-preview-actions .bo-btn { padding: 4px 10px; font-size: 13px; }
}

/* Modelos de documentação (admin/docs/rules) */
.kdr-intro { max-width: 820px; margin-bottom: 16px; color: var(--ink-muted); }
.kdr-off td { opacity: .55; }
.kdr .kl-table .form-select { width: auto; min-width: 200px; }
.kdr-add { margin-top: 16px; padding: 16px; }
.kdr-type { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; }
.kdr-type .kdr-name { flex: 1 1 260px; width: auto; }
.kdr-type .form-select { width: auto; }
.kdr-months { width: 120px !important; }
.kdr-scope { min-width: 80px; }
.kdr-active { display: inline-flex; align-items: center; gap: 4px; margin: 0; font-size: 13px; }
.kchk-form .kreq-due { flex-wrap: wrap; max-width: 100%; }
.kchk-form .kreq-due .form-control { min-width: 0; width: 150px; max-width: 100%; }
/* Listas de tipos com nomes longos: no telemóvel ocupam a largura toda, sem alargar a página */
.kchk-form select.form-select, .kreq-form select.form-select { min-width: 0; width: 100%; max-width: 100%; }
@media (min-width: 576px) { .kchk-form select.form-select, .kreq-form select.form-select { width: auto; max-width: 320px; } }

/* Selo da documentação nas listagens (partials/docs/state) */
.kdoc-state { display: table; margin-top: 4px; padding: 1px 7px; border-radius: 4px; font-size: 12px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.kdoc-state[data-state="incomplete"] { background: var(--st-alerta-bg); color: var(--st-alerta-c); }
.kdoc-state[data-state="alerts"], .kdoc-state[data-state="validating"] { background: var(--st-novo-bg); color: var(--st-novo-c); }
.kdoc-state[data-state="validated"] { background: var(--st-ganho-bg); color: var(--st-ganho-c); }
.kchk-special summary { cursor: pointer; font-size: 13px; font-weight: 600; list-style: none; }
.kchk-special summary::-webkit-details-marker { display: none; }
.kchk-special[open] { flex-basis: 100%; }
.kchk-special-help { margin: 6px 0; }
.kchk-special-list { display: flex; flex-wrap: wrap; gap: 6px; }
.kchk-special-list form { margin: 0; }
.kdoc-person a { color: var(--ink); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.kdoc-head a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.kdq-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 6px; }
.kdq-actions form { margin: 0; }
.kchk-est { color: var(--ink-muted); font-style: italic; }
.kdoc-share { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: -4px 0 8px; }
.kdoc-list .is-shared { color: var(--st-ganho-c) !important; font-weight: 600; }

/* =====================================================================================================================
   Moldura responsiva (auditoria de 2026-10-09). Larguras:
   ≥ 1280 px  menu lateral aberto (280 px); conteúdo limitado a --bo-max e centrado a partir de 2040 px (2K, 4K, 5K)
   992–1279   menu compacto só com ícones (72 px); o botão abre-o inteiro por cima do conteúdo, com fundo escurecido
   ≤ 991      menu em gaveta por cima do conteúdo, com fundo escurecido e a página por trás parada
   ≤ 767      cabeçalho com alvos de 44 px e as ações secundárias no menu "Mais" (.bo-hdr-more)
   O comportamento (estado, nome do botão, Esc, fundo) está em backoffice-layout.js.
   ===================================================================================================================== */
:root { --bo-side: 280px; --bo-rail: 72px; --bo-max: 1760px; }

/* ---------- Menu lateral: ocupa a altura toda, a lista estica e o cartão de ajuda fica no fundo */
.page-wrapper .page-body-wrapper .page-sidebar {
    display: flex;
    flex-direction: column;
    height: 100vh;
    height: 100dvh;
}
.page-wrapper .page-body-wrapper .page-sidebar .logo-wrap { flex: none; }
.page-wrapper .page-body-wrapper .page-sidebar .main-sidebar {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
}
.page-wrapper .page-body-wrapper .page-sidebar .main-sidebar .user-profile { flex: none; }
.page-wrapper .page-body-wrapper .page-sidebar .main-sidebar #mainsidebar {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
}
.page-wrapper .page-body-wrapper .page-sidebar .main-sidebar .sidebar-menu {
    flex: 1 1 auto;
    height: auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    margin-top: 0;
    padding: 12px 0 0;
    overscroll-behavior: contain;
}
.page-wrapper .page-body-wrapper .page-sidebar .main-sidebar .sidebar-menu > li { flex: none; }
.bo-logo-k { display: none; }

/* ---------- Cartão "Precisa de ajuda?" (partials/backoffice/help) */
.page-wrapper .page-body-wrapper .page-sidebar .main-sidebar .sidebar-menu > li.bo-help-item {
    margin-top: auto;
    padding: 24px 16px 16px;
}
.bo-help {
    position: relative;
    overflow: hidden;
    padding: 20px 16px 16px;
    border: 1px solid #262626;
    border-radius: var(--radius-md);
    background: #111111;
    color: var(--inverse-ink);
    text-align: left;
}
/* O telhado do logótipo, grande e quase invisível no canto: a marca sem mais um enfeite de cor */
.bo-help::after {
    content: "";
    position: absolute;
    top: -18px;
    right: -26px;
    width: 120px;
    height: 56px;
    background: #1c1c1c;
    clip-path: polygon(50% 0, 100% 100%, 0 100%);
    pointer-events: none;
}
.bo-help > * { position: relative; z-index: 1; }
.bo-help-icon {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    margin-bottom: 14px;
    border-radius: var(--radius-md);
    background: var(--accent);
    color: var(--on-accent);
}
.bo-help-icon svg { width: 18px; height: 18px; color: var(--on-accent); stroke-width: 1.75; }
.page-sidebar .bo-help .bo-help-title { margin: 0 0 4px; font-size: 16px; line-height: 22px; font-weight: 700; color: var(--inverse-ink); letter-spacing: -.01em; }
.page-sidebar .bo-help .bo-help-text { margin: 0 0 16px; font-size: 13px; line-height: 19px; color: #b3b3b3; }
.page-wrapper .page-body-wrapper .page-sidebar .main-sidebar .sidebar-menu > li .bo-help-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 14px;
    border: 0;
    border-left: 0;
    border-radius: var(--radius-md);
    background: var(--accent);
    color: var(--on-accent);
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    transition: background-color .15s ease;
}
.page-wrapper .page-body-wrapper .page-sidebar .main-sidebar .sidebar-menu > li .bo-help-btn:hover { background: var(--inverse-ink); color: var(--on-accent); }
.page-wrapper .page-body-wrapper .page-sidebar .main-sidebar .sidebar-menu > li .bo-help-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.bo-help-btn svg { width: 16px; height: 16px; color: currentColor; stroke-width: 2; }
.page-sidebar .bo-help .bo-help-mail { display: block; margin-top: 10px; font-size: 12px; color: #8c8c8c; text-align: center; overflow-wrap: anywhere; }

/* ---------- Botão do menu no cabeçalho (era um div: agora botão, com nome e estado) */
.page-wrapper .page-main-header .toggle-sidebar {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    margin-right: 16px;
    padding: 0;
    border: 0;
    border-radius: var(--radius-md);
    background: transparent;
    color: var(--ink);
}
.page-wrapper .page-main-header .toggle-sidebar:hover { background: var(--surface); }
.page-wrapper .page-main-header .toggle-sidebar svg { width: 20px; height: 20px; }

/* ---------- Fundo escurecido por trás do menu aberto por cima do conteúdo */
.bo-scrim {
    position: fixed;
    inset: 0;
    z-index: 10; /* por cima do cabeçalho (8); o menu (11) fica por cima */
    background: rgba(0, 0, 0, .5);
}
.bo-scrim[hidden] { display: none; }
html.bo-locked, html.bo-locked body { overflow: hidden; }

@media (max-width: 991px) {
    .page-wrapper .page-body-wrapper .page-sidebar { z-index: 11; }
    .page-wrapper .page-body-wrapper .page-sidebar:not(.close_icon) { box-shadow: 8px 0 32px rgba(0, 0, 0, .25); }
}

/* ---------- 992–1279 px: menu compacto só com ícones; o botão abre-o inteiro (.bo-open) por cima do conteúdo */
@media (min-width: 992px) and (max-width: 1279px) {
    :root { --bo-side: var(--bo-rail); }
    .page-wrapper .page-main-header:not(.close_icon) { margin-left: var(--bo-rail); width: calc(100% - var(--bo-rail)); }
    .page-wrapper .page-body-wrapper .page-sidebar:not(.close_icon) ~ .page-body,
    .page-wrapper .page-body-wrapper .page-sidebar:not(.close_icon) ~ footer { margin-left: var(--bo-rail); }
    .page-wrapper .page-body-wrapper .page-sidebar { z-index: 11; }
    .page-wrapper .page-body-wrapper .page-sidebar.bo-open { box-shadow: 8px 0 32px rgba(0, 0, 0, .25); }

    .page-wrapper .page-body-wrapper .page-sidebar:not(.bo-open) { width: var(--bo-rail); }
    .page-wrapper .page-body-wrapper .page-sidebar:not(.bo-open) .logo-wrap { display: grid; place-items: center; height: 80px; padding: 0; }
    .page-wrapper .page-body-wrapper .page-sidebar:not(.bo-open) .bo-logo,
    .page-wrapper .page-body-wrapper .page-sidebar:not(.bo-open) .logo-wrap .back-btn { display: none; }
    .page-wrapper .page-body-wrapper .page-sidebar:not(.bo-open) .bo-logo-k { display: block; width: 40px; height: 40px; }
    .page-wrapper .page-body-wrapper .page-sidebar:not(.bo-open) .user-profile { padding: 14px 0; }
    .page-wrapper .page-body-wrapper .page-sidebar:not(.bo-open) .user-profile .media { justify-content: center; }
    .page-wrapper .page-body-wrapper .page-sidebar:not(.bo-open) .user-profile .change-pic img { width: 40px; margin: 0; }
    .page-wrapper .page-body-wrapper .page-sidebar:not(.bo-open) .user-profile .media-body { display: none; }
    .page-wrapper .page-body-wrapper .page-sidebar:not(.bo-open) .sidebar-menu { padding-top: 8px; scrollbar-width: none; }
    .page-wrapper .page-body-wrapper .page-sidebar:not(.bo-open) .sidebar-menu > li > a {
        display: grid;
        place-items: center;
        height: 48px;
        padding: 0;
    }
    .page-wrapper .page-body-wrapper .page-sidebar:not(.bo-open) .sidebar-menu > li > a svg { width: 20px; height: 20px; margin: 0; }
    /* Barra compacta: sem títulos de secção; o número passa a um ponto amarelo no canto do ícone */
    .page-wrapper .page-body-wrapper .page-sidebar:not(.bo-open) .sidebar-menu > li.sidebar-title { display: none; }
    .page-wrapper .page-body-wrapper .page-sidebar:not(.bo-open) .bo-mc {
        top: 9px; right: 18px; transform: none; min-width: 0; width: 10px; height: 10px; padding: 0; overflow: hidden; font-size: 0;
        box-shadow: 0 0 0 2px var(--preto-k);
    }
    .page-wrapper .page-body-wrapper .page-sidebar:not(.bo-open) .sidebar-menu > li > a > span,
    .page-wrapper .page-body-wrapper .page-sidebar:not(.bo-open) .sidebar-menu > li > a .according-menu { display: none; }
    /* O submenu aberto pelo sidebar.js (display em linha) não cabe em 72 px: abre-se com o menu inteiro */
    .page-wrapper .page-body-wrapper .page-sidebar:not(.bo-open) .sidebar-menu .nav-submenu { display: none !important; }
    .page-wrapper .page-body-wrapper .page-sidebar:not(.bo-open) .sidebar-menu > li.bo-help-item { padding: 16px 12px 12px; }
    .page-wrapper .page-body-wrapper .page-sidebar:not(.bo-open) .bo-help { padding: 0; border: 0; background: none; }
    .page-wrapper .page-body-wrapper .page-sidebar:not(.bo-open) .bo-help::after,
    .page-wrapper .page-body-wrapper .page-sidebar:not(.bo-open) .bo-help > :not(.bo-help-btn),
    .page-wrapper .page-body-wrapper .page-sidebar:not(.bo-open) .bo-help-btn span { display: none; }
    .page-wrapper .page-body-wrapper .page-sidebar:not(.bo-open) .sidebar-menu > li .bo-help-btn { padding: 0; }
}

/* ---------- 2K, 4K e 5K: área de trabalho até --bo-max, centrada no espaço à direita do menu */
@media (min-width: 2040px) {
    .page-wrapper .page-body-wrapper .page-body,
    .page-wrapper .page-body-wrapper > footer {
        padding-left: calc((100vw - var(--bo-side) - var(--bo-max)) / 2);
        padding-right: calc((100vw - var(--bo-side) - var(--bo-max)) / 2);
    }
    .page-wrapper .page-body-wrapper:has(> .page-sidebar.close_icon) > .page-body,
    .page-wrapper .page-body-wrapper:has(> .page-sidebar.close_icon) > footer {
        padding-left: calc((100vw - var(--bo-max)) / 2);
        padding-right: calc((100vw - var(--bo-max)) / 2);
    }
}

/* ---------- Telemóvel: cabeçalho com alvos de 44 px; o secundário vai para "Mais" */
.page-wrapper .page-main-header .header-menu > li.bo-hdr-more { display: none; }
@media (max-width: 767px) {
    .page-wrapper .page-main-header { padding: 0 8px; }
    .page-wrapper .page-main-header .toggle-sidebar { margin-right: 4px; }
    .page-wrapper .page-main-header .header-menu { display: flex; align-items: center; justify-content: flex-end; gap: 2px; }
    .page-wrapper .page-main-header .header-menu > li { padding: 0; }
    .page-wrapper .page-main-header .header-menu > li.bo-hdr-extra { display: none; }
    .page-wrapper .page-main-header .header-menu > li.bo-hdr-more { display: block; position: relative; }
    .page-wrapper .page-main-header .header-menu > li > a,
    .page-wrapper .page-main-header .header-menu .mobile-search,
    .page-wrapper .page-main-header .header-menu .profile-avatar > div,
    .bo-hdr-more-btn {
        display: grid;
        place-items: center;
        width: 44px;
        height: 44px;
        padding: 0;
        border: 0;
        border-radius: var(--radius-md);
        background: transparent;
        color: var(--ink);
    }
    .page-wrapper .page-main-header .header-menu > li > a svg,
    .page-wrapper .page-main-header .header-menu .mobile-search svg,
    .bo-hdr-more-btn svg { width: 22px; height: 22px; }
    .page-wrapper .page-main-header .header-menu .profile-avatar img { width: 34px; }
    .page-wrapper .page-main-header .header-menu > li .notification-badge { top: 4px; right: 2px; transform: none; }
    .page-wrapper .page-main-header .onhover-show-div { top: 52px; }
    /* Pesquisa aberta pela lupa: presa ao cabeçalho (e não ao item da lista), de margem a margem; antes saía 26 px do ecrã a 320 */
    .page-wrapper .page-main-header .header-menu > li:has(> .search-form) { position: static; }
    .page-wrapper .page-main-header .header-menu .search-form { top: calc(100% + 4px); left: 8px; right: 8px; width: auto; }
}
.bo-hdr-menu {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    z-index: 20;
    min-width: 220px;
    margin: 0;
    padding: 6px;
    list-style: none;
    border: 1px solid var(--ink);
    border-radius: var(--radius-md);
    background: var(--bg);
    box-shadow: 0 12px 32px rgba(0, 0, 0, .18);
}
.bo-hdr-menu[hidden] { display: none; }
.bo-hdr-menu a {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 44px;
    padding: 0 12px;
    border-radius: var(--radius-sm);
    color: var(--ink);
    font-size: 15px;
    font-weight: 500;
    white-space: nowrap;
}
.bo-hdr-menu a:hover, .bo-hdr-menu a:focus-visible { background: var(--surface); color: var(--ink); }
.bo-hdr-menu svg { width: 18px; height: 18px; color: var(--ink); flex: none; }

/* ---------- Medidas do webkit no telemóvel e em ecrãs de toque: alvos de 44 px (--touch) e campos a 16 px
   (abaixo disso o Safari do iPhone aproxima a página ao tocar no campo). No computador ficam os 40 px de área de trabalho densa. */
@media (max-width: 767px), (pointer: coarse) {
    .bo-btn,
    .btn-gradient, .btn-pill, .btn-solid, .btn-dashed, .btn-light-bg,
    .btn.btn-primary, .btn.btn-secondary, .btn.btn-info, .btn.btn-danger, .btn.btn-dark, .btn.btn-success, .btn.btn-warning, .btn.btn-light,
    .btn.btn-outline-primary, .btn.btn-outline-secondary, .btn.btn-outline-dark, .btn.btn-outline-danger { min-height: var(--touch, 44px); }
    .btn-sm.btn-gradient, .btn-sm.btn-pill, .btn.btn-sm, .bo-btn--sm { min-height: 40px; }
    .form-control, .form-select, select.form-control { min-height: var(--touch, 44px); font-size: 16px; }
    textarea.form-control { min-height: 96px; }
}

/* ---------- Qualidade do anúncio (partials/properties/quality): anel com a percentagem no tom do nível, fatores com
   ligação para onde se resolvem, o que falta para ligar um portal e os avisos. O anel é um indicador (não um botão nem
   um cartão), por isso é a única forma redonda da vista; os tons são os dos estados das listas (--st-*). */
.kq .kq-head { display: flex; gap: 20px; align-items: center; margin-bottom: 14px; }
.kq-ring { --kq-c: var(--st-alerta-dot); position: relative; flex: none; width: 84px; height: 84px; border-radius: 50%;
    background: conic-gradient(var(--kq-c) calc(var(--kq) * 1%), var(--surface) 0); display: grid; place-items: center; }
.kq-ring::before { content: ""; position: absolute; inset: 8px; border-radius: 50%; background: var(--bg); }
.kq-ring span { position: relative; font-size: 24px; font-weight: 700; line-height: 1; color: var(--ink); font-variant-numeric: tabular-nums; }
.kq-ring small { font-size: 13px; font-weight: 600; }
.kq-ring[data-level="alta"] { --kq-c: var(--st-ganho-dot); }
.kq-ring[data-level="media"] { --kq-c: var(--st-novo-dot); }
.kq-title h5 { font-size: 18px; font-weight: 600; }
.kq-title p { font-size: 13px; }
.kq-portals { font-size: 13px; color: var(--ink-muted); }
.kq-portals a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.kq-items { list-style: none; margin: 0 0 14px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 0 24px; }
.kq-items li { display: grid; grid-template-columns: 18px 1fr auto; grid-template-areas: "mark label points" "mark hint points"; align-items: baseline; column-gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.kq-mark { grid-area: mark; align-self: start; color: var(--st-ganho-c); font-weight: 700; }
.kq-items li:not(.is-done) .kq-mark { width: 10px; height: 10px; margin-top: 5px; border-radius: 50%; background: var(--st-alerta-dot); }
.kq-label { grid-area: label; font-size: 14px; font-weight: 600; color: var(--ink); }
.kq-label a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.kq-hint { grid-area: hint; font-size: 12px; color: var(--ink-muted); }
.kq-points { grid-area: points; align-self: center; font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--ink-muted); }
.kq-items li.is-done .kq-points { color: var(--st-ganho-c); }
.kq-block { padding: 10px 12px; border-radius: var(--radius-sm); background: var(--st-alerta-bg); color: var(--st-alerta-c); font-size: 14px; }
.kq-block a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.kq-ready { padding: 10px 12px; border-radius: var(--radius-sm); background: var(--st-ganho-bg); color: var(--st-ganho-c); font-size: 14px; }
.kq-advice { font-size: 13px; color: var(--ink-muted); }
.kq-advice a { color: var(--ink); text-decoration: underline; text-underline-offset: 2px; }
@media (max-width: 575px) {
    .kq .kq-head { gap: 14px; }
    .kq-ring { width: 68px; height: 68px; }
    .kq-ring span { font-size: 20px; }
    .kq-items { grid-template-columns: 1fr; }
}

/* Faturação dos consultores (partials/deals/payouts): a cancelada fica riscada, sem badge */
.kpay-item[data-status="3"] .kpay-line { text-decoration: line-through; color: var(--ink-muted); }
.kpay-item .kreq-form, .kpay-item .kreq-actions { margin-top: 6px; }
.kpay-item > .bo-num { white-space: nowrap; }
.kpay-item details summary { cursor: pointer; font-size: 13px; font-weight: 600; width: max-content; }
/* Como a comissão foi recebida (partes antes da escritura): subtítulos do cartão e partes devolvidas riscadas */
.kpay-head { font-size: 13px; font-weight: 600; text-transform: none; margin: 0 0 6px; color: var(--ink); }
.kpay-head--next { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line); }
.kpay-item[data-refunded] .kpay-line { text-decoration: line-through; color: var(--ink-muted); }
.kpay-item .kreq-actions .kchk-btn { padding-left: 0; }
/* Negócio perdido com comissão recebida: a decisão da sede, em destaque no topo do cartão */
.kpay-lost { background: var(--bo-warn-bg); border-radius: 6px; padding: 10px 12px; margin-bottom: 14px; }
.kpay-lost-title { font-weight: 600; margin: 0 0 4px; }
.kpay-lost fieldset { border: 0; margin: 8px 0 0; padding: 0; min-width: 0; }
.kpay-lost legend { font-size: 13px; margin: 0 0 4px; float: none; width: auto; }
.kpay-lost label { display: flex; align-items: center; gap: 8px; font-size: 14px; padding: 4px 0; }
.kpay-lost .kchk-btn { margin-top: 8px; }
.kpay-lost .bo-sub { display: block; margin-top: 6px; }

/* Histórico do imóvel (partials.properties.history, 2026-10-11) */
.kh-summary { font-size: 14px; }
.kh-pct { font-weight: 600; }
.kh-pct[data-sign="down"] { color: var(--st-alerta-c); }
.kh-pct[data-sign="up"] { color: var(--st-ganho-c); }
.kh-cycles { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; padding: 0; list-style: none; }
.kh-cycles li { padding: 6px 10px; border: 1px solid var(--line); border-radius: var(--radius-sm); font-size: 13px; color: var(--ink-muted); }
.kh-cycles li.is-current { border-color: var(--ink); color: var(--ink); }
.kh-table { font-size: 14px; }
.kh-table th { font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-muted); white-space: nowrap; }
.kh-row--other td { color: var(--ink-muted); }
.kh-row--deal td:nth-child(2), .kh-row--deal td:nth-child(3) { font-weight: 600; color: var(--ink); }
.kh-note { font-size: 12px; margin-top: 10px; }

/* Avaliações e relatórios (partials.properties.valuations) */
.kv-form { margin-top: 14px; padding: 14px 16px 2px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); }
.kv-form .form-group { margin-bottom: 12px; }
.kv-form label { font-size: 13px; }

/* ---------- "Parabéns": comissão autorizada (partials/payouts/celebrate). Uma vez por autorização, só a quem a recebe.
   Entrada curta (fundo + cartão), o visto desenha-se e seis faíscas amarelas saem do círculo uma vez. */
.kcel { position: fixed; inset: 0; z-index: 1080; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(0, 0, 0, 0); transition: background-color .25s ease; }
.kcel.is-on { background: rgba(0, 0, 0, .55); }
.kcel-card { width: 100%; max-width: 420px; padding: 32px 28px 24px; background: var(--bg); border-radius: var(--radius-md); text-align: center; opacity: 0; transform: translateY(12px) scale(.96); transition: opacity .25s ease, transform .25s ease; }
.kcel.is-on .kcel-card { opacity: 1; transform: none; }
.kcel-mark { position: relative; width: 84px; height: 84px; margin: 0 auto 18px; border-radius: 50%; background: var(--accent); color: var(--on-accent); display: flex; align-items: center; justify-content: center; transform: scale(.4); }
.kcel.is-on .kcel-mark { animation: kcel-pop .5s cubic-bezier(.2, .9, .3, 1.3) .15s forwards; }
.kcel-check { stroke-dasharray: 40; stroke-dashoffset: 40; }
.kcel.is-on .kcel-check { animation: kcel-draw .4s ease .45s forwards; }
.kcel-mark i { position: absolute; top: 50%; left: 50%; width: 8px; height: 8px; margin: -4px 0 0 -4px; border-radius: 50%; background: var(--accent); opacity: 0; }
.kcel.is-on .kcel-mark i { animation: kcel-spark .7s ease-out .5s forwards; }
.kcel-mark i:nth-child(2) { --kx: 0; --ky: -64px; }
.kcel-mark i:nth-child(3) { --kx: 56px; --ky: -32px; }
.kcel-mark i:nth-child(4) { --kx: 56px; --ky: 32px; }
.kcel-mark i:nth-child(5) { --kx: 0; --ky: 64px; }
.kcel-mark i:nth-child(6) { --kx: -56px; --ky: 32px; }
.kcel-mark i:nth-child(7) { --kx: -56px; --ky: -32px; }
.kcel-eyebrow { margin: 0 0 6px; font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-muted); }
.kcel-title { margin: 0 0 10px; font-family: var(--font-brand); font-size: 26px; line-height: 1.2; color: var(--ink); }
.kcel-text { margin: 0 0 10px; font-size: 16px; line-height: 1.5; color: var(--ink-body); }
.kcel-note { margin: 0 0 10px; padding: 10px 12px; border-radius: var(--radius-md); background: var(--surface); font-size: 14px; line-height: 1.5; color: var(--ink-body); white-space: pre-line; }
.kcel-sub { margin: 0 0 20px; font-size: 13px; line-height: 1.5; color: var(--ink-muted); }
.kcel-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
@keyframes kcel-pop { to { transform: scale(1); } }
@keyframes kcel-draw { to { stroke-dashoffset: 0; } }
@keyframes kcel-spark { 0% { opacity: 1; transform: translate(0, 0) scale(1); } 100% { opacity: 0; transform: translate(var(--kx), var(--ky)) scale(.3); } }
@media (prefers-reduced-motion: reduce) {
    .kcel, .kcel-card { transition: none; }
    .kcel-mark { transform: none; }
    .kcel.is-on .kcel-mark, .kcel.is-on .kcel-mark i, .kcel.is-on .kcel-check { animation: none; }
    .kcel-check { stroke-dashoffset: 0; }
    .kcel-mark i { display: none; }
}

/* ---------- Separadores de secção (partials.backoffice.section-tabs): páginas que vivem dentro do mesmo item do menu
   (Propostas · Negócios, Tarefas · Pedidos · Documentos…). São o nível de cima da página: texto do tamanho dos títulos
   das secções, escuro e em negrito, sublinhado preto no ativo (o amarelo não se lê sobre o fundo claro) e o número do que
   espera, como no menu. Os filtros de estado (.kl-tab, em caixa) ficam por baixo, um nível abaixo. */
.bo-section-tabs {
    display: flex;
    align-items: flex-end;
    gap: 0 32px;
    margin: 0 0 24px;
    border-bottom: 2px solid var(--line);
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
}
.bo-section-tabs::-webkit-scrollbar { display: none; }
.bo-section-tab {
    flex: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 48px;
    padding: 0 2px;
    margin-bottom: -2px;
    border-bottom: 3px solid transparent;
    font-family: var(--font-brand);
    font-size: 17px;
    font-weight: 600;
    line-height: 1.2;
    color: var(--ink-body);
    white-space: nowrap;
}
.bo-section-tab:hover { color: var(--ink); border-bottom-color: var(--line-strong); }
.bo-section-tab.is-active { color: var(--ink); font-weight: 700; border-bottom-color: var(--ink); }
.bo-section-tab:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.bo-section-count {
    min-width: 22px;
    padding: 1px 7px;
    border-radius: 999px;
    background: var(--accent);
    color: var(--preto-k);
    font-family: var(--font-body, inherit);
    font-size: 12px;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
    font-variant-numeric: tabular-nums;
}
.bo-section-count i { font-style: normal; }
/* Telemóvel: os separadores que não cabem passam para a linha de baixo (todos à vista, sem deslizar às escondidas);
   cada um leva a sua linha por baixo, para o sublinhado do ativo não ficar a flutuar */
@media (max-width: 575px) {
    .bo-section-tabs { flex-wrap: wrap; gap: 0; margin-bottom: 18px; border-bottom: 0; overflow: visible; }
    .bo-section-tab { flex: 1 1 auto; justify-content: center; font-size: 16px; min-height: 44px; padding: 0 12px; margin-bottom: 0; border-bottom: 2px solid var(--line); }
    .bo-section-tab.is-active { border-bottom: 3px solid var(--ink); }
}

/* ---------- Separadores de uma ficha (x-bo.record-tabs): cliente, imóvel, oportunidade */
/* Até 10 separadores (cliente): mais juntos e, se não couberem, numa segunda linha; nunca escondidos atrás de um scroll */
.bo-record-tabs { margin-bottom: 20px; flex-wrap: wrap; gap: 0 24px; overflow: visible; }
.bo-record-tabs .bo-section-tab { min-height: 44px; }
.bo-record-tab-count {
    min-width: 22px;
    padding: 1px 7px;
    border-radius: 999px;
    background: var(--line);
    color: var(--ink);
    font-size: 12px;
    font-weight: 600;
    line-height: 18px;
    text-align: center;
}
.bo-record-tab-count.is-zero { display: none; } /* um separador vazio não precisa de "0": fica o nome, mais leve */
.bo-section-tab:has(.bo-record-tab-count.is-zero):not(.is-active) { color: var(--ink-muted); }
.bo-section-tab.is-active .bo-record-tab-count:not(.is-zero) { background: var(--ink); color: var(--bg); }

/* ---------- Pedido geral (partials.requests.list): para quem, tipo, prazo, o que é preciso */
.kreq-general { margin-bottom: 18px; padding: 0; }
.kreq-general-summary { padding: 14px 18px; font-family: var(--font-brand); font-size: 16px; font-weight: 600; cursor: pointer; list-style: none; }
.kreq-general-summary::-webkit-details-marker { display: none; }
.kreq-general-summary .bo-sub { margin-left: 8px; font-weight: 400; }
.kreq-general[open] .kreq-general-summary { border-bottom: 1px solid var(--line); }
.kreq-general-form { display: grid; gap: 18px; padding: 18px; }
.kreq-to { margin: 0; padding: 0; border: 0; min-width: 0; }
.kreq-label { display: grid; gap: 6px; font-size: 14px; font-weight: 600; color: var(--ink); }
.kreq-to > .kreq-label { margin-bottom: 8px; }
.kreq-group { margin: 10px 0 4px; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-muted); }
.kreq-people { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 2px 16px; }
.kreq-check { display: flex; align-items: center; gap: 8px; min-height: 36px; font-size: 14px; font-weight: 400; color: var(--ink-body); cursor: pointer; }
.kreq-check input { width: 18px; height: 18px; accent-color: var(--ink); flex: none; }
.kreq-check--all { font-weight: 600; color: var(--ink); border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.kreq-general-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 18px; }
.kreq-general-fields .kreq-wide { grid-column: 1 / -1; }
.kreq-general-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.kreq--page { max-width: 880px; }
@media (max-width: 575px) {
    .kreq-general-fields { grid-template-columns: 1fr; }
    .kreq-general-summary .bo-sub { display: block; margin: 2px 0 0; }
}

/* Barra "Recentes" do cabeçalho (partials/recent/menu, App\Support\Recent): abre como o sino (a largura e o telemóvel
   vêm do tema, como no sino); ícone, nome e há quanto tempo */
.bo-recent .notification-dropdown { max-height: 70vh; overflow-y: auto; }
.bo-recent-list { margin: 0; padding: 0; list-style: none; }
.bo-recent-list li a { display: flex; align-items: flex-start; gap: 10px; min-height: 44px; padding: 8px 14px; border-top: 1px solid var(--line); color: var(--ink); font-size: 13px; line-height: 1.35; }
.bo-recent-list li:first-child a { border-top: 0; }
.bo-recent-list li a:hover, .bo-recent-list li a:focus-visible { background: var(--surface); }
.bo-recent-list svg { flex: none; width: 16px; height: 16px; margin-top: 2px; color: var(--ink-muted); }
.bo-recent-text { display: grid; min-width: 0; }
.bo-recent-title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bo-recent-sub { color: var(--ink-muted); font-size: 12px; }

/* ---------- Linha do tempo dos valores de uma proposta (partials/offers/history): uma linha por passo, com um
   traço à esquerda; a contraproposta do proprietário fica à direita do traço com a cor de aviso, o fecho com a sua */
.kv-offer-history { list-style: none; margin: 8px 0 12px; padding: 0 0 0 14px; border-left: 2px solid var(--bo-line); }
.kv-offer-history__item { position: relative; display: flex; flex-wrap: wrap; gap: 2px 10px; padding: 4px 0; font-size: 13px; line-height: 1.4; }
.kv-offer-history__item::before { content: ""; position: absolute; left: -19px; top: 9px; width: 8px; height: 8px; border-radius: 50%; background: var(--bo-line-strong); }
.kv-offer-history__item.is-owner::before { background: var(--accent); box-shadow: 0 0 0 1px var(--ink); }
.kv-offer-history__item.is-aceite::before { background: var(--bo-ok); }
.kv-offer-history__item.is-rejeitada::before { background: var(--bo-danger); }
.kv-offer-history__when { color: var(--bo-muted); min-width: 110px; font-variant-numeric: tabular-nums; }
.kv-offer-history__who { color: var(--bo-muted); }
.kv-offer-counter { margin: 8px 0; padding: 10px 12px; border-radius: var(--bo-radius); background: var(--bo-warn-bg); }
