/*
 * adminator-app.css
 * ---------------------------------------------------------------------------
 * Complemento do design system do Adminator (wwwroot/adminator/style.css).
 *
 * As paginas usam os componentes nativos do Adminator (.card, .table, .field,
 * .btn--*, .tag, .alert, .modal) e do Bootstrap fica apenas a camada de
 * UTILITARIOS (espacamento, flex, display, texto). Medido: adminator/style.css
 * x bootstrap-utilities.min.css = ZERO colisoes de seletor. Por isso nao ha
 * mais nenhuma disputa entre os dois arquivos.
 *
 * Ordem de carga no layout:
 *   1. adminator/style.css            -> shell, tokens e componentes
 *   2. bootstrap-utilities.min.css    -> so utilitarios
 *   3. este arquivo                   -> tokens dos utilitarios + o que falta
 */

/* ==========================================================================
   0. Marca — Instituto Beneví. Tipografia (Poppins) e paleta (verde petroleo
      + dourado + cinza) sobrepostas aos tokens do Adminator. --primary e lido
      por mais de cem regras do vendor (botoes, links, foco, estado ativo),
      entao redefini-lo aqui ja propaga a marca pelo sistema inteiro sem tocar
      no arquivo do template.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&display=swap');

:root {
    --gold: #b98a2e;
    --gold-light: #e4c888;
    --gold-dark: #8a692a;
    --gold-soft: #fbf3e1;
    --gold-ring: rgba(185, 138, 46, .25);
    --gold-gradient: linear-gradient(135deg, #8a692a, #e4c888 50%, #b98a2e 100%);
    --gray: #6b7280;
    --gray-soft: #f1f2f4;

    /* Preto e branco puros ja existem como --t-base/--t-inverse (invertem
       com o tema); estes ficam disponiveis para quem precisar do valor fixo. */
    --color-white: #fff;
    --color-black: #000;
}

/* :root[data-theme=...] (nao so [data-theme=...]): o vendor define --primary
   nesse mesmo seletor com :root, que tem especificidade maior — sem o :root
   aqui, esta sobrescrita perde a cascata mesmo carregando por ultimo. */
:root[data-theme=light] {
    --primary: #074038;
    --primary-light: #0e5f4f;
    --primary-dark: #052d26;
    --primary-soft: #e6f0ed;
    --primary-ring: rgba(7, 64, 56, .18);
}

:root[data-theme=dark] {
    --primary: #22a67f;
    --primary-light: #4fcba6;
    --primary-dark: #0f7a5c;
    --primary-soft: #0f2a22;
    --primary-ring: rgba(34, 166, 127, .24);
    --gold: #e0bb6a;
    --gold-light: #f0d9a2;
    --gold-dark: #a9853f;
    --gold-soft: #2e2510;
    --gray: #9ca3af;
    --gray-soft: #20242b;
}

/* Poppins vira a fonte do sistema. Os rotulos em versalete/monoespacado
   (cabecalhos de tabela, timestamps, paleta de comando, calendario, chat)
   continuam em JetBrains Mono: e um acento tipografico do template, nao
   texto corrido, e a marca nao pede para tira-lo. */
* {
    font-family: 'Poppins', 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif !important;
}

.attach-ico, .attach-size, .auth-aside-eyebrow, .auth-aside-footer, .auth-divider,
.brand-tag, .cal-chip-time, .cal-list-count, .cal-weekdays > div, .chart-meta-label,
.chart-svg .axis-label, .chat-conv-time, .chat-day-sep, .chat-msg-meta,
.chat-rail-title .meta, .chat-ts, .d-footer-meta, .data-cell-mono,
.data-cell-user-email, .data-table thead th, .dd-profile-email, .dd-time,
.error-eyebrow, .error-meta, .eyebrow, .fc .fc-col-header-cell-cushion,
.fc .fc-event-time, .fc .fc-timegrid-axis-cushion, .fc .fc-timegrid-slot-label-cushion,
.input-group .addon, .kbd, .kpi-compare strong, .kpi-pill, .mail-folder-count,
.mail-list-title .meta, .mail-rail-label, .mail-row-time, .mail-storage-head .num,
.mail-tab .num, .mini-cal-wd, .mono, .nav-label, .palette-esc, .palette-foot kbd,
.palette-result-section, .reader-attach-head, .reader-collapsed-time,
.reader-from-email, .reader-time-block .mono, .section-h .num, .sv-region-value .pct,
.table thead th, .upc-date .mo, .upc-time .mono, .wx-date p {
    font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, monospace !important;
}

/* Dourado e cinza como variantes de marca para tag/botao, no mesmo contrato
   das variantes que ja existem (success, danger, info...). */
.tag.t-gold { background: var(--gold-soft); color: var(--gold); }
.tag.t-gray { background: var(--gray-soft); color: var(--gray); }

.btn--gold { background: var(--gold); box-shadow: 0 1px 2px var(--gold-ring); color: #fff; }
.btn--gold:hover { background: var(--gold-dark); }

/* ==========================================================================
   1. Os utilitarios do Bootstrap passam a falar a paleta do Adminator.
      O bootstrap-utilities.min.css traz seu proprio :root com a paleta padrao;
      sem este bloco, .text-muted/.border/.bg-light ficariam fora do tema.
   ========================================================================== */

[data-theme=light] {
    --t-base-rgb: 30, 41, 59;
    --primary-rgb: 37, 99, 235;
    --success-rgb: 16, 185, 129;
    --warning-rgb: 245, 158, 11;
    --danger-rgb: 239, 68, 68;
    --info-rgb: 14, 165, 233;
}

[data-theme=dark] {
    --t-base-rgb: 241, 245, 249;
    --primary-rgb: 96, 165, 250;
    --success-rgb: 52, 211, 153;
    --warning-rgb: 251, 191, 36;
    --danger-rgb: 248, 113, 113;
    --info-rgb: 56, 189, 248;
}

[data-theme=light],
[data-theme=dark] {
    --bs-body-color: var(--t-base);
    --bs-body-color-rgb: var(--t-base-rgb);
    --bs-secondary-color: var(--t-muted);
    --bs-emphasis-color: var(--t-base);
    --bs-border-color: var(--border);
    --bs-border-width: 1px;
    --bs-border-style: solid;

    --bs-primary-rgb: var(--primary-rgb);
    --bs-success-rgb: var(--success-rgb);
    --bs-warning-rgb: var(--warning-rgb);
    --bs-danger-rgb: var(--danger-rgb);
    --bs-info-rgb: var(--info-rgb);
    --bs-light-rgb: 241, 245, 249;
    --bs-secondary-rgb: 100, 116, 139;
}

/* ==========================================================================
   2. Grade. O Adminator define .grid (12 colunas) mas so publica .col-6 e
      .col-12. As paginas precisam de tercos e quartos, entao o restante da
      escala e completado aqui, no mesmo contrato.
   ========================================================================== */

.grid > .col-1  { grid-column: span 1; }
.grid > .col-2  { grid-column: span 2; }
.grid > .col-3  { grid-column: span 3; }
.grid > .col-4  { grid-column: span 4; }
.grid > .col-5  { grid-column: span 5; }
.grid > .col-7  { grid-column: span 7; }
.grid > .col-8  { grid-column: span 8; }
.grid > .col-9  { grid-column: span 9; }
.grid > .col-10 { grid-column: span 10; }
.grid > .col-11 { grid-column: span 11; }

@media (max-width: 1100px) {
    .grid > .col-3, .grid > .col-4, .grid > .col-5 { grid-column: span 6; }
    .grid > .col-7, .grid > .col-8, .grid > .col-9,
    .grid > .col-10, .grid > .col-11 { grid-column: span 12; }
}

@media (max-width: 720px) {
    .grid > [class*="col-"] { grid-column: span 12; }
}

/* Variante de tres colunas para formularios largos. */
.form-grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.form-grid.cols-3 .span-2 { grid-column: span 2; }
.form-grid.cols-3 .span-3 { grid-column: span 3; }

@media (max-width: 900px) {
    .form-grid.cols-3 { grid-template-columns: 1fr; }
    .form-grid.cols-3 .span-2,
    .form-grid.cols-3 .span-3 { grid-column: span 1; }
}

/* ==========================================================================
   3. Validacao do jquery-validation-unobtrusive.
      O unobtrusive marca os campos com .input-validation-error e as mensagens
      com .field-validation-error; o Adminator so conhece .is-invalid.
   ========================================================================== */

.input.input-validation-error,
.select.input-validation-error,
.textarea.input-validation-error { border-color: var(--danger); }

.field-validation-error,
.validation-summary-errors {
    color: var(--danger);
    display: block;
    font-size: 12px;
    margin-top: 5px;
}

.validation-summary-errors ul { list-style: none; margin: 0; padding: 0; }
.validation-summary-valid { display: none; }

/* ==========================================================================
   4. Peças que as paginas precisam e o template nao traz prontas.
   ========================================================================== */

/* Estado vazio de listagem. */
.empty-state { color: var(--t-muted); padding: 40px 20px; text-align: center; }
.empty-state svg {
    fill: none; height: 34px; margin-bottom: 12px; opacity: .5;
    stroke: currentColor; stroke-width: 1.5; width: 34px;
}
.empty-state-title { color: var(--t-base); font-size: 14px; font-weight: 600; margin-bottom: 4px; }

/* Linha rotulo/valor, usada nas telas de detalhe (ex.: Minha conta). */
.detail-row {
    border-bottom: 1px solid var(--border-soft);
    display: grid;
    gap: 16px;
    grid-template-columns: 150px 1fr;
    padding: 11px 0;
}
.detail-row:last-child { border-bottom: 0; }
.detail-label { color: var(--t-muted); font-size: 12.5px; }
.detail-value { color: var(--t-base); font-size: 13px; font-weight: 500; }

/* Formulario inline dentro de celula de tabela (ativar/desativar/excluir). */
.inline-form { display: inline-block; margin: 0; }

/* Barra de acoes acima de uma listagem. */
.toolbar {
    align-items: flex-end;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 18px;
}
.toolbar .field { margin: 0; }
.toolbar-spacer { flex: 1; }

/* Modal: o template so traz .modal-demo estatico, sem overlay nem JS.
   O comportamento vive em wwwroot/js/adminator-app.js. */
.modal-overlay {
    align-items: center;
    background: var(--overlay);
    backdrop-filter: blur(2px);
    display: none;
    inset: 0;
    justify-content: center;
    padding: 20px;
    position: fixed;
    z-index: 200;
}
.modal-overlay.is-open { display: flex; }
.modal-overlay .modal-demo {
    animation: rise-in .24s cubic-bezier(.2, .7, .2, 1) both;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    width: 100%;
}
.modal-overlay .modal-demo.modal-lg { max-width: 720px; }
body.has-modal-open { overflow: hidden; }

/* Tabela: coluna de acoes encostada a direita. */
.table .cell-actions { text-align: right; white-space: nowrap; }
.table .cell-actions > * + * { margin-left: 6px; }

/* O .pager-btn do template só prevê :disabled (button). Nas listagens os
   controles são links, então precisam de um estado inerte equivalente. */
.pager-btn.is-disabled { cursor: not-allowed; opacity: .4; pointer-events: none; }

/* Rodapé de listagem: contagem à esquerda, paginador à direita. */
.list-foot {
    align-items: center;
    border-top: 1px solid var(--border-soft);
    display: flex;
    justify-content: space-between;
    margin-top: 16px;
    padding-top: 14px;
}
.list-foot-info { color: var(--t-muted); font-size: 12px; }

/* Linha do tempo de prontuário: entradas cronológicas com autor e data. */
.entry-list { list-style: none; margin: 0; padding: 0; }
.entry {
    border-bottom: 1px solid var(--border-soft);
    padding: 14px 0;
}
.entry:first-child { padding-top: 0; }
.entry:last-child { border-bottom: 0; padding-bottom: 0; }
.entry-head {
    align-items: baseline;
    display: flex;
    gap: 12px;
    justify-content: space-between;
    margin-bottom: 6px;
}
.entry-author { color: var(--t-base); font-size: 13px; font-weight: 600; }
.entry-date { color: var(--t-muted); font-size: 12px; white-space: nowrap; }
.entry-body { color: var(--t-base); font-size: 13px; line-height: 1.6; margin: 0; white-space: pre-wrap; }

/* Linha destacada de tabela (registro selecionado em listagem mestre/detalhe). */
.table tbody tr.is-selected td { background: var(--primary-soft); }

/* Lista de escolha (seleção de clínica no login). */
.pick-list { display: grid; gap: 8px; }
.pick-item {
    align-items: center;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    gap: 12px;
    justify-content: space-between;
    padding: 12px 14px;
    text-align: left;
    transition: border-color .16s, background .16s;
    width: 100%;
}
.pick-item:hover { background: var(--bg-hover); border-color: var(--primary); }
.pick-name { color: var(--t-base); font-size: 13px; font-weight: 600; }
.pick-meta { color: var(--t-muted); font-size: 12px; }

/* ==========================================================================
   Exames — cartões de exame e faixa de destaque.
   Reescrito sobre os tokens do tema: a versão anterior tinha o verde
   (#1b6b43) fixo no HTML, o que não acompanhava o modo escuro.
   ========================================================================== */

.exam-banner {
    align-items: center;
    background: var(--success-soft);
    border: 1px solid color-mix(in oklab, var(--success) 30%, transparent);
    border-radius: 14px;
    display: flex;
    gap: 16px;
    margin-bottom: 22px;
    padding: 18px 20px;
}
.exam-banner-icon {
    align-items: center;
    background: var(--bg-card);
    border: 1px solid color-mix(in oklab, var(--success) 30%, transparent);
    border-radius: 12px;
    display: flex;
    flex-shrink: 0;
    height: 50px;
    justify-content: center;
    width: 50px;
}
.exam-banner-icon svg { fill: none; height: 22px; stroke: var(--success); stroke-width: 1.8; width: 22px; }
.exam-banner-title { color: var(--t-base); font-size: 14px; font-weight: 700; margin-bottom: 2px; }
.exam-banner-sub { color: var(--t-muted); font-size: 12.5px; margin: 0; }

.exam-card {
    align-items: flex-start;
    background: var(--bg-card);
    border: 1px solid var(--border-soft);
    border-radius: 14px;
    box-shadow: var(--shadow-card);
    color: inherit;
    display: flex;
    gap: 14px;
    margin-bottom: 10px;
    padding: 16px 18px;
    text-decoration: none;
    transition: box-shadow .18s, border-color .18s;
    width: 100%;
}
.exam-card.is-clickable { cursor: pointer; text-align: left; }
.exam-card.is-clickable:hover { border-color: var(--primary); box-shadow: var(--shadow-lg); }

.exam-icon-wrap {
    align-items: center;
    border-radius: 50%;
    display: flex;
    flex-shrink: 0;
    height: 46px;
    justify-content: center;
    width: 46px;
}
.exam-icon-wrap svg { fill: none; height: 20px; stroke: currentColor; stroke-width: 1.8; width: 20px; }
.exam-icon-wrap.icon-bio { background: var(--success-soft); color: var(--success); }
.exam-icon-wrap.icon-drop { background: var(--info-soft); color: var(--info); }
.exam-icon-wrap.icon-heart { background: var(--purple-soft); color: var(--purple); }
.exam-icon-wrap.icon-blood { background: var(--danger-soft); color: var(--danger); }
.exam-icon-wrap.is-sm { border-radius: 9px; height: 34px; width: 34px; }
.exam-icon-wrap.is-sm svg { height: 15px; width: 15px; }

.exam-card-body { flex: 1; min-width: 0; }
.exam-card-title { color: var(--t-base); font-size: 14px; font-weight: 700; margin-bottom: 4px; }
.exam-meta {
    align-items: center;
    color: var(--t-muted);
    display: flex;
    font-size: 12px;
    gap: 6px;
    margin-bottom: 2px;
}
.exam-meta svg { fill: none; height: 13px; stroke: currentColor; stroke-width: 1.8; width: 13px; }

.exam-section-title {
    color: var(--t-muted);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .08em;
    margin-bottom: 12px;
    text-transform: uppercase;
}

/* Linha rótulo/valor com ícone, usada no detalhe do exame. */
.exam-detail {
    align-items: center;
    border-bottom: 1px solid var(--border-soft);
    display: flex;
    gap: 12px;
    padding: 10px 0;
}
.exam-detail:last-of-type { border-bottom: 0; }
.exam-detail-label { color: var(--t-base); font-size: 13px; font-weight: 600; }
.exam-detail-value { color: var(--t-muted); font-size: 12.5px; }

/* Linha de tabela em destaque — usada no histórico de exames para separar as medições de
   bioimpedância, que são as únicas com relatório detalhado, dos demais exames. */
.table tbody tr.is-highlight {
    background: var(--primary-soft);
    box-shadow: inset 3px 0 0 0 var(--primary);
}

/* ==========================================================================
   Logo do Instituto Beneví — substitui o ícone + nome genéricos do template.
   A arte é um lockup horizontal (não um glifo quadrado), então a caixa
   .brand-logo deixa de ser um quadrado colorido e passa a ocupar a largura
   do cabeçalho da sidebar; o <img> fica limitado por max-height/max-width
   (em vez de height:100%) para não herdar o tamanho intrínseco do arquivo
   (4505x4505) quando o container também está em auto.
   ========================================================================== */

.brand {
    justify-content: center;
    padding: 1px 10px 20px;
}
.brand-logo {
    background: none;
    box-shadow: none;
    height: auto;
    padding: 0;
    width: 100%;
}
.brand-logo img {
    display: block;
    height: auto;
    margin: 0 auto;
    max-height: 100px;
    max-width: 100%;
    width: auto;
}

.auth-brand .logo {
    background: hsla(0, 0%, 100%, .92);
    height: 44px;
    padding: 6px 10px;
    width: auto;
}
.auth-brand .logo img {
    display: block;
    height: 100%;
    width: auto;
}

/* Marca campos obrigatórios com um asterisco vermelho após o rótulo. */
.field-label.required::after {
    content: " *";
    color: #dc3545;
    font-weight: 700;
}

/* Seções do menu lateral (Clínica, Atendimento, Sistema, Conta) recolhíveis pela setinha. */
.nav-label.nav-label--toggle {
    align-items: center;
    cursor: pointer;
    display: flex;
    font-size: 12px;
    justify-content: space-between;
    padding-bottom: 8px;
    user-select: none;
}
.nav-label.nav-label--toggle .nav-label-caret {
    height: 14px;
    transition: transform .25s ease;
    width: 14px;
}
.nav-section.is-collapsed > .nav-label--toggle .nav-label-caret {
    transform: rotate(-90deg);
}
/* Corpo animado: grid de 1fr -> 0fr anima a altura sem precisar medi-la. */
.nav-section-body {
    display: grid;
    grid-template-rows: 1fr;
    opacity: 1;
    transition: grid-template-rows .28s ease, opacity .22s ease;
}
.nav-section-body > .nav-section-inner {
    min-height: 0;
    overflow: hidden;
}
.nav-section.is-collapsed > .nav-section-body {
    grid-template-rows: 0fr;
    opacity: 0;
}
/* Faixa de ícones (721–1100px): sem rótulo não há como reabrir, então nada fica recolhido. */
@media (min-width: 721px) and (max-width: 1100px) {
    .nav-section.is-collapsed > .nav-section-body {
        grid-template-rows: 1fr;
        opacity: 1;
    }
}
@media (prefers-reduced-motion: reduce) {
    .nav-section-body, .nav-label.nav-label--toggle .nav-label-caret { transition: none; }
}

/* Ícone "i" com balão de orientações (.info-wrap > .info-btn + .info-pop). */
.info-wrap { position: relative; display: inline-flex; align-items: center; vertical-align: middle; margin-left: 10px; }
.info-btn { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; padding: 0;
    border-radius: 50%; border: 0; background: var(--primary); color: #fff; cursor: pointer; transition: transform .15s, box-shadow .15s; }
.info-btn:hover, .info-btn[aria-expanded="true"] { transform: scale(1.08); box-shadow: 0 0 0 4px var(--primary-ring); }
.info-btn:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.info-btn svg { width: 14px; height: 14px; fill: #fff; stroke: none; }
.info-pop { position: absolute; z-index: 30; top: calc(100% + 8px); left: 0; width: min(520px, 86vw); padding: 14px 16px;
    background: var(--surface, #fff); border: 1px solid var(--border, #d6dbe3); border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0,0,0,.14); font-size: 14px; line-height: 1.5; font-weight: 400; }
.info-pop[hidden] { display: none; }

/* ── Detalhes em seções: cartão com ícone no título e linhas rótulo/valor ── */
.detail-head { align-items: center; display: flex; gap: 12px; padding-bottom: 14px; border-bottom: 1px solid var(--border-soft); margin-bottom: 4px; }
.detail-head-icon { align-items: center; background: var(--icon-green-soft); border-radius: 10px; color: var(--icon-green); display: inline-flex; flex: none; height: 34px; justify-content: center; width: 34px; }
.detail-head-icon svg { fill: none; height: 18px; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; width: 18px; }
.detail-title { color: var(--t-base); font-size: 16px; font-weight: 700; margin: 0; }
.detail-list { margin: 0; }
.detail-row { align-items: center; border-bottom: 1px solid var(--border-soft); display: grid; gap: 16px; grid-template-columns: minmax(150px, 38%) 1fr; padding: 13px 0; }
.detail-row:last-child { border-bottom: 0; }
.detail-label { align-items: center; color: var(--t-muted); display: flex; font-size: 13px; font-weight: 600; gap: 10px; margin: 0; }
.detail-label svg { fill: none; flex: none; height: 15px; stroke: var(--icon-green); stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; width: 15px; }
.detail-value { color: var(--t-base); font-size: 14px; line-height: 1.4; margin: 0; overflow-wrap: anywhere; }
.detail-value.is-multiline { white-space: pre-line; }
.detail-value.is-empty { color: var(--t-muted); font-style: italic; }
.detail-value a { color: var(--primary); text-decoration: none; }
.detail-value a:hover { text-decoration: underline; }
.detail-value a.is-whatsapp { color: var(--success); }
.detail-value a { white-space: nowrap; }
.detail-value a svg { fill: none; height: 13px; margin-left: 4px; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2; vertical-align: -1px; width: 13px; }
@media (max-width: 600px) { .detail-row { gap: 4px; grid-template-columns: 1fr; } }

/* Espaço entre os cartões de detalhe consecutivos. */
.detail-card + .detail-card,
form > .card + .card { margin-top: 28px; }
.detail-card + .form-actions { margin-top: 28px; }

/* Verde dos ícones de detalhe: o mesmo do tema escuro, também no claro (onde --primary é quase preto). */
:root { --icon-green: #22a67f; --icon-green-soft: #e3f5ef; }
:root[data-theme=dark] { --icon-green: #22a67f; --icon-green-soft: #0f2a22; }

/* Ícone dentro do rótulo dos formulários de proprietário. */
.field-label:has(> svg) { align-items: center; display: flex; gap: 8px; }
.field-label > svg { fill: none; flex: none; height: 15px; stroke: var(--icon-green); stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; width: 15px; }
.detail-card .detail-head, form > .card .detail-head { margin-bottom: 18px; }

/* ── Toasts (mensagens de sucesso/aviso/erro no canto da tela) ───────────── */
.toast-stack { display: flex; flex-direction: column; gap: 10px; pointer-events: none; position: fixed; right: 24px; top: 84px; width: min(420px, calc(100vw - 32px)); z-index: 1100; }
.toast-stack:empty { display: none; }
.toast { animation: toast-in .35s cubic-bezier(.2, .8, .2, 1); background: var(--surface, var(--bg-card, #fff)); border-radius: 12px; box-shadow: 0 12px 32px rgba(15, 23, 42, .18), 0 2px 6px rgba(15, 23, 42, .08); margin: 0 !important; overflow: hidden; padding-bottom: 16px; pointer-events: auto; position: relative; }
.toast.success { border-left: 4px solid var(--success); }
.toast.warning { border-left: 4px solid var(--warning, #d97706); }
.toast.danger { border-left: 4px solid var(--danger); }
.toast .body { font-weight: 600; }
.toast.is-leaving { animation: toast-out .3s ease forwards; }
.toast-progress { animation: toast-progress linear forwards; background: currentColor; bottom: 0; height: 3px; left: 0; opacity: .55; position: absolute; width: 100%; }
.toast.success .toast-progress { color: var(--success); }
.toast.warning .toast-progress { color: var(--warning, #d97706); }
.toast.is-paused .toast-progress { animation-play-state: paused; }
@keyframes toast-in { from { opacity: 0; transform: translateX(32px); } to { opacity: 1; transform: none; } }
@keyframes toast-out { to { opacity: 0; transform: translateX(32px); } }
@keyframes toast-progress { from { transform: scaleX(1); transform-origin: left; } to { transform: scaleX(0); transform-origin: left; } }
@media (max-width: 600px) { .toast-stack { right: 16px; top: 72px; } }
@media (prefers-reduced-motion: reduce) { .toast, .toast.is-leaving { animation-duration: .01s; } .toast-progress { animation: none; } }

/* ── Abas de situação (Ativos / Inativos) ─────────────────────────────────── */
.tabs { background: var(--border-soft); border-radius: 10px; display: inline-flex; gap: 4px; padding: 4px; }
.tab { align-items: center; border-radius: 8px; color: var(--t-muted); display: inline-flex; font-size: 13.5px; font-weight: 600; gap: 7px; padding: 7px 14px; text-decoration: none; transition: background .15s, color .15s; }
.tab svg { fill: none; height: 15px; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2; width: 15px; }
.tab:hover { color: var(--t-base); }
.tab.is-active { background: var(--bg-card, #fff); box-shadow: 0 1px 3px rgba(15, 23, 42, .12); color: var(--icon-green); }

/* ── Listagem: ícones no cabeçalho/nome e documento em destaque verde ─────── */
.th-icon { align-items: center; display: inline-flex; gap: 6px; }
.th-icon svg { fill: none; flex: none; height: 13px; stroke: var(--icon-green); stroke-linecap: round; stroke-linejoin: round; stroke-width: 2; width: 13px; }
.cell-with-icon { align-items: center; display: inline-flex; gap: 10px; }
.cell-avatar { align-items: center; background: var(--icon-green-soft); border-radius: 50%; color: var(--icon-green); display: inline-flex; flex: none; height: 30px; justify-content: center; width: 30px; }
.cell-avatar svg { fill: none; height: 15px; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; width: 15px; }
.doc-badge { border: 1.5px solid var(--icon-green); border-radius: 8px; color: var(--icon-green); display: inline-block; font-family: var(--font-mono, ui-monospace, monospace); font-size: 13px; font-weight: 600; padding: 3px 9px; white-space: nowrap; }

/* Listagem de proprietários: a tabela se ajusta à largura da tela, sem rolagem horizontal.
   Fonte, espaçamento, avatar e botões encolhem com a largura (clamp); em telas mais estreitas
   as colunas secundárias saem (Tipo já aparece no formato do documento).
   O vendor usa ".table tbody td" / ".table thead th", então a especificidade precisa ser maior. */
.table.table--spaced { table-layout: auto; width: 100%; }
.table.table--spaced thead th,
.table.table--spaced tbody td {
    font-size: clamp(11px, .9vw, 13px);
    padding-left: clamp(5px, .9vw, 14px);
    padding-right: clamp(5px, .9vw, 14px);
}
.table.table--spaced thead th { font-size: clamp(8.5px, .7vw, 10px); letter-spacing: clamp(.02em, .08vw, .1em); }
.table.table--spaced thead th:first-child,
.table.table--spaced tbody td:first-child { padding-left: 0; }
.table.table--spaced thead th:last-child,
.table.table--spaced tbody td:last-child { padding-right: 0; }
.table.table--spaced .cell-name { min-width: 0; overflow-wrap: anywhere; }
.table.table--spaced .cell-date,
.table.table--spaced .doc-badge { white-space: nowrap; }
.table.table--spaced .doc-badge { font-size: clamp(10.5px, .85vw, 13px); padding: 2px clamp(5px, .6vw, 9px); }
.table.table--spaced .cell-avatar { height: clamp(22px, 2vw, 30px); width: clamp(22px, 2vw, 30px); }
.table.table--spaced .cell-with-icon { gap: clamp(6px, .7vw, 10px); }
.table.table--spaced .cell-actions .btn--icon { height: clamp(26px, 2.2vw, 32px); width: clamp(26px, 2.2vw, 32px); }
.table.table--spaced .cell-actions .btn--icon svg { height: clamp(13px, 1.1vw, 16px); width: clamp(13px, 1.1vw, 16px); }
@media (max-width: 1000px) { .table.table--spaced .th-icon svg { display: none; } }
@media (max-width: 1400px) { .table.table--spaced .col-tipo { display: none; } }
@media (max-width: 900px) { .table.table--spaced .cell-avatar { display: none; } }
.table.table--spaced thead th { font-weight: 700; }

/* ── Breadcrumb do topo: pílula com início, separadores e página atual em destaque ── */
.breadcrumb-pill { align-items: center; background: var(--bg-card, #fff); border: 1px solid var(--border-soft); border-radius: 999px; box-shadow: 0 1px 2px rgba(15, 23, 42, .05); display: inline-flex; gap: 8px; max-width: 100%; min-width: 0; padding: 7px 16px 7px 12px; }
.breadcrumb-pill .crumb-home { align-items: center; color: var(--t-muted); display: inline-flex; font-size: 13px; font-weight: 600; gap: 8px; text-decoration: none; transition: color .15s; white-space: nowrap; }
.breadcrumb-pill .crumb-home svg { fill: none; height: 16px; stroke: var(--icon-green); stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.9; width: 16px; }
.breadcrumb-pill .crumb-home:hover { color: var(--icon-green); }
.breadcrumb-pill .sep { color: var(--t-light); flex: none; }
.breadcrumb-pill .crumb-mid { color: var(--t-muted); font-size: 13px; font-weight: 500; white-space: nowrap; }
.breadcrumb-pill .current { color: var(--t-base); font-size: 13.5px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.breadcrumb-pill .current::before { background: var(--icon-green); border-radius: 50%; content: ""; display: inline-block; height: 7px; margin-right: 8px; vertical-align: 1px; width: 7px; }
@media (max-width: 900px) { .breadcrumb-pill .crumb-home span { display: none; } }
@media (max-width: 600px) { .breadcrumb-pill .crumb-mid { display: none; } }
.breadcrumb-pill .crumb-link { border-radius: 6px; color: var(--t-muted); margin: -2px -4px; padding: 2px 4px; text-decoration: none; transition: background .15s, color .15s; }
.breadcrumb-pill .crumb-link:hover { background: var(--icon-green-soft); color: var(--icon-green); }
.input--readonly { background: var(--border-soft); color: var(--t-base); cursor: not-allowed; display: flex; align-items: center; min-height: 40px; }
@media (max-width: 1400px) { .table.table--spaced .col-secundaria { display: none; } }

/* Campo com prefixo (ex.: "R$"). */
.input-prefix { align-items: stretch; display: flex; }
.input-prefix-text { align-items: center; background: var(--border-soft); border: 1px solid var(--border); border-right: 0; border-radius: 8px 0 0 8px; color: var(--t-muted); display: inline-flex; font-size: 13px; font-weight: 600; padding: 0 12px; }
.input-prefix .input { border-radius: 0 8px 8px 0; flex: 1; min-width: 0; }

/* ── Formulário de usuário: subtítulo de seção, regras de senha e cartões de papel ── */
.detail-subtitle { color: var(--t-muted); font-size: 12.5px; margin-top: 2px; }
.req-mark { color: var(--danger); }
.pwd-rules { display: grid; gap: 6px; list-style: none; margin: 12px 0 0; padding: 0; }
.pwd-rules li { align-items: center; color: var(--t-muted); display: flex; font-size: 12.5px; gap: 8px; transition: color .15s; }
.pwd-rules li svg { background: var(--border-soft); border-radius: 50%; fill: none; flex: none; height: 16px; padding: 3px; stroke: transparent; stroke-linecap: round; stroke-linejoin: round; stroke-width: 3; width: 16px; transition: background .15s, stroke .15s; }
.pwd-rules li.is-ok { color: var(--icon-green); }
.pwd-rules li.is-ok svg { background: var(--icon-green); stroke: #fff; }
.pwd-rules li.is-pending { color: var(--danger); }
.role-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); margin-top: 14px; }
.role-card { cursor: pointer; display: block; position: relative; }
.role-card input { height: 0; opacity: 0; position: absolute; width: 0; }
.role-card-body { background: var(--bg-card, #fff); border: 1.5px solid var(--border); border-radius: 12px; display: grid; gap: 4px; padding: 14px 16px 14px 44px; position: relative; transition: border-color .15s, box-shadow .15s, background .15s; }
.role-card-body::before { background: var(--bg-card, #fff); border: 2px solid var(--border); border-radius: 50%; content: ""; height: 16px; left: 16px; position: absolute; top: 17px; transition: border-color .15s, background .15s; width: 16px; }
.role-card:hover .role-card-body { border-color: var(--icon-green); }
.role-card input:checked + .role-card-body { background: var(--icon-green-soft); border-color: var(--icon-green); box-shadow: 0 0 0 3px color-mix(in oklab, var(--icon-green) 18%, transparent); }
.role-card input:checked + .role-card-body::before { background: radial-gradient(circle, var(--icon-green) 0 4px, transparent 5px); border-color: var(--icon-green); }
.role-card input:focus-visible + .role-card-body { outline: 2px solid var(--icon-green); outline-offset: 2px; }
.role-card-title { color: var(--t-base); font-size: 13px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.role-card-desc { color: var(--t-muted); font-size: 12.5px; }

/* Campo com botão dentro (ex.: mostrar/ocultar senha). */
.input-affix { position: relative; }
.input-affix .input { padding-right: 44px; }
.input-affix-btn { align-items: center; background: transparent; border: 0; border-radius: 6px; color: var(--t-muted); cursor: pointer; display: inline-flex; height: 32px; justify-content: center; position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 32px; }
.input-affix-btn:hover { background: var(--icon-green-soft); color: var(--icon-green); }
.input-affix-btn svg { fill: none; height: 18px; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; width: 18px; }
.input-affix-btn [hidden] { display: none; }

/* ── Planos e assinaturas ─────────────────────────────────────────────────── */
.page-intro { margin-bottom: 18px; }
.page-intro-title { color: var(--t-base); font-size: 20px; font-weight: 700; margin: 0; }
.page-intro-text { color: var(--t-muted); font-size: 13.5px; margin: 4px 0 0; }
.link-btn { background: none; border: 0; color: var(--icon-green); cursor: pointer; font: inherit; font-weight: 600; padding: 0; text-decoration: underline; text-underline-offset: 2px; }
.link-btn:hover { color: var(--primary); }
.resource-grid { display: grid; gap: 12px 20px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); margin-top: 14px; }
.resource-item { align-items: center; }
.tag-list { display: flex; flex-wrap: wrap; gap: 6px; }
