/* Portal do Paciente — layout de 04/10/2026, copiado do design "Portal do
   paciente responsivo" (Claude Design): menu lateral no computador, barra de
   abas no celular, sino com todos os avisos, pesquisa pós-alta em destaque.

   A cor da marca continua vindo da UNIDADE (--pp-marca, BranchTheme); o resto
   da paleta é a do design. Esta folha carrega DEPOIS de portal-paciente.css e
   redefine os tokens --pp-* para as telas antigas (agenda, mensagens,
   receitas…) vestirem a mesma roupa. Ponto de quebra: 860px. */

:root {
    --d-bg: #F7F3F2;
    --d-card: #FFFFFF;
    --d-tinta: #221B1E;
    --d-fraco: #625A5E;
    --d-meio: #4A4145;
    --d-linha: #ECE4E6;
    --d-linha2: #F1EBEC;
    --d-verde: #1C6E43;  --d-verde-suave: #E3F2E8;
    --d-ambar: #8A5300;  --d-ambar-suave: #FCF0D8;  --d-ambar-borda: #EFD49C;  --d-ambar-ponto: #D49A2A;
    --d-azul: #2C4F86;   --d-azul-suave: #E8EEF7;
    --d-laranja: #A4500F; --d-laranja-suave: #FDEFE3;
    --d-rosa: #B0285E;   --d-rosa-suave: #FBE7EF;
    --d-ouro: #8A6200;   --d-ouro-suave: #FCF3D9;
    --d-verm: #B42318;   --d-verm-suave: #FDECEA;
    --d-escura: var(--pp-marca);
    /* tokens antigos, para as telas que ainda usam .pp-* */
    --pp-fundo: #F7F3F2;
    --pp-texto: #221B1E;
    --pp-tinta: #221B1E;
    --pp-fraco: #625A5E;
    --pp-linha: #ECE4E6;
    --pp-raio: 20px;
    --pp-verde: #1C6E43;
    --pp-verde-suave: #E3F2E8;
    --pp-ambar: #8A5300;
    --pp-ambar-suave: #FCF0D8;
    --pp-verm: #B42318;
    --pp-verm-suave: #FDECEA;
    --pp-sombra: 0 6px 20px rgba(34,27,30,.06);
}
@supports (color: color-mix(in srgb, red 50%, black)) {
    :root { --d-escura: color-mix(in srgb, var(--pp-marca) 78%, black); }
}

html { -webkit-text-size-adjust: 100%; }
html, body { margin: 0; padding: 0; background: var(--d-bg); }
body.d-body {
    font-family: 'Atkinson Hyperlegible Next', 'Atkinson Hyperlegible', system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    color: var(--d-tinta);
    font-size: 16px;
    line-height: 1.45;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
}
.d-body button, .d-body textarea, .d-body input, .d-body select { font-family: inherit; }
/* links soltos no texto ganham a cor da marca; os componentes (d-*) têm cor própria */
.d-body a:not([class*="d-"]) { color: var(--pp-marca); }
.d-body a:not([class*="d-"]):hover { color: var(--d-escura); }
.d-body textarea:focus, .d-body input:focus, .d-body select:focus { outline: 3px solid var(--pp-suave); border-color: var(--pp-marca) !important; }
.d-body *:focus-visible { outline: 3px solid var(--pp-suave); outline-offset: 2px; }
.d-body [hidden] { display: none !important; }

/* ═══════════ casca ═══════════ */
.d-shell { display: flex; min-height: 100vh; min-height: 100dvh; background: var(--d-bg); }
.d-col { flex: 1; min-width: 0; display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; }
.d-main { flex: 1; }
.d-wrap { max-width: 1080px; margin: 0 auto; padding: 18px 16px 28px; }
html.d-grande .d-wrap { zoom: 1.15; }

/* menu lateral (computador) */
.d-side { display: none; }
/* barra do topo (computador) */
.d-top { display: none; }

/* cabeçalho do celular */
.d-mtop {
    height: 66px; flex-shrink: 0; background: var(--d-card); border-bottom: 1px solid var(--d-linha);
    display: flex; align-items: center; gap: 12px; padding: 0 16px; position: sticky; top: 0; z-index: 30;
}
.d-mtop-logo { width: 40px; height: 40px; border-radius: 12px; background: var(--pp-suave); display: flex; align-items: center; justify-content: center; flex-shrink: 0; overflow: hidden; }
.d-mtop-logo img { max-width: 34px; max-height: 30px; }
.d-mtop-logo b { color: var(--pp-marca); font-weight: 800; font-size: 14px; }
.d-mtop-tit { flex: 1; min-width: 0; }
.d-mtop-tit b { display: block; font-weight: 700; font-size: 16px; }
.d-mtop-tit span { display: block; font-size: 13px; color: var(--d-fraco); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* botões redondos do topo (sino, A+) */
.d-ico-btn {
    width: 44px; height: 44px; border-radius: 22px; border: 1px solid var(--d-linha); background: var(--d-card); color: var(--d-tinta);
    display: flex; align-items: center; justify-content: center; cursor: pointer; position: relative; padding: 0; flex-shrink: 0;
}
.d-ico-btn svg { width: 22px; height: 22px; }
.d-ico-btn:hover { background: var(--pp-suave); }
.d-ico-btn.aberto { background: var(--pp-suave); border-color: var(--pp-marca); color: var(--pp-marca); }
.d-ico-btn .d-ponto {
    position: absolute; top: -4px; right: -4px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px;
    background: var(--pp-marca); color: #fff; font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; border: 2px solid var(--d-card);
}
.d-ico-btn.d-amais { font-weight: 800; font-size: 15px; letter-spacing: -.02em; }
.d-avatar { width: 40px; height: 40px; border-radius: 20px; background: var(--pp-marca); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; flex-shrink: 0; border: none; cursor: pointer; padding: 0; font-size: 16px; text-decoration: none; }

/* barra de abas (celular) */
.d-tabs {
    flex-shrink: 0; display: flex; background: var(--d-card); border-top: 1px solid var(--d-linha); padding: 8px 4px 14px;
    padding-bottom: calc(14px + env(safe-area-inset-bottom)); position: sticky; bottom: 0; z-index: 30;
}
.d-tabs a, .d-tabs a.d-nl { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; text-decoration: none; color: var(--d-meio); min-height: 56px; }
.d-tabs .d-pill { position: relative; width: 58px; height: 34px; border-radius: 17px; display: flex; align-items: center; justify-content: center; }
.d-tabs a.ativa { color: var(--pp-marca); }
.d-tabs a.ativa .d-pill { background: var(--pp-suave); }
.d-tabs svg { width: 24px; height: 24px; }
.d-tabs span.d-rot { font-size: 13px; font-weight: 600; }
.d-tabs a.d-nl, .d-side nav a.d-nl, .d-conta-lista a.d-nl { color: inherit; }
.d-tabs a.ativa span.d-rot { font-weight: 700; }
.d-tabs .d-badge { position: absolute; top: -4px; right: 4px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: var(--pp-marca); color: #fff; font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; border: 2px solid var(--d-card); }

/* ícones de traço (24x24) */
.d-i { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }

/* ═══════════ painéis: sino e conta ═══════════ */
.d-veu { position: fixed; inset: 0; background: rgba(34,27,30,.5); z-index: 40; display: none; }
.d-veu.aberto { display: flex; align-items: flex-end; justify-content: center; }
.d-sheet { width: 100%; max-width: 560px; max-height: 88vh; max-height: 88dvh; overflow-y: auto; background: var(--d-card); border-radius: 28px 28px 0 0; padding: 20px 20px 28px; padding-bottom: calc(28px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 10px; }
.d-sheet-topo { display: flex; align-items: center; gap: 12px; }
.d-sheet-topo h2 { margin: 0; flex: 1; font-size: 22px; font-weight: 800; }
.d-fechar { width: 44px; height: 44px; border-radius: 22px; border: none; background: var(--d-bg); color: var(--d-tinta); display: flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0; padding: 0; }
.d-fechar svg { width: 20px; height: 20px; }
.d-aviso { display: flex; align-items: center; gap: 14px; padding: 12px 10px; border-radius: 18px; text-decoration: none; color: var(--d-tinta); border: 1px solid transparent; }
.d-aviso:hover { background: var(--d-bg); color: var(--d-tinta); }
.d-aviso-ic { width: 46px; height: 46px; border-radius: 14px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.d-aviso-ic svg { width: 24px; height: 24px; }
.d-aviso-meio { flex: 1; min-width: 0; }
.d-aviso-meio b { display: block; font-size: 16px; font-weight: 700; line-height: 1.25; }
.d-aviso-meio span { display: block; font-size: 14px; color: var(--d-fraco); margin-top: 2px; }
.d-aviso-seta { color: var(--pp-marca); flex-shrink: 0; }
.d-aviso-seta svg { width: 20px; height: 20px; stroke-width: 2.4; }
.d-aviso-vazio { padding: 24px 10px; text-align: center; color: var(--d-fraco); font-size: 16px; }
.d-aviso-vazio b { display: block; color: var(--d-tinta); font-size: 18px; margin-bottom: 4px; }
.tom-marca { background: var(--pp-suave); color: var(--pp-marca); }
.tom-ambar { background: var(--d-ambar-suave); color: var(--d-ambar); }
.tom-verde { background: var(--d-verde-suave); color: var(--d-verde); }
.tom-azul { background: var(--d-azul-suave); color: var(--d-azul); }
.tom-laranja { background: var(--d-laranja-suave); color: var(--d-laranja); }
.tom-rosa { background: var(--d-rosa-suave); color: var(--d-rosa); }
.tom-ouro { background: var(--d-ouro-suave); color: var(--d-ouro); }
.tom-verm { background: var(--d-verm-suave); color: var(--d-verm); }
.d-conta-user { display: flex; align-items: center; gap: 12px; padding: 6px 4px 10px; border-bottom: 1px solid var(--d-linha); }
.d-conta-user b { display: block; font-size: 16px; }
.d-conta-user > div > span { display: block; font-size: 13px; color: var(--d-fraco); }
.d-conta-lista { display: flex; flex-direction: column; gap: 2px; }
.d-conta-lista a, .d-conta-lista button { display: flex; align-items: center; gap: 14px; height: 54px; padding: 0 12px; border: none; border-radius: 14px; background: none; color: var(--d-tinta); font-size: 17px; font-weight: 600; text-decoration: none; cursor: pointer; width: 100%; text-align: left; }
.d-conta-lista a:hover, .d-conta-lista button:hover { background: var(--d-bg); color: var(--d-tinta); }
.d-conta-lista .d-badge { margin-left: auto; min-width: 26px; height: 26px; padding: 0 8px; border-radius: 13px; background: var(--pp-marca); color: #fff; font-size: 14px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.d-conta-lista .d-sair { color: var(--d-verm); }

/* ═══════════ blocos do design ═══════════ */
.d-pilha { display: flex; flex-direction: column; gap: 28px; }
.d-grid-topo { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 16px; }
.d-hero { position: relative; overflow: hidden; background: var(--pp-marca); color: #fff; border-radius: 24px; padding: 28px; display: flex; flex-direction: column; justify-content: center; gap: 10px; min-height: 176px; }
.d-hero::before { content: ""; position: absolute; right: -60px; top: -60px; width: 220px; height: 220px; border-radius: 50%; background: rgba(255,255,255,.07); }
.d-hero::after { content: ""; position: absolute; right: 40px; bottom: -90px; width: 160px; height: 160px; border-radius: 50%; background: rgba(255,255,255,.05); }
.d-hero > * { position: relative; z-index: 1; }
.d-hero-sup { font-size: 16px; font-weight: 500; }
.d-hero h1 { margin: 0; font-size: clamp(30px, 4vw, 40px); font-weight: 800; letter-spacing: -.01em; line-height: 1.05; }
.d-hero-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.d-chip { background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.3); border-radius: 20px; padding: 6px 14px; font-size: 15px; font-weight: 700; color: #fff; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.d-chip:hover { color: #fff; background: rgba(255,255,255,.26); }

/* cartão de pesquisa pendente (amarelo) e irmãos */
.d-alerta-card { background: var(--d-ambar-suave); border: 1px solid var(--d-ambar-borda); border-radius: 24px; padding: 24px; display: flex; flex-direction: column; gap: 14px; }
.d-alerta-card.verde { background: var(--d-verde-suave); border-color: #BFE0CB; }
.d-alerta-card.azul { background: var(--d-azul-suave); border-color: #C9D6EA; }
.d-alerta-card.marca { background: var(--pp-suave); border-color: var(--pp-suave); }
.d-alerta-topo { display: flex; gap: 14px; align-items: flex-start; }
.d-alerta-ic { width: 48px; height: 48px; border-radius: 24px; background: var(--d-card); color: var(--d-ambar); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.d-alerta-ic svg { width: 26px; height: 26px; }
.d-alerta-card.verde .d-alerta-ic { color: var(--d-verde); }
.d-alerta-card.azul .d-alerta-ic { color: var(--d-azul); }
.d-alerta-card.marca .d-alerta-ic { color: var(--pp-marca); }
.d-alerta-txt { display: flex; flex-direction: column; gap: 4px; }
.d-alerta-txt b { font-size: 19px; font-weight: 700; line-height: 1.3; text-wrap: pretty; }
.d-alerta-txt span { font-size: 15px; color: #5C4A2A; line-height: 1.45; }
.d-alerta-card.verde .d-alerta-txt span, .d-alerta-card.azul .d-alerta-txt span, .d-alerta-card.marca .d-alerta-txt span { color: var(--d-fraco); }
.d-alerta-card form { display: contents; }

/* botões */
.d-btn { height: 56px; border: none; border-radius: 16px; background: var(--d-tinta); color: #fff; font-size: 17px; font-weight: 700; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; padding: 0 20px; width: 100%; transition: background .15s, transform .1s; }
.d-btn:hover { background: #3A3034; color: #fff; }
.d-btn:active { transform: scale(.98); }
.d-btn svg { width: 20px; height: 20px; stroke-width: 2.4; }
.d-btn.marca { background: var(--pp-marca); }
.d-btn.marca:hover { background: var(--d-escura); }
.d-btn.claro { background: var(--d-card); color: var(--d-tinta); border: 1px solid var(--d-linha); }
.d-btn.claro:hover { background: var(--d-bg); color: var(--d-tinta); }
.d-btn.suave { background: var(--pp-suave); color: var(--pp-marca); }
.d-btn.suave:hover { background: var(--pp-suave); color: var(--d-escura); }
.d-btn.auto { width: auto; }
.d-btn.mini { height: 48px; font-size: 16px; padding: 0 20px; border-radius: 14px; }
.d-btn[disabled], .d-btn.apagado { opacity: .4; cursor: default; transform: none; }
.d-btn-linha { display: flex; flex-wrap: wrap; gap: 10px; }
.d-btn-linha .d-btn { flex: 1; min-width: 180px; }
.d-link-btn { border: none; background: none; color: var(--pp-marca); font-size: 16px; font-weight: 700; cursor: pointer; padding: 8px 0; text-decoration: none; }

/* título de página */
.d-pag-topo { display: flex; flex-direction: column; gap: 6px; }
.d-pag-topo h1, .d-h1 { margin: 0; font-size: clamp(28px, 4vw, 34px); font-weight: 800; letter-spacing: -.01em; line-height: 1.15; }
.d-pag-topo p, .d-sub { margin: 0; font-size: 17px; color: var(--d-fraco); line-height: 1.45; }
.d-pag-linha { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.d-select { height: 48px; padding: 0 40px 0 16px; border-radius: 14px; border: 1px solid var(--d-linha); background: var(--d-card) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23221B1E' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 14px center; font-size: 16px; font-weight: 700; color: var(--d-tinta); appearance: none; -webkit-appearance: none; cursor: pointer; }

/* seções e títulos */
.d-secao { display: flex; flex-direction: column; gap: 14px; }
.d-secao > h2, .d-h2 { margin: 0; font-size: 22px; font-weight: 700; }
.d-card { background: var(--d-card); border: 1px solid var(--d-linha); border-radius: 24px; padding: 22px; display: flex; flex-direction: column; gap: 6px; }
.d-card-topo { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 8px; }
.d-card-topo h2 { margin: 0; font-size: 20px; font-weight: 700; }

/* azulejos "O que você precisa hoje?" */
.d-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.d-tile { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 14px; padding: 20px; min-height: 168px; border: 1px solid var(--d-linha); border-radius: 22px; background: var(--d-card); cursor: pointer; text-align: left; color: var(--d-tinta); text-decoration: none; transition: border-color .15s, box-shadow .15s, transform .1s; }
.d-tile:hover { border-color: var(--pp-marca); box-shadow: 0 6px 20px rgba(34,27,30,.10); color: var(--d-tinta); }
.d-tile:active { transform: scale(.98); }
.d-tile-ic { width: 54px; height: 54px; border-radius: 16px; display: flex; align-items: center; justify-content: center; }
.d-tile-ic svg { width: 28px; height: 28px; }
.d-tile-txt { display: flex; flex-direction: column; gap: 4px; }
.d-tile-txt b { font-size: 19px; font-weight: 700; line-height: 1.2; }
.d-tile-txt span { font-size: 15px; color: var(--d-fraco); line-height: 1.35; }
.d-tile .d-novo { position: absolute; top: 18px; right: 18px; height: 28px; padding: 0 10px; border-radius: 14px; background: var(--pp-marca); color: #fff; font-size: 14px; font-weight: 700; display: flex; align-items: center; }
.d-tiles.sm { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.d-tiles.sm .d-tile { min-height: 0; flex-direction: row; align-items: center; padding: 14px 16px; gap: 12px; border-radius: 18px; }
.d-tiles.sm .d-tile-ic { width: 44px; height: 44px; border-radius: 14px; }
.d-tiles.sm .d-tile-ic svg { width: 22px; height: 22px; }
.d-tiles.sm .d-tile-txt b { font-size: 16px; }
.d-tiles.sm .d-tile-txt span { font-size: 13.5px; }
.d-tiles.sm .d-tile .d-novo { position: static; margin-left: auto; height: 26px; }

/* linhas de resultado (home e listas) */
.d-linha { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-top: 1px solid var(--d-linha2); }
.d-linha-ic { width: 48px; height: 48px; border-radius: 14px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.d-linha-ic svg { width: 24px; height: 24px; }
.d-linha-meio { flex: 1; min-width: 0; }
.d-linha-meio b { display: block; font-size: 17px; font-weight: 700; }
.d-linha-meio span { display: block; font-size: 14px; color: var(--d-fraco); margin-top: 2px; }
.d-abrir { height: 48px; padding: 0 20px; border-radius: 14px; border: none; background: var(--pp-marca); color: #fff; font-size: 16px; font-weight: 700; cursor: pointer; flex-shrink: 0; display: inline-flex; align-items: center; gap: 6px; text-decoration: none; }
.d-abrir:hover { background: var(--d-escura); color: #fff; }
.d-abrir.suave { background: var(--pp-suave); color: var(--pp-marca); }
.d-abrir.suave:hover { color: var(--d-escura); }
.d-abrir svg { width: 18px; height: 18px; stroke-width: 2.4; }
.d-vazio-linha { font-size: 16px; color: var(--d-fraco); padding: 12px 0; border-top: 1px solid var(--d-linha2); }
.d-selo { height: 24px; padding: 0 9px; border-radius: 12px; background: var(--pp-marca); color: #fff; font-size: 13px; font-weight: 700; display: inline-flex; align-items: center; }
.d-selo.cinza { background: #F1ECED; color: var(--d-meio); }
.d-selo.verde { background: var(--d-verde-suave); color: var(--d-verde); }
.d-selo.ambar { background: var(--d-ambar-suave); color: var(--d-ambar); }

/* listas das telas Exames/Laudos */
.d-rot-lista { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.d-rot-lista i { width: 10px; height: 10px; border-radius: 5px; display: inline-block; }
.d-rot-lista.verde { color: var(--d-verde); } .d-rot-lista.verde i { background: var(--d-verde); }
.d-rot-lista.ambar { color: var(--d-ambar); } .d-rot-lista.ambar i { background: var(--d-ambar-ponto); }
.d-lista { display: flex; flex-direction: column; gap: 12px; }
.d-item { display: flex; align-items: center; gap: 16px; padding: 18px; border: 1px solid var(--d-linha); border-radius: 20px; background: var(--d-card); color: var(--d-tinta); text-decoration: none; text-align: left; cursor: pointer; width: 100%; }
.d-item:hover { border-color: var(--pp-marca); color: var(--d-tinta); }
.d-item:active { transform: scale(.99); }
.d-item.espera { border: 1px dashed #E2D6D9; background: #FBF9F8; cursor: default; }
.d-item.espera:hover { border-color: #E2D6D9; }
.d-item-ic { width: 52px; height: 52px; border-radius: 16px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.d-item-ic svg { width: 26px; height: 26px; }
.d-item-meio { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.d-item-nome { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 18px; font-weight: 700; }
.d-item-meta { font-size: 15px; color: var(--d-fraco); }
.d-item-dir { text-align: right; flex-shrink: 0; }
.d-item-dir small { display: block; font-size: 13px; color: var(--d-fraco); }
.d-item-dir b { display: block; font-size: 16px; font-weight: 700; color: var(--d-ambar); }
.d-nota { font-size: 15px; color: var(--d-fraco); line-height: 1.5; background: var(--d-bg); border-radius: 14px; padding: 14px 16px; }

/* no celular a linha de exame/laudo fica enxuta: ícone menor e só a seta no "Abrir" */
@media (max-width: 859px) {
    .d-item { gap: 12px; padding: 14px; }
    .d-item-ic { width: 44px; height: 44px; border-radius: 14px; }
    .d-item-ic svg { width: 22px; height: 22px; }
    .d-item-nome { font-size: 17px; }
    .d-item-meta { font-size: 14px; }
    a.d-item .d-abrir { font-size: 0; gap: 0; width: 44px; height: 44px; padding: 0; justify-content: center; border-radius: 12px; }
    a.d-item .d-abrir svg { width: 22px; height: 22px; }
    div.d-item .d-abrir { height: 44px; padding: 0 14px; font-size: 15px; }
    .d-linha-ic { width: 42px; height: 42px; }
    .d-linha .d-abrir { height: 42px; padding: 0 16px; }
}

/* ajuda (celular) */
.d-ajuda { display: flex; align-items: center; gap: 14px; background: var(--d-card); border: 1px solid var(--d-linha); border-radius: 20px; padding: 16px 18px; text-decoration: none; color: var(--d-tinta); }
.d-ajuda-ic { width: 44px; height: 44px; border-radius: 22px; background: var(--pp-suave); color: var(--pp-marca); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.d-ajuda-ic svg { width: 22px; height: 22px; }
.d-ajuda small { display: block; font-size: 15px; color: var(--d-fraco); }
.d-ajuda b { display: block; font-size: 18px; font-weight: 700; color: var(--pp-marca); }

/* avisos de sessão (erro/ok) */
.d-flash { border-radius: 16px; padding: 14px 18px; font-size: 16px; font-weight: 600; margin-bottom: 18px; }
.d-flash.erro { background: var(--d-verm-suave); color: var(--d-verm); border: 1px solid #F3C3BE; }
.d-flash.ok { background: var(--d-verde-suave); color: var(--d-verde); border: 1px solid #BFE0CB; }

/* ═══════════ passos (ouvidoria e pesquisa) ═══════════ */
.d-fluxo { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 24px; }
.d-fluxo.larga { max-width: 820px; }
.d-passo { display: none; flex-direction: column; gap: 16px; }
.d-passo.ativo { display: flex; }
.d-passo h1 { margin: 0; font-size: clamp(26px, 4vw, 32px); font-weight: 800; line-height: 1.15; }
.d-passo-topo { display: flex; align-items: center; gap: 12px; }
.d-voltar { display: inline-flex; align-items: center; gap: 6px; height: 48px; padding: 0 16px 0 10px; border-radius: 14px; border: 1px solid var(--d-linha); background: var(--d-card); font-size: 16px; font-weight: 700; color: var(--d-tinta); cursor: pointer; text-decoration: none; }
.d-voltar svg { width: 20px; height: 20px; stroke-width: 2.4; }
.d-passo-rot { font-size: 15px; font-weight: 700; color: var(--d-fraco); margin-left: auto; white-space: nowrap; }
.d-segs { display: flex; gap: 6px; }
.d-segs i { flex: 1; height: 8px; border-radius: 4px; background: var(--d-linha); }
.d-segs i.feito { background: var(--pp-marca); }
.d-barra { flex: 1; height: 10px; border-radius: 5px; background: var(--d-linha); overflow: hidden; }
.d-barra i { display: block; height: 100%; width: 0; background: var(--pp-marca); border-radius: 5px; transition: width .3s; }
.d-etiquetas { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.d-etq { height: 34px; padding: 0 14px; border-radius: 17px; font-size: 15px; font-weight: 700; display: inline-flex; align-items: center; background: var(--d-card); border: 1px solid var(--d-linha); }
.d-opcoes { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 10px; }
.d-opcoes.coluna { grid-template-columns: 1fr; }
.d-op { min-height: 64px; padding: 12px 20px; border-radius: 16px; border: 2px solid var(--d-linha); background: var(--d-card); font-size: 18px; font-weight: 700; color: var(--d-tinta); cursor: pointer; text-align: left; display: flex; align-items: center; gap: 14px; width: 100%; }
.d-op:hover { border-color: var(--pp-marca); }
.d-op.marcada { border-color: var(--pp-marca); background: #FDF5F8; background: color-mix(in srgb, var(--pp-suave) 45%, white); }
.d-op small { display: block; font-size: 15px; color: var(--d-fraco); font-weight: 400; margin-top: 2px; }
.d-op .d-radio { width: 26px; height: 26px; border-radius: 13px; border: 2px solid var(--d-linha); background: #fff; flex-shrink: 0; box-shadow: inset 0 0 0 4px #fff; }
.d-op.marcada .d-radio { border-color: var(--pp-marca); background: var(--pp-marca); }
.d-op input, .d-op-tipo input, .d-face input, .d-na input { position: absolute; opacity: 0; pointer-events: none; width: 1px; height: 1px; }
.d-op-tipo { display: flex; align-items: center; gap: 16px; padding: 20px; border: 1px solid var(--d-linha); border-radius: 20px; background: var(--d-card); cursor: pointer; text-align: left; color: var(--d-tinta); text-decoration: none; width: 100%; }
.d-op-tipo:hover { border-color: var(--pp-marca); color: var(--d-tinta); }
.d-op-tipo:active { transform: scale(.98); }
.d-op-tipo .d-tile-ic { width: 56px; height: 56px; border-radius: 18px; }
.d-op-tipo .d-tile-txt { flex: 1; }
.d-op-tipo > svg.d-seta { width: 22px; height: 22px; stroke: var(--pp-marca); stroke-width: 2.4; }
.d-area { min-height: 200px; padding: 18px; border-radius: 18px; border: 2px solid #E2D6D9; background: var(--d-card); font-size: 18px; line-height: 1.5; color: var(--d-tinta); resize: vertical; width: 100%; }
.d-input { height: 60px; padding: 0 18px; border-radius: 16px; border: 2px solid #E2D6D9; background: var(--d-card); font-size: 18px; color: var(--d-tinta); width: 100%; }
.d-campo { display: flex; flex-direction: column; gap: 6px; }
.d-campo label { font-size: 16px; font-weight: 700; }
.d-dica { font-size: 15px; color: var(--d-fraco); }
.d-pergunta { font-size: 17px; font-weight: 700; margin: 6px 0 0; }

/* carinhas */
.d-cartao-perg { background: var(--d-card); border: 1px solid var(--d-linha); border-radius: 28px; padding: 24px 18px; display: flex; flex-direction: column; gap: 22px; }
.d-cartao-perg h1 { margin: 0; font-size: clamp(26px, 4vw, 34px); font-weight: 800; line-height: 1.2; text-align: center; text-wrap: balance; }
.d-cartao-perg .d-detalhe { text-align: center; font-size: 16px; color: var(--d-fraco); margin: -12px 0 0; }
.d-escala { display: grid; grid-template-columns: 1fr; gap: 10px; }
.d-face { display: flex; flex-direction: row; align-items: center; gap: 12px; padding: 12px 18px; border-radius: 20px; border: 2px solid var(--d-linha); background: var(--d-card); cursor: pointer; color: var(--d-tinta); transition: background .15s, border-color .15s; width: 100%; }
.d-face:hover { border-color: var(--face-cor); }
.d-face.marcada { border-color: var(--face-cor); background: var(--face-tint); }
.d-face:active { transform: scale(.97); }
.d-face svg { width: 40px; height: 40px; stroke: var(--face-cor); stroke-width: 1.8; fill: none; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.d-face span { font-size: 17px; font-weight: 700; }
.d-escala-dica { text-align: center; font-size: 15px; color: var(--d-fraco); }
.d-na { text-align: center; }
.d-na button { border: none; background: none; color: var(--d-fraco); font-size: 15px; font-weight: 700; text-decoration: underline; cursor: pointer; }
.d-na button.marcada { color: var(--pp-marca); }
.d-nps { display: grid; grid-template-columns: repeat(11, minmax(0, 1fr)); gap: 6px; }

/* tela de "feito" */
.d-feito { background: var(--d-card); border: 1px solid var(--d-linha); border-radius: 28px; padding: 36px 24px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 16px; }
.d-feito-ic { width: 84px; height: 84px; border-radius: 42px; background: var(--d-verde-suave); color: var(--d-verde); display: flex; align-items: center; justify-content: center; }
.d-feito-ic svg { width: 44px; height: 44px; stroke-width: 2.6; }
.d-feito-ic.cinza { width: 72px; height: 72px; background: var(--d-bg); color: var(--d-fraco); }
.d-feito-ic.cinza svg { width: 34px; height: 34px; stroke-width: 2; }
.d-feito h1 { margin: 0; font-size: clamp(26px, 4vw, 32px); font-weight: 800; }
.d-feito p { margin: 0; font-size: 17px; color: var(--d-fraco); line-height: 1.5; max-width: 440px; text-wrap: pretty; }
.d-proto { background: var(--d-bg); border-radius: 18px; padding: 16px 28px; display: flex; flex-direction: column; gap: 2px; }
.d-proto small { font-size: 14px; color: var(--d-fraco); font-weight: 600; }
.d-proto b { font-size: 28px; font-weight: 800; letter-spacing: .04em; color: var(--pp-marca); }
.d-feito .d-btn-linha { width: 100%; max-width: 480px; margin-top: 6px; justify-content: center; }
.d-acesso { background: var(--d-bg); border-radius: 18px; padding: 16px 20px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; width: 100%; max-width: 440px; text-align: left; }
.d-acesso div span { display: block; font-size: 13px; color: var(--d-fraco); font-weight: 600; }
.d-acesso div b { display: block; font-size: 20px; font-weight: 800; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .04em; }

/* "minhas solicitações" */
.d-hist { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-top: 1px solid var(--d-linha2); flex-wrap: wrap; }
.d-hist-meio { flex: 1; min-width: 180px; }
.d-hist-meio b { display: block; font-size: 17px; font-weight: 700; }
.d-hist-meio span { display: block; font-size: 14px; color: var(--d-fraco); margin-top: 2px; }
.d-status { height: 32px; padding: 0 14px; border-radius: 16px; font-size: 14px; font-weight: 700; display: inline-flex; align-items: center; }
.d-status.verde { background: var(--d-verde-suave); color: var(--d-verde); }
.d-status.ambar { background: var(--d-ambar-suave); color: var(--d-ambar); }
.d-status.cinza { background: #F1ECED; color: var(--d-meio); }
.d-hist-resp { width: 100%; background: var(--d-bg); border-radius: 14px; padding: 12px 14px; font-size: 15px; line-height: 1.5; }
.d-hist-resp small { display: block; font-size: 12.5px; color: var(--d-fraco); text-transform: uppercase; letter-spacing: .06em; font-weight: 700; margin-bottom: 4px; }

/* telas de entrada (login, unidades, pesquisa sem login) */
.d-auth-main { min-height: 100vh; }
.d-auth-wrap { max-width: 820px; margin: 0 auto; padding: 24px 16px 40px; }
.d-auth-logo { text-align: center; padding: 8px 0 18px; }
.d-auth-logo img { height: 56px; width: auto; }

/* telas antigas dentro da casca nova: cartões e botões .pp-* ganham os raios do design */
.d-body .pp-cartao { border: 1px solid var(--d-linha); box-shadow: none; }
.d-body .pp-botao, .d-body .pp-botao-claro { border-radius: 14px; font-weight: 700; }

/* ═══════════ computador (≥ 860px) ═══════════ */
@media (min-width: 860px) {
    .d-mtop, .d-tabs { display: none; }
    .d-wrap { padding: 32px 40px 56px; }
    .d-side {
        display: flex; flex-direction: column; width: 272px; flex-shrink: 0; background: var(--d-card); border-right: 1px solid var(--d-linha);
        padding: 22px 16px 16px; overflow-y: auto; position: sticky; top: 0; height: 100vh; height: 100dvh;
    }
    .d-side-brand { display: flex; align-items: center; gap: 12px; padding: 0 8px 26px; }
    .d-side-logo { width: 46px; height: 46px; border-radius: 14px; background: var(--pp-suave); display: flex; align-items: center; justify-content: center; flex-shrink: 0; overflow: hidden; }
    .d-side-logo img { max-width: 40px; max-height: 36px; }
    .d-side-logo b { color: var(--pp-marca); font-weight: 800; font-size: 16px; }
    .d-side-brand > div { min-width: 0; }
    .d-side-brand b.nome { display: block; font-weight: 700; font-size: 16px; line-height: 1.25; }
    .d-side-brand span { display: block; font-size: 14px; color: var(--d-fraco); margin-top: 2px; }
    .d-side nav { display: flex; flex-direction: column; gap: 4px; }
    .d-side nav a, .d-side nav a.d-nl { display: flex; align-items: center; gap: 14px; height: 56px; padding: 0 14px; border-radius: 14px; color: var(--d-meio); font-size: 17px; font-weight: 600; text-decoration: none; }
    .d-side nav a:hover { background: var(--pp-suave); color: var(--d-meio); }
    .d-side nav a.ativa { background: var(--pp-suave); color: var(--pp-marca); font-weight: 700; }
    .d-side nav a span.d-rot { flex: 1; }
    .d-side nav a .d-badge { min-width: 26px; height: 26px; padding: 0 8px; border-radius: 13px; background: var(--pp-marca); color: #fff; font-size: 14px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
    .d-side nav .d-sep { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--d-fraco); padding: 14px 14px 4px; }
    .d-side nav a.menor { height: 46px; font-size: 15px; }
    .d-side nav a.menor svg { width: 20px; height: 20px; }
    .d-side-esp { flex: 1; min-height: 14px; }
    .d-side-ajuda { background: var(--d-bg); border-radius: 16px; padding: 16px; display: flex; flex-direction: column; gap: 4px; margin-bottom: 14px; }
    .d-side-ajuda b { font-weight: 700; font-size: 15px; }
    .d-side-ajuda span { font-size: 14px; color: var(--d-fraco); line-height: 1.45; }
    .d-side-ajuda a { font-size: 18px; font-weight: 700; color: var(--pp-marca); text-decoration: none; }
    .d-side-user { display: flex; align-items: center; gap: 12px; padding: 12px 8px 0; border-top: 1px solid var(--d-linha); }
    .d-side-user .d-avatar { width: 42px; height: 42px; border-radius: 21px; }
    .d-side-user > div { flex: 1; min-width: 0; }
    .d-side-user b { display: block; font-weight: 700; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .d-side-user > div > span { display: block; font-size: 13px; color: var(--d-fraco); }
    .d-top { height: 72px; flex-shrink: 0; background: var(--d-card); border-bottom: 1px solid var(--d-linha); display: flex; align-items: center; gap: 16px; padding: 0 40px; position: sticky; top: 0; z-index: 30; }
    .d-top-unidade { display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 16px; border-radius: 19px; background: var(--pp-suave); color: var(--pp-marca); font-weight: 700; font-size: 15px; min-width: 0; max-width: 320px; white-space: nowrap; text-decoration: none; }
    .d-top-unidade svg { width: 18px; height: 18px; flex-shrink: 0; }
    .d-top-unidade span { overflow: hidden; text-overflow: ellipsis; }
    .d-top-data { display: none; font-size: 15px; color: var(--d-fraco); white-space: nowrap; }
    .d-top-esp { flex: 1; }
    .d-top-user { display: flex; align-items: center; gap: 10px; }
    .d-top-user span { font-weight: 700; font-size: 16px; }
    .d-top-sair { height: 44px; padding: 0 16px; border-radius: 12px; border: 1px solid var(--d-linha); background: var(--d-card); font-size: 15px; font-weight: 600; color: var(--d-fraco); cursor: pointer; }
    .d-top-sair:hover { background: var(--d-bg); }
    .d-veu.aberto { align-items: flex-start; justify-content: flex-end; padding: 80px 40px 0 0; background: rgba(34,27,30,.18); }
    .d-sheet { max-width: 460px; max-height: calc(100vh - 110px); border-radius: 24px; box-shadow: 0 20px 60px rgba(34,27,30,.18); padding-bottom: 20px; }
    .d-tiles { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
    .d-tiles.sm { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
    .d-escala { grid-template-columns: repeat(5, minmax(0, 1fr)); }
    .d-face { flex-direction: column; padding: 22px 8px; }
    .d-face svg { width: 56px; height: 56px; }
    .d-cartao-perg { padding: 36px; }
    .d-ajuda.so-celular { display: none; }
    .d-opcoes.coluna { grid-template-columns: 1fr; }
}
@media (min-width: 1100px) { .d-top-data { display: block; } }
@media print { .d-side, .d-top, .d-mtop, .d-tabs, .d-veu { display: none !important; } }
