/* =========================
   APP (EEP Core)
   - usa tokens do theme.css (HSL)
   - sem Tailwind
   - sem duplicações
   - ícones: sprite inline (partials/icons_sprite.html) — mesmo comportamento Chrome/Firefox
   ========================= */

/* =========================================================
   Tipografia global (Inter igual Quali)
   ========================================================= */
   html, body{
    font-family: Inter, "Segoe UI", system-ui, -apple-system, sans-serif;
  
    font-optical-sizing: auto;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
  
    font-feature-settings:
      "kern" 1,
      "liga" 1,
      "calt" 1,
      "ss01" 1,
      "ss02" 1;
  
    font-size: 14px;
  }
  
  

/* =========================================================
   SVG Icons (sprite inline, referência same-document)
   - Padrão outline (Quali-like); mesmo comportamento Chrome/Firefox
   - Use: <svg class="nav-svg" viewBox="0 0 24 24"><use href="#icon-x"></use></svg>
   ========================================================= */
.nav-svg, .ico-svg, .btn__icon, .tab-svg{
  width: 20px;
  height: 20px;
  display: inline-block;
  vertical-align: middle;

  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}
.nav-svg use, .ico-svg use, .btn__icon use, .tab-svg use{ fill: none; }
/* =========================================================
     Tokens locais
     ========================================================= */
  :root{
    /* espaçamentos locais */
    --pad-1: 12px;
    --pad-2: 14px;
    --pad-3: 20px;
  
    /* radius derivados */
    --r-sm: calc(var(--radius) - 2px); /* buttons/inputs */
    --r-md: calc(var(--radius) + 2px);
    --r-lg: calc(var(--radius) + 4px);
  
    /* header */
    --hdr-min-h: 104px;
    --hdr-pad-y: 20px;
    --hdr-pad-x: 24px;
  
    /* header actions (shadcn-like) */
    --hdr-tile: 44px;     /* h-10 w-10 */
    --hdr-tile-r: 8px;    /* rounded-md */
    --hdr-btn-h: 40px;    /* h-10 */
  
    /* page */
    --page-max: 1440px;   /* Foundations 2xl=1400 (Quali feel) */
    --page-pad-x: 32px;
    --page-pad-y: 18px;
  
    /* modal */
    --modal-w: 720px;
    --modal-r: 16px;
    --modal-pad: 18px;
  }
  
  /* =========================================================
     Fundo + “sobra” da transição sidebar -> conteúdo
     (evita linha / gap visual)
     ========================================================= */
  body{
    background: hsl(var(--background));
  }
  
  .app-shell{
    margin-left: var(--sidebar-w-expanded);
    transition: margin-left .3s ease-in-out;
    background: hsl(var(--background));
  }
  
  body.sidebar-collapsed .app-shell{
    margin-left: var(--sidebar-w-collapsed);
  }

  /* Tablet: faixa retrátil fixa (44px) */
  @media (min-width: 769px) and (max-width: 1024px) {
    .app-shell { margin-left: var(--sidebar-w-collapsed) !important; }
  }

  /* Mobile: conteúdo full width */
  @media (max-width: 768px) {
    .app-shell { margin-left: 0 !important; }
  }

  .sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: hsl(217 86% 5% / 0.5);
    z-index: 40;
  }

  @media (min-width: 769px) and (max-width: 1024px) {
    body.sidebar-tablet-expanded .sidebar-overlay { display: block; }
    body.sidebar-tablet-expanded { overflow: hidden; }
  }

  @media (max-width: 768px) {
    body.sidebar-open-mobile .sidebar-overlay { display: block; }
    body.sidebar-open-mobile { overflow: hidden; }
  }
  
  .app-main{
    padding: var(--page-pad-y) var(--pad-3);
    background: hsl(var(--background));
    /* padding-top aplicado no bloco do header fixo */
  }
  
  /* =========================================================
     Page container (Quali-like)
     Estrutura esperada:
     .page > .page__inner > .page__stack
     ========================================================= */
  .page{
    width: 100%;
    padding: var(--page-pad-y) var(--page-pad-x);
  }
  
  .page__inner{
    width: 100%;
    max-width: var(--page-max);
    margin: 0 auto;
    overflow-x: hidden; /* evita que a página estique; scroll fica só no table-wrap (não quebra sticky) */
  }
  
  .page__stack{
    display: grid;
    gap: 24px; /* Quali feel (space-y-6) */
  }
  .page__stack > *{ min-width: 0; }
  
  /* =========================================================
     Utilitários de layout/estilo globais
     (usados em poucas telas para facilitar reversão parcial)
     ========================================================= */
  .view-callout{
    background: hsl(var(--muted) / 0.18);
    border-radius: var(--r-md, 10px);
    padding: 1rem 1.25rem;
    border-left: 4px solid hsl(var(--primary));
  }
  .view-callout__title{
    margin: 0 0 0.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: hsl(var(--primary));
    border: 0;
  }
  .view-callout__body{
    margin: 0;
    font-size: 0.95rem;
  }
  
  .callout-muted{
    background: hsl(var(--muted) / 0.20);
    border-radius: var(--r-md, 10px);
    padding: 0.75rem 0.85rem;
  }
  .callout-soft{
    background: hsl(var(--muted) / 0.15);
    border-radius: var(--r-md, 10px);
    padding: 0.75rem 0.85rem;
  }
  .callout-soft p{
    margin: 0 0 0.25rem;
  }
  .callout-soft p:last-child{
    margin-bottom: 0;
  }
  
  .form-actions--border-top{
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid hsl(var(--border));
  }
  
  .dropdown-scroll{
    max-height: 200px;
    overflow-y: auto;
  }
  
  @media (max-width: 1024px){
    .page{ padding: 16px 18px; }
  }
  @media (max-width: 640px){
    .page{ padding: 12px 14px; }
  }
  
  /* =========================================================
     Header (global fixo — position: fixed conforme doc)
     ========================================================= */
  .app-header{
    position: fixed;
    top: 0;
    left: var(--sidebar-w-expanded);
    right: 0;
    z-index: 30; /* sidebar é 50 */
    min-height: var(--hdr-min-h);

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;

    padding: var(--hdr-pad-y) var(--hdr-pad-x);
    border-bottom: 1px solid hsl(var(--border));

    background: hsl(var(--card) / 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: left 0.3s ease-in-out;
  }

  body.sidebar-collapsed .app-header {
    left: var(--sidebar-w-collapsed);
  }

  @media (min-width: 769px) and (max-width: 1024px) {
    .app-header { left: var(--sidebar-w-collapsed); }
  }

  @media (max-width: 768px) {
    .app-header { left: 0; }
  }

  /* Conteúdo principal começa abaixo do header fixo */
  .app-main {
    padding-top: calc(var(--hdr-min-h) + var(--page-pad-y));
  }
  
  .header-left{
    min-width: 0;
    display:flex;
    flex-direction: column;
    justify-content: center;
  }
  
  .header-kicker{
    margin: 0 0 2px;
    font-size: 14px;
    font-weight: 400;
    color: hsl(var(--muted-foreground));
    line-height: 1.1;
  }
  
  .page-title{
    margin: 0;
    font-size: 34px;          /* padrão */
    font-weight: 600;
    letter-spacing: -0.03em;
    line-height: 1.02;
  }
  
  .page-subtitle{
    margin: 2px 0 0;
    font-size: 12px;
    color: hsl(var(--muted-foreground));
    line-height: 1.15;
    font-weight: 400;
  }
  
  .header-right{
    display:flex;
    flex-wrap: wrap;
    align-items:center;
    gap: 12px;
  }
  
  .header-sep{
    width: 1px;
    height: 22px;
    background: hsl(var(--border));
    margin: 0 2px;
    opacity: .9;
  }
  
  /* Botão menu: só mobile (tablet usa faixa retrátil + chevron) */
  .hdr-menu-btn { display: none !important; }
  @media (max-width: 768px) {
    .hdr-menu-btn { display: inline-flex !important; }
  }

  @media (max-width: 900px){
    .page-title{ font-size: 22px; }
    .page-subtitle{ display:none; }
    .app-header{ padding: 12px 16px; min-height: 80px; }
    .app-main{ padding-top: 98px; } /* 80 + page-pad-y (header fixo) */
  }
  @media (max-width: 640px) {
    .app-header { padding: 10px 12px; min-height: 72px; gap: 12px; }
    .app-main { padding-top: 90px; } /* 72 + page-pad-y (header fixo) */
    .page-title { font-size: 18px; }
  }
  
  /* =========================================================
     Header actions (tiles)
     ========================================================= */
  .hdr-tile{
    width: var(--hdr-tile);
    height: var(--hdr-tile);
    border-radius: var(--hdr-tile-r);
  
    border: 1px solid hsl(var(--input));
    background: hsl(var(--background));
    color: hsl(var(--foreground));
  
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap: 8px;
  
    cursor: pointer;
    text-decoration: none;
  
    transition: background-color .15s ease, color .15s ease, box-shadow .15s ease;
  }
  
  .hdr-tile:hover{
    background: hsl(var(--accent));
    color: hsl(var(--accent-foreground));
    box-shadow: var(--shadow-soft);
  }
  
  .hdr-tile svg,
  .hdr-tile svg use{
    fill: none;
    stroke: currentColor;
    stroke-width: 1 !important;
  }
  .hdr-tile svg{
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
    stroke-linecap: round;
    stroke-linejoin: round;
  
    pointer-events: none;
  }
  
  .hdr-theme{ position: relative; }
  .hdr-theme svg{ transition: transform .2s ease, opacity .2s ease; }
  
  html:not(.dark) .hdr-theme .sun{ opacity: 1; transform: rotate(0deg) scale(1); }
  html:not(.dark) .hdr-theme .moon{ opacity: 0; transform: rotate(90deg) scale(0); }
  
  html.dark .hdr-theme .sun{ opacity: 0; transform: rotate(-90deg) scale(0); }
  html.dark .hdr-theme .moon{ opacity: 1; transform: rotate(0deg) scale(1); }
  
  .hdr-theme .moon{ position: absolute; }
  
  .hdr-logout{
    height: var(--hdr-btn-h);
    border-radius: var(--hdr-tile-r);

    border: 1px solid hsl(var(--input));
    background: hsl(var(--background));
    color: hsl(var(--foreground));

    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0 12px;

    font: inherit;
    font-size: 14px;
    font-weight: 300;
    cursor: pointer;
    text-decoration: none;
    appearance: none;
    -webkit-appearance: none;

    transition: background-color .15s ease, color .15s ease, box-shadow .15s ease;
  }

  .hdr-logout-form{
    display: inline;
    margin: 0;
  }
  
  .hdr-logout:hover{
    background: hsl(var(--accent));
    color: hsl(var(--accent-foreground));
    box-shadow: var(--shadow-soft);
  }
  
  .hdr-logout svg,
  .hdr-logout svg use{
    fill: none;
    stroke: currentColor;
    stroke-width: 1 !important;
  }
  .hdr-logout svg{
    width: 22px;
    height: 22px;
    flex: 0 0 22px;
    stroke-linecap: round;
    stroke-linejoin: round;

    pointer-events: none;
  }

  /* Notificações (sino + dropdown) */
  .hdr-notif-wrap { position: relative; }
  .hdr-notif-btn {
    position: relative;
    width: var(--hdr-tile);
    height: var(--hdr-tile);
    border-radius: var(--hdr-tile-r);
    border: 1px solid hsl(var(--input));
    background: hsl(var(--background));
    color: hsl(var(--foreground));
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
  }
  .hdr-notif-btn:hover {
    background: hsl(var(--accent));
    color: hsl(var(--accent-foreground));
  }
  .hdr-notif-icon,
  .hdr-notif-icon use { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1 !important; }
  .hdr-notif-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    font-size: 10px;
    font-weight: 600;
    line-height: 16px;
    text-align: center;
    border-radius: 8px;
    background: hsl(var(--destructive));
    color: hsl(var(--destructive-foreground));
  }
  .hdr-notif-badge.is-zero { display: none; }
  .hdr-notif-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 360px;
    max-width: 95vw;
    max-height: 400px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border-radius: var(--radius);
    border: 1px solid hsl(var(--input));
    background: hsl(var(--card));
    box-shadow: var(--shadow-soft);
    z-index: 100;
  }
  .hdr-notif-dropdown[hidden] { display: none !important; }
  .hdr-notif-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 10px 12px;
    border-bottom: 1px solid hsl(var(--border));
  }
  .hdr-notif-title { font-weight: 600; font-size: 14px; }
  .hdr-notif-list { overflow-y: auto; flex: 1; min-height: 120px; }
  .hdr-notif-empty { padding: 16px; text-align: center; font-size: 13px; }
  .hdr-notif-item {
    padding: 10px 12px;
    border-bottom: 1px solid hsl(var(--border));
  }
  .hdr-notif-item.is-read { opacity: 0.75; }
  .hdr-notif-item-title { font-weight: 500; font-size: 13px; margin-bottom: 2px; }
  .hdr-notif-item-msg { font-size: 12px; margin-bottom: 4px; }
  .hdr-notif-item-meta { font-size: 11px; }
  .hdr-notif-item-link { text-decoration: none; color: inherit; display: block; }
  .hdr-notif-item-link:hover { color: hsl(var(--accent)); }
  .hdr-notif-item-mark { margin-top: 6px; }
  .hdr-notif-foot { padding: 8px 12px; border-top: 1px solid hsl(var(--border)); }
  .hdr-notif-foot--actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px 12px;
  }
  .hdr-notif-action {
    font-size: 12px;
    color: hsl(var(--primary));
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    text-decoration: none;
    transition: color 150ms ease;
  }
  .hdr-notif-action:hover { color: hsl(var(--primary) / 0.9); text-decoration: underline; }
  .hdr-notif-link { font-size: 12px; color: hsl(var(--primary)); text-decoration: none; transition: color 150ms ease; }
  .hdr-notif-link:hover { color: hsl(var(--primary) / 0.9); text-decoration: underline; }

  /* acessibilidade */
  .sr-only{
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }
  
  /* =========================================================
     Primitivos / utilitários
     ========================================================= */
  .row{ display:flex; gap:10px; align-items:center; }
  .mt{ margin-top: 12px; }
  
  .strong{ font-weight: var(--font-weight-strong); }
  .muted{ color: hsl(var(--muted-foreground)); }
  
  .link{ color: hsl(var(--primary)); font-weight: var(--font-weight-emphasis); }
  .link:hover{ text-decoration: underline; }
  
  .grid{ display:grid; gap: 12px; }
  .grid-2{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3{ grid-template-columns: repeat(3, minmax(0, 1fr)); }
  
  @media (max-width: 900px){
    .grid-2, .grid-3{ grid-template-columns: 1fr; }
  }
  
  /* =========================================================
     Superfície / Cards
     ========================================================= */
  .surface{
    background: hsl(var(--card));
    color: hsl(var(--card-foreground));
    border: 1px solid hsl(var(--border));
    box-shadow: var(--shadow-card);
  }
  
  .card{
    border-radius: var(--r-lg);
    overflow: hidden;
    background: hsl(var(--card));
    color: hsl(var(--card-foreground));
    border: 1px solid hsl(var(--border));
    box-shadow: var(--shadow-card);
  }
  .card:hover{ box-shadow: var(--shadow-card-hover); }
  
  .card-pad{ padding: 16px; } /* Quali: p-4 */
  .card-space{ margin-bottom: 14px; }
  
  /* =========================================================
     Page Head (título do módulo + ação)
     - padrão: mesmo tamanho do header
     ========================================================= */
  .page-head{
    display:flex;
    align-items:flex-start;
    justify-content: space-between;
    gap: 16px;
    margin: 6px 0 18px;
  }
  
  .page-head__left{
    display:flex;
    align-items:center;
    gap: 12px;
    min-width: 0;
  }

  .page-head__right{
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
  }

  .page-head__actions {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
  }

  .page-head__actions .btn,
  #btnExibicoes,
  #btnPersonalizarDashboard {
    font-weight: 300;
  }

  .page-head__actions .btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
  }

  .page-head__actions .btn .btn__icon,
  .page-head__actions .btn .btn__icon use,
  #btnExibicoes .btn__icon,
  #btnExibicoes .btn__icon use,
  #btnPersonalizarDashboard .btn__icon,
  #btnPersonalizarDashboard .btn__icon use {
    stroke-width: 1 !important;
  }
  .page-head__actions .btn .btn__icon,
  #btnExibicoes .btn__icon,
  #btnPersonalizarDashboard .btn__icon {
    width: 18px;
    height: 18px;
  }

  /* Font e peso iguais ao Sair */
  .page-head__actions .btn-secondary {
    font-weight: 300;
    font-size: 14px;
    color: hsl(var(--foreground));
  }

  .page-head__dropdown {
    position: relative;
  }

  .page-head__dropdown .dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 6px;
    min-width: 240px;
    max-width: 340px;
    background: hsl(var(--card));
    border: 1px solid hsl(var(--border));
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,.12), 0 2px 8px rgba(0,0,0,.06);
    z-index: 100;
    padding: 6px;
    overflow: hidden;
  }

  .page-head__dropdown.is-open .dropdown-menu {
    display: block;
  }

  .page-head__dropdown .dropdown-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    cursor: pointer;
    border-radius: 8px;
    font-size: 14px;
    transition: background 0.15s;
  }

  .page-head__dropdown .dropdown-item:hover {
    background: hsl(var(--accent));
  }

  .page-head__dropdown .dropdown-item__label {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .page-head__dropdown .dropdown-item__delete {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    border-radius: 6px;
    color: hsl(var(--muted-foreground));
    cursor: pointer;
    transition: color 0.15s, background 0.15s;
  }

  .page-head__dropdown .dropdown-item__delete:hover {
    color: #dc2626;
    background: rgba(220, 38, 38, 0.1);
  }

  .page-head__dropdown .dropdown-item__delete svg {
    flex-shrink: 0;
  }

  .page-head__dropdown .dropdown-empty {
    padding: 16px 14px;
    font-size: 13px;
    line-height: 1.4;
    color: hsl(var(--muted-foreground));
    text-align: center;
  }

  .page-head__icon{
    width: 44px;
    height: 44px;
    border-radius: 14px;
  
    display:inline-flex;
    align-items:center;
    justify-content:center;
  
    background: hsl(var(--primary) / 0.12);
    border: 1px solid hsl(var(--primary) / 0.18);
  }
  
  .page-head__icon svg{
    width: 22px;
    height: 22px;
  
    fill: none;
    stroke: hsl(var(--primary));
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
  }
  
  .page-head__titles{
    display:flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
  }
  
  .page-head__title{
    font-size: 34px;         /* = título do header */
    font-weight: 600;        /* = título do header */
    letter-spacing: -0.03em; /* igual */
    line-height: 1.02;
    margin: 0;
  }
  
  .page-head__subtitle{
    font-size: 14px;
    font-weight: 500;
    color: hsl(var(--muted-foreground));
    margin: 0;
  }
  
  /* =========================================================
     Forms / inputs
     ========================================================= */
  .label{
    display:block;
    font-size: 12px;
    font-weight: 600;
    margin: 10px 0 6px;
  }
  
  .input{
    width: 100%;
    height: 44px;
    padding: 10px 12px;
    border-radius: var(--r-sm);
    border: 1px solid hsl(var(--input));
    background: hsl(var(--card));
    color: hsl(var(--foreground));
    outline: none;
    transition: box-shadow .15s ease, border-color .15s ease, background-color .15s ease;
  
    font-size: 14px;
    font-weight: 400;
    line-height: 1.4;
  }
  
  .input:focus{
    border-color: hsl(var(--ring));
    box-shadow: 0 0 0 3px hsl(var(--ring) / 0.15);
  }
  
  textarea.input{
    height: auto;
    min-height: 96px;
    padding-top: 10px;
    padding-bottom: 10px;
    resize: vertical;
  }
  
  /* layout de linhas do form */
  .form-grid{ display:grid; gap: 14px; }

  /* painel de filtros compacto (padrão Escritório / Quali) */
  .filtros-panel{
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 0.75rem 1rem;
  }
  .filtros-panel > div{
    flex: 0 1 auto;
    min-width: 0;
  }
  .filtros-panel > div:not(.filtros-panel__apply){
    min-width: 140px;
  }
  .filtros-panel__field--date{
    flex: 0 0 168px;
    min-width: 168px;
    max-width: 180px;
  }
  .filtros-panel__field--wide{
    flex: 1 1 280px;
    min-width: 280px;
    max-width: 420px;
  }
  .filtros-panel .label{
    margin: 0 0 4px;
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    color: hsl(var(--muted-foreground));
  }
  .filtros-panel .input,
  .filtros-panel select{
    height: 36px;
    padding: 6px 10px;
    font-size: 13px;
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
  }
  .filtros-panel .filtros-panel__apply{
    flex: 0 0 auto;
    align-self: flex-end;
    display: flex;
    flex-wrap: nowrap;
    gap: 0.5rem;
    align-items: center;
    margin-left: auto;
  }
  @media (max-width: 720px){
    .filtros-panel > div:not(.filtros-panel__apply){
      flex: 1 1 100%;
      min-width: 0;
      max-width: none;
    }
    .filtros-panel .filtros-panel__field--date,
    .filtros-panel .filtros-panel__field--wide{
      flex: 1 1 100%;
      min-width: 0;
      max-width: none;
    }
    .filtros-panel .filtros-panel__apply{
      flex: 1 1 100%;
      margin-left: 0;
      justify-content: flex-start;
    }
  }
  
  .form-row{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  align-items: start;
}
  .form-row--2,
  .form-row--3{ display: grid; gap: 12px; align-items: start; }
  .form-row--2{ grid-template-columns: 1fr 1fr; }
  .form-row--3{ grid-template-columns: 1fr 1fr 1fr; }
  .form-row--nome{ grid-template-columns: 2fr 1fr; }
  
  /* Tablet: 2 colunas | Mobile: 1 coluna */
  @media (max-width: 640px){
    .form-row,
    .form-row--2,
    .form-row--3,
    .form-row--nome{ grid-template-columns: 1fr; }
  }

  .mfield--inline-check{
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 8px 0;
  }
  .mfield--stack-checks{
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 8px;
  }
  .cst-item-row,
  .cst-rec-row{
    display: flex;
    gap: 8px;
    align-items: flex-end;
    margin-bottom: 8px;
    flex-wrap: wrap;
  }
  .cst-check-label{
    display: flex;
    gap: 8px;
    align-items: flex-start;
    margin-bottom: 8px;
  }
  .cst-tr-row{
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
  }
  @media (max-width: 640px){
    .cst-item-row,
    .cst-rec-row{
      flex-direction: column;
      align-items: stretch;
    }
    .cst-item-row .mfield,
    .cst-rec-row .mfield{
      width: 100% !important;
    }
  }
  
  .form-actions{
    display:flex;
    gap:10px;
    justify-content:flex-end;
    padding-top: 14px;
    margin-top: 8px;
    border-top: 1px solid hsl(var(--border));
  }

  .inventario-page .inv-toolbar--contagem {
    border-top: none;
    padding-top: 0;
    margin-top: 0;
    align-items: center;
    flex-wrap: wrap;
  }

  .inventario-page .inv-toolbar--movs {
    border-top: none;
    padding-top: 0;
    margin-top: 0;
    align-items: center;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 10px;
  }

  .inventario-page .inv-toolbar__filters,
  .inventario-page .inv-toolbar__actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
  }

  .inventario-page .inv-toolbar__actions {
    margin-left: auto;
    justify-content: flex-end;
  }

  .inventario-page .inv-filter--sm {
    width: auto;
    min-width: 9rem;
    max-width: 11rem;
    flex: 0 0 auto;
  }

  .inventario-page .inv-toolbar--contagem .btn {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .inventario-page .tab-pane > .form-actions.mobile-toolbar {
    border-top: none;
    padding-top: 0;
    margin-top: 0;
    justify-content: flex-end;
  }
  
  /* =========================================================
     Buttons (Quali)
     ========================================================= */
  .btn{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap: 8px;
    height: 40px;            /* h-10 */
    padding: 0 14px;
    border-radius: var(--r-sm);
    border: 1px solid transparent;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
  }
  
  .btn-primary{
    background: hsl(var(--primary));
    color: hsl(var(--primary-foreground));
  }
  
  .btn-secondary{
    background: hsl(var(--secondary));
    color: hsl(var(--secondary-foreground));
    border-color: hsl(var(--border));
  }

  .btn--danger{
    background: hsl(var(--destructive));
    color: hsl(var(--destructive-foreground));
    border-color: hsl(var(--destructive));
  }
  .btn--danger:hover{
    background: hsl(var(--destructive) / 0.9);
  }
  
  .btn-ghost{
    background: transparent;
    border-color: hsl(var(--border));
    color: hsl(var(--foreground));
  }

  /* Limpar Filtros: mesmo estilo em todos os templates (outline) */
  .btn-limpar-filtros,
  .btn-outline{
    background: transparent;
    border: 1px solid hsl(var(--border));
    color: hsl(var(--foreground));
  }
  .btn-limpar-filtros:hover,
  .btn-outline:hover{
    background: hsl(var(--muted) / 0.5);
    border-color: hsl(var(--border));
  }

  /* estados disabled (links com .disabled e botões nativos) */
  .btn.disabled,
  .btn:disabled{
    opacity: .55;
    pointer-events: none;
    filter: grayscale(10%);
  }
  
  /* =========================================================
     Search (padrão único: com ícone, com/sem botão)
     Estrutura:
       <form class="search-row">
         <svg class="search-ico">...</svg>
         <input class="input search-input">
         (opcional) <button class="btn ...">
       </form>
     ========================================================= */
  .search-row{
    position: relative;
    display:flex;
    align-items:center;
    gap: 12px;
    flex-wrap: nowrap;
  }

  /* ícone sempre “dentro” do input */
  .search-ico{
    position:absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    opacity: .78;
    pointer-events: none;

    fill: none;
    stroke: hsl(var(--muted-foreground));
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  /* input ocupa a linha */
  .search-input{
    flex: 1;
    min-width: 0;

    height: 44px;
    padding-left: 44px; /* espaço do ícone */

    font-size: 14.5px;
    font-weight: 500;
    line-height: 1.4;

    /* importante: não sobrescreve o .input (dark-safe) */
    background: hsl(var(--card));
  }

  .search-input::placeholder{
    color: hsl(var(--muted-foreground));
    opacity: 1;
    font-weight: 500;
  }

  /* botão dentro da search-row: não quebra linha */
  .search-row .btn{
    flex: 0 0 auto;
    height: 44px;
    white-space: nowrap;
  }
  @media (max-width: 640px) {
    .search-row { flex-wrap: wrap; }
    .search-row .input.search-input { min-width: 0; }
    .search-row .btn { width: 100%; }
  }
  
  /* =========================================================
     Tables (base)
     ========================================================= */
  .table-wrap{
    overflow: auto;
    -webkit-overflow-scrolling: touch;
  }
  @media (max-width: 768px) {
    .table-wrap { overflow-x: auto; overflow-y: visible; }
    .table { min-width: 600px; }
  }
  
  .table{
    width: 100%;
    border-collapse: collapse;
  }
  
  .table th, .table td{
    padding: 12px 14px;
    border-bottom: 1px solid hsl(var(--border));
    font-size: 13px;
  }
  
  .table th{
    text-align:left;
    font-size: 12px;
    color: hsl(var(--muted-foreground));
    font-weight: 600;
    letter-spacing: 0.02em;
  }
  
  .table tbody tr:hover{
    background: hsl(var(--muted) / 0.35);
  }
  
  /* =========================================================
     Flash messages
     ========================================================= */
  .flash-stack{
    display:grid;
    gap:10px;
    margin: 0 0 14px;
  }
  
  .alert{
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid hsl(var(--border));
    background: hsl(var(--secondary) / 0.45);
    color: hsl(var(--foreground));
    font-size: 0.9rem;
    line-height: 1.35;
    box-shadow: 0 1px 2px rgba(0,0,0,.04);
  }
  
  .alert-success{
    border-color: hsl(var(--success) / 0.35);
    background: hsl(var(--success) / 0.12);
    color: hsl(142 64% 24%);
  }
  .alert-warning{
    border-color: hsl(38 92% 45% / 0.4);
    background: hsl(38 92% 50% / 0.14);
    color: hsl(32 80% 28%);
  }
  .alert-info{
    border-color: hsl(var(--info, 210 80% 50%) / 0.30);
    background: hsl(var(--info, 210 80% 50%) / 0.10);
    color: hsl(210 60% 28%);
  }
  .alert-danger,
  .alert-error{
    border-color: hsl(var(--destructive) / 0.4);
    background: hsl(var(--destructive) / 0.10);
    color: hsl(var(--destructive));
    font-weight: 600;
  }
  html.dark .alert-success{ color: hsl(142 50% 72%); }
  html.dark .alert-warning{ color: hsl(38 80% 70%); }
  html.dark .alert-info{ color: hsl(210 70% 75%); }
  html.dark .alert-danger,
  html.dark .alert-error{ color: hsl(0 80% 72%); }
  
  /* =========================================================
     Dashboard (cards simples)
     ========================================================= */
  .kpi{ padding: var(--pad-2); }
  .kpi-label{
    font-size: 12px;
    color: hsl(var(--muted-foreground));
    font-weight: 500;
  }
  .kpi-value{
    font-size: 28px;
    font-weight: 500;
    margin-top: 6px;
  }
  .kpi-foot{ margin-top: 8px; }
  
  .quick{ padding: var(--pad-2); }
  .quick-item{
    border-radius: var(--r-md);
    padding: var(--pad-1);
    background: hsl(var(--card));
    border: 1px solid hsl(var(--border));
    box-shadow: var(--shadow-card);
  }
  .quick-item:hover{ box-shadow: var(--shadow-card-hover); }
  
  /* =========================================================
     Modal (Quali-like)
     ========================================================= */
  .modal-backdrop{
    position: fixed;
    inset: 0;
    background: hsl(217 86% 5% / .55);
    z-index: 80;
    display: none;
  }
  .modal-backdrop.is-open{ display: block; }
  #confirmExcluirBackdrop{
    z-index: 200;
  }
  #confirmExcluirModal{
    z-index: 210;
  }
  /* Backdrop do modal Resposta do gestor / Registrar Feedback: overlay liso, sem “bola” ou gradiente */
  #respostaGestorBackdrop{
    background: rgba(15, 23, 42, 0.6);
  }
  #respostaGestorBackdrop::before,
  #respostaGestorBackdrop::after{
    display: none !important;
    content: none !important;
  }
  #respostaGestorBackdrop.is-open{
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
  #respostaGestorModal::before,
  #respostaGestorModal::after{
    display: none !important;
    content: none !important;
  }
  
  .modal{
    position: fixed;
    inset: 0;
    z-index: 90;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
  }
  .modal.is-open{ display: flex; }
  
  .modal-dialog{
    width: min(var(--modal-w), calc(100vw - 32px));
    border-radius: var(--modal-r);
    background: hsl(var(--card));
    border: 1px solid hsl(var(--border));
    box-shadow: 0 30px 90px rgba(0,0,0,.35);
    overflow: hidden;
  }
  
  .modal-head{
    padding: var(--modal-pad);
    border-bottom: 1px solid hsl(var(--border));
    display:flex;
    align-items:flex-start;
    justify-content: space-between;
    gap: 12px;
  }
  
  .modal-title{
    font-size: 18px;
    font-weight: var(--font-weight-title);
    letter-spacing: -0.02em;
    line-height: 1.15;
  }
  
  .modal-subtitle{
    margin-top: 4px;
    font-size: 12px;
    color: hsl(var(--muted-foreground));
  }
  
  .modal-close{
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: 1px solid hsl(var(--input));
    background: hsl(var(--background));
    display:inline-flex;
    align-items:center;
    justify-content:center;
    cursor: pointer;
  }
  
  .modal-body{ padding: var(--modal-pad); }
  
  .modal-foot{
    padding: var(--modal-pad);
    border-top: 1px solid hsl(var(--border));
    display: flex;
    justify-content: flex-end;
    gap: 10px;
  }
  .modal-foot.is-hidden{
    display: none !important;
  }
  .modal-foot button[hidden]{
    display: none !important;
  }

  /* Modal padrão de lançamentos — mais largo que confirmações + scroll interno */
  .modal--lancamento {
    align-items: flex-start;
    padding-top: max(12px, 2vh);
    padding-bottom: max(12px, 2vh);
    overflow-y: auto;
  }

  .modal--lancamento .modal-dialog,
  .modal-dialog--lancamento {
    width: min(600px, calc(100vw - 32px));
    max-width: 600px;
    max-height: calc(100vh - 24px);
    max-height: calc(100dvh - 24px);
    margin: auto;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  .modal--lancamento .modal-head,
  .modal--lancamento .modal-foot {
    flex-shrink: 0;
  }

  .modal--lancamento #lancamentoModalForm {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
  }

  .modal--lancamento .modal-body {
    flex: 1 1 auto;
    overflow-y: auto;
    min-height: 0;
    -webkit-overflow-scrolling: touch;
  }

  /* Modal de lançamento alto (ex.: checklist) — mais largo + scroll no corpo */
  .modal--lancamento.modal--scrollable {
    align-items: flex-start;
    padding-top: max(16px, 3vh);
    padding-bottom: max(16px, 3vh);
  }

  .modal--lancamento.modal--scrollable .modal-dialog {
    width: min(900px, calc(100vw - 32px));
    max-width: 900px;
    max-height: min(920px, calc(94vh - 32px));
    max-height: min(920px, calc(94dvh - 32px));
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  .modal--lancamento.modal--scrollable .modal-head {
    flex-shrink: 0;
  }

  .modal--lancamento.modal--scrollable #lancamentoModalForm {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
  }

  .modal--lancamento.modal--scrollable .modal-body {
    flex: 1 1 auto;
    overflow-y: auto;
    min-height: 0;
    -webkit-overflow-scrolling: touch;
  }

  .modal--lancamento.modal--scrollable .modal-foot {
    flex-shrink: 0;
  }

  /* Modal troca de unidade — card de login centrado (mesmo container visual) */
  .modal--trocar-unidade {
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    overflow-y: auto;
  }
  .modal--trocar-unidade .modal-dialog,
  .modal-dialog--trocar-unidade {
    width: min(480px, calc(100vw - 32px));
    max-width: 480px;
    margin: auto;
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
    overflow: visible;
  }
  .login-card--in-modal {
    margin: 0 auto !important;
    width: 100%;
    max-width: 480px;
    box-sizing: border-box;
    overflow: hidden;
  }
  .login-card--in-modal .login-card__head,
  .login-card--in-modal .login-card__body {
    box-sizing: border-box;
    max-width: 100%;
    min-width: 0;
  }
  .login-card--in-modal .login-card__head {
    position: relative;
    padding-right: 44px;
  }
  .login-card--in-modal .login-form,
  .login-card--in-modal .login-field-group,
  .login-card--in-modal .login-row--actions,
  .login-card--in-modal .login-field {
    max-width: 100%;
    min-width: 0;
  }
  .login-card--in-modal .login-row--actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
  }
  .login-card--in-modal .login-btn--inline {
    flex: 0 0 auto;
  }
  .modal-close--on-card {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    color: rgba(255, 255, 255, 0.85);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
  }
  .modal-close--on-card:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.16);
  }
  .login-card--in-modal .login-link {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    font: inherit;
  }

  /* Select de unidade — não estoura o card com nomes longos */
  .login-field--select {
    width: 100%;
    max-width: 100%;
  }
  .login-input--select,
  .login-field select.login-input {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    cursor: pointer;
    padding-right: 2rem;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
  }
  .login-field__hint {
    margin-top: 8px;
    font-size: 0.78rem;
    line-height: 1.35;
    color: rgba(255, 255, 255, 0.72);
    overflow-wrap: anywhere;
    word-break: break-word;
    max-height: 4.2em;
    overflow-y: auto;
  }

  /* Usuários — grade de módulos / proteções */
  .usuario-modulos-scroll {
    max-height: min(42vh, 340px);
    overflow: auto;
    border: 1px solid hsl(var(--border));
    border-radius: 10px;
    margin-top: 8px;
  }
  .usuario-modulos-table {
    margin: 0;
  }
  .usuario-modulos-table th,
  .usuario-modulos-table td {
    font-size: 13px;
    vertical-align: middle !important;
  }
  .usuario-modulos__group td {
    background: hsl(var(--muted) / 0.35);
    font-weight: 700;
    font-size: 12px;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: hsl(var(--muted-foreground));
  }
  .usuario-modulos__chk label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    white-space: nowrap;
  }
  .admin-usuarios-page .btn-sm {
    padding: 6px 10px;
    font-size: 12px;
  }
  
  /* =========================================================
     Pacientes list helpers (tabela + per-page)
     ========================================================= */
  .table-card{ overflow: hidden; width: 100%; max-width: 100%; min-width: 0; }
  
  .table-head{
    display:flex;
    justify-content: space-between;
    align-items:center;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid hsl(var(--border));
    background: hsl(var(--muted) / 0.40);
  }
  
  .table-title{
    font-weight: 500;
    font-size: 14px;
  }
  
  .perpage-row{
    display:flex;
    gap: 10px;
    align-items:center;
    flex: 0 0 auto;
  }
  .perpage-label{ font-size: 12px; }

  .perpage-select{
    width: 110px;
    height: 32px;
    padding: 0 10px;
    background: hsl(var(--card));
  }
  
  /* colunas (opcional) */
  .col-nome{ width: 26%; }
  .col-tipo{ width: 10%; }
  .col-tenant{ max-width: 90px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .col-doc{ width: 14%; }
  .col-tel{ width: 12%; }
  .col-nascimento{ width: 10%; }
  .col-acoes{ width: 8%; text-align: right; }
  
  .empty-row{
    padding: 22px;
    text-align:center;
  }
  
    .list-footer{
    display:flex;
    justify-content: space-between;
    align-items:center;
    gap: 12px;
    margin-top: 12px;
    flex-wrap: wrap;
  }

  .pager{
    display:flex;
    gap: 8px;
    align-items:center;
    flex: 0 0 auto;
  }

  .pager .badge{
    padding: 6px 10px;
  }
  
  /* =========================================================
     Pacientes list — Nome/Avatar, Badges, Ações (editar/excluir)
     ========================================================= */
  
  /* Nome com hierarquia */
  .td-name{ min-width: 320px; }
  
  .cell-name{
    display:flex;
    align-items:center;
    gap: 12px;
  }
  
  .avatar-dot{
    width: 34px;
    height: 34px;
    border-radius: 999px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    background: hsl(var(--primary) / 0.10);
    border: 1px solid hsl(var(--primary) / 0.16);
    flex: 0 0 auto;
  }
  
  .avatar-dot svg{
    width: 18px;
    height: 18px;
    fill: none;
    stroke: hsl(var(--primary));
    stroke-width: 2.1;
    stroke-linecap: round;
    stroke-linejoin: round;
  }
  
  .cell-name__primary{
    font-weight: 400;
    color: hsl(var(--foreground));
    line-height: 1.25;
    font-size: 14.5px;
  }
  
  .cell-name__secondary{
    margin-top: 3px;
    font-size: 13px;
    color: hsl(var(--muted-foreground));
    display:flex;
    gap: 8px;
    flex-wrap: wrap;
    line-height: 1.2;
  }
  
  .cell-name__secondary .sep{ opacity: .6; }
  
  /* Deixa o resto das colunas mais leve */
  .table td:not(.td-name):not(.td-actions){
    color: hsl(var(--muted-foreground));
  }
  
  /* Badges (tipo + status) — base única + variantes */
  .badge{
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid hsl(var(--border));
    background: hsl(var(--secondary) / 0.35);
    color: hsl(var(--foreground));
    font-size: 12px;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
  }
  .badge-good{
    background: hsl(var(--primary) / 0.12);
    border-color: hsl(var(--primary) / 0.22);
    color: hsl(var(--primary));
  }
  .badge-muted{
    background: hsl(var(--muted) / 0.45);
    border-color: hsl(var(--border));
    color: hsl(var(--muted-foreground));
  }
  .badge--info{
    background: hsl(var(--primary) / .14);
    border-color: hsl(var(--primary) / .28);
    color: hsl(var(--foreground));
  }
  .badge--success{
    background: hsl(var(--success, 142 76% 36%) / .14);
    border-color: hsl(var(--success, 142 76% 36%) / .28);
    color: hsl(var(--foreground));
  }
  .badge--warn{
    background: hsl(var(--warning, 38 92% 50%) / .16);
    border-color: hsl(var(--warning, 38 92% 50%) / .30);
    color: hsl(var(--foreground));
  }
  .badge--danger{
    background: hsl(var(--destructive) / .14);
    border-color: hsl(var(--destructive) / .30);
    color: hsl(var(--foreground));
  }
  .badge--sm{
    padding: 3px 8px;
    font-size: 11px;
  }

  /* Matriz de risco GUT / IXP — cores normativa */
  .risk-critico,
  .badge.risk-critico{
    background: hsl(0 84% 60% / 0.2);
    border-color: hsl(0 84% 45%);
    color: hsl(0 84% 32%);
  }
  .risk-alto,
  .badge.risk-alto{
    background: hsl(28 100% 55% / 0.2);
    border-color: hsl(28 100% 45%);
    color: hsl(28 70% 32%);
  }
  .risk-medio,
  .badge.risk-medio{
    background: hsl(45 93% 55% / 0.25);
    border-color: hsl(45 93% 42%);
    color: hsl(45 70% 28%);
  }
  .risk-baixo,
  .badge.risk-baixo{
    background: hsl(142 76% 42% / 0.18);
    border-color: hsl(142 76% 36%);
    color: hsl(142 60% 26%);
  }
  
  /* Ações (mini ícones como no print) */
  /* editar = azul */
  /* excluir = laranja (parecido com seu print) */
  .icon-btn:hover{
    background: hsl(var(--muted) / 0.45);
    transform: translateY(-1px);
  }
  
  .icon-btn--danger:hover{
    background: hsl(24 94% 50% / 0.10);
  }
  
  .icon-btn:active{
    transform: translateY(0);
  }
  .icon-btn--view:hover{
  background: hsl(var(--muted) / 0.45);
}
.input.is-invalid{
  border-color: hsl(0 84% 60% / 0.7);
  box-shadow: 0 0 0 3px hsl(0 84% 60% / 0.15);
}

.field-hint{
  margin-top: 6px;
  font-size: 12px;
  color: hsl(var(--muted-foreground));
}

.field-hint.is-invalid{
  color: hsl(0 84% 60%);
  font-weight: 600;
}
/* =========================================================
   Cadastros — Tabs (QUEBRA de linha) + pill só na ativa
   + Títulos/Subtítulos (Quali-like)
   ========================================================= */

/* Container das tabs (compartilhado Cadastros + Configurações) */
.cadastros-page .tabs-bar,
.config-page .tabs-bar{
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  padding: 14px 16px;
  margin-bottom: 20px;
  background: hsl(var(--secondary) / 0.65);
  border: 1px solid hsl(var(--border));
  border-radius: 10px;
}
.cadastros-page .tabs-bar{
  display: flex !important;
  flex-wrap: wrap !important;
  overflow: visible !important;
}

/* Botão: sem “caixa” no normal */
.cadastros-page .tabs-bar > .tab-btn,
.config-page .tabs-bar > .tab-btn{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  padding: 0 4px;
  border: 0;
  background: transparent;
  box-shadow: none;
  color: hsl(var(--muted-foreground));
  font-size: 14.5px;
  font-weight: 400;
  letter-spacing: -0.01em;
  cursor: pointer;
  white-space: nowrap;
  transition: color .15s ease, background-color .15s ease, box-shadow .15s ease;
}

.cadastros-page .tabs-bar > .tab-btn:hover,
.config-page .tabs-bar > .tab-btn:hover{
  color: hsl(var(--foreground));
}

/* “Pill” aparece só na ativa */
.cadastros-page .tabs-bar > .tab-btn.is-active,
.config-page .tabs-bar > .tab-btn.is-active{
  padding: 0 12px;
  border-radius: 10px;
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  box-shadow: 0 1px 2px rgba(0,0,0,.06);
  color: hsl(var(--foreground));
}
.cadastros-page .tab-ico svg,
.config-page .tab-ico svg{
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: .95;
}

/* Cabeçalho da página — só na tela Cadastros (evita diferença de tamanho em Kanban/Config) */
.page--cadastros .page-head__title{
  font-size: 32px;
  font-weight: 600;
  letter-spacing: -0.025em;
}

.page--cadastros .page-head__subtitle{
  font-size: 15px;
  font-weight: 400;
  color: hsl(var(--muted-foreground));
}

/* Título/Subtítulo do card (Setores...) */
.cadastros-page .cad-card-head{
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.cadastros-page .cad-card-left{ min-width: 0; flex: 1 1 auto; }
.cadastros-page .cad-card-right,
.cadastros-page .iu-head-actions{
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

/* Remessas inter-unidade — trilha de status */
.iu-status-cell{
  min-width: 140px;
  vertical-align: middle !important;
}
.iu-stepper{
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-width: 100%;
}
.iu-stepper__track{
  display: flex;
  align-items: flex-start;
  gap: 0;
  width: 100%;
}
.iu-step{
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  flex: 1 1 0;
  min-width: 0;
  position: relative;
  z-index: 1;
}
.iu-step__dot{
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid hsl(var(--border));
  background: hsl(var(--background));
  box-sizing: border-box;
  flex-shrink: 0;
}
.iu-step__line{
  flex: 0 0 12px;
  align-self: flex-start;
  height: 2px;
  margin-top: 5px;
  background: hsl(var(--border));
  min-width: 8px;
}
.iu-step__label{
  margin-top: 8px;
  font-size: 12.5px;
  font-weight: 600;
  color: hsl(var(--muted-foreground));
  line-height: 1.2;
}
.iu-step__hint{
  margin-top: 2px;
  font-size: 11.5px;
  color: hsl(var(--muted-foreground) / 0.85);
  line-height: 1.25;
}
.iu-step.is-done .iu-step__dot{
  background: hsl(var(--success, 142 76% 36%));
  border-color: hsl(var(--success, 142 76% 36%));
}
.iu-step.is-done + .iu-step__line{
  background: hsl(var(--success, 142 76% 36%) / 0.55);
}
.iu-step.is-done .iu-step__label{
  color: hsl(var(--foreground));
}
.iu-step.is-current .iu-step__dot{
  background: hsl(var(--primary));
  border-color: hsl(var(--primary));
  box-shadow: 0 0 0 3px hsl(var(--primary) / 0.22);
}
.iu-step.is-current .iu-step__label{
  color: hsl(var(--primary));
}
.iu-step.is-todo .iu-step__dot{
  background: hsl(var(--muted) / 0.35);
}
.iu-stepper--compact{
  gap: 4px;
  min-width: 120px;
}
.iu-stepper--compact .iu-stepper__track{
  align-items: center;
  gap: 0;
}
.iu-stepper--compact .iu-step{
  flex: 0 0 auto;
}
.iu-stepper--compact .iu-step__dot{
  width: 9px;
  height: 9px;
  border-width: 1.5px;
}
.iu-stepper--compact .iu-step.is-current .iu-step__dot{
  box-shadow: 0 0 0 2px hsl(var(--primary) / 0.25);
}
.iu-stepper--compact .iu-step__line{
  flex: 1 1 10px;
  margin-top: 0;
  min-width: 6px;
  max-width: 18px;
  height: 2px;
}
.iu-stepper__now{
  font-size: 12.5px;
  font-weight: 600;
  color: hsl(var(--foreground));
  line-height: 1.2;
}
.iu-stepper--cancelled{
  flex-direction: row;
  align-items: center;
}
.pk-sub-pane[hidden]{ display: none !important; }
.pk-hist-resumo{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}
.pk-hist-kpi{
  border: 1px solid hsl(var(--border));
  border-radius: 10px;
  padding: 10px 12px;
  background: hsl(var(--card, 0 0% 100%));
  cursor: pointer;
  text-align: left;
  font: inherit;
  color: inherit;
}
.pk-hist-kpi:hover{ border-color: hsl(var(--primary) / 0.5); }
.pk-hist-kpi.is-active{
  border-color: hsl(var(--primary));
  box-shadow: 0 0 0 2px hsl(var(--primary) / 0.15);
}
.pk-hist-kpi__n{
  display: block;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.1;
}
.pk-hist-kpi__l{
  display: block;
  font-size: 12.5px;
  color: hsl(var(--muted-foreground));
  margin-top: 2px;
}
.pk-hist-mov{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.pk-hist-mov__dot{
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: hsl(var(--muted-foreground));
}
.pk-hist-mov--montado .pk-hist-mov__dot{ background: hsl(215 16% 47%); }
.pk-hist-mov--enviado .pk-hist-mov__dot{ background: hsl(var(--primary)); }
.pk-hist-mov--recebido .pk-hist-mov__dot{ background: hsl(var(--success, 142 76% 36%)); }
.pk-hist-mov--em_uso .pk-hist-mov__dot{ background: hsl(38 92% 50%); }
.pk-hist-mov--devolvido .pk-hist-mov__dot{ background: hsl(262 52% 55%); }
.pk-hist-mov--cancelado .pk-hist-mov__dot{ background: hsl(var(--destructive, 0 72% 51%)); }

.pk-multipla{
  font-weight: 700;
  font-size: 1.15em;
  color: hsl(var(--primary));
  cursor: help;
}

/* Logística — seleção em lote dos pacotes */
.pk-col-check{
  width: 1%;
  text-align: center;
}
.pk-col-check input{
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: hsl(var(--primary));
}
.pk-bulk{
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  padding: 10px 16px;
  background: hsl(var(--primary) / 0.08);
  border-bottom: 1px solid hsl(var(--primary) / 0.2);
}
.pk-bulk[hidden]{ display: none; }
.pk-bulk__count{
  font-weight: 600;
  color: hsl(var(--primary));
}
.pk-bulk__acoes{
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.pk-bulk__acoes .btn[disabled]{
  opacity: 0.45;
  cursor: not-allowed;
}
.pk-bulk__danger{
  color: hsl(var(--destructive, 0 72% 51%));
}
tr.is-selected > td{
  background: hsl(var(--primary) / 0.06);
}

/* Logística — leitura de QR dos pacotes */
.pk-scan__input{
  display: flex;
  gap: 8px;
  align-items: stretch;
  margin-top: 4px;
}
.pk-scan__input .input{
  flex: 1 1 auto;
  font-size: 16px;
  min-height: 44px;
}
.pk-scan__video{
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-start;
}
.pk-scan__video[hidden]{ display: none; }
.pk-scan__video video{
  width: 100%;
  max-width: 420px;
  border-radius: 10px;
  border: 1px solid hsl(var(--border));
  background: #000;
}
.pk-scan__result{ margin-top: 16px; }
.pk-scan__card{
  border: 1px solid hsl(var(--border));
  border-left-width: 4px;
  border-radius: 10px;
  padding: 14px 16px;
}
.pk-scan__card.is-ok{ border-left-color: hsl(var(--success, 142 76% 36%)); }
.pk-scan__card.is-err{ border-left-color: hsl(var(--destructive, 0 72% 51%)); }
.pk-scan__head{
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  flex-wrap: wrap;
}
.pk-scan__codigo{
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.pk-scan__acoes{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
@media (max-width: 720px){
  .pk-scan__input{ flex-wrap: wrap; }
  .pk-scan__input .input{ flex-basis: 100%; }
  .pk-scan__acoes .btn{ flex: 1 1 100%; min-height: 44px; }
}

.iu-stepper-wrap{
  padding: 12px 14px;
  border: 1px solid hsl(var(--border));
  border-radius: 10px;
  background: hsl(var(--muted) / 0.2);
}
@media (max-width: 720px){
  .iu-stepper:not(.iu-stepper--compact) .iu-step__hint{
    display: none;
  }
  .iu-stepper:not(.iu-stepper--compact) .iu-step__label{
    font-size: 11px;
  }
}
.cadastros-page .cad-card-title{
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: hsl(var(--foreground));
}

.cadastros-page .cad-card-sub{
  margin-top: 2px;
  font-size: 14.5px;
  font-weight: 400;
  color: hsl(var(--muted-foreground));
}

/* Evita salto de altura ao trocar abas (Unidade / Rotas) */
.admin-unidades-page .cad-card-sub{
  min-height: 1.35em;
  line-height: 1.35;
}
.admin-unidades-page .card > .card-pad:last-child > .tab-pane.is-active{
  min-height: 420px;
}
.admin-unidades-page .login-alert[hidden]{
  display: none !important;
}

/* Tabela */
.cadastros-page .table th{
  font-size: 12.5px;
  font-weight: 600;
  color: hsl(var(--muted-foreground));
}

.cadastros-page .table td{
  font-size: 14.5px;
  font-weight: 400;
}
.cadastros-page .table td.td-num{
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* Pesagens — linha contínua; ações em wrapper (evita quebra com flex no TD) */
.table--pesagens-local thead tr{
  box-shadow: inset 0 -1px 0 hsl(var(--border));
}
.table--pesagens-local thead th{
  border-bottom: none;
  vertical-align: middle;
}
.table--pesagens-local tbody tr{
  border-bottom: 1px solid hsl(var(--border));
}
.table--pesagens-local tbody td{
  border-bottom: 0 !important;
  vertical-align: middle !important;
}
.table--pesagens-local th.td-actions,
.table--pesagens-local td.td-actions{
  display: table-cell !important;
  width: 1%;
  white-space: nowrap;
  vertical-align: middle !important;
  text-align: right;
  padding-top: 10px;
  padding-bottom: 10px;
}
.table--pesagens-local .td-actions__inner{
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  vertical-align: middle;
  line-height: 0;
}
.table--pesagens-local .td-actions .icon-btn{
  flex: 0 0 auto;
}

.table--processos-lavadora thead tr{
  box-shadow: inset 0 -1px 0 hsl(var(--border));
}
.table--processos-lavadora thead th{
  border-bottom: none;
  vertical-align: middle;
}
.table--processos-lavadora tbody tr{
  border-bottom: 1px solid hsl(var(--border));
}
.table--processos-lavadora th.td-actions,
.table--processos-lavadora td.td-actions{
  display: table-cell !important;
  width: 1%;
  white-space: nowrap;
  vertical-align: middle !important;
  text-align: right;
}
.table--processos-lavadora .td-actions__inner{
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}
.table--controle-produtos thead tr{
  box-shadow: inset 0 -1px 0 hsl(var(--border));
}
.table--controle-produtos thead th{
  border-bottom: none;
  vertical-align: middle;
}
.table--controle-produtos tbody tr{
  border-bottom: 1px solid hsl(var(--border));
}
.table--controle-produtos th.td-actions,
.table--controle-produtos td.td-actions{
  display: table-cell !important;
  width: 1%;
  white-space: nowrap;
  vertical-align: middle !important;
  text-align: right;
}
.table--controle-produtos .td-actions__inner{
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

/* Peso por local / grids com filtros — páginas operacionais */
.area-critica-page .ac-peso-stack,
.area-limpa-page .ac-peso-stack,
.inventario-page .ac-peso-stack,
.gestao-manutencoes-page .ac-peso-stack,
.estoque-page .ac-peso-stack,
.abastecimento-page .ac-peso-stack,
.admin-unidades-page .ac-peso-stack{
  overflow: hidden;
}
.inventario-page .inv-par-saldo-hint{
  display:block;
  font-size:0.78rem;
  margin-top:2px;
  line-height:1.35;
  max-width:220px;
}
.area-critica-page .ac-peso-search,
.area-limpa-page .ac-peso-search,
.inventario-page .ac-peso-search,
.gestao-manutencoes-page .ac-peso-search,
.estoque-page .ac-peso-search,
.abastecimento-page .ac-peso-search,
.hospitalidade-page .ac-peso-search{
  border-bottom: 1px solid hsl(var(--border));
}
.area-critica-page .ac-peso-filtros,
.area-limpa-page .ac-peso-filtros,
.inventario-page .ac-peso-filtros,
.gestao-manutencoes-page .ac-peso-filtros,
.estoque-page .ac-peso-filtros,
.abastecimento-page .ac-peso-filtros,
.hospitalidade-page .ac-peso-filtros{
  border-bottom: 1px solid hsl(var(--border));
  background: hsl(var(--muted) / 0.18);
}
.area-critica-page .ac-peso-filtros-panel,
.area-limpa-page .ac-peso-filtros-panel,
.inventario-page .ac-peso-filtros-panel,
.gestao-manutencoes-page .ac-peso-filtros-panel,
.estoque-page .ac-peso-filtros-panel,
.abastecimento-page .ac-peso-filtros-panel,
.hospitalidade-page .ac-peso-filtros-panel{
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
  gap: 12px 16px;
  align-items: end;
  width: 100%;
}
.area-critica-page .ac-peso-filtros-panel__field,
.area-limpa-page .ac-peso-filtros-panel__field,
.inventario-page .ac-peso-filtros-panel__field,
.gestao-manutencoes-page .ac-peso-filtros-panel__field,
.estoque-page .ac-peso-filtros-panel__field,
.abastecimento-page .ac-peso-filtros-panel__field,
.hospitalidade-page .ac-peso-filtros-panel__field{
  min-width: 0;
}
.area-critica-page .ac-peso-filtros-panel__apply,
.area-limpa-page .ac-peso-filtros-panel__apply,
.inventario-page .ac-peso-filtros-panel__apply,
.gestao-manutencoes-page .ac-peso-filtros-panel__apply,
.estoque-page .ac-peso-filtros-panel__apply,
.abastecimento-page .ac-peso-filtros-panel__apply,
.hospitalidade-page .ac-peso-filtros-panel__apply{
  margin-left: 0;
  align-self: end;
}
.area-critica-page .ac-peso-filtros-panel .input,
.area-critica-page .ac-peso-filtros-panel select,
.area-limpa-page .ac-peso-filtros-panel .input,
.area-limpa-page .ac-peso-filtros-panel select,
.inventario-page .ac-peso-filtros-panel .input,
.inventario-page .ac-peso-filtros-panel select,
.gestao-manutencoes-page .ac-peso-filtros-panel .input,
.gestao-manutencoes-page .ac-peso-filtros-panel select,
.estoque-page .ac-peso-filtros-panel .input,
.estoque-page .ac-peso-filtros-panel select,
.abastecimento-page .ac-peso-filtros-panel .input,
.abastecimento-page .ac-peso-filtros-panel select,
.hospitalidade-page .ac-peso-filtros-panel .input,
.hospitalidade-page .ac-peso-filtros-panel select{
  width: 100%;
}

.area-critica-page .ac-peso-filtros-panel--processos,
.area-limpa-page .ac-peso-filtros-panel--processos,
.inventario-page .ac-peso-filtros-panel--processos,
.gestao-manutencoes-page .ac-peso-filtros-panel--processos,
.abastecimento-page .ac-peso-filtros-panel--processos,
.hospitalidade-page .ac-peso-filtros-panel--processos{
  grid-template-columns: 128px 128px repeat(3, minmax(0, 1fr)) auto;
}
.area-critica-page .ac-peso-filtros-panel--processos .ac-peso-filtros-panel__field--date,
.area-limpa-page .ac-peso-filtros-panel--processos .ac-peso-filtros-panel__field--date,
.inventario-page .ac-peso-filtros-panel--processos .ac-peso-filtros-panel__field--date,
.gestao-manutencoes-page .ac-peso-filtros-panel--processos .ac-peso-filtros-panel__field--date,
.abastecimento-page .ac-peso-filtros-panel--processos .ac-peso-filtros-panel__field--date{
  max-width: 128px;
}
.area-critica-page .ac-peso-filtros-panel--controle-produtos,
.inventario-page .ac-peso-filtros-panel--controle-produtos{
  grid-template-columns: 128px 128px repeat(2, minmax(0, 1fr)) auto;
}
.area-critica-page .ac-peso-filtros-panel--controle-produtos .ac-peso-filtros-panel__field--date,
.inventario-page .ac-peso-filtros-panel--controle-produtos .ac-peso-filtros-panel__field--date{
  max-width: 128px;
}
.area-critica-page .ac-peso-filtros-panel--passagem,
.area-limpa-page .ac-peso-filtros-panel--passagem{
  grid-template-columns: 128px 128px minmax(0, 1fr) auto;
}
.area-critica-page .ac-peso-filtros-panel--passagem .ac-peso-filtros-panel__field--date,
.area-limpa-page .ac-peso-filtros-panel--passagem .ac-peso-filtros-panel__field--date{
  max-width: 128px;
}
.table--passagens-plantao thead tr{
  box-shadow: inset 0 -1px 0 hsl(var(--border));
}
.table--passagens-plantao thead th{
  border-bottom: none;
  vertical-align: middle;
}
.table--passagens-plantao tbody tr{
  border-bottom: 1px solid hsl(var(--border));
}
.table--passagens-plantao th.td-actions,
.table--passagens-plantao td.td-actions{
  display: table-cell !important;
  width: 1%;
  white-space: nowrap;
  vertical-align: middle !important;
  text-align: right;
}
.table--passagens-plantao .td-actions__inner{
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}
.passagem-foto-preview{
  border: 1px solid hsl(var(--border));
  border-radius: var(--r-md);
  overflow: hidden;
  background: hsl(var(--muted) / 0.2);
  max-height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.passagem-foto-preview img{
  max-width: 100%;
  max-height: 320px;
  object-fit: contain;
  display: block;
}
.table--passagens-plantao .th-descricao-passagem,
.table--passagens-plantao .td-descricao-passagem{
  min-width: 220px;
  max-width: 420px;
  white-space: normal;
  vertical-align: top !important;
}
.passagem-desc-preview,
.passagem-desc-full{
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.45;
  font-size: 13px;
}
.passagem-desc-preview{
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
  overflow: hidden;
}
.td-descricao-passagem.is-expanded .passagem-desc-preview{
  display: none;
}
.passagem-desc-full{
  margin-bottom: 4px;
}
.btn-toggle-desc-passagem{
  margin-top: 4px;
  padding: 0;
  border: 0;
  background: none;
  color: hsl(var(--primary));
  font-size: 12px;
  cursor: pointer;
  text-decoration: underline;
}
.passagem-anexo-list{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.passagem-anexo-chip{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  padding: 4px 8px;
  border: 1px solid hsl(var(--border));
  border-radius: var(--r-sm);
  background: hsl(var(--muted) / 0.25);
  font-size: 12px;
}
.passagem-anexo-chip.is-removed{
  opacity: 0.45;
  text-decoration: line-through;
}
.passagem-anexo-chip.is-new{
  border-color: hsl(var(--primary) / 0.35);
}
.passagem-anexo-chip__nome{
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 200px;
}
.passagem-anexo-chip__btn{
  border: 0;
  background: transparent;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  padding: 0 2px;
  color: hsl(var(--foreground) / 0.7);
}
.passagem-fotos-grid{
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
}
.passagem-fotos-grid .passagem-foto-preview{
  max-height: 160px;
}
.passagem-fotos-grid .passagem-foto-preview img{
  max-height: 160px;
}

.local-parceiro-check{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
  cursor: pointer;
  font-weight: 500;
  user-select: none;
}
.local-parceiro-check input[type="checkbox"]{
  width: 18px;
  height: 18px;
  margin: 0;
  cursor: pointer;
  accent-color: hsl(var(--primary));
}
.table--pesagens-local .td-parceiro{
  white-space: nowrap;
  vertical-align: middle !important;
}

/* Cadastros — linha contínua no cabeçalho e nas linhas; coluna Ações alinhada */
.table--cadastros thead tr{
  box-shadow: inset 0 -1px 0 hsl(var(--border));
}
.table--cadastros thead th{
  border-bottom: none;
  vertical-align: middle;
}
.table--cadastros tbody tr{
  border-bottom: 1px solid hsl(var(--border));
}
.table--cadastros tbody td{
  border-bottom: 0 !important;
  vertical-align: middle !important;
}
.table--cadastros th.td-actions,
.table--cadastros td.td-actions{
  display: table-cell !important;
  width: 1%;
  white-space: nowrap;
  vertical-align: middle !important;
  text-align: right;
}
.table--cadastros .td-actions__inner{
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  vertical-align: middle;
  line-height: 0;
}
.table--cadastros .td-actions .icon-btn{
  flex: 0 0 auto;
}

/* Manutenção preventiva — linha contínua (mesmo padrão dos cadastros) */
.table--planos-preventivos thead tr,
.table--execucoes-preventivas thead tr{
  box-shadow: inset 0 -1px 0 hsl(var(--border));
}
.table--planos-preventivos thead th,
.table--execucoes-preventivas thead th{
  border-bottom: none;
  vertical-align: middle;
}
.table--planos-preventivos tbody tr,
.table--execucoes-preventivas tbody tr{
  border-bottom: 1px solid hsl(var(--border));
}
.table--planos-preventivos tbody td,
.table--execucoes-preventivas tbody td{
  border-bottom: 0 !important;
  vertical-align: middle !important;
}
.table--planos-preventivos th.td-actions,
.table--planos-preventivos td.td-actions,
.table--execucoes-preventivas th.td-actions,
.table--execucoes-preventivas td.td-actions{
  display: table-cell !important;
  width: 1%;
  white-space: nowrap;
  vertical-align: middle !important;
  text-align: right;
}
.table--planos-preventivos .td-actions__inner,
.table--execucoes-preventivas .td-actions__inner{
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  vertical-align: middle;
  line-height: 0;
}
.gestao-manutencoes-page .card.ac-peso-stack > .table-head{
  border-bottom: none;
  box-shadow: inset 0 -1px 0 hsl(var(--border));
}
.gestao-manutencoes-page .ac-peso-table .table-head{
  border-bottom: none;
  box-shadow: inset 0 -1px 0 hsl(var(--border));
}

/* Manutenção corretiva — linha contínua no cabeçalho (inclui coluna Ações) */
.table--manutencao-corretiva thead tr{
  box-shadow: inset 0 -1px 0 hsl(var(--border));
}
.table--manutencao-corretiva thead th{
  border-bottom: none;
  vertical-align: middle;
}
.table--manutencao-corretiva tbody tr{
  border-bottom: 1px solid hsl(var(--border));
}
.table--manutencao-corretiva tbody td{
  border-bottom: 0 !important;
  vertical-align: middle !important;
}
.table--manutencao-corretiva th.td-actions,
.table--manutencao-corretiva td.td-actions{
  display: table-cell !important;
  width: 1%;
  white-space: nowrap;
  vertical-align: middle !important;
  text-align: right;
}
.table--manutencao-corretiva .td-actions__inner{
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  vertical-align: middle;
  line-height: 0;
}
.table--manutencao-corretiva .td-actions .icon-btn{
  flex: 0 0 auto;
}

/* OS corretiva — cartão de status duplo (atendimento + validação) */
.td-os-status{
  min-width: 10.5rem;
}
.os-status-card{
  display: inline-flex;
  flex-direction: column;
  gap: 0;
  min-width: 10.5rem;
  padding: 8px 10px;
  border: 1px solid hsl(var(--border));
  border-radius: 10px;
  background: linear-gradient(180deg, hsl(var(--card)) 0%, hsl(var(--muted) / 0.18) 100%);
  box-shadow: 0 1px 2px hsl(var(--foreground) / 0.04);
}
.os-status-card--single{
  min-width: auto;
  padding: 6px 10px;
}
.os-status-card__item{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.os-status-card--single .os-status-card__item{
  justify-content: flex-start;
}
.os-status-card__key{
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: hsl(var(--muted-foreground));
  white-space: nowrap;
}
.os-status-card__badge{
  flex-shrink: 0;
}
.os-status-card__divider{
  height: 1px;
  margin: 7px 0;
  background: linear-gradient(
    90deg,
    transparent 0%,
    hsl(var(--border)) 12%,
    hsl(var(--border)) 88%,
    transparent 100%
  );
}

/* Assinatura tablet — manutenção preventiva */
.signature-pad-wrap{
  border: 1px solid hsl(var(--border));
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
  touch-action: none;
}
.signature-pad-wrap canvas{
  display: block;
  width: 100%;
  height: 160px;
  min-height: 140px;
  touch-action: none;
  cursor: crosshair;
}
.signature-pad-field__hint{
  margin: 0 0 8px;
  font-size: 12px;
}
.signature-pad-actions{
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 8px;
}
@media (max-width: 640px){
  .signature-pad-wrap canvas{
    height: 200px;
    min-height: 180px;
  }
}

/* Anexos — manutenção corretiva (mobile) */
.manut-anexos-field{
  margin-bottom: 12px;
}
.manut-anexos__toolbar{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}
.manut-anexos__pick{
  position: relative;
  margin: 0;
  cursor: pointer;
}
.manut-anexos__pick input{
  position: absolute;
  width: 0;
  height: 0;
  opacity: 0;
  pointer-events: none;
}
.manut-anexos__hint{
  margin: 0 0 8px;
  font-size: 12px;
}
.manut-anexos-grid{
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 10px;
}
.manut-anexo-thumb{
  position: relative;
  border: 1px solid hsl(var(--border));
  border-radius: 8px;
  overflow: hidden;
  background: hsl(var(--muted) / 0.3);
  aspect-ratio: 1;
}
.manut-anexo-thumb img{
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.manut-anexo-thumb__del{
  position: absolute;
  top: 4px;
  right: 4px;
  width: 26px;
  height: 26px;
  border: 0;
  border-radius: 999px;
  background: hsl(var(--destructive) / 0.92);
  color: #fff;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
@media (max-width: 640px){
  .manut-anexos__toolbar{
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .manut-anexos__toolbar .btn{
    width: 100%;
    justify-content: center;
  }
}
.execucao-readonly-item{
  padding: 10px 0;
  border-bottom: 1px solid hsl(var(--border) / 0.6);
}
.execucao-readonly-item:last-child{
  border-bottom: 0;
}
.execucao-readonly-item__label{
  font-weight: 600;
  font-size: 13px;
  margin-bottom: 4px;
}
.execucao-readonly-item__value{
  font-size: 13px;
}
.execucao-readonly-item__value.is-nao-conforme{
  color: hsl(var(--destructive));
}

/* Cadastros > Processo — sub-abas */
.admin-cadastros-page .processo-hub{
  margin-top: 4px;
}
.admin-cadastros-page .tabs-bar--nested{
  margin-bottom: 0;
}
.admin-cadastros-page .processo-hub > .tab-pane{
  display: none;
}
.admin-cadastros-page .processo-hub > .tab-pane.is-active{
  display: block;
}

.area-critica-page .ac-peso-table .table-head,
.area-limpa-page .ac-peso-table .table-head,
.inventario-page .ac-peso-table .table-head,
.gestao-manutencoes-page .ac-peso-table .table-head,
.abastecimento-page .ac-peso-table .table-head{
  border-bottom: 1px solid hsl(var(--border));
}
@media (max-width: 960px){
  .area-critica-page .ac-peso-filtros-panel,
  .area-limpa-page .ac-peso-filtros-panel,
  .inventario-page .ac-peso-filtros-panel,
  .gestao-manutencoes-page .ac-peso-filtros-panel,
  .estoque-page .ac-peso-filtros-panel,
  .abastecimento-page .ac-peso-filtros-panel{
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .area-critica-page .ac-peso-filtros-panel__apply,
  .area-limpa-page .ac-peso-filtros-panel__apply,
  .inventario-page .ac-peso-filtros-panel__apply,
  .gestao-manutencoes-page .ac-peso-filtros-panel__apply,
  .estoque-page .ac-peso-filtros-panel__apply,
  .abastecimento-page .ac-peso-filtros-panel__apply{
    grid-column: 1 / -1;
    justify-self: start;
  }
  .area-critica-page .ac-peso-filtros-panel--processos .ac-peso-filtros-panel__field--date,
  .area-limpa-page .ac-peso-filtros-panel--processos .ac-peso-filtros-panel__field--date,
  .inventario-page .ac-peso-filtros-panel--processos .ac-peso-filtros-panel__field--date,
  .gestao-manutencoes-page .ac-peso-filtros-panel--processos .ac-peso-filtros-panel__field--date,
  .abastecimento-page .ac-peso-filtros-panel--processos .ac-peso-filtros-panel__field--date,
  .area-critica-page .ac-peso-filtros-panel--passagem .ac-peso-filtros-panel__field--date,
  .area-limpa-page .ac-peso-filtros-panel--passagem .ac-peso-filtros-panel__field--date,
  .area-critica-page .ac-peso-filtros-panel--controle-produtos .ac-peso-filtros-panel__field--date,
  .inventario-page .ac-peso-filtros-panel--controle-produtos .ac-peso-filtros-panel__field--date{
    max-width: none;
  }
}
@media (max-width: 560px){
  .area-critica-page .ac-peso-filtros-panel,
  .area-limpa-page .ac-peso-filtros-panel,
  .inventario-page .ac-peso-filtros-panel,
  .gestao-manutencoes-page .ac-peso-filtros-panel,
  .estoque-page .ac-peso-filtros-panel,
  .abastecimento-page .ac-peso-filtros-panel{
    grid-template-columns: 1fr;
  }
}

/* =========================
   Modal — fields (Cadastros)
   ========================= */

   .mfield{
    display:grid;
    gap: 8px;
    margin-bottom: 14px;
  }
  
  .mfield__label{
    font-size: 12px;
    font-weight: 600;
    color: hsl(var(--muted-foreground));
  }
  
  /* campo check alinhado */
  .mfield--check{
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 14px;
    padding: 12px 0 0;
    border-top: 1px solid hsl(var(--border));
    margin-top: 10px;
  }
  
  .mfield__meta{
    display:grid;
    gap: 2px;
  }
  
  .mfield__hint{
    font-size: 12px;
    color: hsl(var(--muted-foreground));
  }
  
  /* Switch clean (Quali-like) */
  .mswitch{
    position: relative;
    width: 46px;
    height: 26px;
    display:inline-block;
  }
  
  .mswitch input{
    position:absolute;
    inset:0;
    opacity:0;
  }
  
  .mswitch__track{
    position:absolute;
    inset:0;
    border-radius: 999px;
    background: hsl(var(--muted) / .7);
    border: 1px solid hsl(var(--border));
    transition: background-color .15s ease, border-color .15s ease;
  }
  
  .mswitch__track::after{
    content:"";
    position:absolute;
  
    /* 🔧 centralização correta */
    top: 50%;
    transform: translateY(-50%);
  
    left: 3px;
    width: 20px;
    height: 20px;
    border-radius: 999px;
    background: hsl(var(--background));
    border: 1px solid hsl(var(--border));
    box-shadow: 0 1px 2px rgba(0,0,0,.10);
    transition: transform .15s ease;
  }
  
  .mswitch input:checked + .mswitch__track{
    background: hsl(var(--primary) / .85);
    border-color: hsl(var(--primary) / .55);
  }
  
  .mswitch input:checked + .mswitch__track::after{
    transform: translateY(-50%) translateX(20px);
  }
  /* =========================================================
   Configurações — Tabs (compartilhado com Cadastros) + Titles
   ========================================================= */

/* conteúdo das tabs */
.config-page .tab-pane{ display:none; }
.config-page .tab-pane.is-active{ display:block; }

/* sub-tabs API / Integradores — oculta por padrão, visível só quando aba ativa */
.tabs-bar--sub.tabs-bar--integradores{
  display: none !important;
  margin-top: -8px;
  margin-bottom: 16px;
  padding: 10px 14px;
  background: hsl(var(--muted) / 0.5);
  border-radius: 8px;
  border: 1px solid hsl(var(--border));
}
.tabs-bar--sub.tabs-bar--integradores.is-visible{
  display: flex !important;
}
.tabs-bar--sub .tab-btn{
  height: 30px;
  padding: 0 10px;
  font-size: 13px;
}
.config-page .tab-sub-pane{ display:none; }
.config-page .tab-sub-pane.is-active{ display:block; }
.tabs-bar--sub.tabs-bar--sistema{
  display: flex;
  margin: 0 0 16px;
  padding: 10px 14px;
  background: hsl(var(--muted) / 0.5);
  border-radius: 8px;
  border: 1px solid hsl(var(--border));
}
.pesquisas-page .tab-pane{ display:none; }
.pesquisas-page .tab-pane.is-active{ display:block; }
.pesquisas-page .pesquisas-card-head-row{
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}
.pesquisas-page .pesquisas-card-head-row .cad-card-right{
  margin-left: auto;
}

/* títulos internos do card */
.config-page .cfg-head{ margin-bottom: 14px; }
.config-page .cfg-title{
  margin: 0;
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.config-page .cfg-sub{
  margin: 2px 0 0;
  font-size: 14.5px;
  font-weight: 400;
  color: hsl(var(--muted-foreground));
}

/* switches */
.config-page .cfg-switches{
  margin-top: 8px;
  border-top: 1px solid hsl(var(--border));
}
.config-page .cfg-switch{
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid hsl(var(--border));
}
.config-page .cfg-switch__title{ font-weight: 600; }
.config-page .cfg-switch__hint{
  margin-top: 2px;
  font-size: 12px;
  color: hsl(var(--muted-foreground));
}

/* Consumo de API */
.consumo-api{ padding: 8px 0; }
.consumo-api__header{
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 1rem;
}
.consumo-api__desc{
  margin: 0;
  flex: 1;
  min-width: 200px;
}
.consumo-filter{
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
  margin: 0;
}
.consumo-grid{
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}
.consumo-card{
  border: 1px solid hsl(var(--border));
  border-radius: 12px;
  padding: 16px;
  background: hsl(var(--card));
}
.consumo-card__label{
  font-size: 13px;
  font-weight: 600;
  color: hsl(var(--foreground));
  margin-bottom: 8px;
}
.consumo-card__valor{
  font-size: 24px;
  font-weight: var(--font-weight-strong);
  color: hsl(var(--primary));
}
.consumo-card__meta{
  font-size: 12px;
  color: hsl(var(--muted-foreground));
  margin-top: 4px;
}
.consumo-card__custo{
  font-size: 13px;
  font-weight: 600;
  color: hsl(var(--primary));
  margin-top: 6px;
}
.consumo-filter .label{
  display: inline-block;
  margin: 0;
  white-space: nowrap;
  font-size: 13px;
}
.consumo-filter .consumo-select{
  width: auto;
  min-width: 160px;
}
.consumo-total{
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid hsl(var(--border));
  font-size: 15px;
}

/* =========================
   Matriz Builder
========================= */
.mbuilder{ display:flex; flex-direction:column; gap:12px; }

.mtabs{
  display:flex;
  gap:8px;
  flex-wrap: wrap;
  padding:10px;
  border:1px solid hsl(var(--border));
  border-radius: 12px;
  background: hsl(var(--secondary));
}

.mtab{
  height:34px;
  padding:0 12px;
  border-radius: 10px;
  border:1px solid hsl(var(--border));
  background: hsl(var(--background) / .7);
  font-weight: var(--font-weight-title);
  font-size: 12.8px;
  cursor:pointer;
}
.mtab.is-active{
  background: hsl(var(--card));
  box-shadow: var(--shadow-soft);
}

.mpanel{ display:none; }
.mpanel.is-active{ display:block; }

.mrow{ display:flex; gap:10px; margin: 8px 0 12px; }

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

.mitem{
  border:1px solid hsl(var(--border));
  background: hsl(var(--card));
  border-radius: 12px;
  padding: 12px;
}

.mitem__grid{
  display:grid;
  grid-template-columns: 1.2fr 2fr .8fr .8fr;
  gap: 10px;
}
@media (max-width: 900px){
  .mitem__grid{ grid-template-columns: 1fr 1fr; }
}

.mitem__actions{
  display:flex;
  justify-content:flex-end;
  margin-top: 10px;
}
.matriz-block{
  margin-top: 16px;
}

.matriz-block.is-hidden{
  display: none;
}

.matriz-tabs{
  margin: 0 12px 12px;
}
/* Tabs-bar mais “baixa” (menos padding/altura) */
.tabs-bar.tabs-bar--compact{
  padding: 6px;
  border-radius: 12px;          /* se quiser menos “alto”, pode cair p/ 10px */
  gap: 6px;
}

.tabs-bar.tabs-bar--compact .tab-btn{
  padding: 8px 10px;            /* principal redução da altura */
  min-height: 36px;             /* antes deve estar 44/48 */
  border-radius: 10px;
}

.tabs-bar.tabs-bar--compact .tab-ico{
  width: 18px;
  height: 18px;
}

/* Separadores/seções na aba Segurança */
.cfg-divider{
  height: 1px;
  background: var(--line, rgba(0,0,0,.08));
  margin: 14px 0;
}

.cfg-section__head{
  margin-bottom: 10px;
}

.cfg-section__title{
  font-weight: var(--font-weight-title);
}

/* Config > Notificações: regra form */
.notif-cond-block { margin-top: 10px; }
.notif-campos-list { display: flex; flex-wrap: wrap; gap: 10px 16px; margin-top: 6px; }
.notif-campo-item { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; cursor: pointer; }
.notif-check { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; cursor: pointer; }

.brand-logo{
  width: 65px;
  height: 65px;
  object-fit: contain;
  display: block;
  border-radius: 6px; /* fica premium */
}
.brand-icon{
  display:flex;
  align-items:center;
  justify-content:center;
}
/* =========================
   Manifestacoes (lista) — UI igual aos outros templates
   ========================= */

/* Barra de filtros */
.filters-row{
  display: flex;
  align-items: center;
  gap: 10px;
}

/* input-group padrão, com ícone pequeno */
.input-group{
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  border: 1px solid var(--line, hsl(var(--border)));
  border-radius: 12px;
  background: var(--card, hsl(var(--card)));
  min-height: 42px; /* igual padrão inputs */
}

.input-group .input{
  border: 0 !important;
  outline: none !important;
  box-shadow: none !important;
  padding: 10px 0 !important;
  height: 40px;
  width: 100%;
  background: transparent;
}

/* ícone lupa pequeno e alinhado */
.input-icon{
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  opacity: .55;
}

/* select pequeno no header da tabela */
.input--sm{
  height: 36px;
  padding: 6px 10px;
  border-radius: 10px;
  font-size: 13px;
}

/* =========================================================
   Table footer / pagination (shared)
   ========================================================= */
.table-footer,
.pagination-bar,
.table-pagination{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap: 8px;
  padding-top: 10px;
}

.pagination-pill{
  display:inline-flex;
  align-items:center;
  height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid hsl(var(--border));
  background: hsl(var(--card));
  color: hsl(var(--foreground));
  font-weight: var(--font-weight-title);
  font-size: 12px;
}

/* Small button (tables / pagination / chips) — um único tamanho */
.btn--sm,
.btn-sm,
.btn.btn-sm,
.btn.btn--sm{
  height: 34px;
  min-height: 34px;
  padding: 6px 10px;
  border-radius: var(--r-sm);
  font-size: 13px;
}

/* Ícone dentro de botão de texto (Filtros, etc.) */
.btn > svg{
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}

/* Icon inside buttons */
.btn__icon{
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}

/* =========================================================
   Manifestações — Modal skin (token-based, dark-safe)
   (escopado)
   ========================================================= */
#manifestacaoBackdrop{
  background: hsl(217 86% 5% / .55);
}
html.dark #manifestacaoBackdrop{
  background: hsl(217 86% 5% / .70);
}

/* opcional: trava scroll do fundo */
.is-modal-open{ overflow:hidden; }

#manifestacaoModal{ padding: 18px; }

#manifestacaoModal .modal-dialog{
  width: min(1200px, calc(100vw - 32px));
  max-height: calc(100vh - 36px);
  border-radius: var(--r-lg);
  border: 1px solid hsl(var(--border));
  box-shadow: 0 24px 70px rgba(0,0,0,.22);
  overflow: hidden;
}

#manifestacaoModal .modal-head{
  padding: 14px 18px;
  background: hsl(var(--card));
  border-bottom: 1px solid hsl(var(--border));
}

#manifestacaoModal .modal-body,
#manifestacaoModal .modal-foot{
  background: hsl(var(--background));
}

#manifestacaoModal .modal-body{
  padding: 14px 18px;
  max-height: calc(100vh - 170px);
  overflow: auto;
}

/* Modal em modo visualização: largura adequada e disposição */
#manifestacaoModal.modal--view .modal-dialog{
  width: min(1200px, calc(100vw - 32px));
  max-height: 85vh;
  display: flex;
  flex-direction: column;
}
#manifestacaoModal.modal--view .modal-body{
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px;
  max-height: calc(85vh - 140px);
}

/* Conteúdo de visualização (só leitura): mais ar, seções claras */
#manifestacaoModal .modal-body .manifestacao-view{
  padding: 8px 0;
  min-height: 120px;
  max-width: 100%;
}
#manifestacaoModal .modal-body .manifestacao-view .view-section{
  margin-bottom: 24px;
}
#manifestacaoModal .modal-body .manifestacao-view .view-section:last-child{
  margin-bottom: 0;
}
#manifestacaoModal .modal-body .manifestacao-view .view-section__title{
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: hsl(var(--muted-foreground));
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid hsl(var(--border));
}
#manifestacaoModal .modal-body .manifestacao-view .view-grid{
  gap: 12px 20px;
}
#manifestacaoModal .modal-body .manifestacao-view .view-field__label{
  font-size: 11px;
}
#manifestacaoModal .modal-body .manifestacao-view .view-field__value{
  font-size: 14px;
  line-height: 1.4;
}
#manifestacaoModal .modal-body .manifestacao-view .view-field--sla .view-field__value{
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
#manifestacaoModal .modal-body .manifestacao-view .view-field__value--relato{
  font-size: 13px;
  line-height: 1.5;
  padding: 12px;
  background: hsl(var(--muted) / 0.15);
  border-radius: var(--r-md);
}
#manifestacaoModal .modal-body .manifestacao-view .view-risco{
  padding: 16px 18px;
  gap: 14px;
}
#manifestacaoModal .modal-body .manifestacao-view .view-risco__caption{
  font-size: 11px;
  color: hsl(var(--muted-foreground));
  width: 100%;
  margin-top: 6px;
}

#manifestacaoModal .modal-foot{
  padding: 12px 18px;
  border-top: 1px solid hsl(var(--border));
  justify-content: flex-end;
  gap: 10px;
}

/* Form em colunas e mais compacto */
#manifestacaoModal .form-row{
  display:grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  align-items:end;
  gap: 12px;
  margin-bottom: 10px;
}
#manifestacaoModal .label{ margin-bottom: 6px; }
#manifestacaoModal .input{ height: 42px; background: hsl(var(--card)); }
#manifestacaoModal textarea.input{ min-height: 84px; }

.sintese-ia-box{
  min-height: 60px;
  padding: 12px 14px;
  background: hsl(var(--muted) / 0.25);
  border: 1px solid hsl(var(--border));
  border-radius: 6px;
  white-space: pre-wrap;
  word-wrap: break-word;
  line-height: 1.5;
  font-size: 14px;
  width: 100%;
  box-sizing: border-box;
}

/* Focus ring suave no sheet */
#manifestacaoModal .input:focus{
  border-color: hsl(var(--ring));
  box-shadow: 0 0 0 2px hsl(var(--ring) / .18);
}

@media (max-width: 900px){
  #manifestacaoModal{ padding: 10px; }
  #manifestacaoModal .modal-dialog{ width: calc(100vw - 20px); }
  #manifestacaoModal.modal--view .modal-dialog{ width: calc(100vw - 20px); }
  #manifestacaoModal .form-row{ grid-template-columns: repeat(6, minmax(0, 1fr)); }
}
@media (max-width: 640px){
  #manifestacaoModal .form-row{ grid-template-columns: repeat(1, minmax(0, 1fr)); }
}

/* =========================================================
   CIRURGICO 3 — Padronização global
   - table-head / table-title (todas as listas)
   - badges com variações (info/success/warn/danger) token-based
   - icon-btn (view/edit/danger) com hover/focus consistentes
   Compatível com light/dark (somente tokens HSL)
   ========================================================= */

/* -------------------------
   TABLE HEAD / TITLE
   ------------------------- */
.table-card .table-head{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid hsl(var(--border));
  background: hsl(var(--card));
}

.table-card .table-title{
  font-weight: var(--font-weight-title);
  font-size: 14px;
  letter-spacing: -0.01em;
  color: hsl(var(--foreground));
}

/* Padrão de fonte para TODAS as grids (referência: Configurações > Unidades) */
.table-card .table th{
  font-size: 12.5px;
  font-weight: 600;
  color: hsl(var(--muted-foreground));
}
.table-card .table td,
.table-card .table .cell-name__primary,
.table-card .table .cell-name__secondary,
.table-card .table .cell-name__txt{
  font-size: 14.5px;
}

/* table-head: título + colunas + per page */
.table-card .table-head__actions{
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.table-card .perpage-row{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0;
}
.table-card .perpage-label{ white-space: nowrap; }
.table-card .perpage-select{
  min-width: 92px;
}

/* Dropdown Colunas (escolher o que exibir na grid) */
.dropdown-colunas{
  position: relative;
}
.dropdown-colunas .btn-colunas-toggle{
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.dropdown-colunas__menu{
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 4px;
  min-width: 160px;
  padding: 8px 0;
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,.12);
  z-index: 20;
}
.dropdown-colunas__menu[hidden]{ display: none !important; }
.dropdown-colunas__menu.is-open{ display: block; }
.dropdown-colunas__title{
  padding: 6px 12px 8px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .03em;
  color: hsl(var(--muted-foreground));
}
.dropdown-colunas__item{
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
}
.dropdown-colunas__item:hover{ background: hsl(var(--accent)); }
.dropdown-colunas__list{
  max-height: 280px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.dropdown-colunas__item input{ margin: 0; }
.dropdown-colunas__note{
  display: block;
  padding: 8px 12px 0;
  font-size: 11px;
  color: hsl(var(--muted-foreground));
}
/* Evitar que o card corte o dropdown */
.table-card .table-head{ overflow: visible; }
.table-card .table-head__actions{ position: relative; }
.dropdown-colunas{ position: relative; }
/* Ícone do botão Colunas: herda cor do botão (não fica preto) */
#btnColunasToggle svg{ color: currentColor; }
#btnColunasToggle svg use,
#btnColunasToggle use{ fill: none; stroke: currentColor; }

/* -------------------------
   BADGES (base + variantes)
   ------------------------- */
.col-acoes, .col-data, .td-date{ white-space: nowrap; }

/* SLA na grid: tempo proposto | decorrido + badge no prazo/fora */
.td-sla{
  white-space: nowrap;
}
.td-sla .sla-pair{
  display: inline-block;
  margin-right: 6px;
}
.td-sla .badge-sla{
  font-size: 10px;
  padding: 2px 5px;
  vertical-align: middle;
}

/* Grid manifestações — larguras fixas (documentação do sistema) */
.table--manifestacoes{
  table-layout: fixed;
  width: 100%;
}
/* Mesmo padrão de fonte que configurações (12.5px th, 14.5px td) */
.table--manifestacoes th{
  font-size: 12.5px !important;
}
.table--manifestacoes td,
.table--manifestacoes .td-name,
.table--manifestacoes .cell-name__primary,
.table--manifestacoes .cell-name__secondary,
.table--manifestacoes .cell-name__txt{
  font-size: 14.5px !important;
}
.table--manifestacoes .badge{
  font-size: 12px !important;
}
.table--manifestacoes th,
.table--manifestacoes td{
  padding: 8px 10px;
}
/* Largura mínima evita truncagem ao reordenar colunas */
.table--manifestacoes th,
.table--manifestacoes td{
  min-width: 72px;
}
.table--manifestacoes .col-data{ width: 9%; }
.table--manifestacoes .col-protocolo{ width: 11%; }
.table--manifestacoes .col-paciente{ width: 13%; }
.table--manifestacoes .col-setor{ width: 9%; }
.table--manifestacoes .col-motivo{ width: 10%; }
.table--manifestacoes .col-gravidade{ width: 8%; }
.table--manifestacoes .col-sla{ width: 13%; }
.table--manifestacoes .col-fluxo{ width: 13%; }
.table--manifestacoes .col-status{ width: 10%; }
.table--manifestacoes .col-origem{ width: 7%; }
.table--manifestacoes .col-tipo{ width: 6%; }
.table--manifestacoes .col-etapa{ width: 9%; text-align: left; }
.table--manifestacoes td[data-col="etapa"]{ text-align: left; }
.table--manifestacoes td[data-col="etapa"] .link-style{ text-align: left; }
.table--manifestacoes .col-telefone{ width: 9%; }
.table--manifestacoes .col-unidade{ width: 7%; }
.table--manifestacoes .col-relato{ width: 11%; }
.table--manifestacoes .col-acoes{ width: 142px; min-width: 142px; text-align: right; }
/* Cabeçalho arrastável (reordenar colunas na grid) */
.table--manifestacoes th[data-col]:not([data-col="acoes"]){ cursor: grab; }
.table--manifestacoes th[data-col]:not([data-col="acoes"]):active{ cursor: grabbing; }
.table--manifestacoes th.col-drag-over{ outline: 2px solid hsl(var(--primary)); outline-offset: -2px; }
.table--manifestacoes th.col-dragging{ opacity: 0.7; }
/* Cabeçalho com seta de ordenação */
.table--manifestacoes .th-sort{
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: inherit;
  text-decoration: none;
  white-space: nowrap;
}
.table--manifestacoes .th-sort:hover{ color: hsl(var(--primary)); }
.table--manifestacoes .th-sort-arrow{
  font-size: 10px;
  opacity: .9;
  color: hsl(var(--primary));
}
.table--manifestacoes td{
  overflow: hidden;
  text-overflow: ellipsis;
}
.table--manifestacoes .td-name,
.table--manifestacoes .td-actions{ overflow: visible; }
.table--manifestacoes .td-protocolo{ white-space: nowrap; }
.table--manifestacoes .td-sla,
.table--manifestacoes .td-date,
.table--manifestacoes .td-fluxo,
.table--manifestacoes .td-telefone,
.table--manifestacoes .td-date{ white-space: nowrap; }

/* Página de listagem: não expande (overflow está em page__inner para não quebrar sticky da coluna Ações) */
.cadastros-page{ min-width: 0; max-width: 100%; }

/* Container da grid: tamanho fixo (nunca cresce). Sem overflow: hidden aqui para não quebrar sticky da coluna Ações. */
.table-card.table-card--manifestacoes{
  width: 100%;
  max-width: 100%;
  min-width: 0;
}
/* Área rolável: espaço à direita para os 3 ícones de Ações sempre visíveis */
.table-card .table-wrap--scroll-acoes-fixo{
  overflow-x: auto;
  overflow-y: visible;
  -webkit-overflow-scrolling: touch;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  display: block;
  position: relative;
  padding-right: 20px;
  box-sizing: border-box;
}
/* Tabela: width 100% do wrapper; min-width (via JS) faz o conteúdo ultrapassar → scroll aparece sem alterar tamanho do container */
.table-wrap--scroll-acoes-fixo .table--manifestacoes{
  width: 100%;
}
/* Coluna Ações travada à direita; largura fixa em px para os 3 ícones aparecerem sem rolar */
.table-wrap--scroll-acoes-fixo .table--manifestacoes th.col-acoes,
.table-wrap--scroll-acoes-fixo .table--manifestacoes td.td-actions{
  position: sticky !important;
  right: 0 !important;
  z-index: 3;
  width: 142px !important;
  min-width: 142px !important;
  max-width: 142px !important;
  box-sizing: border-box;
  background: hsl(var(--card)) !important;
  box-shadow: -6px 0 10px -4px rgba(0,0,0,.12);
  vertical-align: middle;
  display: table-cell !important;
  text-align: right;
  padding-left: 6px;
  padding-right: 6px;
}
.table-wrap--scroll-acoes-fixo .table--manifestacoes td.td-actions .td-actions__inner{
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  flex-wrap: nowrap;
  white-space: nowrap;
  margin-left: auto;
  width: 100%;
  box-sizing: border-box;
}
/* fallback: .table .td-actions genérico não deve sobrescrever display no contexto sticky */
.table--manifestacoes .td-actions .inline-form{
  display: inline-flex;
  margin: 0;
  padding: 0;
}
.table-wrap--scroll-acoes-fixo .table--manifestacoes thead th.col-acoes{
  box-shadow: -6px 0 10px -4px rgba(0,0,0,.12);
}
/* Dropdown aberto: célula sobe no z-index para o menu ficar na frente da coluna sticky */
.table-wrap--scroll-acoes-fixo .table--manifestacoes td.td-actions:has(.actions-more.has-dropdown-open){
  z-index: 50;
}

/* =========================================================
   Botão "+" (Mais ações) — LAYOUT UNIFICADO em todas as grids
   - Manifestações (tabela)
   - Pesquisas / Respostas (tabela)
   - Kanban (cards Respondido pela Área)
   ========================================================= */
.actions-more,
.kanban-card__actions-more {
  position: relative;
}
.actions-more .icon-btn--more,
.kanban-card__actions-more .icon-btn--more,
.kanban-card__actions-more .kanban-card__more {
  color: hsl(var(--muted-foreground));
}
.actions-more .icon-btn--more:hover,
.kanban-card__actions-more .icon-btn--more:hover,
.kanban-card__actions-more .kanban-card__more:hover {
  background: hsl(var(--muted) / .5);
  color: hsl(var(--foreground));
}
.actions-more .icon-btn--more svg,
.kanban-card__actions-more .icon-btn--more svg,
.kanban-card__actions-more .kanban-card__more svg {
  width: 16px;
  height: 16px;
}
.actions-more .actions-dropdown,
.kanban-card .kanban-card__dropdown.actions-dropdown,
.kanban-card__dropdown.actions-dropdown--open {
  min-width: 180px;
  padding: 6px 0;
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: 10px;
  box-shadow: 0 10px 28px hsl(var(--foreground) / .12);
  z-index: 9999;
  list-style: none;
}
.actions-more .actions-dropdown.actions-dropdown--open,
.kanban-card .kanban-card__dropdown.actions-dropdown.actions-dropdown--open {
  position: fixed;
}
.actions-more .actions-dropdown[hidden],
.kanban-card .kanban-card__dropdown[hidden],
.kanban-card__dropdown.actions-dropdown--open[hidden] {
  display: none !important;
}
.actions-more .actions-dropdown:not([hidden]),
.kanban-card .kanban-card__dropdown:not([hidden]) {
  display: block;
}
.actions-more .actions-dropdown__item,
.kanban-card .kanban-card__dropdown .actions-dropdown__item,
.kanban-card__dropdown.actions-dropdown--open .actions-dropdown__item {
  display: block;
  width: 100%;
  padding: 8px 14px;
  border: 0;
  background: none;
  font-family: Inter, "Segoe UI", system-ui, -apple-system, sans-serif;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.35;
  color: hsl(var(--foreground));
  text-align: left;
  cursor: pointer;
  white-space: nowrap;
  transition: background .12s ease;
}
.actions-more .actions-dropdown__item:hover,
.kanban-card .kanban-card__dropdown .actions-dropdown__item:hover,
.kanban-card__dropdown.actions-dropdown--open .actions-dropdown__item:hover {
  background: hsl(var(--muted) / .4);
}
.actions-more .actions-dropdown__item:focus,
.kanban-card .kanban-card__dropdown .actions-dropdown__item:focus,
.kanban-card__dropdown.actions-dropdown--open .actions-dropdown__item:focus {
  outline: none;
}
.actions-more .actions-dropdown__item:focus-visible,
.kanban-card .kanban-card__dropdown .actions-dropdown__item:focus-visible,
.kanban-card__dropdown.actions-dropdown--open .actions-dropdown__item:focus-visible {
  background: hsl(var(--muted) / .35);
}
.actions-more .actions-dropdown__item[href],
.kanban-card .actions-dropdown__item[href] {
  text-decoration: none;
  color: inherit;
  box-sizing: border-box;
}

/* Colunas ocultas pelo seletor (usuário escolhe o que mostrar na grid) */
.table--manifestacoes.col-hidden-data [data-col="data"],
.table--manifestacoes.col-hidden-protocolo [data-col="protocolo"],
.table--manifestacoes.col-hidden-paciente [data-col="paciente"],
.table--manifestacoes.col-hidden-setor [data-col="setor"],
.table--manifestacoes.col-hidden-motivo [data-col="motivo"],
.table--manifestacoes.col-hidden-gravidade [data-col="gravidade"],
.table--manifestacoes.col-hidden-sla [data-col="sla"],
.table--manifestacoes.col-hidden-fluxo [data-col="fluxo"],
.table--manifestacoes.col-hidden-status [data-col="status"],
.table--manifestacoes.col-hidden-origem [data-col="origem"],
.table--manifestacoes.col-hidden-tipo [data-col="tipo"],
.table--manifestacoes.col-hidden-etapa [data-col="etapa"],
.table--manifestacoes.col-hidden-telefone [data-col="telefone"],
.table--manifestacoes.col-hidden-unidade [data-col="unidade"],
.table--manifestacoes.col-hidden-relato [data-col="relato"]{
  display: none !important;
}

/* =========================================================
   Icon buttons + Tooltips + Coluna Ações (consolidado)
   - Corrige ícone do botão Filtros
   - Refina view/edit/danger (melhor contraste no light/dark)
   - Estado disabled real (visual + interação)
   - Tooltip padrão (CSS puro)
   ========================================================= */

/* ===== FIX: ícone do botão Filtros (search-row) ===== */
.search-row [data-toggle-filtros],
.search-row .btn-filtros,
.search-row #btnMaisFiltros,
.search-row #btnMaisFiltrosPlanos,
.search-row #btnMaisFiltrosVisitas,
.search-row #btnMaisFiltrosRespostas,
.search-row #btnMaisFiltrosPesquisas,
.search-row #btnMaisFiltrosWmty,
.search-row #btnMaisFiltrosElogios,
.search-row #btnMaisFiltrosUsuarios,
.search-row #btnMaisFiltrosKanban,
.search-row #btnMaisFiltrosPesagens,
.search-row #btnMaisFiltrosProcessos,
.search-row #btnMaisFiltrosControleProdutos {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.search-row [data-toggle-filtros] svg,
.search-row .btn-filtros svg,
.search-row #btnMaisFiltros svg,
.search-row #btnMaisFiltrosPlanos svg,
.search-row #btnMaisFiltrosVisitas svg,
.search-row #btnMaisFiltrosRespostas svg,
.search-row #btnMaisFiltrosPesquisas svg,
.search-row #btnMaisFiltrosWmty svg {
  width: 16px;
  height: 16px;
  color: hsl(var(--primary));
  opacity: 1;
  display: inline-block;
}

/* ===== Icon buttons — microinteractions ===== */
.icon-btn:hover{
  box-shadow: 0 6px 18px hsl(var(--foreground) / .06);
}

.icon-btn:active{
  transform: translateY(1px);
  box-shadow: none;
}

/* Melhor foco (acessível) */
.icon-btn:focus-visible{
  outline: 2px solid hsl(var(--ring));
  outline-offset: 2px;
}

/* ===== Semânticos (view/edit/delete) — Quali-like ===== */
.icon-btn--view:hover{
  background: hsl(var(--primary) / .12);
  border-color: hsl(var(--primary) / .45);
}

.icon-btn--edit:hover{
  background: hsl(var(--primary) / .10);
  border-color: hsl(var(--primary) / .45);
}

.icon-btn--danger:hover{
  background: hsl(var(--destructive) / .12);
  border-color: hsl(var(--destructive) / .45);
}

/* Dark: aumenta levemente contraste do hover (sem estourar) */
html.dark .icon-btn:hover{
  box-shadow: 0 10px 22px hsl(var(--foreground) / .10);
}
html.dark .icon-btn--view:hover{ background: hsl(var(--primary) / .16); }
html.dark .icon-btn--edit:hover{ background: hsl(var(--primary) / .14); }
html.dark .icon-btn--danger:hover{ background: hsl(var(--destructive) / .16); }

/* ===== Disabled (para <button disabled> ou .disabled) ===== */
.icon-btn:disabled,
.icon-btn.disabled{
  opacity: .55;
  cursor: not-allowed;
  pointer-events: none;
  box-shadow: none;
  transform: none;
}

/* ===== Tooltip padrão (CSS puro) — use data-tip no botão */
.icon-btn[data-tip]{ position: relative; }
.icon-btn[data-tip]::after{
  content: attr(data-tip);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 10px);
  transform: translateX(-50%);
  white-space: nowrap;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 10px;
  background: hsl(var(--foreground));
  color: hsl(var(--background));
  opacity: 0;
  pointer-events: none;
  transition: opacity .12s ease, transform .12s ease;
  box-shadow: 0 10px 24px hsl(var(--foreground) / .18);
  z-index: 30;
}

.icon-btn[data-tip]::before{
  content: "";
  position: absolute;
  left: 50%;
  bottom: calc(100% + 4px);
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: hsl(var(--foreground));
  opacity: 0;
  transition: opacity .12s ease, transform .12s ease;
  z-index: 29;
}

.icon-btn[data-tip]:hover::after,
.icon-btn[data-tip]:hover::before{
  opacity: 1;
}
.icon-btn[data-tip]:hover::after,
.icon-btn[data-tip]:hover::before{
  transform: translateX(-50%) translateY(-2px);
}

@media (prefers-reduced-motion: reduce){
  .icon-btn[data-tip]::after,
  .icon-btn[data-tip]::before{
    transition: none;
  }
}
/* ===== Alinhamento de ícones na coluna Ações ===== */

/* garante que a coluna de ações não “quebre” e alinha ao centro da linha */
.table .td-actions /* centraliza o SVG de verdade (evita “puxar” pra cima/baixo) */
/* o form do delete vira inline-flex (não cria baseline estranho) */

/* 1) Tabela: garante que todas as células alinhem no meio */
.table td,
.table th{
  vertical-align: middle !important;
}

/* 2) Coluna Ações: vira um “dock” horizontal, centralizado */
.table .td-actions /* 5) SVG: block evita “puxar” pra cima/baixo */
.table .td-actions button{
  font-size: 0 !important; /* impede espaço fantasma */
}
.table .td-actions button svg{
  font-size: 16px !important; /* só o svg “vale” */
}

/* =========================================================
   ICONES MINI (28x28) — padrão solicitado
   - sem borda
   - hover suave (token-based)
   - alinhamento perfeito com <form> no meio
   ========================================================= */

/* Coluna ações: dock horizontal (vertical-align já definido acima) */
.table .td-actions{
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  white-space: nowrap;
  line-height: 1;
}

.table .td-actions .inline-form{
  display: inline-flex;
  align-items: center;
  margin: 0;
  padding: 0;
}

/* Botões mini */
.icon-btn{
  width: 28px;
  height: 28px;
  border: 0;
  background: transparent;
  border-radius: 10px;
  padding: 0;
  line-height: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;

  color: hsl(var(--muted-foreground));
  transition: background .16s ease, color .16s ease, transform .06s ease;
}

.icon-btn svg{
  width: 16px;
  height: 16px;
  display: block;
}

.icon-btn:hover{
  background: hsl(var(--muted) / .45);
  color: hsl(var(--foreground));
}

.icon-btn:active{ transform: translateY(1px); }

.icon-btn:focus-visible{
  outline: 2px solid hsl(var(--ring));
  outline-offset: 2px;
}

/* Semânticos */
.icon-btn--view{ color: hsl(var(--primary)); }
.icon-btn--view:hover{ background: hsl(var(--primary) / .12); }

.icon-btn--edit{ color: hsl(var(--primary)); }
.icon-btn--edit:hover{ background: hsl(var(--primary) / .10); }

.icon-btn--danger{ color: hsl(var(--destructive)); }
.icon-btn--danger:hover{ background: hsl(var(--destructive) / .10); }

/* Disabled */
.icon-btn:disabled,
.icon-btn.disabled{
  opacity: .55;
  cursor: not-allowed;
  pointer-events: none;
  transform: none;
}

/* =========================================================
   FIX — linha da tabela contínua + ícones com cor correta
   ========================================================= */

/* 1) Grade: desenha a linha no TR, não nos TD (não quebra no flex) */
.table tbody tr{
  border-bottom: 1px solid hsl(var(--border));
}

.table tbody td{
  border-bottom: 0 !important; /* neutraliza bordas antigas nos td */
}

/* 2) Ações: mantém dock alinhado sem “puxar” a linha */
.table .td-actions{
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
  white-space: nowrap;
}

/* 3) SVG: força usar currentColor (corrige ícones pretos) */
.table .td-actions .icon-btn svg{
  fill: currentColor !important;
  stroke: currentColor !important;
}

/* 4) Cores por ação (Quali-like) */
.table .td-actions .icon-btn--view{  color: hsl(var(--accent)) !important; }
.table .td-actions .icon-btn--edit{  color: hsl(var(--primary)) !important; }
.table .td-actions .icon-btn--danger{color: hsl(var(--destructive)) !important; }

/* Hover suave mantendo a cor */
.table .td-actions .icon-btn--view:hover{   background: hsl(var(--accent) / .10); }
.table .td-actions .icon-btn--edit:hover{   background: hsl(var(--primary) / .10); }
.table .td-actions .icon-btn--danger:hover{ background: hsl(var(--destructive) / .10); }
/* =========================
   Select-like dropdown (autocomplete)
   ========================= */

   .dropdown{
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 6px);
    z-index: 9999;
  
    border: 1px solid var(--border, rgba(0,0,0,.12));
    background: var(--panel, #fff);
    border-radius: 12px;
    box-shadow: 0 18px 50px rgba(0,0,0,.12);
    overflow: hidden;
  }
  
  .dropdown__list{
    max-height: 260px;
    overflow: auto;
  }
  
  .dropdown-item{
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 10px 12px;
    cursor: pointer;
    user-select: none;
  }
  
  .dropdown-item + .dropdown-item{
    border-top: 1px solid var(--border-subtle, rgba(0,0,0,.06));
  }
  
  .dropdown-item:hover{
    background: rgba(0,0,0,.04);
  }
  
  .dropdown-item.is-active{
    background: rgba(0,0,0,.06);
  }
  
  .dd__main{
    flex: 1;
    min-width: 0;
  }
  
  .dd__title{
    font-weight: 600;
    line-height: 1.15;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  
  .dd__meta{
    margin-top: 3px;
    font-size: 12px;
    opacity: .75;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
  }
  
  .dd__badge{
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 999px;
    border: 1px solid var(--border-subtle, rgba(0,0,0,.12));
    opacity: .9;
  }
  
  .dropdown-item.is-empty,
  .dropdown-item.is-loading{
    cursor: default;
    opacity: .7;
  }
  
  /* opcional: campo com botão limpar (se você quiser) */
  .input-wrap{
    position: relative;
  }
  .input-clear{
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 26px;
    height: 26px;
    border-radius: 999px;
    border: 1px solid var(--border-subtle, rgba(0,0,0,.12));
    background: transparent;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: .7;
  }
  .input-clear:hover{ opacity: 1; }
  .input-wrap.has-value .input-clear{ display: flex; }
  /* =========================
   Chips multi-select
   ========================= */
.chips{
  border: 1px solid var(--border, rgba(0,0,0,.12));
  border-radius: 12px;
  background: var(--panel, #fff);
  padding: 10px;
}

.chips__selected{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 34px;
  align-items: center;
  margin-bottom: 10px;
}

.chip{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--border-subtle, rgba(0,0,0,.12));
  background: rgba(0,0,0,.03);
  font-weight: 600;
  font-size: 12px;
}

.chip__x{
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 1px solid var(--border-subtle, rgba(0,0,0,.12));
  background: transparent;
  cursor: pointer;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: .8;
}
.chip__x:hover{ opacity: 1; }

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

.chips__input{
  flex: 1;
  border: 1px solid var(--border-subtle, rgba(0,0,0,.12));
  border-radius: 10px;
  padding: 10px 12px;
  background: transparent;
  outline: none;
}

.chips__btn{
  width: 42px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid var(--border-subtle, rgba(0,0,0,.12));
  background: transparent;
  cursor: pointer;
  opacity: .85;
}
.chips__btn:hover{ opacity: 1; }

.chips__dropdown{
  margin-top: 8px;
  border: 1px solid var(--border-subtle, rgba(0,0,0,.12));
  border-radius: 12px;
  overflow: hidden;
  max-height: 260px;
  overflow-y: auto;
  background: var(--panel, #fff);
}

.chips__item{
  padding: 10px 12px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  gap: 10px;
}
.chips__item:hover{ background: rgba(0,0,0,.04); }

.chips__item.is-selected{
  opacity: .55;
}

.chips__empty{
  padding: 10px 12px;
  opacity: .7;
  cursor: default;
}
/* chips em formato de linha (mais compacto) */
.chips--row{
  padding: 10px 10px 8px 10px;
}
.chips--row .chips__selected{
  margin-bottom: 8px;
}
.chips--row .chip{
  padding: 5px 10px;
}
/* Planos: chips dentro do próprio campo (como tag input) */
.chips-responsaveis-planos{
  position: relative;
  min-width: 0;
}
.chips-responsaveis-planos .chips-resp-trigger{
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  min-height: 38px;
  padding: 6px 8px 6px 10px;
  border: 1px solid hsl(var(--border));
  border-radius: 6px;
  background: var(--input-bg, #fff);
}
.chips-responsaveis-planos .chips-resp-selected{
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.chips-responsaveis-planos .chips-resp-selected.is-empty::before{
  content: attr(data-placeholder);
  color: hsl(var(--muted-foreground));
  font-size: 0.9rem;
}
.chips-responsaveis-planos .chips-resp-search{
  flex: 1;
  min-width: 120px;
  border: none;
  padding: 4px 0;
  background: transparent;
  outline: none;
}
.chips-responsaveis-planos .chips-resp-toggle{
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: hsl(var(--muted-foreground));
}
/* Planos: layout Ação em 2 linhas (novo + editar) */
.novo-plano-acao-row,
.editar-acao-row {
  margin-bottom: 1.25rem;
  padding: 1rem 1.25rem;
  background: hsl(var(--muted) / 0.08);
  border: 1px solid hsl(var(--border));
  border-radius: 8px;
}
.novo-plano-acao-row:last-of-type,
.editar-acao-row:last-of-type { margin-bottom: 0; }
/* Indicadores visuais: borda lateral por situação */
.novo-plano-acao-row.acao-situacao--atrasado,
.editar-acao-row.acao-situacao--atrasado { border-left: 4px solid hsl(var(--destructive)); }
.novo-plano-acao-row.acao-situacao--no_prazo,
.editar-acao-row.acao-situacao--no_prazo { border-left: 4px solid hsl(var(--success)); }
.novo-plano-acao-row.acao-situacao--repactuado,
.editar-acao-row.acao-situacao--repactuado { border-left: 4px solid hsl(var(--warning)); }
.novo-plano-acao-row.acao-situacao--concluido,
.editar-acao-row.acao-situacao--concluido { border-left: 4px solid hsl(var(--success) / 0.6); }
/* Tabela ver plano: indicadores nas linhas */
.table--planos-modulo tr.acao-situacao--atrasado { border-left: 4px solid hsl(var(--destructive)); }
.table--planos-modulo tr.acao-situacao--no_prazo { border-left: 4px solid hsl(var(--success)); }
.table--planos-modulo tr.acao-situacao--repactuado { border-left: 4px solid hsl(var(--warning)); }
.table--planos-modulo tr.acao-situacao--concluido { border-left: 4px solid hsl(var(--success) / 0.6); }
.novo-plano-acao-row .acao-desc-block,
.editar-acao-row .acao-desc-block { margin-bottom: 0.75rem; }
/* Responsáveis e Data na mesma linha, Data alinhado ao topo */
.novo-plano-acao-row .acao-meta-row,
.editar-acao-row .acao-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: flex-start;
}
.novo-plano-acao-row .acao-responsaveis,
.editar-acao-row .acao-responsaveis {
  flex: 1 1 280px;
  min-width: 280px;
  max-width: none;
}
.novo-plano-acao-row .acao-data,
.editar-acao-row .acao-data {
  flex: 0 0 auto;
}
.novo-plano-acao-row .acao-responsaveis .label,
.novo-plano-acao-row .acao-data .label,
.editar-acao-row .acao-responsaveis .label,
.editar-acao-row .acao-data .label,
.editar-acao-row .acao-status .label { display: block; margin-bottom: 0.35rem; font-size: 0.9rem; }
.editar-acao-row .acao-status { flex: 0 0 auto; }
.editar-acao-row .acao-status-wrap .input { min-width: 130px; }
/* Excluir no canto superior direito, ao lado do label Ação */
.novo-plano-acao-row .acao-header,
.editar-acao-row .acao-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}
.novo-plano-acao-row .acao-header .label,
.editar-acao-row .acao-header .label { margin-bottom: 0; }
.novo-plano-acao-row .acao-remove,
.editar-acao-row .acao-remove {
  flex-shrink: 0;
  margin-left: auto;
}

.chips-responsaveis-planos .chips-resp-trigger{ position: relative; }

.chips-responsaveis-planos .chips-resp-dropdown{
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 100;
  max-height: 280px;
  overflow-y: auto;
  margin-top: 4px;
  border: 1px solid hsl(var(--border));
  border-radius: 6px;
  background: var(--panel, #fff);
  box-shadow: 0 4px 12px rgba(0,0,0,.1);
}
.chips-responsaveis-planos .chips-resp-group{
  padding: 6px 0;
  border-bottom: 1px solid hsl(var(--border) / 0.5);
}
.chips-responsaveis-planos .chips-resp-group:last-child{ border-bottom: none; }
.chips-responsaveis-planos .chips-resp-group-header{
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 12px 6px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: hsl(var(--muted-foreground));
}
.chips-responsaveis-planos .chips-resp-group-all{
  font-size: 11px;
  padding: 2px 8px;
}
/* =========================
   LOGIN (Argus Experience — padrão Quali)
   ========================= */

html:has(body.login-body){
  overflow-x: clip;
}

   .login-body{
    min-height: 100vh;
    min-height: 100dvh;
    margin: 0;
    font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
    display: flex;
    flex-direction: column;
    background: #5A96FF;
    height: 100dvh;
    overflow: hidden;
    position: relative;
    -webkit-font-smoothing: antialiased;
  }

  /* FUNDO */
  .login-bg{ position:absolute; inset:0; pointer-events:none; z-index:0; }
  .login-bg__grad{
    position:absolute; inset:0;
    background:
      linear-gradient(to bottom, rgba(28, 58, 102, 0.55), rgba(15, 38, 70, 0.68), rgba(90, 150, 255, 0.95)),
      radial-gradient(ellipse 80% 60% at 0% 0%, rgba(31, 209, 195, 0.22), transparent 50%),
      radial-gradient(ellipse 70% 50% at 100% 100%, rgba(255, 180, 100, 0.12), transparent 45%);
  }
  .login-bg__noise{
    position:absolute; inset:0;
    opacity: .04;
    mix-blend-mode: soft-light;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
    background-size: 200px 200px;
  }
  .login-bg__orbit{
    position:absolute;
    width: min(120vmin, 900px);
    height: min(120vmin, 900px);
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.06);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
  }
  .login-bg__orbit::before{
    content: '';
    position: absolute;
    inset: 12%;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.04);
  }
  .login-bg__top{
    position:absolute; top:0; left:50%;
    transform: translateX(-50%);
    height: 60vh; width: min(120vmin, 1200px);
    border-bottom-left-radius: 50%;
    border-bottom-right-radius: 50%;
    background: rgba(83,176,255,.15);
    filter: blur(80px);
  }
  .login-bg__mid{
    position:absolute; top:0; left:50%;
    transform: translateX(-50%);
    height: 60vh; width: min(100vmin, 980px);
    border-radius: 999px;
    background: rgba(31,209,195,.20);
    filter: blur(60px);
    animation: loginFloat 9s ease-in-out infinite;
  }
  .login-bg__bot{
    position:absolute; bottom:0; left:50%;
    transform: translateX(-50%);
    height: 90vh; width: min(90vmin, 980px);
    border-top-left-radius: 999px;
    border-top-right-radius: 999px;
    background: rgba(15,38,70,.40);
    filter: blur(60px);
    animation: loginFloat2 11s ease-in-out infinite;
  }
  .login-bg__l{
    position:absolute; left: 18%; top: 22%;
    width: 380px; height: 380px;
    max-width: 50vw; max-height: 50vh;
    border-radius: 999px;
    background: rgba(99,255,208,.10);
    filter: blur(120px);
    opacity: .55;
    animation: loginPulse 5.5s ease-in-out infinite;
  }
  .login-bg__r{
    position:absolute; right: 18%; bottom: 18%;
    width: 380px; height: 380px;
    max-width: 50vw; max-height: 50vh;
    border-radius: 999px;
    background: rgba(255,122,89,.10);
    filter: blur(120px);
    opacity: .55;
    animation: loginPulse 6.5s ease-in-out infinite;
  }
  
  @keyframes loginFloat{
    0%,100%{ transform: translateX(-50%) scale(1.00); opacity: .28; }
    50%{ transform: translateX(-50%) scale(1.03); opacity: .36; }
  }
  @keyframes loginFloat2{
    0%,100%{ transform: translateX(-50%) scale(1.00); opacity: .30; }
    50%{ transform: translateX(-50%) scale(1.06); opacity: .45; }
  }
  @keyframes loginPulse{
    0%,100%{ transform: scale(1); opacity: .45; }
    50%{ transform: scale(1.06); opacity: .62; }
  }
  
  /* WRAP */
  .login-wrap{
    width: 100%;
    flex: 1;
    padding: clamp(20px, 4vw, 48px) 18px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
  }

  .login-grid{
    width: min(440px, 100%);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr;
    justify-items: center;
    align-items: center;
  }

  .login-svg{
    width: 18px;
    height: 18px;
    display: block;
    fill: none;
    stroke: currentColor;
    color: inherit;
  }

  .login-svg--muted{
    color: rgba(10, 18, 34, 0.55);
  }

  /* CARD */
  .login-card{
    position: relative;
    width: 100%;
    max-width: 440px;
    margin: 0 auto;
    background: rgba(0, 0, 0, 0.38);
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 20px;
    box-shadow:
      0 18px 45px rgba(0, 0, 0, 0.28),
      0 0 0 1px rgba(255, 255, 255, 0.04) inset;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    overflow: clip;
    color: rgba(255, 255, 255, 0.92);
  }

  @media (max-width: 768px){
    .login-mast__logo{
      width: 128px;
      height: 128px;
      margin: -8px 0 -28px;
    }
  }

  @media (max-height: 820px){
    .login-body{
      height: auto;
      min-height: 100dvh;
      overflow-x: hidden;
      overflow-y: auto;
    }
  }

  .login-card__glow{
    position: absolute;
    inset: -1px;
    border-radius: 21px;
    pointer-events: none;
    opacity: 0.9;
    z-index: 0;
    background: conic-gradient(
      from 0deg,
      transparent 0%,
      rgba(255, 255, 255, 0) 10%,
      rgba(83, 176, 255, 0.75) 18%,
      rgba(255, 255, 255, 0) 26%,
      transparent 40%,
      rgba(31, 209, 195, 0.65) 52%,
      rgba(255, 255, 255, 0) 60%,
      transparent 100%
    );
    padding: 1px;
    animation: loginRing 3.2s linear infinite;
    -webkit-mask:
      linear-gradient(#000 0 0) content-box,
      linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask:
      linear-gradient(#000 0 0) content-box,
      linear-gradient(#000 0 0);
    mask-composite: exclude;
  }

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

  .login-card__head,
  .login-card__body{
    position: relative;
    z-index: 1;
  }

  .login-card__head{
    padding: 12px 28px 14px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    background: linear-gradient(
      180deg,
      rgba(83, 176, 255, 0.14) 0%,
      rgba(0, 0, 0, 0.06) 100%
    );
  }

  .login-card__body{
    padding: 24px 28px 28px;
    background: rgba(0, 0, 0, 0.22);
  }

  .login-mast{
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
  }

  .login-mast__logo{
    width: 196px;
    height: 196px;
    margin: -18px 0 -48px;
    object-fit: contain;
    display: block;
    filter: drop-shadow(0 8px 22px rgba(0, 0, 0, 0.36));
  }
  .login-card--in-modal .login-mast__logo{
    width: 96px;
    height: 96px;
  }

  .login-mast__copy{
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    max-width: 100%;
  }

  .login-mast__brand{
    display: block;
    margin: 0;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    background: linear-gradient(90deg, #7ec8e8 0%, #53b0ff 45%, #1fd1c3 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
  }

  .login-mast__title{
    margin: 2px 0 0;
    font-size: clamp(1.5rem, 4vw, 1.75rem);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.03em;
    color: rgba(255, 255, 255, 0.98);
  }

  .login-mast__lead{
    margin: 0;
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.45;
    color: rgba(255, 255, 255, 0.58);
    max-width: 28ch;
  }

  .login-alert{
    margin: 0 0 16px;
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(254, 242, 242, 0.95);
    border: 1px solid #fecaca;
    color: #991b1b;
    font-size: 0.875rem;
  }
  .modal .login-alert{
    background: hsl(var(--muted) / 0.4);
    border-color: hsl(var(--border));
    color: hsl(var(--foreground));
  }
  .login-alert--success{
    background: #f0fdf4;
    border-color: #bbf7d0;
    color: #166534;
  }
  .login-alert--danger,
  .modal .login-alert--danger{
    background: #fef2f2;
    border-color: #fecaca;
    color: #991b1b;
    font-weight: 600;
  }

  /* FORM */
  .login-form{ display: grid; gap: 0; }
  .login-form[hidden]{ display: none !important; }

  .login-field-group{
    margin-bottom: 14px;
  }

  .login-label{
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.72);
    margin-bottom: 6px;
  }

  /* INPUT (creme suave — evita amarelo saturado) */
  .login-field{
    display: flex;
    align-items: stretch;
    min-height: 44px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(250, 248, 242, 0.96);
    overflow: hidden;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.14);
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.15s;
    color: rgba(10, 18, 34, 0.92);
  }

  .login-field:hover{
    border-color: rgba(255, 255, 255, 0.28);
    transform: translateY(-1px);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.18);
  }

  .login-field:focus-within{
    border-color: rgba(83, 176, 255, 0.85);
    box-shadow:
      0 8px 22px rgba(0, 0, 0, 0.18),
      0 0 0 3px rgba(83, 176, 255, 0.28);
    transform: translateY(-1px);
  }

  .login-field__icon{
    flex: 0 0 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(228, 223, 210, 0.42);
    border-right: 1px solid rgba(10, 18, 34, 0.08);
    color: rgba(10, 18, 34, 0.50);
  }

  .login-input{
    flex: 1;
    min-width: 0;
    border: 0;
    outline: none;
    background: transparent;
    color: rgba(10, 18, 34, 0.92);
    font-size: 0.875rem;
    padding: 9px 12px;
    font-family: inherit;
    font-weight: 400;
  }
  .login-input::placeholder{ color: rgba(10, 18, 34, 0.42); }
  .login-input--code{
    letter-spacing: 0.28em;
    font-weight: 700;
    font-size: 1.05rem;
    text-align: center;
  }

  .login-row .login-link{
    border: 0;
    background: transparent;
    padding: 0;
    cursor: pointer;
    font-family: inherit;
  }

  .login-pass-toggle{
    flex: 0 0 42px;
    border: 0;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(10, 18, 34, 0.50);
    transition: background 0.15s, color 0.15s;
  }
  .login-pass-toggle:hover{
    background: rgba(10, 18, 34, 0.06);
    color: rgba(10, 18, 34, 0.75);
  }

  .login-row{
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin: 4px 0 22px;
  }

  .login-check{
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.72);
    user-select: none;
    cursor: pointer;
  }
  .login-check input{
    width: 18px;
    height: 18px;
    accent-color: #1fd1c3;
    cursor: pointer;
  }

  .login-link{
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.88);
    text-decoration: none;
    font-weight: 500;
  }
  .login-link:hover{ text-decoration: underline; }
  .login-link.is-disabled{
    opacity: .55;
    pointer-events: none;
    text-decoration: none;
  }

  /* BOTÃO */
  .login-btn{
    width: 100%;
    height: 46px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.96);
    color: rgba(10, 18, 34, 0.95);
    font-weight: 700;
    font-size: 0.9rem;
    letter-spacing: 0.02em;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.22);
    transition: transform 0.15s ease, box-shadow 0.2s;
    font-family: inherit;
  }

  .login-btn:hover{
    transform: translateY(-1px);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.28);
  }
  .login-btn:active{ transform: translateY(0); }

  .login-btn__arrow{
    width: 14px;
    height: 14px;
    color: rgba(10, 18, 34, 0.75);
    transition: transform 0.25s ease;
  }
  .login-btn:hover .login-btn__arrow{ transform: translateX(3px); }

  .login-btn__shine{
    position: absolute;
    inset: -40% -60%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.65), transparent);
    transform: translateX(-40%) rotate(12deg);
    opacity: 0;
    pointer-events: none;
  }
  .login-btn:hover .login-btn__shine{
    opacity: 1;
    animation: loginShine 1s ease forwards;
  }
  @keyframes loginShine{
    to{ transform: translateX(65%) rotate(12deg); opacity: 0; }
  }

  .login-btn--inline{
    width: auto;
    min-width: 148px;
    padding: 0 20px;
  }

  .login-row--actions{
    margin-top: 8px;
    margin-bottom: 0;
  }

  @media (max-width: 480px){
    .login-row--actions{
      flex-direction: column-reverse;
      align-items: stretch;
      gap: 12px;
    }
    .login-btn--inline{ width: 100%; }
  }

  .login-field select.login-input{
    cursor: pointer;
    padding-right: 2rem;
  }

  .login-page-foot{
    margin: 20px 0 0;
    padding: 0 16px 8px;
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.50);
    text-align: center;
    letter-spacing: 0.04em;
  }
  
  /* HERO */
  .login-hero{
    display: none;
    color: rgba(255, 255, 255, 0.95);
    padding: 8px 8px 8px 0;
  }
  @media (min-width: 1024px){
    .login-hero{ display: block; }
  }

  .login-hero__badge{
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.55);
    margin-bottom: 20px;
  }
  .login-hero__badge span{
    width: 28px;
    height: 1px;
    background: linear-gradient(90deg, #1fd1c3, transparent);
  }

  .login-hero h2{
    margin: 0;
    font-size: clamp(1.75rem, 3vw, 2.35rem);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
  }
  .login-hero h2 em{
    font-style: normal;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.88);
  }
  .login-hero p{
    margin: 16px 0 0;
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.62);
    max-width: 36ch;
    font-weight: 400;
  }

  .login-features{
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 32px;
    max-width: 640px;
  }

  .login-feature{
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 14px;
    padding: 14px;
    display: grid;
    grid-template-columns: 40px 1fr;
    gap: 12px;
    align-items: center;
    backdrop-filter: blur(10px);
    transition: background 0.2s, border-color 0.2s;
  }
  .login-feature:hover{
    background: rgba(255, 255, 255, 0.09);
    border-color: rgba(255, 255, 255, 0.16);
  }

  .login-feature__icon{
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.10);
    display: grid;
    place-items: center;
    color: #7ec8e8;
  }
  .login-feature:nth-child(1) .login-feature__icon{
    background: rgba(83, 176, 255, 0.22);
    color: #a8d4ff;
  }
  .login-feature:nth-child(2) .login-feature__icon{
    background: rgba(31, 209, 195, 0.20);
    color: #7ee8df;
  }
  .login-feature:nth-child(3) .login-feature__icon{
    background: rgba(255, 180, 100, 0.20);
    color: #ffc9a0;
  }
  .login-feature:nth-child(4) .login-feature__icon{
    background: rgba(167, 139, 250, 0.20);
    color: #c4b5fd;
  }
  .login-feature__icon .login-svg{ width: 18px; height: 18px; }

  .login-feature__title{
    font-weight: 600;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.92);
  }
  .login-feature__sub{
    margin-top: 3px;
    font-size: 0.78rem;
    line-height: 1.4;
    color: rgba(255, 255, 255, 0.58);
  }

  .login-trust{
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 28px 0 0;
    padding: 0;
    list-style: none;
    max-width: 640px;
  }
  .login-trust li{
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.45);
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.04);
  }

/* Comunicado ARGUS Watch — após acesso ao sistema */
.argus-watch-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(10, 18, 34, 0.6);
  z-index: 9998;
  backdrop-filter: blur(6px);
  transition: opacity 0.25s ease;
}
.argus-watch-overlay.is-open { display: block; }
.argus-watch-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.argus-watch-modal.is-open { display: flex; }
.argus-watch-modal__dialog {
  position: relative;
  width: 100%;
  max-width: 440px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  border-radius: 20px;
  padding: 32px 28px 24px;
  box-shadow: 0 32px 64px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(0, 0, 0, 0.04);
  text-align: center;
  color: #0f172a;
}
.argus-watch-modal__close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  color: #64748b;
  cursor: pointer;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s;
}
.argus-watch-modal__close:hover {
  background: rgba(0, 0, 0, 0.06);
  color: #0f172a;
}
.argus-watch-modal__icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 16px;
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.35);
}
.argus-watch-modal__icon svg {
  width: 36px;
  height: 36px;
}
.argus-watch-modal__lead {
  margin: 0 0 4px;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #64748b;
}
.argus-watch-modal__title {
  margin: 0 0 12px;
  font-size: 26px;
  font-weight: var(--font-weight-strong);
  letter-spacing: -0.02em;
  color: #0f172a;
  line-height: 1.2;
}
.argus-watch-modal__desc {
  margin: 0 0 24px;
  font-size: 15px;
  line-height: 1.55;
  color: #475569;
}
.argus-watch-modal__actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 20px;
}
.argus-watch-modal__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: #fff;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.4);
  transition: transform 0.2s, box-shadow 0.2s;
}
.argus-watch-modal__cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.45);
  color: #fff;
}
.argus-watch-modal__btn {
  padding: 12px 22px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #475569;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.argus-watch-modal__btn:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #0f172a;
}
.argus-watch-modal__dismiss {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #64748b;
  cursor: pointer;
}
.argus-watch-modal__dismiss:hover { color: #475569; }
.argus-watch-modal__dismiss input { margin: 0; accent-color: #2563eb; }

/* ícones das features — cores definidas por nth-child acima */


/* =========================================================
   UI COMPONENTS — PADRÃO (sem duplicar por tela)
   - Select (mesmo “peso visual” do input)
   - Filters (grid responsivo)
   - Modal overlay (backdrop padrão)
   Observação: telas devem usar as classes abaixo SEM escopo por página.
   ========================================================= */

/* -------------------------
   SELECT (global)
   ------------------------- */
.select{
  width: 100%;
  height: 44px;                 /* igual .input */
  padding: 10px 38px 10px 12px; /* espaço para seta */
  border-radius: var(--r-sm);
  border: 1px solid hsl(var(--input));
  background: hsl(var(--card));
  color: hsl(var(--foreground));
  font: inherit;
  outline: none;
  transition: box-shadow .15s ease, border-color .15s ease, background .15s ease;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;

  /* seta (CSS puro) */
  background-image:
    linear-gradient(45deg, transparent 50%, hsl(var(--muted-foreground)) 50%),
    linear-gradient(135deg, hsl(var(--muted-foreground)) 50%, transparent 50%);
  background-position:
    calc(100% - 18px) 50%,
    calc(100% - 12px) 50%;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  cursor: pointer;
}

.select:hover{
  border-color: hsl(var(--border));
  background: hsl(var(--background));
}

.select:focus{
  border-color: hsl(var(--ring));
  box-shadow: 0 0 0 3px hsl(var(--ring) / 0.15);
}

.select:disabled{
  opacity: .65;
  cursor: not-allowed;
}

/* -------------------------
   FILTERS (global)
   Estrutura esperada:
   <form class="filters">
     <div class="filters__row">
       ... .field ...
       <div class="filters__actions"> ... </div>
     </div>
   </form>
   ------------------------- */
.filters{
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.filters__row{
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr auto;
  gap: 14px;
  align-items: end;
}

.filters__actions{
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
  padding-bottom: 2px;
}

@media (max-width: 980px){
  .filters__row{
    grid-template-columns: 1fr 1fr;
  }
  .filters__actions{
    grid-column: 1 / -1;
    justify-content: flex-start;
    padding-bottom: 0;
  }
}
@media (max-width: 640px) {
  .filters__row { grid-template-columns: 1fr; }
  .form-actions { flex-wrap: wrap; }
  .header-right { flex-wrap: wrap; }
}

/* -------------------------
   MODAL overlay (global)
   Observação: mantenha <div class="modal" id="modalUsuario">
   ------------------------- */
.modal{
  background: hsl(217 86% 5% / .55); /* Quali-like */
}

html.dark .modal{
  background: hsl(217 86% 5% / .70);
}

/* =========================================================
   MODAL (BEM aliases)
   Para evitar CSS “por tela”, o recomendado é
   padronizar o HTML usando .modal-dialog/.modal-head/.modal-body/.modal-footer.
   Se você já tem templates com modal__*, estes aliases mantêm compatibilidade.
   ========================================================= */

.modal__dialog{ 
  width: min(var(--modal-w), calc(100vw - 32px));
  border-radius: var(--modal-r);
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  box-shadow: 0 30px 90px rgba(0,0,0,.35);
  overflow: hidden;
}

.modal__head{
  padding: var(--modal-pad);
  border-bottom: 1px solid hsl(var(--border));
  display:flex;
  align-items:flex-start;
  justify-content: space-between;
  gap: 14px;
  background: hsl(var(--card));
}

.modal__body{
  padding: var(--modal-pad);
  background: hsl(var(--background));
}

.modal__footer{
  padding: var(--modal-pad);
  border-top: 1px solid hsl(var(--border));
  display:flex;
  justify-content: flex-end;
  gap: 10px;
  background: hsl(var(--background));
}

/* Título dentro do head (compat modal__title) */
.modal__title{
  display:flex;
  align-items:center;
  gap: 12px;
  min-width: 0;
}
/* =========================================================
   Modal WIDE (somente quando usar .modal--wide)
   - mais largo
   - menos alto (scroll no body)
   ========================================================= */
   .modal.modal--wide{
    align-items: flex-start;     /* não centraliza tanto */
    padding-top: 6vh;            /* respiro superior */
    padding-bottom: 3vh;
  }
  
  .modal.modal--wide .modal-dialog{
    width: min(1200px, calc(100vw - 32px)); /* mais largo */
    max-height: 88vh;                       /* menos alto */
    display: flex;
    flex-direction: column;
  }
  
  .modal.modal--wide .modal-body{
    flex: 1 1 auto;
    overflow-y: auto;          /* scroll só no conteúdo */
    padding-right: 12px;       /* evita “cortar” por causa da barra */
  }
  
  .modal.modal--wide .modal-head,
  .modal.modal--wide .modal-foot{
    flex: 0 0 auto;            /* header/footer fixos */
  }
  /* =========================================================
   Kanban (novo) – não altera componentes existentes
   ========================================================= */
.kanban-filters{
  display:grid;
  grid-template-columns: 1fr 220px auto;
  gap: 14px;
  align-items:end;
}
.kanban-filter--actions{
  display:flex;
  gap:10px;
  justify-content:flex-end;
}

.kanban-board{
  display: grid;
  grid-template-columns: repeat(5, minmax(272px, 1fr));
  gap: 12px;
  align-items: start;
  overflow-x: auto;
  padding-bottom: 8px;
}

.kanban-col{
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: 14px;
  overflow: hidden;
  height: 72vh;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.kanban-col__head{
  flex-shrink: 0;
  padding: 10px 12px;
  background: hsl(220, 55%, 28%); /* faixa azul igual anexo (pode trocar por token depois) */
  color: white;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.kanban-col__title{ font-weight: var(--font-weight-title); font-size: 13px; }
.kanban-col__count{
  background: rgba(255,255,255,.18);
  border: 1px solid rgba(255,255,255,.25);
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
}

.kanban-col__list{
  flex: 1;
  min-height: 0;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.kanban-empty{
  padding: 14px;
  color: hsl(var(--muted-foreground));
  text-align:center;
  border: 1px dashed hsl(var(--border));
  border-radius: 12px;
}

.kanban-card{
  background: hsl(var(--background));
  border: 1px solid hsl(var(--border));
  border-radius: 12px;
  padding: 10px;
  box-shadow: 0 8px 18px rgba(0,0,0,.06);
  display: flex;
  flex-direction: column;
  max-height: 220px;
  min-width: 0;
  overflow: hidden;
}

.kanban-card__scroll{
  overflow-y: auto;
  min-height: 0;
  flex: 1;
}

.kanban-card__top{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap: 10px;
}
.kanban-card__title{
  font-weight: var(--font-weight-strong);
  font-size: 13px;
  line-height: 1.2;
}
.kanban-card__id{ font-weight: 600; color: hsl(var(--muted-foreground)); }

/* Indicador de prazo (canto superior direito): verde = no prazo, vermelho = fora do prazo */
.kanban-card__prazo-indicator{
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.kanban-card__prazo-dot{
  width: 10px;
  height: 10px;
  border-radius: 50%;
  box-shadow: 0 0 0 1px hsl(var(--background));
}
.kanban-card__prazo-indicator--ok .kanban-card__prazo-dot{
  background: hsl(var(--success));
}
.kanban-card__prazo-indicator--atraso .kanban-card__prazo-dot{
  background: hsl(var(--destructive));
}

.kanban-card__icons{
  display: flex;
  gap: 6px;
  align-items: center;
  flex-shrink: 0;
}

.kanban-card__meta{
  margin-top: 8px;
  font-size: 12px;
  display:flex;
  flex-direction:column;
  gap: 4px;
}

.kanban-card__feedback-indicator{
  margin-top: 6px;
  font-size: 11px;
  color: hsl(var(--muted-foreground));
}
.kanban-card__feedback-badge{
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.kanban-card__feedback-icon{ width: 12px; height: 12px; }

.kanban-card__foot{
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  flex-shrink: 0;
  min-width: 0;
}

.kanban-card__delete-form{ display: inline; }
.kanban-card .icon-btn--delete{
  color: hsl(var(--destructive) / 0.9);
}
.kanban-card .icon-btn--delete:hover{
  background: hsl(var(--destructive) / 0.12);
}
.kanban-card .icon-btn--delete svg{ width: 14px; height: 14px; }
/* Seta "Enviar para responsável" no card (só em colunas de fluxo) */
.kanban-card .icon-btn--send{
  color: hsl(var(--primary));
}
.kanban-card .icon-btn--send:hover{
  background: hsl(var(--primary) / .12);
}
.kanban-card .icon-btn--send svg{
  width: 14px;
  height: 14px;
}
/* Ícone Ver resposta do gestor (só na coluna Respondido pela Área) */
.kanban-card .icon-btn--resposta,
.kanban-card .kanban-card__ver-resposta{
  color: hsl(var(--primary));
}
.kanban-card .icon-btn--resposta:hover,
.kanban-card .kanban-card__ver-resposta:hover{
  background: hsl(var(--primary) / .12);
}
.kanban-card .icon-btn--resposta svg,
.kanban-card .kanban-card__ver-resposta svg{
  width: 14px;
  height: 14px;
  fill: currentColor;
}
/* Kanban: dropdown usa estilos unificados acima (.actions-more / .kanban-card__actions-more) */
/* Drag and drop no Kanban */
.kanban-card.is-dragging{
  opacity: 0.6;
  cursor: grabbing;
}
.kanban-card[draggable="true"]{
  cursor: grab;
}
.kanban-col__list.is-drag-over{
  background: hsl(var(--primary) / 0.06);
  border-radius: var(--r-md);
  outline: 2px dashed hsl(var(--primary) / 0.4);
  outline-offset: 4px;
}
/* =========================================================
   Builder (No-code) – classes novas
   ========================================================= */
   .builder-summary{
    display:grid;
    grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
    gap: 14px;
    align-items:center;
  }
  .builder-summary__right{
    display:flex;
    justify-content:flex-end;
    gap:10px;
  }
  
  .builder-grid{
    display:grid;
    grid-template-columns: 1.05fr .95fr;
    gap: 12px;
  }
  
  .builder-head{
    display:flex;
    align-items:flex-end;
    justify-content:space-between;
    gap: 12px;
    margin-bottom: 10px;
  }
  .builder-title{
    font-weight: var(--font-weight-strong);
    letter-spacing: -0.02em;
  }
  
  .builder-list{
    display:flex;
    flex-direction:column;
    gap: 10px;
    max-height: 68vh;
    overflow:auto;
    padding-right: 6px;
  }
  
  .builder-q{
    border: 1px solid hsl(var(--border));
    border-radius: 14px;
    padding: 10px;
    background: hsl(var(--background));
  }
  .builder-q__top{
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
  }
  .builder-q__drag{
    cursor: grab;
    padding: 2px;
    color: hsl(var(--muted-foreground));
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .builder-q__drag .nav-svg{
    width: 18px;
    height: 18px;
  }
  .builder-q__drag:active{
    cursor: grabbing;
  }
  .builder-q.is-dragging{
    opacity: 0.5;
  }
  .builder-q.is-drag-over{
    outline: 2px dashed hsl(var(--primary));
    outline-offset: 2px;
  }
  .builder-q__title{
    font-weight: var(--font-weight-strong);
    font-size: 13px;
    line-height: 1.2;
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
    flex: 1;
    min-width: 0;
  }
  .builder-q__meta{
    margin-top: 8px;
    display:flex;
    gap: 8px;
    flex-wrap:wrap;
  }
  .builder-q__help{
    margin-top: 8px;
    font-size: 12px;
  }
  
  .builder-q__actions{
    display:flex;
    gap: 6px;
    align-items:center;
  }
  .inline-form{ display:inline; }
  
  .builder-preview{
    max-height: 68vh;
    overflow:auto;
    padding-right: 6px;
    display:flex;
    flex-direction:column;
    gap: 10px;
  }
  .prev-item{
    border: 1px solid hsl(var(--border));
    border-radius: 14px;
    padding: 10px;
    background: hsl(var(--background));
  }
  .prev-title{
    font-weight: 600;
    margin-bottom: 8px;
  }
  .prev-row{
    display:flex;
    gap: 6px;
    flex-wrap:wrap;
    align-items:center;
  }

  /* =========================================================
     Pesquisa – cabeçalho delimitado (OCR)
     Áreas fixas: logo | matriz | filial
   ========================================================= */
  .pesquisa-header{
    border: 1px solid hsl(var(--border));
    border-radius: var(--r-md);
    background: hsl(var(--card));
    overflow: hidden;
    margin-bottom: 1rem;
  }
  .pesquisa-header__inner{
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 0;
    min-height: 80px;
    align-items: stretch;
  }
  .pesquisa-header__cell{
    padding: var(--pad-2);
    border-right: 1px solid hsl(var(--border));
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    font-size: 13px;
    min-width: 0;
  }
  .pesquisa-header__textos .pesquisa-header__cell{ border-right: none; }
  .pesquisa-header__textos{ min-width: 0; }
  .pesquisa-header__logo{
    grid-row: span 2;
    min-height: 80px;
    background: hsl(var(--muted) / 0.2);
  }
  .pesquisa-header__logo-img{
    max-width: 100%;
    max-height: 72px;
    object-fit: contain;
  }
  .pesquisa-header__placeholder{
    color: hsl(var(--muted-foreground));
    font-size: 12px;
  }
  .pesquisa-header__textos{
    display: flex;
    flex-direction: column;
    gap: 0;
  }
  .pesquisa-header__matriz{
    font-weight: 600;
    border-bottom: 1px solid hsl(var(--border));
  }
  .pesquisa-header__filial{
    font-weight: 500;
  }
  .pesquisa-header__titulo-pesquisa{
    width: 100%;
    border-top: 1px solid hsl(var(--border));
    padding: var(--pad-2);
    font-weight: 600;
    font-size: 15px;
    min-height: 44px;
    box-sizing: border-box;
  }
  /* Texto do cabeçalho (abaixo do título): mesma fonte, quebra de linha sem desalinhar */
  .pesquisa-header__texto-cabecalho{
    display: block;
    font-family: Inter, "Segoe UI", system-ui, -apple-system, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    word-wrap: break-word;
    overflow-wrap: break-word;
    text-align: left;
  }
  .pesquisa-header-preview .pesquisa-header{ max-width: 480px; }

  /* Alinhamento Logo (URL) e Logo (arquivo) na mesma linha */
  .layout-logo-row .layout-logo-url,
  .layout-logo-row .layout-logo-file{ display: flex; flex-direction: column; }
  .layout-logo-row .layout-logo-file{ position: relative; }
  .layout-logo-file-hint{
    position: absolute;
    left: 0;
    top: 100%;
    font-size: 11px;
    margin-top: 2px;
    white-space: nowrap;
  }

  /* Rodapé da pesquisa (texto livre) */
  .pesquisa-rodape{
    border: 1px solid hsl(var(--border));
    border-radius: var(--r-md);
    background: hsl(var(--card));
    margin-top: 1rem;
    overflow: hidden;
  }
  .pesquisa-rodape__inner{
    padding: var(--pad-2);
    font-family: Inter, "Segoe UI", system-ui, -apple-system, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: hsl(var(--muted-foreground));
    white-space: pre-line;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }
  .pesquisa-rodape__inner.pesquisa-richtext{ white-space: normal; }

  /* Editor rico (Quill): mesma fonte que a prévia e o app */
  .rich-editor-wrap{ min-height: 100px; }
  .rich-editor-wrap .ql-editor{
    min-height: 80px;
    font-family: Inter, "Segoe UI", system-ui, -apple-system, sans-serif !important;
    font-size: 14px !important;
    line-height: 1.5 !important;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }
  .rich-editor-wrap .ql-container{ border-radius: 0 0 var(--r-sm) var(--r-sm); }
  .rich-editor-wrap .ql-toolbar{ border-radius: var(--r-sm) var(--r-sm) 0 0; }
  /* Texto rico renderizado (prévia e páginas) — manter exatamente como no editor */
  .pesquisa-richtext p{ margin: 0.25em 0; }
  .pesquisa-richtext p:first-child{ margin-top: 0; }
  .pesquisa-richtext p:last-child{ margin-bottom: 0; }
  .pesquisa-richtext strong,
  .pesquisa-richtext b{ font-weight: var(--font-weight-strong) !important; }
  .pesquisa-richtext em,
  .pesquisa-richtext i{ font-style: italic !important; }
  .pesquisa-richtext span[style*="color"]{ font-weight: inherit; font-style: inherit; }

  /* Imprimir pesquisa */
  .pesquisa-imprimir__bar{
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
    padding: 0.75rem 1rem;
    background: hsl(var(--muted) / 0.3);
    border-radius: var(--r-md);
  }
  .pesquisa-imprimir__titulo{ margin-bottom: 1.25rem; }
  .pesquisa-imprimir__nome{ font-size: 1.25rem; margin: 0 0 0.25rem 0; }
  .pesquisa-imprimir__descricao{ margin: 0; }
  .pesquisa-imprimir__perguntas{ display: flex; flex-direction: column; gap: 1rem; }
  .pesquisa-imprimir__pergunta{
    border: 1px solid hsl(var(--border));
    border-radius: var(--r-sm);
    padding: 1rem;
    background: hsl(var(--background));
  }
  .pesquisa-imprimir__pergunta-titulo{ font-weight: 600; margin-bottom: 0.25rem; }
  .pesquisa-imprimir__pergunta-ajuda{ font-size: 0.9em; margin-bottom: 0.5rem; }
  .pesquisa-imprimir__resposta{ margin-top: 0.5rem; }
  .pesquisa-imprimir__linha{ display: inline-block; min-width: 240px; border-bottom: 1px solid hsl(var(--border)); margin-right: 0.5rem; }
  .pesquisa-imprimir__opcoes, .pesquisa-imprimir__opcao{ margin-right: 1rem; }
  .no-print{ }
  @media print{ .no-print{ display: none !important; } }

  /* =========================================================
   Home Dashboard (Quali-like) – classes novas
   ========================================================= */
.sortable-ghost { opacity: 0.4; }
.dash-widget { transition: opacity 0.15s; }

.dash-filters .input, .dash-filters select { min-height: 36px; }

/* KPIs em uma linha: flex + cartões legíveis (altura + tipografia um pouco maiores) */
.dash-kpis{
  display: flex;
  flex-wrap: nowrap;
  gap: 10px;
  align-items: stretch;
}
.dash-kpis .kpi{
  flex: 1 1 0;
  min-width: 0;
  padding: 14px 12px;
}
.dash-kpis .kpi-top{
  gap: 10px;
  align-items: center;
}
.dash-kpis .kpi-label{
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.3;
}
.dash-kpis .kpi-value{
  font-size: 26px;
  font-weight: 600;
  margin-top: 4px;
  line-height: 1.12;
  letter-spacing: -0.02em;
}
.dash-kpis .kpi-sub{
  margin-top: 6px;
  font-size: 11px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.dash-kpis .kpi-foot{
  margin-top: 8px;
}
.dash-kpis .kpi-foot .link{
  font-size: 12px;
}
.dash-kpis .kpi-ico{
  width: 38px;
  height: 38px;
  border-radius: 11px;
  flex-shrink: 0;
}

.kpi-top{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap: 12px;
}

.kpi-sub{
  margin-top: 6px;
  font-size: 12px;
  color: hsl(var(--muted-foreground));
}

.kpi-ico{
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display:flex;
  align-items:center;
  justify-content:center;
  border: 1px solid hsl(var(--border));
  background: hsl(var(--background));
}

.dash-grid{
  margin-top: 12px;
  display:grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 12px;
}

.dash-panel{
  padding: 14px;
}

.dash-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.dash-title{
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.dash-sub{
  margin-top: 2px;
  font-size: 12px;
  color: hsl(var(--muted-foreground));
}

.dash-list{
  display:flex;
  flex-direction:column;
  gap: 10px;
  max-height: 60vh;
  overflow:auto;
  padding-right: 6px;
}

.dash-item{
  display:flex;
  justify-content:space-between;
  gap: 12px;
  border: 1px solid hsl(var(--border));
  border-radius: 14px;
  padding: 12px;
  background: hsl(var(--background));
}

/* Cards compactos em manifestações recentes */
[data-widget-id="panel_manifestacoes"] .dash-item{
  padding: 8px 10px;
  border-radius: 10px;
}
[data-widget-id="panel_manifestacoes"] .dash-item__title{
  font-size: 14px;
  margin-bottom: 2px;
}
[data-widget-id="panel_manifestacoes"] .dash-item__meta{
  font-size: 11px;
  margin-top: 2px;
}

/* NPS por faixa: Detrator 0-6 | Passivo 7-8 | Promotor 9-10 */
.badge-nps-detrator { background: #fef2f2; color: #b91c1c; font-weight: 600; }
.badge-nps-passivo { background: #fffbeb; color: #b45309; font-weight: 600; }
.badge-nps-promotor { background: #f0fdf4; color: #15803d; font-weight: 600; }

/* Modal Personalizar Dashboard */
#personalizarModal { align-items: flex-start; padding: 3vh 16px; overflow-y: auto; }
#personalizarModal .modal-dialog { width: min(680px, calc(100vw - 32px)); max-width: 100%; max-height: calc(94vh - 24px); display: flex; flex-direction: column; overflow: hidden; }
#personalizarModal .modal-head,
#personalizarModal .modal-foot { flex-shrink: 0; }
#personalizarModal .modal-body { flex: 1 1 auto; overflow-y: auto; max-height: calc(94vh - 180px); min-height: 0; }
.modal-dialog--lg { max-width: 680px; }
#personalizarModal .modal-body .personalizar-section { margin-bottom: 16px; }
#personalizarModal .modal-body .personalizar-section:last-child { margin-bottom: 0; }
.personalizar-section { margin-bottom: 20px; }
.personalizar-section__title { font-size: 14px; font-weight: 600; margin: 0 0 10px; color: hsl(var(--foreground)); }
.personalizar-section__sub { font-size: 12px; color: hsl(var(--muted-foreground)); margin: 0 0 12px; }
.personalizar-filtros { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; padding: 10px 12px; background: hsl(var(--muted)/0.3); border-radius: 10px; }
.personalizar-filtros .form-group { margin: 0; }
.personalizar-filtros .input { min-width: 120px; }
.personalizar-filtros__actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-left: auto; }
.personalizar-salvar-view { display: flex; gap: 8px; align-items: center; }
.personalizar-salvar-view .input { min-width: 140px; }
.personalizar-widgets-list { display: flex; flex-direction: column; gap: 4px; }
.personalizar-widget-item { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border: 1px solid hsl(var(--border)); border-radius: 8px; cursor: grab; background: hsl(var(--card)); transition: box-shadow 0.15s; }
.personalizar-widget-item:hover { box-shadow: 0 2px 8px rgba(0,0,0,.06); }
.personalizar-widget-item:active { cursor: grabbing; }
.personalizar-widget-item__handle { color: hsl(var(--muted-foreground)); font-size: 16px; user-select: none; padding: 4px 8px; cursor: grab; flex-shrink: 0; }
.personalizar-widget-item__handle:active { cursor: grabbing; }
.personalizar-widget-item__label { flex: 1; cursor: pointer; }
.personalizar-widget-item__badge { font-size: 10px; padding: 2px 6px; border-radius: 6px; font-weight: 500; flex-shrink: 0; }
.personalizar-widget-item__badge--kpi { background: hsl(217 91% 60% / 0.15); color: hsl(217 91% 45%); }
.personalizar-widget-item__badge--panel { background: hsl(142 71% 45% / 0.15); color: hsl(142 71% 35%); }

/* Preview da disposição no dashboard */
.personalizar-layout-preview { margin-bottom: 12px; }
.personalizar-layout-preview__diagram { display: flex; flex-direction: column; gap: 4px; border: 1px dashed hsl(var(--border)); border-radius: 8px; padding: 8px 10px; background: hsl(var(--muted)/0.2); }
.personalizar-layout-preview__area { display: flex; flex-direction: column; gap: 1px; padding: 6px 10px; border-radius: 6px; }
.personalizar-layout-preview__area--kpi { background: hsl(217 91% 60% / 0.1); border: 1px solid hsl(217 91% 60% / 0.25); }
.personalizar-layout-preview__area--panel { background: hsl(142 71% 45% / 0.1); border: 1px solid hsl(142 71% 45% / 0.25); }
.personalizar-layout-preview__area-label { font-size: 12px; font-weight: 600; color: hsl(var(--foreground)); }
.personalizar-layout-preview__area-desc { font-size: 11px; color: hsl(var(--muted-foreground)); }

/* Grupos de widgets (Linha superior / Área principal) */
.personalizar-widgets-group { margin-bottom: 12px; }
.personalizar-widgets-group:last-child { margin-bottom: 0; }
.personalizar-widgets-group__title { font-size: 13px; font-weight: 600; margin: 0 0 8px; color: hsl(var(--foreground)); display: flex; align-items: center; gap: 8px; }
.personalizar-widgets-group__icon { font-size: 10px; opacity: 0.8; }
.personalizar-widgets-group__icon--kpi { color: hsl(217 91% 45%); }
.personalizar-widgets-group__icon--panel { color: hsl(142 71% 35%); }

.dash-item__title{
  font-weight: 600;
  margin-bottom: 4px;
}

.dash-item__meta{
  font-size: 12px;
  color: hsl(var(--muted-foreground));
  display:flex;
  align-items:center;
  gap: 8px;
  flex-wrap:wrap;
  margin-top: 4px;
}
.sep{ opacity:.7; }

.dash-item__right{
  display:flex;
  align-items:center;
}

.dash-empty{
  padding: 14px;
  text-align:center;
}

.dash-quick{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 10px;
}

.quick-card{
  border: 1px solid hsl(var(--border));
  border-radius: 14px;
  padding: 12px;
  background: hsl(var(--background));
  text-decoration:none;
  color: inherit;
  display:block;
}

.quick-card__title{
  font-weight: 600;
}
.quick-card__sub{
  margin-top: 4px;
  font-size: 12px;
  color: hsl(var(--muted-foreground));
}

.dash-tasks{
  margin-top: 12px;
  display:flex;
  flex-direction:column;
  gap: 10px;
}

.dash-task{
  display:flex;
  gap: 10px;
  align-items:flex-start;
  border: 1px solid hsl(var(--border));
  border-radius: 14px;
  padding: 12px;
  background: hsl(var(--background));
}

.dash-task__dot{
  width: 10px;
  height: 10px;
  border-radius: 999px;
  margin-top: 6px;
  background: hsl(var(--primary));
}

.dash-task__title{
  font-weight: 600;
}

.dash-task__sub{
  margin-top: 2px;
  font-size: 12px;
  color: hsl(var(--muted-foreground));
}

/* responsivo */
@media (max-width: 1200px){
  .dash-kpis{
    flex-wrap: wrap;
  }
  .dash-kpis .kpi{
    flex: 1 1 calc(50% - 6px);
    min-width: min(100%, 200px);
  }
  .dash-grid{ grid-template-columns: 1fr; }
}
@media (max-width: 640px){
  .dash-kpis .kpi{
    flex: 1 1 100%;
  }
  .page-head{ flex-direction: column; align-items: flex-start; gap: 12px; }
  .page-head__title{ font-size: 24px; }
}
/* Dashboard KPIs: força cor dos ícones (resolve ícone preto do sprite) */
.kpi-ico{
  color: hsl(var(--primary)); /* ou var que você usa pro azul */
}

/* garante que símbolos com fill/ stroke preto herdem a cor */
.kpi-ico svg,
.kpi-ico svg *{
  fill: none !important;
  stroke: currentColor !important;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
/* Ícone do título da página (page-head) */
.page-head__icon{
  color: hsl(var(--primary));
}
.modal--wide .modal-dialog{ --modal-w: 980px; }
/* Modal pesquisa: visualizar resposta — aproveitar bem a tela (menos espaço livre à direita) */
#pesquisaModal.modal--view .modal-dialog{ width: min(94vw, 1600px); max-width: 100%; }
#pesquisaModal.modal--view .modal-body{ max-height: 85vh; overflow-y: auto; }
#pesquisaModal.modal--view .manifestacao-view.pesquisa-resposta-view{ max-width: none; }
.modal--short .modal-body{ max-height: 70vh; overflow:auto; }
/* Modal Elogiados: largura moderada, altura com scroll interno */
.modal.modal--elogiados{ align-items: flex-start; padding-top: 5vh; padding-bottom: 3vh; }
.modal.modal--elogiados .modal-dialog{
  width: min(560px, calc(100vw - 32px));
  max-height: 85vh;
  display: flex;
  flex-direction: column;
}
.modal.modal--elogiados .modal-head,
.modal.modal--elogiados .modal-foot{ flex: 0 0 auto; }
.modal.modal--elogiados .modal-body{
  flex: 1 1 auto;
  overflow-y: auto;
  max-height: calc(85vh - 120px);
  padding-right: 12px;
}
@media (max-width: 640px){
  .modal.modal--elogiados .modal-dialog{ width: calc(100vw - 24px); }
}
/* Modal pequeno (ex.: seleção de colunas) */
.modal--sm .modal-dialog{ width: min(380px, calc(100vw - 32px)); max-width: 100%; }
.modal-dialog--md{ width: min(560px, calc(100vw - 32px)); max-width: 100%; }
/* Modal Ver feedback: mais largo, altura controlada (não come a tela) */
#feedbackVerModal .modal-dialog{
  width: min(900px, calc(100vw - 32px));
  max-width: 100%;
  max-height: 70vh;
  display: flex;
  flex-direction: column;
}
#feedbackVerModal .modal-body{
  max-height: calc(70vh - 70px);
  overflow-y: auto;
}
/* Modal largo (formulários / conteúdo extenso): Resposta do gestor, Registrar Feedback, etc. */
.modal-dialog--lg{ width: min(900px, calc(100vw - 32px)); max-width: 100%; }
/* Modal Resposta gestor / Registrar Feedback: mesmo tamanho do modal de manifestações */
#respostaGestorModal .modal-dialog{
  width: min(1200px, calc(100vw - 32px));
  max-width: 100%;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
}
/* Modal Registrar Feedback: corpo rolável e textarea sem corte de texto */
#respostaGestorModal .modal-body{
  max-height: 78vh;
  overflow-y: auto;
  overflow-x: hidden;
  min-width: 0;
}
/* Conteúdo Registrar Feedback: usa .resposta-gestor-modal (mesmo do “Resposta do gestor”) — só ajustes de layout */
#respostaGestorModal .resposta-gestor-modal[data-registro-feedback="1"]{
  min-width: 0;
}
#respostaGestorModal .resposta-gestor-modal[data-registro-feedback="1"] textarea.input{
  box-sizing: border-box;
  min-width: 0;
  max-width: 100%;
  width: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  word-wrap: break-word;
  overflow-wrap: break-word;
  white-space: pre-wrap;
}
#respostaGestorModal .resposta-gestor-modal[data-registro-feedback="1"] .view-field__value--relato{
  word-wrap: break-word;
  overflow-wrap: break-word;
  white-space: pre-wrap;
}
/* Espaçamento vertical: Resumo → Registro do feedback */
#respostaGestorModal .resposta-gestor-modal[data-registro-feedback="1"] #formRegistrarFeedback{
  margin-top: 1.5rem;
}
#respostaGestorModal .resposta-gestor-modal[data-registro-feedback="1"] #formRegistrarFeedback .view-section{
  margin-bottom: 1.5rem;
}
#respostaGestorModal .resposta-gestor-modal[data-registro-feedback="1"] #formRegistrarFeedback .view-grid{
  gap: 16px !important;
}
#respostaGestorModal .resposta-gestor-modal[data-registro-feedback="1"] #formRegistrarFeedback .view-field{
  margin-bottom: 0.25rem;
}
#respostaGestorModal .resposta-gestor-modal[data-registro-feedback="1"] .resposta-gestor-modal__foot{
  margin-top: 1.5rem;
  padding-top: 1.25rem;
}
/* Resumo da manifestação (Registrar Feedback): layout lado a lado */
.feedback-resumo-section .feedback-resumo-grid{
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 16px 24px;
  margin-bottom: 1.25rem;
}
.feedback-resumo-section .feedback-resumo-grid .view-field{
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.feedback-resumo-section .feedback-resumo-grid .view-field__label{
  font-size: 0.8rem;
  font-weight: 600;
  color: hsl(var(--muted-foreground));
}
.feedback-resumo-section .feedback-resumo-grid .view-field__value{
  font-size: 0.95rem;
  line-height: 1.4;
}
.feedback-resumo-section .feedback-resumo-bloco{
  display: grid;
  grid-template-columns: minmax(160px, 200px) 1fr;
  gap: 12px 20px;
  align-items: start;
  margin-bottom: 1rem;
}
.feedback-resumo-section .feedback-resumo-bloco:last-child{ margin-bottom: 0; }
.feedback-resumo-section .feedback-resumo-bloco .view-field__label{
  font-weight: 600;
  color: hsl(var(--muted-foreground));
  font-size: 0.85rem;
}
.feedback-resumo-section .feedback-resumo-bloco .view-field__value{
  padding: 0.6rem 0.75rem;
  background: hsl(var(--muted) / 0.15);
  border-radius: 8px;
  border: 1px solid hsl(var(--border) / 0.5);
  line-height: 1.5;
}
@media (max-width: 520px){
  .feedback-resumo-section .feedback-resumo-bloco{
    grid-template-columns: 1fr;
  }
}
/* Avaliação em estrelas (Registrar Feedback) */
.feedback-stars{ display: flex; align-items: center; flex-wrap: wrap; gap: 2px; }
.feedback-star{
  background: none; border: 0; padding: 0; font-size: 1.6rem; line-height: 1;
  color: hsl(var(--muted-foreground) / .4); cursor: pointer; transition: color .15s;
}
.feedback-star:hover{ color: hsl(var(--primary) / .8); }
.feedback-star.feedback-star--on{ color: hsl(45 90% 50%); }
.modal-colunas-desc{ margin: 0 0 12px; font-size: 13px; }
/* Modal Colunas (exibir/ordenar colunas da grid) */
.modal--colunas .modal-dialog{
  width: min(440px, calc(100vw - 32px));
  max-width: 100%;
}
.modal--colunas .modal-head{
  padding-bottom: 8px;
}
.modal-colunas-subtitle{
  font-size: 13px;
  margin: 4px 0 0;
  color: hsl(var(--muted-foreground));
}
.modal-colunas-body{
  padding: 16px 20px 20px;
}
.modal-colunas-actions{
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid hsl(var(--border) / .6);
}
.modal-colunas-actions .btn-ghost{
  font-size: 13px;
  padding: 4px 10px;
  color: hsl(var(--muted-foreground));
}
.modal-colunas-actions .btn-ghost:hover{
  color: hsl(var(--primary));
}
.modal-colunas-foot{
  gap: 10px;
  padding: 14px 20px 18px;
}
/* Botão que parece link (ex.: etapa clicável na grid) */
.link-style{
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: hsl(var(--primary));
  cursor: pointer;
  text-decoration: underline;
}
.link-style:hover{ color: hsl(var(--primary) / .85); }
/* Conteúdo do modal Ver ação */
.resposta-gestor-modal__header{ margin-bottom: 0.75rem; }
.table--acoes-editar { font-size: 0.9rem; }
.table--acoes-editar .td-acao-desc { max-width: 280px; line-height: 1.4; }
.table--acoes-editar .input--sm { min-height: 36px; padding: 0.35rem 0.5rem; }
.resposta-gestor-modal__title{ font-size: 1.1rem; margin: 0 0 0.25rem; }
.resposta-gestor-modal .view-section{ margin-bottom: 1rem; }
.resposta-gestor-modal .view-section:last-of-type{ margin-bottom: 0; }
.resposta-gestor-modal .view-section__title{ font-size: 0.9rem; margin: 0 0 0.5rem; font-weight: 600; }
.resposta-gestor-modal .view-field__value--relato{ white-space: pre-wrap; margin: 0; }
.resposta-gestor-modal .resposta-gestor-metodo{
  margin-bottom: 1.25rem;
  padding: 1rem;
  background: hsl(var(--muted) / .08);
  border-radius: 8px;
  border: 1px solid hsl(var(--border) / .6);
}
.resposta-gestor-modal .resposta-gestor-metodo:last-child{ margin-bottom: 0; }
.resposta-gestor-metodo__nome{
  font-size: 0.95rem;
  font-weight: 600;
  margin: 0 0 0.75rem;
  color: hsl(var(--foreground));
}
.resposta-gestor-campos{
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.resposta-gestor-campo{
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.resposta-gestor-campo__label{
  font-size: 0.8rem;
  font-weight: 600;
  color: hsl(var(--muted-foreground));
  text-transform: none;
  letter-spacing: 0;
}
.resposta-gestor-campo__value{
  font-size: 0.9rem;
  line-height: 1.45;
  color: hsl(var(--foreground));
  white-space: pre-wrap;
  word-break: break-word;
  padding: 0.5rem 0.6rem;
  background: hsl(var(--background));
  border-radius: 6px;
  border: 1px solid hsl(var(--border) / .5);
}
.resposta-gestor-modal .resposta-gestor-metodo__vazio{ margin: 0; font-size: 0.9rem; }
.resposta-gestor-modal .resposta-gestor-planos{ margin: 0.25rem 0 0; padding-left: 1.25rem; }
.resposta-gestor-modal__foot{ margin-top: 1.25rem; padding-top: 1rem; border-top: 1px solid hsl(var(--border)); }
.modal-colunas-list{
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-height: 52vh;
  overflow-y: auto;
  padding-right: 4px;
  scrollbar-width: thin;
}
.modal-colunas-list::-webkit-scrollbar{ width: 6px; }
.modal-colunas-list::-webkit-scrollbar-track{ background: hsl(var(--muted) / .2); border-radius: 3px; }
.modal-colunas-list::-webkit-scrollbar-thumb{ background: hsl(var(--muted-foreground) / .3); border-radius: 3px; }
.modal-colunas-list::-webkit-scrollbar-thumb:hover{ background: hsl(var(--muted-foreground) / .45); }
.modal-colunas-order-item{
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 8px;
  transition: background .12s ease;
}
.modal-colunas-order-item:hover{
  background: hsl(var(--accent) / .15);
}
.modal-colunas-order-item .btn-order{
  width: 26px;
  height: 26px;
  padding: 0;
  font-size: 12px;
  line-height: 1;
  border: 1px solid hsl(var(--border));
  border-radius: 6px;
  background: hsl(var(--background));
  color: hsl(var(--foreground));
  cursor: pointer;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background .12s, border-color .12s;
}
.modal-colunas-order-item .btn-order:hover{
  background: hsl(var(--accent));
  border-color: hsl(var(--accent));
}
.modal-colunas-item{
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
  font-size: 14px;
  cursor: pointer;
  padding: 2px 0;
}
.modal-colunas-item input{
  margin: 0;
  width: 16px;
  height: 16px;
  accent-color: hsl(var(--primary));
}
.modal-colunas-item:hover{ color: hsl(var(--foreground)); }

/* Modal de formulário (ex.: Novo Usuário): largo, altura contida, scroll no body */
.modal-dialog--form{
  max-height: 82vh;
  display: flex;
  flex-direction: column;
}
.modal-dialog--form .modal-body{
  flex: 1 1 auto;
  overflow-y: auto;
  max-height: calc(82vh - 120px);
}

/* Form grid 2 colunas (modal de usuário, etc.) — reduz altura, aproveita largura */
.form-grid--2col{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  align-items: start;
}
.form-grid--2col .field--full{
  grid-column: 1 / -1;
}
@media (max-width: 640px){
  .form-grid--2col{ grid-template-columns: 1fr; }
}

/* =========================================================
   Usuários — formulário: setores e permissões (grid de cards)
   ========================================================= */
.usuarios-form__setores-hint,
.usuarios-form__permissoes-hint {
  font-size: 12px;
  margin: 0 0 10px;
  color: hsl(var(--muted-foreground));
}
.usuarios-form__checkbox-grid {
  display: grid;
  gap: 10px;
  max-height: 200px;
  overflow-y: auto;
  padding: 4px 0;
  border: 1px solid hsl(var(--border));
  border-radius: var(--r-md);
  background: hsl(var(--muted) / 0.2);
  padding: 12px;
}
.usuarios-form__checkbox-grid--permissoes {
  max-height: 220px;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}
.usuarios-form__checkbox-grid--setores {
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
}
.usuarios-form__checkbox-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--r-sm);
  border: 1px solid hsl(var(--border));
  background: hsl(var(--card));
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.usuarios-form__checkbox-card:hover {
  border-color: hsl(var(--primary) / 0.5);
  background: hsl(var(--primary) / 0.04);
}
.usuarios-form__checkbox-card input[type="checkbox"] {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: hsl(var(--primary));
}
.usuarios-form__checkbox-card input[type="checkbox"]:checked + .usuarios-form__checkbox-label {
  font-weight: 600;
  color: hsl(var(--foreground));
}
.usuarios-form__checkbox-label {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  color: hsl(var(--foreground));
}
.usuarios-form__checkbox-meta {
  font-size: 11px;
  color: hsl(var(--muted-foreground));
  flex-shrink: 0;
}
.usuarios-form__setores-wrap,
.usuarios-form__permissoes-wrap {
  margin-top: 4px;
}

.cfg-actions{
  display:flex; align-items:flex-start; justify-content:space-between; gap:12px; margin-bottom:10px;
}
.cfg-form-wrap{
  width: 100%;
}

/* =========================================================
   Visualizar Manifestação — layout e seções
   ========================================================= */
.manifestacao-view{
  padding: var(--pad-2, 14px) var(--pad-3, 20px);
  max-width: 720px;
}
/* Página "Ver manifestação" — usa toda a largura do container */
.manifestacao-ver-page__card .manifestacao-view{
  max-width: none;
  width: 100%;
}
.manifestacao-ver-page__card .manifestacao-view .view-grid{
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
}
.manifestacao-view .view-section{
  margin-bottom: 24px;
}
.manifestacao-view .view-section:last-child{
  margin-bottom: 0;
}
.manifestacao-view .view-section__title{
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: hsl(var(--muted-foreground));
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid hsl(var(--border));
}
.manifestacao-view .view-grid{
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px 24px;
}
.manifestacao-view .view-field{
  min-width: 0;
}
.manifestacao-view .view-field__label{
  font-size: 12px;
  color: hsl(var(--muted-foreground));
  margin-bottom: 4px;
}
.manifestacao-view .view-field__value{
  font-size: 14px;
  font-weight: 500;
  color: hsl(var(--foreground));
}
.manifestacao-view .view-field__value--relato{
  white-space: pre-wrap;
  line-height: 1.5;
  font-weight: 400;
}
.manifestacao-view .view-risco{
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding: 16px;
  border-radius: var(--r-md, 10px);
  background: hsl(var(--muted) / 0.25);
  border: 1px solid hsl(var(--border));
}
.manifestacao-view .view-risco__score{
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.manifestacao-view .view-risco__score .badge{
  font-size: 14px;
  padding: 8px 14px;
}
.manifestacao-view .view-risco__gut{
  font-size: 12px;
  color: hsl(var(--muted-foreground));
}
.manifestacao-view .view-risco__gut .badge{
  font-size: 11px;
  padding: 4px 8px;
  margin: 0 2px;
}
.manifestacao-view .view-risco__caption{
  font-size: 11px;
  color: hsl(var(--muted-foreground));
  margin-top: 8px;
}

/* Plano de ação — tabela de ações (sempre visível, mesmo manifestação fechada) */
.plano-acao-painel .table--planos-acao { font-size: 13px; }
.plano-acao-painel .plano-acao-ordem { width: 2.5rem; text-align: center; color: hsl(var(--muted-foreground)); }
.plano-acao-painel .plano-acao-desc__text { display: block; line-height: 1.4; }
.plano-acao-painel .plano-acao-row--atrasado .plano-acao-desc__text { color: hsl(var(--destructive)); }
.plano-acao-painel .plano-acao-row--vence-hoje .plano-acao-desc__text { font-weight: 600; }

/* Assistente IA — design system Argus */
.plano-acao-chat {
  max-width: 100%;
}
.plano-acao-chat__header {
  margin-bottom: 1.25rem;
}
.plano-acao-chat__title {
  font-size: 1.1rem;
  font-weight: 600;
  color: hsl(var(--foreground));
  margin: 0 0 0.5rem;
  letter-spacing: 0.02em;
}
.plano-acao-chat__intro {
  font-size: 0.95rem;
  color: hsl(var(--foreground));
  margin: 0 0 0.6rem;
  line-height: 1.5;
}
.plano-acao-chat__hint {
  font-size: 0.875rem;
  color: hsl(var(--muted-foreground));
  margin: 0.5rem 0 0;
  line-height: 1.45;
}
.plano-acao-chat__comandos {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.6rem;
}
.plano-acao-chat__cmd {
  display: inline-block;
  font-size: 0.9rem;
  font-family: ui-monospace, "Cascadia Code", "Consolas", monospace;
  padding: 0.35rem 0.6rem;
  background: hsl(var(--primary) / 0.1);
  border: 1px solid hsl(var(--primary) / 0.25);
  color: hsl(var(--primary));
  border-radius: 6px;
  font-weight: 500;
}
.plano-acao-chat__body {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.plano-acao-chat__output {
  min-height: 120px;
  padding: 1.25rem 1.5rem;
  background: hsl(var(--muted) / 0.15);
  border: 1px solid hsl(var(--border));
  border-radius: 8px;
  font-size: 0.95rem;
  line-height: 1.55;
  max-height: 240px;
  overflow-y: auto;
}
.plano-acao-chat__output-placeholder {
  color: hsl(var(--muted-foreground));
  font-size: 0.9rem;
}
.plano-acao-chat__output .plano-acao-chat__msg + .plano-acao-chat__msg { margin-top: 0.75rem; }
.plano-acao-chat__output .plano-acao-chat__msg p { margin: 0 0 0.5rem; }
.plano-acao-chat__output .plano-acao-chat__msg p:last-child { margin-bottom: 0; }
.plano-acao-chat__output .plano-acao-chat__msg ul { margin: 0.25rem 0 0 1rem; padding: 0; }
.plano-acao-chat__input-wrap {
  display: flex;
  gap: 0.5rem;
  align-items: flex-end;
}
.plano-acao-chat__input {
  flex: 1;
  resize: vertical;
  min-height: 76px;
  font-size: 0.95rem;
}
.plano-acao-chat__send {
  flex-shrink: 0;
  min-width: 90px;
}
.plano-acao-chat .text-destructive { color: hsl(var(--destructive)); }
.plano-acao-chat kbd {
  font-size: 0.8em;
  padding: 0.1em 0.35em;
  background: hsl(var(--muted));
  border: 1px solid hsl(var(--border));
  border-radius: 3px;
  font-family: inherit;
}

/* Detalhes da visita — usa toda a largura do modal */
.visita-view{
  padding: var(--pad-2, 14px) var(--pad-3, 20px);
  width: 100%;
  max-width: none;
}
.visita-view .view-section{
  margin-bottom: 24px;
}
.visita-view .view-section:last-child{
  margin-bottom: 0;
}
.visita-view .view-section__title{
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: hsl(var(--muted-foreground));
  margin-bottom: 12px;
  padding-bottom: 6px;
  border-bottom: 1px solid hsl(var(--border));
}
.visita-view .view-grid{
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 18px 28px;
}
.visita-view .view-field{
  min-width: 0;
}
.visita-view .view-field__label{
  font-size: 11px;
  color: hsl(var(--muted-foreground));
  margin-bottom: 4px;
}
.visita-view .view-field__value{
  font-size: 14px;
  font-weight: 500;
  color: hsl(var(--foreground));
  line-height: 1.4;
}
.visita-view .view-field__value--relato{
  white-space: pre-wrap;
  line-height: 1.5;
  font-weight: 400;
  padding: 12px;
  background: hsl(var(--muted) / 0.15);
  border-radius: var(--r-md, 10px);
}

/* Resposta de pesquisa — NPS / Nota com destaque visual (ruim em evidência) */
/* Seção Respostas: uma linha por pergunta — label à esquerda, valor à direita (texto livre usa toda a largura) */
.pesquisa-resposta-view .view-grid--stack{
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px 0;
}
.pesquisa-resposta-view .view-field--resposta{
  display: grid;
  grid-template-columns: minmax(200px, 280px) 1fr;
  gap: 8px 24px;
  align-items: start;
  min-width: 0;
}
.pesquisa-resposta-view .view-field--resposta .view-field__label{
  margin-bottom: 0;
  padding-top: 2px;
  color: hsl(var(--muted-foreground));
  font-weight: 500;
}
.pesquisa-resposta-view .view-field--resposta .view-field__value{
  min-width: 0;
  word-wrap: break-word;
}
/* Texto livre: mais espaço, pre-wrap, leitura confortável */
.pesquisa-resposta-view .view-field__value--texto-livre{
  white-space: pre-wrap;
  line-height: 1.55;
  font-weight: 400;
  padding: 14px 16px;
  background: hsl(var(--muted) / 0.2);
  border-radius: var(--r-md, 10px);
  border: 1px solid hsl(var(--border) / 0.8);
  max-width: 100%;
}
.pesquisa-resposta-view .resposta-valor{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-radius: var(--r-md, 10px);
  font-weight: 600;
  border: 2px solid transparent;
  min-width: 0;
}
.pesquisa-resposta-view .resposta-valor__numero{
  font-size: 1.5rem;
  line-height: 1;
  min-width: 1.8rem;
  text-align: center;
}
.pesquisa-resposta-view .resposta-valor__faixa{
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  opacity: .95;
}
/* NPS/Nota RUIM — destaque forte (vermelho) */
.pesquisa-resposta-view .resposta-valor--ruim{
  background: hsl(var(--destructive) / 0.12);
  border-color: hsl(var(--destructive) / 0.45);
  color: hsl(var(--destructive));
}
.pesquisa-resposta-view .resposta-valor--ruim .resposta-valor__numero{
  color: hsl(var(--destructive));
}
/* NPS/Nota NEUTRO */
.pesquisa-resposta-view .resposta-valor--neutro{
  background: hsl(var(--warning) / 0.14);
  border-color: hsl(var(--warning) / 0.4);
  color: hsl(var(--warning-foreground, 38 92% 25%));
}
.pesquisa-resposta-view .resposta-valor--neutro .resposta-valor__numero{
  color: hsl(var(--warning-foreground, 38 92% 25%));
}
/* NPS/Nota BOM */
.pesquisa-resposta-view .resposta-valor--bom{
  background: hsl(var(--success) / 0.12);
  border-color: hsl(var(--success) / 0.4);
  color: hsl(var(--success-foreground, 142 76% 22%));
}
.pesquisa-resposta-view .resposta-valor--bom .resposta-valor__numero{
  color: hsl(var(--success-foreground, 142 76% 22%));
}

/* Tabela Respostas das pesquisas — 4 colunas: Data, Pesquisa, NPS, Ações — mesmo padrão de fonte que configurações/cadastros */
.pesquisas-page .table--respostas-pesquisa th {
  font-size: 12.5px;
  font-weight: 600;
  color: hsl(var(--muted-foreground));
}
.pesquisas-page .table--respostas-pesquisa td,
.pesquisas-page .table--respostas-pesquisa .cell-name__primary,
.pesquisas-page .table--respostas-pesquisa .cell-name__secondary {
  font-size: 14.5px;
}
/* Badges na grid de respostas — mesmo padrão das configurações */
.pesquisas-page .table--respostas-pesquisa .badge-nps,
.pesquisas-page .table--respostas-pesquisa .badge-tipo { font-size: 12px; }
/* Respostas: dropdown usa estilos unificados (.actions-more); td-actions overflow para o menu abrir */
.table--respostas-pesquisa .td-actions { overflow: visible; }
.table--respostas-pesquisa .col-data { width: 18%; min-width: 110px; }
.table--respostas-pesquisa .col-paciente { width: auto; min-width: 140px; }
.table--respostas-pesquisa .col-nps { width: 12%; min-width: 88px; }
.table--respostas-pesquisa .col-acoes { width: 132px; min-width: 132px; max-width: 132px; text-align: right; }
.table--respostas-pesquisa .td-nps { white-space: nowrap; vertical-align: middle; }
/* Ações: todos os ícones lado a lado (Ver, Transformar, Excluir, +) */
.table--respostas-pesquisa .td-actions .td-actions__inner {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: nowrap;
  gap: 4px;
}
.table--respostas-pesquisa .td-actions .inline-form { display: inline-flex; margin: 0; }
/* Badge NPS na grid (Promotor / Neutro / Detrator) — padrão configurações */
.badge-nps { font-size: 12px; font-weight: 600; padding: 4px 8px; border-radius: 6px; white-space: nowrap; }
.badge-nps--promotor { background: hsl(var(--success) / 0.18); color: hsl(var(--success-foreground, 142 76% 22%)); border: 1px solid hsl(var(--success) / 0.4); }
.badge-nps--neutro { background: hsl(var(--warning) / 0.18); color: hsl(var(--warning-foreground, 38 92% 25%)); border: 1px solid hsl(var(--warning) / 0.4); }
.badge-nps--detrator { background: hsl(var(--destructive) / 0.18); color: hsl(var(--destructive)); border: 1px solid hsl(var(--destructive) / 0.45); }
/* Sentimento do cliente (avaliação NPS vs alternativas) — na visualização de resposta */
.pesquisa-sentimento-section { background: hsl(var(--muted) / 0.08); border-radius: 8px; padding: 1rem 1.25rem; }
.pesquisa-sentimento-badge { font-size: 14px; padding: 6px 12px; }
.pesquisa-sentimento-inconsistente { margin-left: 0.75rem; font-size: 0.85rem; color: hsl(var(--warning-foreground, 38 92% 25%)); }
/* Tipo da pesquisa na grid (Totem, QR Code, Link, etc.) — padrão configurações */
.badge-tipo { font-size: 12px; font-weight: 500; padding: 3px 6px; border-radius: 4px; white-space: nowrap; background: hsl(var(--muted) / 0.5); color: hsl(var(--muted-foreground)); }

/* =========================
   ARGUS Intelligence (layout estilo OpenAI: sidebar + área do chat)
   ========================= */
.ia-chat-page .ia-chat-layout {
  display: flex;
  gap: 0;
  min-height: 480px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid hsl(var(--border));
  background: hsl(var(--card));
}
.ia-chat-page .ia-chat-sidebar {
  width: 260px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  padding: var(--pad-1);
  border-right: 1px solid hsl(var(--border));
  background: hsl(var(--muted) / 0.2);
}
.ia-chat-page .ia-chat-new {
  width: 100%;
  justify-content: center;
}
.ia-chat-page .ia-chat-sidebar-divider {
  height: 1px;
  background: hsl(var(--border));
  margin: var(--pad-1) 0;
}
.ia-chat-page .ia-chat-sessions-list {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.ia-chat-page .ia-chat-session-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  text-align: left;
  padding: 8px 10px;
  border: none;
  border-radius: var(--r-sm);
  background: transparent;
  color: hsl(var(--foreground));
  font-size: 14px;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ia-chat-page .ia-chat-session-btn:hover {
  background: hsl(var(--accent) / 0.15);
}
.ia-chat-page .ia-chat-session-btn.is-active {
  background: hsl(var(--primary) / 0.15);
  color: hsl(var(--primary));
  font-weight: 500;
}
.ia-chat-page .ia-chat-session-title {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ia-chat-page .ia-chat-session-del {
  flex-shrink: 0;
  margin-left: 6px;
  border: none;
  background: transparent;
  color: hsl(var(--muted-foreground));
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  padding: 2px 4px;
}
.ia-chat-page .ia-chat-session-del:hover {
  color: hsl(var(--destructive));
}
.ia-chat-page .ia-chat-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  padding: var(--pad-1);
}
.ia-chat-page .ia-chat-main .ia-chat-card {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  margin-bottom: 0;
}
.ia-chat-page .ia-chat-messages {
  flex: 1;
  overflow-y: auto;
  min-height: 280px;
  padding: var(--pad-1);
  background: hsl(var(--muted) / 0.2);
  border-radius: var(--radius);
  margin-bottom: var(--pad-1);
}
.ia-chat-page .ia-chat-messages .ia-chat-empty {
  font-size: 14px;
}
.ia-chat-page .ia-chat-bubble {
  max-width: 85%;
  padding: 10px 14px;
  border-radius: var(--r-md);
  margin-bottom: 10px;
  font-size: 14px;
  line-height: 1.5;
  white-space: pre-line;
}
.ia-chat-page .ia-chat-bubble--user {
  margin-left: auto;
  background: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
}
.ia-chat-page .ia-chat-bubble--assistant {
  margin-right: auto;
  background: hsl(var(--muted) / 0.6);
  border: 1px solid hsl(var(--border));
  color: hsl(var(--foreground));
}
.ia-chat-page .ia-chat-status {
  font-size: 13px;
  margin-bottom: 8px;
  display: none;
  align-items: center;
  gap: 8px;
}
.ia-chat-page .ia-chat-status.ia-chat-status--on {
  display: flex;
}
.ia-chat-page .ia-chat-status-dots {
  display: inline-flex;
  gap: 4px;
}
.ia-chat-page .ia-chat-status-dots::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: hsl(var(--primary));
  animation: ia-dots 1.4s ease-in-out infinite both;
}
.ia-chat-page .ia-chat-status-dots::after {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: hsl(var(--primary));
  animation: ia-dots 1.4s ease-in-out 0.2s infinite both;
}
@keyframes ia-dots {
  0%, 80%, 100% { opacity: 0.3; transform: scale(0.8); }
  40% { opacity: 1; transform: scale(1); }
}
.ia-chat-page .ia-chat-contexto-ativo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  margin-bottom: 10px;
  background: hsl(var(--muted) / 0.4);
  border-radius: var(--r-sm);
  font-size: 14px;
}
.ia-chat-page .ia-chat-contexto-label {
  font-weight: 600;
  color: hsl(var(--foreground));
}
.ia-chat-page .ia-chat-contexto-valor {
  flex: 1;
  color: hsl(var(--muted-foreground));
}
.ia-chat-page .ia-chat-contexto-remove {
  flex-shrink: 0;
}
.ia-chat-page .ia-chat-quick-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}
.ia-chat-page .ia-chat-suggestions {
  margin-bottom: 12px;
}
.ia-chat-page .ia-chat-suggestions-title {
  font-size: 13px;
  font-weight: 500;
  color: hsl(var(--muted-foreground));
  margin-bottom: 8px;
}
.ia-chat-page .ia-chat-suggestions-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.ia-chat-page .ia-chat-suggestion {
  padding: 8px 12px;
  font-size: 13px;
  background: hsl(var(--muted) / 0.5);
  border: 1px solid hsl(var(--border));
  border-radius: var(--r-sm);
  color: hsl(var(--foreground));
  cursor: pointer;
  transition: background 0.15s;
}
.ia-chat-page .ia-chat-suggestion:hover {
  background: hsl(var(--accent) / 0.5);
}
.ia-chat-page .ia-chat-context-panel {
  padding: 14px;
  margin-bottom: 12px;
  background: hsl(var(--muted) / 0.25);
  border-radius: var(--r-sm);
  border: 1px solid hsl(var(--border));
}
.ia-chat-page .ia-chat-context-title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 12px;
}
.ia-chat-page .ia-chat-context-fields {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: flex-end;
}
.ia-chat-page .ia-chat-context-field {
  min-width: 140px;
}
.ia-chat-page .ia-chat-context-field .label {
  display: block;
  font-size: 12px;
  margin-bottom: 4px;
  color: hsl(var(--muted-foreground));
}
.ia-chat-page .ia-chat-registro-wrap {
  position: relative;
}
.ia-chat-page .ia-chat-registro-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  max-height: 200px;
  overflow-y: auto;
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: var(--r-sm);
  box-shadow: 0 4px 12px hsl(0 0% 0% / 0.15);
  z-index: 10;
  margin-top: 2px;
}
.ia-chat-page .ia-chat-registro-item {
  padding: 10px 12px;
  font-size: 13px;
  cursor: pointer;
  border-bottom: 1px solid hsl(var(--border));
}
.ia-chat-page .ia-chat-registro-item:last-child {
  border-bottom: none;
}
.ia-chat-page .ia-chat-registro-item:hover:not(.ia-chat-registro-empty) {
  background: hsl(var(--accent) / 0.3);
}
.ia-chat-page .ia-chat-registro-empty {
  cursor: default;
  color: hsl(var(--muted-foreground));
}
.ia-chat-page .ia-chat-input-wrap {
  display: flex;
  gap: 10px;
  align-items: center;
}
.ia-chat-page .ia-chat-input {
  flex: 1;
}
.ia-chat-page .ia-chat-send {
  flex-shrink: 0;
}

/* Dispensação de Enxoval */
.disp-candidates{
  margin-top: 8px;
  max-height: 220px;
  overflow: auto;
  border: 1px solid hsl(var(--border));
  border-radius: 8px;
  padding: 6px;
  background: hsl(var(--background));
}
.dispensacao-enxoval-page .btn-sm{
  padding: 4px 10px;
  font-size: 13px;
  margin: 2px;
}

#dispSaldoAbertoBackdrop{ z-index: 200; }
#dispSaldoAbertoModal{ z-index: 210; }
.disp-saldo-dialog{
  width: min(460px, calc(100vw - 32px));
}
.disp-saldo-head{
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-width: 0;
}
.disp-saldo-icon{
  width: 44px;
  height: 44px;
  border-radius: 12px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: hsl(var(--warning, 38 92% 50%) / .16);
  color: hsl(var(--warning, 38 92% 50%));
  border: 1px solid hsl(var(--warning, 38 92% 50%) / .30);
}
.disp-saldo-icon .nav-svg{
  width: 22px;
  height: 22px;
}
#dispSaldoAbertoLead{
  margin: 6px 0 0;
  font-size: 13px;
  line-height: 1.4;
  color: hsl(var(--foreground));
}
.disp-saldo-list{
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.disp-saldo-list li{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: hsl(var(--warning, 38 92% 50%) / .10);
  border: 1px solid hsl(var(--warning, 38 92% 50%) / .28);
}
.disp-saldo-item-nome{
  font-weight: 600;
  font-size: 14px;
  line-height: 1.3;
  min-width: 0;
}
.disp-saldo-badge{
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 4px 8px;
  border-radius: 999px;
  background: hsl(var(--warning, 38 92% 50%) / .22);
  color: hsl(var(--warning, 38 92% 40%));
}
html.dark .disp-saldo-badge{
  color: hsl(var(--warning, 38 92% 70%));
}

.disp-fluxo-flash{
  position: fixed;
  left: 50%;
  top: 88px;
  transform: translateX(-50%);
  z-index: 180;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-width: min(420px, calc(100vw - 32px));
  max-width: min(560px, calc(100vw - 24px));
  padding: 14px 16px;
  border-radius: 16px;
  box-shadow: 0 18px 50px rgba(0,0,0,.28);
  background: #ecfdf5;
  border: 1px solid #86efac;
  color: #14532d;
}
.disp-fluxo-flash[hidden]{ display: none !important; }
.disp-fluxo-flash.is-info{
  background: #eff6ff;
  border-color: #93c5fd;
  color: #1e3a8a;
}
.disp-fluxo-flash.is-warn{
  background: #fffbeb;
  border-color: #fcd34d;
  color: #92400e;
}
.disp-fluxo-flash__icon{
  width: 40px;
  height: 40px;
  border-radius: 12px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #bbf7d0;
  color: #166534;
}
.disp-fluxo-flash.is-info .disp-fluxo-flash__icon{
  background: #bfdbfe;
  color: #1d4ed8;
}
.disp-fluxo-flash.is-warn .disp-fluxo-flash__icon{
  background: #fde68a;
  color: #b45309;
}
.disp-fluxo-flash__icon .nav-svg{
  width: 22px;
  height: 22px;
}
.disp-fluxo-flash__title{
  font-size: 16px;
  font-weight: 700;
  line-height: 1.2;
}
.disp-fluxo-flash__sub{
  margin-top: 4px;
  font-size: 13px;
  line-height: 1.4;
  opacity: .92;
}

/* Dashboard operacional */
.dashboard-page .tabs-bar--dash-op{
  display: flex;
  margin: 0 0 16px;
  padding: 8px 10px;
  background: hsl(var(--muted) / 0.5);
  border-radius: 8px;
  border: 1px solid hsl(var(--border));
}
.dashboard-page .dash-charts{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}
.dashboard-page .dash-chart{
  border: 1px solid hsl(var(--border));
  border-radius: 10px;
  background: hsl(var(--card));
  padding: 12px 14px 14px;
  min-width: 0;
}
.dashboard-page .dash-chart--wide{
  grid-column: 1 / -1;
}
.dashboard-page .dash-chart__title{
  font-size: 0.82rem;
  font-weight: 700;
  margin: 0 0 10px;
}
.dashboard-page .dash-chart__empty{
  margin: 12px 0 4px;
  font-size: 13px;
}
.dashboard-page .dash-donut{
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}
.dashboard-page .dash-donut svg{
  width: 100%;
  max-width: 150px;
  height: auto;
}
.dashboard-page .dash-donut text{
  font-family: var(--font-sans);
}
.dashboard-page .dash-donut__val{
  font-size: 22px;
  font-weight: 700;
  fill: hsl(var(--foreground));
}
.dashboard-page .dash-donut__lbl{
  font-size: 10px;
  fill: hsl(var(--muted-foreground));
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.dashboard-page .dash-legend{
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin-top: 8px;
  font-size: 12px;
  color: hsl(var(--muted-foreground));
}
.dashboard-page .dash-legend__item{
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.dashboard-page .dash-legend__item i{
  width: 8px;
  height: 8px;
  border-radius: 99px;
  display: inline-block;
}
.dashboard-page .dash-legend__item strong{
  color: hsl(var(--foreground));
  font-weight: 600;
}
.dashboard-page .dash-gbars{
  display: flex;
  align-items: flex-end;
  gap: 10px;
  height: 160px;
  padding: 4px 2px 0;
}
.dashboard-page .dash-gbar{
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
}
.dashboard-page .dash-gbar__track{
  flex: 1 1 auto;
  width: 100%;
  max-width: 72px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 3px;
  background: hsl(var(--muted) / 0.35);
  border-radius: 8px 8px 4px 4px;
  padding: 4px 4px 0;
}
.dashboard-page .dash-gbar__col{
  flex: 1 1 0;
  min-width: 6px;
  border-radius: 4px 4px 0 0;
}
.dashboard-page .dash-gbar__lbl{
  margin-top: 6px;
  font-size: 11px;
  color: hsl(var(--muted-foreground));
}
.dashboard-page .dash-hbars{
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.dashboard-page .dash-hbar__meta{
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  margin-bottom: 4px;
}
.dashboard-page .dash-hbar__meta strong{
  font-weight: 600;
  white-space: nowrap;
}
.dashboard-page .dash-hbar__track{
  height: 8px;
  border-radius: 99px;
  background: hsl(var(--muted) / 0.45);
  overflow: hidden;
}
.dashboard-page .dash-hbar__track span{
  display: block;
  height: 100%;
  border-radius: 99px;
  min-width: 0;
}
.dashboard-page .dash-hbar__track--mini{
  height: 6px;
  margin-top: 3px;
}
@media (max-width: 860px){
  .dashboard-page .dash-charts{ grid-template-columns: 1fr; }
  .dashboard-page .dash-chart--wide{ grid-column: auto; }
  .dashboard-page .dash-donut{ grid-template-columns: 1fr; justify-items: center; }
}
.dashboard-page .dash-kpis--grid{
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  width: 100%;
}
.dashboard-page .dash-kpis--grid .kpi{
  flex: none;
  min-width: 0;
  width: 100%;
}
.dashboard-page .dash-kpis--grid a.kpi{
  text-decoration: none;
  color: inherit;
}
@media (max-width: 1100px){
  .dashboard-page .dash-kpis--grid{
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 560px){
  .dashboard-page .dash-kpis--grid{
    grid-template-columns: 1fr;
  }
}
.dashboard-page .kpi.is-alert .kpi-value{
  color: hsl(0 72% 40%);
}
.dashboard-page .kpi.is-warn .kpi-value{
  color: hsl(38 92% 36%);
}
.dashboard-page .kpi-unit{
  font-size: 0.72em;
  font-weight: 600;
  color: hsl(var(--muted-foreground));
}

/* Modal Meu perfil — mais largo, campos em 2 colunas */
#perfilModal .modal-dialog{
  max-width: 560px;
  width: min(560px, calc(100vw - 32px));
}
.perfil-modal-form{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 16px;
}
.perfil-modal-form .mfield{
  margin: 0;
}
.perfil-modal-form .login-alert,
.perfil-modal-form__section,
.perfil-modal-form__full{
  grid-column: 1 / -1;
  margin: 0;
}
.perfil-modal-form .login-alert{
  margin-bottom: 0;
}
@media (max-width: 560px){
  .perfil-modal-form{
    grid-template-columns: 1fr;
  }
}

.dash-block-title{
  font-size: 0.92rem;
  font-weight: 700;
  margin: 0 0 12px;
}
.dash-split{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: start;
}
@media (max-width: 860px){
  .dash-split{ grid-template-columns: 1fr; }
}
.dash-bars{
  display: flex;
  align-items: flex-end;
  gap: 8px;
  height: 160px;
  padding: 8px 4px 0;
}
.dash-bar{
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
}
.dash-bar__track{
  flex: 1 1 auto;
  width: 100%;
  max-width: 36px;
  display: flex;
  align-items: flex-end;
  background: hsl(var(--muted) / 0.45);
  border-radius: 8px 8px 4px 4px;
  overflow: hidden;
}
.dash-bar__fill{
  width: 100%;
  min-height: 0;
  background: hsl(var(--primary));
  border-radius: 8px 8px 0 0;
}
.dash-bar.is-today .dash-bar__fill{
  background: hsl(var(--warning, 38 92% 50%));
}
.dash-bar__val{
  margin-top: 6px;
  font-size: 11px;
  font-weight: 700;
  color: hsl(var(--foreground));
}
.dash-bar__lbl{
  font-size: 11px;
  color: hsl(var(--muted-foreground));
}

/* Abastecimento de unidades */
.abastecimento-page .abast-hint{
  margin: 10px 0 0;
}
.abast-toolbar{
  display: grid;
  grid-template-columns: minmax(140px, 180px) minmax(120px, 160px) minmax(180px, 1fr) auto;
  gap: 12px;
  align-items: end;
}
.abast-toolbar__action .btn{
  min-width: 120px;
  white-space: nowrap;
}
.abast-empty{
  margin-top: 18px;
  padding: 28px 20px;
  text-align: center;
  border: 1px dashed hsl(var(--border));
  border-radius: var(--r-md, 10px);
  background: hsl(var(--muted) / 0.14);
}
.abast-empty__title{
  font-weight: 700;
  margin-bottom: 6px;
}
.abast-local-head{
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin: 18px 0 12px;
  flex-wrap: wrap;
}
.abast-local-head__name{
  font-size: 1.05rem;
  font-weight: 700;
}
.abast-kpis{
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}
.abast-kpi{
  border: 1px solid hsl(var(--border));
  border-radius: var(--r-md, 10px);
  padding: 12px 14px;
  background: hsl(var(--muted) / 0.16);
  min-width: 0;
}
.abast-kpi__label{
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: hsl(var(--muted-foreground));
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-bottom: 6px;
}
.abast-kpi__value{
  font-size: 1.35rem;
  font-variant-numeric: tabular-nums;
  font-weight: 750;
  line-height: 1.1;
}
.abast-kpi.is-alert .abast-kpi__value{ color: hsl(0 72% 40%); }
.abast-kpi--perc .abast-perc{
  justify-content: flex-start;
  min-width: 0;
}
.abast-kpi--perc .abast-perc__val{ font-size: 1.2rem; min-width: auto; }
.abast-work{
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(260px, .85fr);
  gap: 14px;
  align-items: stretch;
}
.abast-block-title{
  font-size: 0.82rem;
  font-weight: 700;
  margin: 0 0 10px;
  letter-spacing: .01em;
}
.abast-itens{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.abast-item{
  border: 1px solid hsl(var(--border));
  border-radius: 10px;
  padding: 8px 10px 10px;
  background: hsl(var(--card));
}
.abast-item__top{
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: baseline;
  margin-bottom: 6px;
}
.abast-item__name{
  font-size: 12px;
  font-weight: 650;
}
.abast-item__meta{
  font-size: 11px;
  color: hsl(var(--muted-foreground));
  white-space: nowrap;
}
.abast-item .input{
  height: 38px;
}
.abast-actions{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.abast-lancar,
.abast-historico{
  border: 1px solid hsl(var(--border));
  border-radius: var(--r-md, 10px);
  padding: 14px 16px;
  background: hsl(var(--muted) / 0.08);
}
.abast-historico{
  max-height: 420px;
  overflow: auto;
}
.abast-plan{
  margin-top: 16px;
}
@media (max-width: 980px){
  .abast-toolbar{ grid-template-columns: 1fr 1fr; }
  .abast-toolbar__local,
  .abast-toolbar__action{ grid-column: 1 / -1; }
  .abast-kpis{ grid-template-columns: 1fr 1fr; }
  .abast-work{ grid-template-columns: 1fr; }
  .abast-historico{ max-height: none; }
}
@media (max-width: 560px){
  .abast-toolbar{ grid-template-columns: 1fr; }
  .abast-kpis{ grid-template-columns: 1fr; }
  .abast-itens{ grid-template-columns: 1fr; }
}
.abast-historico__head{
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
  margin-bottom: 8px;
}
.abast-historico__actions{
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.abast-historico__title{
  margin: 0;
  font-size: 0.95rem;
  font-weight: 650;
}
.abast-hist-row{
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid hsl(var(--border));
}
.abast-hist-row:last-child{ border-bottom: 0; }
.abast-mat-row{
  display: flex;
  gap: 8px;
}
.abast-mat-row .input{ flex: 1; }
.abast-rec-box{
  margin: 12px 0;
  padding: 10px 12px;
  border: 1px solid hsl(var(--border));
  border-radius: 8px;
  background: hsl(var(--muted) / 0.2);
}
.abastecimento-page .table .num{
  text-align: right;
  white-space: nowrap;
}
.abast-perc{
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 92px;
  justify-content: flex-end;
}
.abast-perc__bar{
  flex: 1;
  height: 8px;
  min-width: 52px;
  max-width: 88px;
  border-radius: 99px;
  background: hsl(var(--muted) / 0.55);
  overflow: hidden;
}
.abast-perc__bar span{
  display: block;
  height: 100%;
  border-radius: inherit;
  background: hsl(var(--muted-foreground) / 0.45);
}
.abast-perc__val{
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  font-size: 12px;
  min-width: 2.6em;
  text-align: right;
}
.abast-perc--danger .abast-perc__bar span{ background: hsl(0 72% 48%); }
.abast-perc--danger .abast-perc__val{ color: hsl(0 72% 40%); }
.abast-perc--warn .abast-perc__bar span{ background: hsl(38 92% 46%); }
.abast-perc--warn .abast-perc__val{ color: hsl(32 80% 32%); }
.abast-perc--success .abast-perc__bar span{ background: hsl(142 64% 36%); }
.abast-perc--success .abast-perc__val{ color: hsl(142 64% 28%); }
.abast-perc--over .abast-perc__bar span{ background: hsl(168 70% 32%); }
.abast-perc--over .abast-perc__val{ color: hsl(168 70% 24%); }
.abast-perc--muted .abast-perc__bar span{ width: 0 !important; }
.abast-hist-just{
  margin-top: 4px;
  max-width: 280px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
}
.abast-hist-row__meta{
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}
.abast-rec-card{
  border: 1px solid hsl(var(--border));
  border-radius: var(--r-md, 10px);
  padding: 12px 14px;
  background: hsl(var(--muted) / 0.18);
  margin-bottom: 12px;
}
.abast-rec-card:last-child{ margin-bottom: 0; }
.abast-rec-card__head{
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}
.abast-sig-box{
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid hsl(var(--border));
}
.abast-sig-img{
  display: block;
  max-width: 320px;
  width: 100%;
  background: #fff;
  border: 1px solid hsl(var(--border));
  border-radius: 8px;
}

/* Hub de módulos + Gerenciamento de Leitos */
body.layout-nosidebar .app-shell{
  margin-left: 0 !important;
}
body.layout-nosidebar .app-header{
  left: 0;
}
body.layout-nosidebar .hdr-menu-btn{
  display: none;
}

body.modulos-hub-body{
  background: #5A96FF;
}
body.modulos-hub-body .login-bg{
  position: fixed;
  z-index: 0;
}
body.modulos-hub-body .app-shell,
body.modulos-hub-body .app-main,
body.modulos-hub-body .page,
body.modulos-hub-body .page__inner,
body.modulos-hub-body .page__stack{
  background: transparent;
}
body.modulos-hub-body .app-shell,
body.modulos-hub-body .app-main{
  position: relative;
  z-index: 1;
}
body.modulos-hub-body .page__inner{
  max-width: 1120px;
  overflow: visible;
}
body.modulos-hub-body .page__stack{
  min-height: calc(100vh - var(--hdr-min-h) - 48px);
  align-content: center;
}
body.modulos-hub-body .app-header{
  background: rgba(10, 22, 42, 0.28);
  border-bottom-color: rgba(255, 255, 255, 0.10);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
body.modulos-hub-body .header-kicker,
body.modulos-hub-body .page-subtitle{
  color: rgba(255, 255, 255, 0.58);
}
body.modulos-hub-body .page-title{
  color: rgba(255, 255, 255, 0.96);
}
body.modulos-hub-body .hdr-tile,
body.modulos-hub-body .hdr-logout{
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.10);
  color: rgba(255, 255, 255, 0.92);
}
body.modulos-hub-body .hdr-tile:hover,
body.modulos-hub-body .hdr-logout:hover{
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.18);
}

.modulos-hub{
  width: 100%;
  padding: 8px 0 32px;
  color: rgba(255, 255, 255, 0.92);
}
.modulos-hub__mast{
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: 28px;
}
.modulos-hub__logo{
  width: 132px;
  height: 132px;
  margin: -8px 0 -28px;
  object-fit: contain;
  filter: drop-shadow(0 8px 22px rgba(0, 0, 0, 0.36));
}
.modulos-hub__title{
  margin: 4px 0 0;
  font-size: clamp(1.6rem, 3.4vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: rgba(255, 255, 255, 0.98);
}
.modulos-hub__lead{
  margin: 8px 0 0;
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.62);
  max-width: 36ch;
}
.modulos-hub__lead strong{
  color: rgba(255, 255, 255, 0.92);
  font-weight: 650;
}
.modulos-hub__grid{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
}
.modulos-hub__card{
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  min-height: 228px;
  padding: 24px 22px 20px;
  overflow: hidden;
  text-decoration: none;
  color: rgba(255, 255, 255, 0.94);
  background: rgba(0, 0, 0, 0.38);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 20px;
  box-shadow:
    0 18px 45px rgba(0, 0, 0, 0.28),
    0 0 0 1px rgba(255, 255, 255, 0.04) inset;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.modulos-hub__card:hover{
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.22);
  box-shadow:
    0 22px 52px rgba(0, 0, 0, 0.34),
    0 0 0 1px rgba(255, 255, 255, 0.08) inset;
}
.modulos-hub__card-glow{
  position: absolute;
  inset: -1px;
  border-radius: 21px;
  pointer-events: none;
  opacity: 0.55;
  z-index: 0;
  background: conic-gradient(
    from 0deg,
    transparent 0%,
    rgba(83, 176, 255, 0.7) 18%,
    transparent 32%,
    rgba(31, 209, 195, 0.55) 52%,
    transparent 68%
  );
  padding: 1px;
  animation: loginRing 6s linear infinite;
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  mask-composite: exclude;
}
.modulos-hub__card--leitos .modulos-hub__card-glow{
  background: conic-gradient(
    from 120deg,
    transparent 0%,
    rgba(31, 209, 195, 0.7) 18%,
    transparent 32%,
    rgba(83, 176, 255, 0.55) 52%,
    transparent 68%
  );
}
.modulos-hub__card--administracao .modulos-hub__card-glow{
  background: conic-gradient(
    from 200deg,
    transparent 0%,
    rgba(196, 164, 92, 0.72) 18%,
    transparent 34%,
    rgba(255, 214, 120, 0.5) 54%,
    transparent 70%
  );
}
.modulos-hub__card > *:not(.modulos-hub__card-glow){
  position: relative;
  z-index: 1;
}
.modulos-hub__icon{
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.10);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.95);
}
.modulos-hub__icon .login-svg{
  width: 22px;
  height: 22px;
}
.modulos-hub__card--lavanderia .modulos-hub__icon{
  background: rgba(83, 176, 255, 0.18);
}
.modulos-hub__card--leitos .modulos-hub__icon{
  background: rgba(31, 209, 195, 0.16);
}
.modulos-hub__card--administracao .modulos-hub__icon{
  background: rgba(196, 164, 92, 0.22);
}
.modulos-hub__card--higiene .modulos-hub__card-glow{
  background: conic-gradient(
    from 80deg,
    transparent 0%,
    rgba(74, 222, 128, 0.7) 18%,
    transparent 34%,
    rgba(34, 197, 94, 0.5) 54%,
    transparent 70%
  );
}
.modulos-hub__card--higiene .modulos-hub__icon{
  background: rgba(74, 222, 128, 0.18);
}
.modulos-hub__name{
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.modulos-hub__desc{
  margin-top: auto;
  font-size: 0.9rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.62);
}
.modulos-hub__cta{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  height: 38px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.96);
  color: rgba(10, 18, 34, 0.95);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
  transition: transform .15s ease;
}
.modulos-hub__cta .login-svg{
  width: 14px;
  height: 14px;
  color: rgba(10, 18, 34, 0.75);
  transition: transform .25s ease;
}
.modulos-hub__card:hover .modulos-hub__cta{
  transform: translateY(-1px);
}
.modulos-hub__card:hover .modulos-hub__cta .login-svg{
  transform: translateX(3px);
}
.modulos-hub__empty{
  max-width: 520px;
  margin: 0 auto;
  padding: 22px 24px;
  text-align: center;
  color: rgba(255, 255, 255, 0.78);
  background: rgba(0, 0, 0, 0.32);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 20px;
  backdrop-filter: blur(16px);
}
.modulos-hub__empty p{
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.5;
}

.leitos-mgmt-page .leitos-kpis{
  margin-top: 4px;
}
.leitos-mgmt-page .leitos-kpi-filter{
  text-align: left;
  cursor: pointer;
  border: 1px solid hsl(var(--border));
  width: 100%;
}
.leitos-andar{
  margin-bottom: 28px;
}
.leitos-andar__title{
  margin: 0 0 12px;
  font-size: 16px;
  font-weight: 600;
}
.leitos-quarto{
  margin-bottom: 16px;
}
.leitos-quarto__title{
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 500;
  color: hsl(var(--muted-foreground));
}
.leitos-quarto__grid{
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
  gap: 8px;
}
.leitos-bed{
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 10px 12px;
  border-radius: var(--r-sm);
  border: 1px solid hsl(var(--border));
  background: hsl(var(--card));
  text-align: left;
  cursor: default;
}
.leitos-bed.is-action{
  cursor: pointer;
}
.leitos-bed.is-action:hover{
  border-color: hsl(var(--foreground) / .28);
}
.leitos-bed:disabled{
  opacity: 1;
  cursor: default;
}
.leitos-bed__code{
  font-size: 14px;
  font-weight: 600;
}
.leitos-bed__status{
  font-size: 12px;
  color: hsl(var(--muted-foreground));
}
.leitos-bed--livre{
  box-shadow: inset 3px 0 0 hsl(142 45% 36%);
}
.leitos-bed--ocupado{
  box-shadow: inset 3px 0 0 hsl(217 70% 45%);
}
.leitos-bed--higienizacao{
  box-shadow: inset 3px 0 0 hsl(38 80% 42%);
}
.leitos-bed--bloqueado{
  box-shadow: inset 3px 0 0 hsl(var(--destructive));
}

.leitos-transf-page .table--transf th,
.leitos-transf-page .table--transf td{
  padding-top: 8px;
  padding-bottom: 8px;
  vertical-align: middle;
}
.leitos-transf-page .table--transf .col-expand{
  width: 40px;
  padding-right: 4px;
  padding-left: 6px;
}
.leitos-transf-page .table--transf .col-actions{
  white-space: nowrap;
}
.leitos-transf-page .table--transf .transf-detail-row td{
  padding: 12px 14px 16px;
  vertical-align: top;
}
.transf-expand{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  padding: 0;
  border: 1px solid hsl(var(--border));
  border-radius: 8px;
  background: hsl(var(--background));
  color: hsl(var(--foreground));
  cursor: pointer;
}
.transf-expand:hover,
.transf-expand.is-open{
  background: hsl(var(--primary) / .1);
  border-color: hsl(var(--primary) / .35);
  color: hsl(var(--primary));
}
.transf-expand svg{
  display: block;
}
.transf-row.is-expanded td{
  border-bottom-color: transparent;
}
.transf-detail-row td{
  background: hsl(var(--muted) / .45);
  padding: 12px 14px 16px;
  vertical-align: top;
}
.transf-detail{
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px 18px;
  margin: 0;
}
.transf-detail__item{
  min-width: 0;
}
.transf-detail__item dt{
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .02em;
  color: hsl(var(--muted-foreground));
  margin: 0 0 2px;
}
.transf-detail__item dd{
  margin: 0;
  font-size: 13px;
  line-height: 1.35;
  word-break: break-word;
}
.transf-detail__item--full{
  grid-column: 1 / -1;
}
.transf-st{
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.35;
  border: 1px solid hsl(var(--border));
  white-space: nowrap;
}
.transf-st--aguardando{
  background: hsl(38 90% 92%);
  color: hsl(32 70% 28%);
  border-color: hsl(38 70% 62%);
}
.transf-st--negado{
  background: hsl(0 70% 94%);
  color: hsl(0 55% 32%);
  border-color: hsl(0 50% 70%);
}
.transf-st--cancelado{
  background: hsl(var(--muted));
  color: hsl(var(--foreground));
}
.transf-st--concluido{
  background: hsl(142 50% 92%);
  color: hsl(142 45% 24%);
  border-color: hsl(142 40% 55%);
}
.transf-st--em_andamento,
.transf-st--em_transito{
  background: hsl(217 80% 93%);
  color: hsl(217 70% 32%);
  border-color: hsl(217 60% 62%);
}
select.transf-status-sel{
  min-width: 0;
  width: max-content;
  max-width: 132px;
  height: 24px;
  padding: 0 6px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.2;
  border-radius: 999px;
  appearance: auto;
}
.leitos-transf-page .mfield__check{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-right: 14px;
  margin-bottom: 8px;
  font-size: 14px;
}
.transf-radio-wrap{
  display: flex;
  flex-wrap: wrap;
}

.modal--transf,
.modal--transf-busca{
  align-items: flex-start;
  justify-content: center;
  padding: max(16px, 3vh) 24px;
  overflow: hidden;
}
.modal--transf .modal-dialog--transf{
  width: min(1120px, calc(100vw - 48px));
  max-width: 1120px;
  max-height: min(920px, calc(94vh - 24px));
  max-height: min(920px, calc(94dvh - 24px));
  margin: auto;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.modal--transf .modal-head,
.modal--transf .modal-foot,
.modal--transf-busca .modal-head{
  flex-shrink: 0;
}
.modal--transf .modal-body,
.modal--transf-busca .modal-body{
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.modal--transf .form-grid--3col{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
}
.modal--transf .form-grid--3col .field--full{
  grid-column: 1 / -1;
}
.modal--transf .mfield{
  margin-top: 0;
}
.modal--transf .modal-body > .form-grid,
.modal--transf .modal-body > .mfield{
  margin-top: 14px;
}
.modal--transf .modal-body > .form-grid:first-of-type,
.modal--transf .modal-body > .mfield:first-of-type,
.modal--transf .modal-body > .login-alert{
  margin-top: 0;
}
.modal--transf-busca .modal-dialog--transf-busca{
  width: min(720px, calc(100vw - 48px));
  max-width: 720px;
  max-height: min(780px, calc(92vh - 24px));
  max-height: min(780px, calc(92dvh - 24px));
  margin: auto;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.transf-busca-table{
  margin-top: 10px;
  max-height: min(420px, 52vh);
  overflow: auto;
}
@media (max-width: 900px){
  .modal--transf .form-grid--3col{
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 640px){
  .modal--transf,
  .modal--transf-busca{
    padding: 12px;
  }
  .modal--transf .modal-dialog--transf,
  .modal--transf-busca .modal-dialog--transf-busca{
    width: 100%;
    max-width: none;
    max-height: calc(100dvh - 16px);
  }
  .modal--transf .form-grid--3col{
    grid-template-columns: 1fr;
  }
}
@media (max-width: 640px){
  .modulos-hub__logo{
    width: 108px;
    height: 108px;
    margin: -4px 0 -22px;
  }
  .modulos-hub__card{
    min-height: 0;
  }
}

/* Passagem de plantão — Gerenciamento de Leitos (estilo Hot) */
.leitos-passagem-page .page-head{
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.leitos-pp-rotas-card{
  margin-bottom: 14px;
}
.leitos-pp-rotas-head{
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}
.leitos-pp-rotas-label{
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: hsl(var(--muted-foreground));
}
.leitos-pp-rotas{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.leitos-pp-rota-btn{
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid hsl(var(--border));
  background: hsl(var(--background));
  color: hsl(var(--foreground));
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.leitos-pp-rota-btn:hover{
  border-color: hsl(var(--primary) / .4);
}
.leitos-pp-rota-btn.is-active{
  background: hsl(var(--primary) / .1);
  border-color: hsl(var(--primary) / .45);
  color: hsl(var(--primary));
  box-shadow: 0 0 0 2px hsl(var(--primary) / .18);
}
.leitos-pp-rota-seta{
  opacity: .65;
  margin: 0 4px;
  font-weight: 400;
}
.leitos-pp-rota-count{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.4em;
  margin-left: 6px;
  padding: 0 6px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  background: hsl(var(--muted));
}
.leitos-pp-st{
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  border: 1px solid hsl(var(--border));
}
.leitos-pp-st--aberto{
  background: hsl(38 90% 92%);
  color: hsl(32 70% 28%);
  border-color: hsl(38 70% 62%);
}
.leitos-pp-st--recebido{
  background: hsl(142 50% 92%);
  color: hsl(142 45% 24%);
  border-color: hsl(142 40% 55%);
}
.modal--lancamento .form-grid--3col{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
}
.modal--lancamento .form-grid--3col .field--full{
  grid-column: 1 / -1;
}
.leitos-pp-detail__meta{
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px 16px;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid hsl(var(--border));
}
.leitos-pp-detail__meta .muted{
  display: block;
  font-size: 11px;
  margin-bottom: 2px;
}
.leitos-pp-detail__block{
  margin-bottom: 16px;
}
.leitos-pp-detail__block h3{
  margin: 0 0 6px;
  font-size: 15px;
}
.leitos-pp-pre{
  white-space: pre-wrap;
  line-height: 1.45;
  color: hsl(var(--muted-foreground));
}
@media (max-width: 720px){
  .modal--lancamento .form-grid--3col{
    grid-template-columns: 1fr;
  }
}

/* Higiene — kg por mês (fluxo de caixa) */
.higiene-kg-chart{
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.higiene-kg-row{
  display: grid;
  grid-template-columns: 72px 1fr 88px;
  gap: 10px;
  align-items: center;
}
.higiene-kg-label{
  font-size: 12px;
  color: hsl(var(--muted-foreground));
  text-transform: lowercase;
}
.higiene-kg-bar-wrap{
  height: 10px;
  border-radius: 999px;
  background: hsl(var(--muted) / 0.55);
  overflow: hidden;
}
.higiene-kg-bar{
  display: block;
  height: 100%;
  border-radius: 999px;
  background: hsl(142 45% 42%);
}
.higiene-kg-val{
  font-size: 12px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.higiene-residuos-page .higiene-res-input{
  width: 100%;
  max-width: 110px;
  text-align: right;
}

/* PGRSS — pesquisa normativa */
.pgrss-pesquisa__alertas{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}
.pgrss-pesquisa__atalhos{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}
.pgrss-pesquisa__row{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 6px;
}
.pgrss-pesquisa__row .input{
  flex: 1 1 220px;
  min-width: 180px;
}
.pgrss-pesquisa__resultado{
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid hsl(var(--border));
}
.pgrss-pesquisa__disclaimer{
  font-size: 12px;
  margin: 0 0 10px;
  line-height: 1.4;
}
.pgrss-pesquisa__resumo{
  white-space: pre-wrap;
  line-height: 1.45;
  margin-bottom: 14px;
}
.pgrss-pesquisa__cols{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.pgrss-pesquisa__list{
  margin: 0;
  padding-left: 18px;
  line-height: 1.45;
}
.pgrss-pesquisa__list li + li{
  margin-top: 6px;
}
@media (max-width: 720px){
  .pgrss-pesquisa__cols{
    grid-template-columns: 1fr;
  }
}

/* Higiene — abas PGRSS densas: scroll horizontal no mobile/tablet */
.higiene-pgrss-page > .tabs-bar.tabs-bar--compact{
  flex-wrap: nowrap !important;
  overflow-x: auto !important;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}
.higiene-pgrss-page > .tabs-bar.tabs-bar--compact > .tab-btn{
  flex: 0 0 auto;
}
.higiene-pgrss-page > .tabs-bar.tabs-bar--compact .tab-label{
  white-space: nowrap;
}

.safety-huddle-page > .tabs-bar.tabs-bar--compact{
  flex-wrap: nowrap !important;
  overflow-x: auto !important;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}
.safety-huddle-page > .tabs-bar.tabs-bar--compact > .tab-btn{
  flex: 0 0 auto;
  min-height: 44px;
  touch-action: manipulation;
}
.safety-huddle-page > .tabs-bar.tabs-bar--compact .tab-label{
  white-space: nowrap;
}
.safety-perguntas-run .card{
  border: 1px solid hsl(var(--border));
}
.safety-huddle-page .form-grid,
.safety-huddle-page .modal-body.form-grid,
dialog.modal .modal-body.form-grid{
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
}
.safety-huddle-page .form-span-2,
dialog.modal .form-span-2{
  grid-column: 1 / -1;
}
.safety-check{
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
}
.safety-toolbar{
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px 12px;
  margin-bottom: 16px;
}
.safety-toolbar__meta{
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  flex: 0 1 auto;
  min-width: 0;
}
.safety-toolbar__status{
  align-self: flex-start;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.safety-toolbar__field{
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.safety-toolbar__field .input{
  min-height: 44px;
}
.safety-toolbar__field--grow{
  flex: 1 1 200px;
  min-width: 160px;
}
.safety-toolbar__actions{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-left: auto;
}
.safety-toolbar__actions .btn{
  min-height: 44px;
  touch-action: manipulation;
}
.safety-huddle-page .safety-kpis.dash-kpis--grid,
.safety-huddle-page .safety-kpis{
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
}
.safety-kpis .kpi{
  margin: 0;
  min-width: 0;
}
.safety-kpis--indicadores{
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
}
.safety-ind-board{
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.safety-ind-row{
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.safety-ind-kpi{
  margin: 0;
  min-width: 0;
  border: 1px solid hsl(var(--border));
  transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
}
.safety-ind-kpi .kpi-value{
  font-variant-numeric: tabular-nums;
}
.safety-ind-kpi .kpi-sub{
  margin-top: 4px;
  font-size: 12px;
}
.safety-ind-kpi[data-tone="ok"]{
  border-color: hsl(var(--success) / .45);
  background: hsl(var(--success) / .08);
}
.safety-ind-kpi[data-tone="ok"] .kpi-value{
  color: hsl(var(--success));
}
.safety-ind-kpi[data-tone="warn"]{
  border-color: hsl(38 92% 45% / .55);
  background: hsl(38 92% 50% / .10);
}
.safety-ind-kpi[data-tone="warn"] .kpi-value{
  color: hsl(32 90% 32%);
}
.safety-ind-kpi[data-tone="danger"]{
  border-color: hsl(var(--destructive) / .5);
  background: hsl(var(--destructive) / .08);
}
.safety-ind-kpi[data-tone="danger"] .kpi-value{
  color: hsl(var(--destructive));
}
.safety-ind-kpi[data-tone="neutral"] .kpi-value{
  color: inherit;
}
@media (max-width: 900px){
  .safety-ind-row{
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 480px){
  .safety-ind-row{
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  .safety-ind-kpi .kpi-value{
    font-size: 1.25rem;
  }
}
.safety-presenca{
  margin: 0 0 18px;
  padding: 12px;
  border: 1px solid hsl(var(--border));
  border-radius: 10px;
  background: hsl(var(--card));
}
.safety-presenca__head{
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.safety-presenca__title{
  font-weight: 600;
  font-size: 0.95rem;
}
.safety-presenca__grid{
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 8px;
}
.safety-presenca__btn{
  appearance: none;
  border: 1px solid hsl(var(--border));
  background: hsl(var(--bg));
  color: inherit;
  border-radius: 10px;
  min-height: 48px;
  padding: 10px 12px;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 500;
  line-height: 1.2;
  text-align: center;
  cursor: pointer;
  touch-action: manipulation;
  transition: background .12s ease, border-color .12s ease, color .12s ease;
}
.safety-presenca__btn:disabled{
  opacity: .55;
  cursor: default;
}
.safety-presenca__btn.is-on{
  background: hsl(var(--success) / .14);
  border-color: hsl(var(--success) / .55);
  color: hsl(var(--success));
  font-weight: 650;
}

/* Native dialogs (Pergunta / PDCA) */
dialog.modal#safetyPerguntaModal,
dialog.modal#safetyPdcaModal{
  position: fixed;
  inset: 0;
  z-index: 90;
  margin: auto;
  padding: 0;
  border: none;
  background: transparent;
  max-width: calc(100vw - 24px);
  max-height: min(90dvh, 920px);
  width: min(var(--modal-w), calc(100vw - 24px));
}
dialog.modal#safetyPerguntaModal[open],
dialog.modal#safetyPdcaModal[open]{
  display: flex;
  align-items: center;
  justify-content: center;
}
dialog.modal#safetyPerguntaModal::backdrop,
dialog.modal#safetyPdcaModal::backdrop{
  background: rgba(0, 0, 0, 0.45);
}
dialog.modal#safetyPerguntaModal .modal-card,
dialog.modal#safetyPdcaModal .modal-card{
  display: flex;
  flex-direction: column;
  max-height: min(90dvh, 920px);
  width: 100%;
  border-radius: var(--modal-r);
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  box-shadow: 0 30px 90px rgba(0,0,0,.35);
  overflow: hidden;
}
dialog.modal#safetyPerguntaModal .modal-body,
dialog.modal#safetyPdcaModal .modal-body{
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  flex: 1 1 auto;
  min-height: 0;
}
dialog.modal#safetyPerguntaModal .modal-foot,
dialog.modal#safetyPdcaModal .modal-foot{
  flex: 0 0 auto;
  gap: 8px;
}
dialog.modal#safetyPerguntaModal .modal-foot .btn,
dialog.modal#safetyPdcaModal .modal-foot .btn{
  min-height: 44px;
  touch-action: manipulation;
}

@media (max-width: 768px){
  .safety-huddle-page > .page-head{
    margin-top: 8px;
    margin-bottom: 16px;
  }
  .safety-huddle-page .page-head__subtitle{
    display: none;
  }
  .safety-huddle-page .cad-card-sub{
    font-size: 0.8125rem;
  }
  .safety-toolbar{
    flex-direction: column;
    align-items: stretch;
  }
  .safety-toolbar__meta{
    width: 100%;
  }
  .safety-toolbar__meta .safety-toolbar__field{
    width: 100%;
  }
  .safety-toolbar__field--grow{
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;
  }
  .safety-toolbar__actions{
    margin-left: 0;
    width: 100%;
  }
  .safety-toolbar__actions .btn{
    flex: 1 1 0;
  }
  .safety-huddle-page .safety-kpis.dash-kpis--grid,
  .safety-huddle-page .safety-kpis{
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .safety-kpis .kpi{
    padding: 10px 12px;
  }
  .safety-kpis .kpi-value{
    font-size: 1.35rem;
  }
  .safety-kpis--indicadores{
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .safety-huddle-page .form-grid,
  .safety-huddle-page .modal-body.form-grid,
  dialog.modal .modal-body.form-grid{
    grid-template-columns: 1fr;
  }
  .safety-huddle-page .form-actions .btn,
  .safety-sticky-actions .btn,
  .safety-huddle-page #btnSafetyAddRisco,
  .safety-huddle-page #btnSafetyNovoPdca,
  .safety-huddle-page #btnSafetyNovaPergunta{
    width: 100%;
    min-height: 44px;
  }
  .safety-presenca__grid{
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .safety-presenca__btn{
    min-height: 52px;
    font-size: 0.88rem;
    padding: 12px 10px;
  }
  .safety-perguntas-run .card .card-pad{
    padding: 12px;
  }
  .safety-perguntas-run .input,
  .safety-perguntas-run select,
  .safety-perguntas-run textarea{
    min-height: 44px;
    font-size: 16px; /* evita zoom iOS */
  }
  dialog.modal#safetyPerguntaModal,
  dialog.modal#safetyPdcaModal{
    width: calc(100vw - 16px);
    max-width: calc(100vw - 16px);
    max-height: min(92dvh, 100%);
  }
  dialog.modal#safetyPerguntaModal .modal-card,
  dialog.modal#safetyPdcaModal .modal-card{
    max-height: min(92dvh, 100%);
  }
  dialog.modal#safetyPerguntaModal .modal-foot,
  dialog.modal#safetyPdcaModal .modal-foot{
    flex-wrap: wrap;
  }
  dialog.modal#safetyPerguntaModal .modal-foot .btn,
  dialog.modal#safetyPdcaModal .modal-foot .btn{
    flex: 1 1 calc(50% - 4px);
  }
}
@media (max-width: 480px){
  .safety-kpis,
  .safety-kpis--indicadores{
    grid-template-columns: 1fr 1fr;
  }
  .safety-presenca{
    padding: 10px;
  }
  .safety-presenca__btn{
    min-height: 56px;
  }
}

/* Cadastros Safety — botões full-width no mobile */
@media (max-width: 768px){
  [data-pane="areas"] > .form-actions .btn,
  [data-pane="condutores"] > .form-actions .btn{
    width: 100%;
    min-height: 44px;
  }
}

/* Passagem higiene: sem card duplo; botão alinhado ao padrão Argus */
.higiene-passagem-page > .form-actions{
  margin-bottom: 16px;
}
.higiene-passagem-page .passagem-plantao-root > .form-actions{
  margin-bottom: 16px;
}

/* Importar / Exportar — alinhado ao chrome Lavanderia (listagem_client) */
.data-io-page a.icon-btn{
  text-decoration: none;
}
.data-io-page .ac-peso-stack{
  overflow: hidden;
}
.data-io-page .ac-peso-search{
  border-bottom: 1px solid hsl(var(--border));
}

/* Higiene — etiquetas de produtos diluídos */
.higiene-etiq-gerar{
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px 16px;
  margin-bottom: 22px;
}
.higiene-etiq-gerar .field--full,
.higiene-etiq-gerar .form-actions{
  grid-column: 1 / -1;
}
.higiene-etiq-grid{
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
  min-height: 48px;
}
.higiene-etiq-model{
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px;
  border: 1px solid hsl(var(--border));
  border-radius: 12px;
  background: hsl(var(--card));
  box-shadow: 0 1px 2px rgba(0,0,0,.03);
}
.higiene-etiq-model__media{
  display: flex;
  align-items: center;
  justify-content: center;
  height: 120px;
  border-radius: 10px;
  background: hsl(var(--secondary) / 0.45);
  border: 1px solid hsl(var(--border));
  overflow: hidden;
}
.higiene-etiq-model__img{
  max-width: 100%;
  max-height: 120px;
  object-fit: contain;
}
.higiene-etiq-model__img--empty{
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  color: hsl(var(--muted-foreground));
  opacity: 0.55;
}
.higiene-etiq-model__img--empty .nav-svg{
  width: 36px;
  height: 36px;
}
.higiene-etiq-model__title{
  font-weight: 600;
  font-size: 0.98rem;
  line-height: 1.3;
}
.higiene-etiq-model__meta{
  font-size: 0.82rem;
  margin-top: 2px;
}
.higiene-etiq-model__dil{
  margin-top: 8px;
  font-size: 0.82rem;
  color: hsl(var(--foreground));
}
.higiene-etiq-model__actions{
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
  padding-top: 4px;
}
.higiene-etiq-preview__label{
  font-size: 0.8rem;
  margin-bottom: 8px;
}
.higiene-etiq-preview__card{
  display: flex;
  gap: 16px;
  align-items: stretch;
  max-width: 420px;
  min-height: 140px;
  padding: 14px 16px;
  border: 1px dashed hsl(var(--border));
  border-radius: 12px;
  background: hsl(var(--secondary) / 0.35);
  aspect-ratio: 10 / 4;
}
.higiene-etiq-preview__text{
  flex: 1;
  font-size: 0.82rem;
  line-height: 1.45;
  display: grid;
  gap: 2px;
}
.higiene-etiq-preview__foto{
  width: 88px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.higiene-etiq-preview__foto img,
.higiene-etiq-foto-atual img{
  max-width: 100%;
  max-height: 88px;
  object-fit: contain;
  border-radius: 8px;
  border: 1px solid hsl(var(--border));
  background: #fff;
}
.higiene-etiq-foto-atual{
  margin-bottom: 12px;
  text-align: center;
}
.higiene-etiq-foto-atual img{
  max-height: 120px;
}
.higiene-etiq-dil-list{
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
  display: grid;
  gap: 8px;
}
.higiene-etiq-dil-list li{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid hsl(var(--border));
  border-radius: 10px;
  background: hsl(var(--secondary) / 0.3);
}
.higiene-etiq-dil-form{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding-top: 8px;
  border-top: 1px solid hsl(var(--border));
}
.higiene-etiq-dil-form .field--full,
.higiene-etiq-dil-form #etiqDilAddBtn{
  grid-column: 1 / -1;
}
@media (max-width: 640px){
  .higiene-etiq-preview__card{
    aspect-ratio: auto;
    flex-direction: column-reverse;
  }
  .higiene-etiq-dil-form{
    grid-template-columns: 1fr;
  }
  .higiene-etiq-model__actions .btn{
    flex: 1 1 calc(50% - 6px);
    min-height: 40px;
  }
}

/* Manual de webservice (Administração) */
.ws-manual-toc{
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin: 0 0 22px;
  padding-bottom: 14px;
  border-bottom: 1px solid hsl(var(--border));
}
.ws-manual-toc a{
  font-size: 0.875rem;
  font-weight: 600;
  color: hsl(var(--primary));
  text-decoration: none;
}
.ws-manual-toc a:hover{
  text-decoration: underline;
}
.ws-manual-section{
  margin: 0 0 28px;
  scroll-margin-top: 88px;
}
.ws-manual-section .cad-card-title{
  margin: 0 0 10px;
  font-size: 1.05rem;
}
.ws-manual-list{
  margin: 0 0 12px;
  padding-left: 1.2rem;
  line-height: 1.5;
}
.ws-manual-list li{
  margin-bottom: 6px;
}
.ws-manual-code{
  margin: 12px 0 0;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid hsl(var(--border));
  background: hsl(var(--secondary) / 0.45);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.8rem;
  line-height: 1.45;
  overflow-x: auto;
  white-space: pre;
}
.ws-manual-page .page-head{
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
@media (max-width: 640px){
  .ws-manual-page .page-head__right{
    width: 100%;
  }
  .ws-manual-page .page-head__right .btn{
    width: 100%;
  }
}


