/* ============================================================
   /avaliacao/form — prefixo av-
   ============================================================ */

/* ── HERO ─────────────────────────────────────────────────── */
.av-hero {
    background: linear-gradient(135deg, #07142f 0%, #0d1d47 60%, #1a2f6e 100%);
    border-radius: 20px;
    padding: 22px 30px;
    margin-bottom: 20px;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 28px;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.av-hero::after {
    content: "";
    position: absolute;
    top: -80px;
    right: 180px;
    width: 340px;
    height: 340px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.03);
    pointer-events: none;
}

.av-hero-icon {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.10);
    border: 1.5px solid rgba(255, 255, 255, 0.18);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    color: #93c5fd;
    margin-bottom: 18px;
}

.av-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.10);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    padding: 4px 12px;
    font-size: 10.5px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.75);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 9px;
}

.av-hero-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: #ffffff;
    margin: 0 0 5px 0;
    line-height: 1.2;
}

.av-hero-desc {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.55);
    line-height: 1.5;
    margin: 0;
    max-width: 620px;
}

/* ── STATS DO HERO ────────────────────────────────────────── */
.av-hero-stats {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 10px;
}

.av-stat {
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.11);
    border-radius: 12px;
    padding: 10px 16px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.av-stat-label {
    font-size: 11px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.45);
    text-transform: uppercase;
    letter-spacing: 0.6px;
}

.av-stat-value {
    font-size: 18px;
    font-weight: 800;
    color: #ffffff;
    line-height: 1.1;
}

.av-stat--green  .av-stat-value { color: #34d399; }
.av-stat--orange .av-stat-value { color: #fbbf24; }

.av-no-plan {
    background: rgba(251, 191, 36, 0.10);
    border: 1px solid rgba(251, 191, 36, 0.25);
    border-radius: 14px;
    padding: 18px 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.av-no-plan-label {
    font-size: 12px;
    font-weight: 700;
    color: #fbbf24;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.av-no-plan-text {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.55);
    line-height: 1.5;
}

/* ── PAINEL BRANCO ────────────────────────────────────────── */
.av-panel {
    background: white;
    border-radius: 20px;
    padding: 36px 40px;
    box-shadow: 0 4px 24px rgba(15, 23, 42, 0.07);
    border: 1px solid #f1f5f9;
    margin-bottom: 24px;
}

/* ── HERO + painel unidos num card único (tela de lista) ───── */
.av-joined {
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(15, 23, 42, 0.07);
    margin-bottom: 24px;
}
.av-joined form { margin: 0; }
.av-joined .av-hero { margin-bottom: 0; border-radius: 0; }
.av-joined .av-panel { border-radius: 0; border: none; box-shadow: none; margin-bottom: 0; }

/* ── PAINEL EM ANDAMENTO ──────────────────────────────────── */
.av-panel--andamento {
    background: linear-gradient(135deg, #eff6ff 0%, #f0f9ff 100%);
    border: 1px solid #bfdbfe;
}

.av-progress-card {
    background: white;
    border: 1px solid #e0e7ff;
    border-radius: 14px;
    padding: 18px 22px;
    margin-bottom: 12px;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.06);
}

.av-progress-card:last-child { margin-bottom: 0; }

.av-progress-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 12px;
}

.av-progress-code {
    font-family: monospace;
    font-weight: 800;
    font-size: 14px;
    color: #2563eb;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    padding: 4px 10px;
    border-radius: 8px;
    flex-shrink: 0;
}

.av-progress-title {
    flex: 1;
    font-size: 15px;
    font-weight: 600;
    color: #111827;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.av-progress-pct {
    font-size: 18px;
    font-weight: 800;
    color: #2563eb;
    flex-shrink: 0;
}

.av-progress-bar.ui-progressbar {
    height: 14px !important;
    border-radius: 999px !important;
    background: #e0e7ff !important;
    border: none !important;
}

.av-progress-bar.ui-progressbar .ui-progressbar-value {
    background: linear-gradient(90deg, #2563eb, #3b82f6) !important;
    border-radius: 999px !important;
    transition: width 0.4s ease !important;
}

.av-progress-bar.ui-progressbar .ui-progressbar-label { display: none !important; }

.av-progress-status {
    margin-top: 10px;
    font-size: 13px;
    color: #6b7280;
    display: flex;
    align-items: center;
    gap: 6px;
}

.av-progress-status i { color: #2563eb; }

/* ── TÍTULOS DE SEÇÃO ─────────────────────────────────────── */
.av-section-sub {
    font-size: 14px;
    font-weight: 700;
    color: #4b5563;
    margin: 28px 0 16px 0;
    display: flex;
    align-items: center;
    gap: 7px;
}

.av-section-sub i { font-size: 13px; }

/* ── CABEÇALHO HERO DAS SEÇÕES (sangra sobre o padding do painel) ── */
.av-shero {
    position: relative;
    margin: -36px -40px 28px;
    padding: 24px 40px;
    background: linear-gradient(135deg, #07142f 0%, #0d1d47 60%, #1a2f6e 100%);
    border-radius: 20px 20px 0 0;
    color: #fff;
    overflow: hidden;
}
.av-shero::after {
    content: "";
    position: absolute;
    top: -120px;
    right: -40px;
    width: 260px;
    height: 260px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.04);
    pointer-events: none;
}
.av-shero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: rgba(255, 255, 255, 0.72);
    background: rgba(255, 255, 255, 0.10);
    border: 1px solid rgba(255, 255, 255, 0.16);
    padding: 4px 12px;
    border-radius: 999px;
}
.av-shero-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 12px 0 0;
    font-size: 1.4rem;
    font-weight: 800;
    line-height: 1.2;
    color: #fff;
}
.av-shero-title i { color: #93c5fd; font-size: 1.15rem; }
.av-shero-sub {
    margin: 8px 0 0;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.55);
    line-height: 1.5;
    max-width: 640px;
}

/* ── INPUTS (altura/padding padrão do tema) ───────────────── */
.av-panel .ui-inputtext:focus,
.av-panel input.ui-inputtext:focus {
    border-color: #2563eb !important;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12) !important;
    outline: none !important;
}

/* ── BOTÃO DE AJUDA (?) ───────────────────────────────────── */
.av-label {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
    font-weight: 600;
    color: #4b5563;
}

.av-help-btn.ui-button {
    background: transparent !important;
    border: none !important;
    color: #cbd5e1 !important;
    padding: 0 !important;
    width: 18px !important;
    height: 18px !important;
    min-width: 0 !important;
    box-shadow: none !important;
    border-radius: 50% !important;
}

.av-help-btn.ui-button .ui-button-icon {
    font-size: 13px !important;
    line-height: 18px !important;
    margin: 0 !important;
}

.av-help-btn.ui-button:hover { color: #2563eb !important; }

/* Overlay do help — estilo dialog */
.av-help-panel.ui-overlaypanel {
    width: 320px;
    max-width: 320px;
    border-radius: 14px !important;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.16) !important;
    border: 1px solid #e2e8f0 !important;
}

.av-help-panel .ui-overlaypanel-content {
    padding: 0 !important;
}

.av-help-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 18px 12px;
    border-bottom: 1px solid #f1f5f9;
}

.av-help-header i {
    font-size: 15px;
    color: #2563eb;
    flex-shrink: 0;
}

.av-help-header-title {
    font-size: 14px;
    font-weight: 600;
    color: #111827;
}

.av-help-body {
    padding: 14px 18px 18px;
    font-size: 13.5px;
    font-weight: 400;
    line-height: 1.75;
    color: #4b5563;
}

.av-help-body strong {
    font-weight: 600;
    color: #1f2937;
}

/* ── GRID DE CAMPOS ───────────────────────────────────────── */
.av-fields {
    display: grid;
    /* min(100%, 300px) impede a coluna de transbordar quando o container fica menor que 300px */
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
    gap: 20px;
}

/* 1 / -1 ocupa a linha inteira sem forçar uma 2ª coluna implícita quando o grid tem só
   uma coluna (o "span 2" criava uma coluna extra que estourava e invadia a área da logo). */
.av-field-wide { grid-column: 1 / -1; }

.av-field { display: flex; flex-direction: column; gap: 7px; }

/* ── Logo personalizada: split, dropzone e card ───────────── */

/* Split: Dados da Avaliação à esquerda, Logo personalizada à direita */
.av-data-split { display: flex; flex-wrap: wrap; gap: 22px; align-items: stretch; }
/* min-width faz as colunas quebrarem (wrap) antes de ficarem estreitas demais, em vez de
   uma invadir a outra. Abaixo de ~680px de container, a logo desce para baixo dos dados. */
.av-data-col  { flex: 2 1 400px; min-width: 360px; }
.av-logo-col  { flex: 1 1 300px; min-width: 300px; display: flex; flex-direction: column; gap: 7px; }

.av-logo-uploader { flex: 1 1 auto; display: flex; flex-direction: column; gap: 14px; }

/* Retângulo: o visual (borda, ícone, instruções) fica no wrap; o fileUpload é só
   a camada transparente por cima que torna a área inteira clicável e droppable. */
.av-dropzone-wrap {
    position: relative;
    flex: 1 1 auto;
    min-height: 210px;
    border: 2px dashed #bfdbfe;
    border-radius: 16px;
    background: linear-gradient(135deg, #f8fbff 0%, #eff6ff 100%);
    cursor: pointer;
    transition: border-color 0.18s, background 0.18s, box-shadow 0.18s;
}
.av-dropzone-wrap:hover {
    border-color: #3b82f6;
    background: linear-gradient(135deg, #f0f7ff 0%, #e0ecff 100%);
    box-shadow: 0 8px 26px rgba(37, 99, 235, 0.12);
}

/* Conteúdo visual (ícone + título + instruções) — não captura cliques */
.av-dropzone-hint {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 22px 18px;
    text-align: center;
    pointer-events: none;
}
.av-dropzone-icon {
    width: 56px;
    height: 56px;
    border-radius: 15px;
    background: #dbeafe;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #2563eb;
    font-size: 26px;
}
.av-dropzone-title {
    color: #334155;
    font-weight: 700;
    font-size: 14px;
    max-width: 250px;
    line-height: 1.4;
}
.av-dropzone-specs {
    list-style: none;
    margin: 2px 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.av-dropzone-specs li {
    color: #64748b;
    font-size: 12px;
    line-height: 1.35;
}
.av-dropzone-specs li span { color: #94a3b8; }

/* fileUpload = camada clicável/droppable transparente cobrindo todo o retângulo */
.av-dropzone.ui-fileupload {
    position: absolute !important;
    inset: 0 !important;
    background: transparent !important;
    border: 0 !important;
    z-index: 2;
}
.av-dropzone .ui-fileupload-content { display: none !important; }
.av-dropzone .ui-fileupload-buttonbar {
    position: absolute !important;
    inset: 0 !important;
    background: transparent !important;
    border: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
}
.av-dropzone .ui-fileupload-choose {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    border-radius: 16px !important;
    cursor: pointer !important;
}
/* Esconde ícone/texto do botão (usamos o conteúdo visual do wrap) */
.av-dropzone .ui-fileupload-choose .ui-button-text,
.av-dropzone .ui-fileupload-choose .ui-icon,
.av-dropzone .ui-fileupload-choose .ui-button-icon-left { display: none !important; }
/* O input de arquivo ocupa todo o retângulo → clique e drop em qualquer ponto */
.av-dropzone .ui-fileupload-choose input[type="file"] {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    opacity: 0;
    cursor: pointer;
    font-size: 0;
}
/* Esconde upload/cancel (modo auto) */
.av-dropzone .ui-fileupload-files,
.av-dropzone .ui-fileupload-upload,
.av-dropzone .ui-fileupload-cancel { display: none !important; }

/* Card de preview da logo enviada */
.av-logo-card {
    display: flex;
    align-items: center;
    gap: 18px;
    background: #fff;
    border: 1px solid #e6ebf2;
    border-radius: 16px;
    padding: 16px 18px;
    box-shadow: 0 6px 20px rgba(15, 23, 42, 0.07);
}
.av-logo-canvas {
    flex: 0 0 auto;
    width: 124px;
    height: 84px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    border-radius: 12px;
    border: 1px solid #eef2f7;
    background:
        linear-gradient(45deg, #f1f5f9 25%, transparent 25%) -8px 0 / 16px 16px,
        linear-gradient(-45deg, #f1f5f9 25%, transparent 25%) -8px 0 / 16px 16px,
        linear-gradient(45deg, transparent 75%, #f1f5f9 75%) 0 0 / 16px 16px,
        linear-gradient(-45deg, transparent 75%, #f1f5f9 75%) 0 0 / 16px 16px,
        #fff;
}
.av-logo-img { max-width: 100%; max-height: 66px; object-fit: contain; display: block; }
.av-logo-info { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.av-logo-badge {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #ecfdf5;
    color: #059669;
    font-weight: 700;
    font-size: 12.5px;
    padding: 4px 11px;
    border-radius: 999px;
}
.av-logo-badge i { font-size: 13px; }
.av-logo-hint { color: #64748b; font-size: 13px; }
.av-logo-remove {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 11px;
    background: #fef2f2;
    color: #dc2626;
    text-decoration: none;
    font-size: 16px;
    transition: background 0.15s, color 0.15s;
}
.av-logo-remove:hover { background: #dc2626; color: #fff; }

/* ── LINHA DE ADICIONAR ITEM ──────────────────────────────── */
.av-add-row {
    display: grid;
    grid-template-columns: 1fr 1fr 110px auto;
    gap: 16px;
    align-items: flex-end;
    margin-bottom: 20px;
}

/* ── CARDS DE ITENS ───────────────────────────────────────── */
.av-item-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px 20px;
    background: linear-gradient(135deg, #ffffff, #f5f8fc);
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    margin-bottom: 10px;
    transition: box-shadow 0.15s, border-color 0.15s;
}

.av-item-card:hover {
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
    border-color: #d1d5db;
}

.av-item-thumb-wrap {
    position: relative;
    flex-shrink: 0;
}

.av-item-num {
    position: absolute;
    top: -6px;
    left: -6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    border: 2px solid #fff;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    color: white;
    padding: 0 6px;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.25);
}

.av-item-info { flex: 1; min-width: 0; }

.av-item-assunto {
    font-size: 15px;
    font-weight: 700;
    color: #111827;
    display: block;
    margin-bottom: 5px;
}

.av-item-meta { display: flex; gap: 6px; flex-wrap: wrap; }

.av-item-descricao {
    display: block;
    margin: 8px 0 0;
    font-size: 13px;
    line-height: 1.4;
    color: #4b5563;
}

.av-item-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 600;
    background: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
}
.av-item-chip i { font-size: 11px; }

.av-item-chip--nivel {
    background: #f0fdf4;
    color: #166534;
    border-color: #bbf7d0;
}

.av-item-chip--qtd {
    background: #faf5ff;
    color: #6b21a8;
    border-color: #e9d5ff;
}

.av-item-chip--formato {
    background: #fff7ed;
    color: #9a3412;
    border-color: #fed7aa;
}

.av-item-chip--layout {
    background: #eef2ff;
    color: #3730a3;
    border-color: #c7d2fe;
}

.av-item-actions { display: flex; gap: 10px; flex-shrink: 0; }

/* Miniatura do fundo do item (verificação visual) */
.av-item-thumb {
    width: 54px;
    height: 54px;
    flex-shrink: 0;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
    background: #eef2f7;
    display: flex;
    align-items: center;
    justify-content: center;
}
.av-item-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.av-item-thumb-ico i { font-size: 22px; color: #94a3b8; }

/* Variantes de chip para os campos de fundo */
.av-item-chip--escolha { background: #ecfeff; color: #155e75; border-color: #a5f3fc; }
.av-item-chip--origem  { background: #fff1f2; color: #9f1239; border-color: #fecdd3; }
.av-item-chip--imagem  { background: #f1f5f9; color: #334155; border-color: #cbd5e1; }
.av-item-chip--alt     { background: #fffbeb; color: #92400e; border-color: #fde68a; }

/* ── HISTÓRICO: linhas clicáveis ──────────────────────────── */
.av-historico-table .ui-datatable-data tr { cursor: pointer; }

/* Linha recém-criada: realce sutil + acento azul à esquerda */
.av-historico-table .ui-datatable-data tr.av-row-novo > td {
    background: #eff6ff !important;
}
.av-historico-table .ui-datatable-data tr.av-row-novo > td:first-child {
    box-shadow: inset 3px 0 0 0 #2563eb;
}

/* ── DIALOG PREMIUM — chrome compartilhado (av-dlg) ────────── */
.av-dlg.ui-dialog { border: none; border-radius: 20px; overflow: hidden; box-shadow: 0 24px 60px rgba(7, 20, 47, 0.28); }
.av-dlg .ui-dialog-content { padding: 0 !important; border-radius: 20px; }
.av-dlg-inner { display: flex; flex-direction: column; }

/* HERO */
.av-dlg-hero {
    position: relative;
    background: linear-gradient(135deg, #07142f 0%, #0d1d47 60%, #1a2f6e 100%);
    padding: 28px 32px 26px;
    color: #fff;
    overflow: hidden;
}
.av-dlg-hero::after {
    content: "";
    position: absolute;
    top: -130px;
    right: -50px;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.04);
    pointer-events: none;
}
.av-dlg-hero-close {
    position: absolute;
    top: 18px;
    right: 18px;
    width: 36px;
    height: 36px;
    border-radius: 11px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: rgba(255, 255, 255, 0.85);
    cursor: pointer;
    font-size: 15px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, transform 0.15s;
}
.av-dlg-hero-close:hover { background: rgba(255, 255, 255, 0.18); transform: scale(1.05); }
.av-dlg-hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: ui-monospace, "SF Mono", monospace;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: #93c5fd;
    background: rgba(147, 197, 253, 0.12);
    border: 1px solid rgba(147, 197, 253, 0.22);
    padding: 4px 12px;
    border-radius: 999px;
}
.av-dlg-hero-title {
    margin: 14px 0 0;
    font-size: 1.5rem;
    font-weight: 800;
    line-height: 1.2;
    color: #fff;
    padding-right: 44px;
}
.av-dlg-hero-sub { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: rgba(255, 255, 255, 0.55); margin-top: 14px; }

/* CORPO + RODAPÉ */
.av-dlg-body { padding: 24px 28px 6px; }
.av-dlg-body label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.4px; color: #64748b; }
.av-dlg-body .campo { padding: 0.5rem; }

/* Galeria de Assunto: muitos assuntos -> altura limitada com rolagem própria + busca. */
.pc-item-form .pc-seg2--assunto {
    display: flex;
    flex-wrap: wrap;
    align-content: flex-start;
    max-height: 240px;
    overflow-y: auto;
    padding: 2px;
}
.pc-card-hidden { display: none !important; }
.pc-assunto-filtro {
    width: 100%;
    box-sizing: border-box;
    margin: 4px 0 8px;
    padding: 8px 12px;
    border: 1px solid #e2e8f4;
    border-radius: 8px;
    font-size: 13px;
    outline: none;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.pc-assunto-filtro:focus { border-color: #2563eb; box-shadow: 0 0 0 3px rgba(37, 99, 235, .12); }

/* Picker de Assunto: card selecionado (recolhido) + galeria (expandida ao clicar em "Trocar") */
.pc-assunto-selected {
    display: inline-flex;
    align-self: flex-start;   /* não estica na coluna do .pc-field */
    align-items: center;
    gap: 12px;
    max-width: 100%;
    padding: 8px 10px;
    border: 2px solid #e2e8f4;
    border-radius: 12px;
    background: #fff;
}
.pc-assunto-selected .pc-seg2-thumb { width: 48px; height: 48px; flex-shrink: 0; }
.pc-assunto-selected .pc-seg2-title {
    min-width: 0; max-width: 280px;
    font-size: 13px; font-weight: 700; color: #334155;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pc-assunto-trocar {
    display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0;
    border: 1px solid #bfdbfe; background: #eff6ff; color: #1d4ed8;
    border-radius: 8px; padding: 7px 13px; font-size: 12.5px; font-weight: 600; cursor: pointer;
    transition: background .15s ease;
}
.pc-assunto-trocar:hover { background: #dbeafe; }

.pc-assunto-opcoes { display: none; margin-top: 8px; }
.pc-assunto-picker.is-expanded .pc-assunto-opcoes { display: block; }
.pc-assunto-picker.is-expanded .pc-assunto-selected { display: none; }

.pc-assunto-opcoes-head { display: flex; align-items: flex-start; gap: 8px; }
.pc-assunto-opcoes-head .pc-assunto-filtro { flex: 1 1 auto; }
.pc-assunto-fechar {
    flex-shrink: 0;
    width: 36px; height: 36px;
    display: inline-flex; align-items: center; justify-content: center;
    border: 1px solid #e2e8f4; background: #fff; color: #64748b;
    border-radius: 8px; cursor: pointer; margin-top: 4px;
}
.pc-assunto-fechar:hover { background: #f1f5f9; }
.av-dlg-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    padding: 16px 28px 20px;
    margin-top: 16px;
    border-top: 1px solid #eef2f7;
}

/* ── DIALOG DE DETALHES — específico (av-det) ──────────────── */
.av-det-hero-meta { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 14px; }
.av-det-hero-when { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: rgba(255, 255, 255, 0.55); }

.av-det-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(195px, 1fr));
    gap: 10px;
}
.av-det-cell {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    padding: 13px 15px;
    background: #f8fafc;
    border: 1px solid #eef2f7;
    border-radius: 13px;
}
.av-det-cell-ico {
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    border-radius: 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #eff4ff;
    color: #2563eb;
    font-size: 15px;
}
.av-det-cell-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.av-det-cell-label {
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #94a3b8;
}
.av-det-cell-value { font-size: 14px; font-weight: 600; color: #0f1d3a; word-break: break-word; }

/* CONTEÚDO */
.av-det-block { margin-top: 24px; }
.av-det-block-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.av-det-block-head > span:first-child {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 800;
    color: #0f1d3a;
}
.av-det-block-head i { color: #2563eb; }
.av-det-pill {
    font-size: 11px;
    font-weight: 700;
    color: #2563eb;
    background: #eff4ff;
    border: 1px solid #dbe7ff;
    padding: 3px 11px;
    border-radius: 999px;
}
.av-det-itens { display: flex; flex-direction: column; gap: 8px; }
.av-det-item {
    display: flex;
    align-items: center;
    gap: 9px;
    flex-wrap: wrap;
    padding: 11px 13px;
    background: #fff;
    border: 1px solid #eef2f7;
    border-radius: 12px;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.av-det-item:hover { border-color: #dbe7ff; box-shadow: 0 2px 12px rgba(37, 99, 235, 0.07); }
.av-det-item-num {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    border-radius: 7px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #2563eb, #1a2f6e);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
}
.av-det-item-thumb {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
    background: #eef2f7;
    display: flex;
    align-items: center;
    justify-content: center;
}
.av-det-item-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.av-det-item-assunto { font-size: 14px; font-weight: 700; color: #0f1d3a; flex: 1; min-width: 130px; }
.av-det-expirado { font-size: 13px; color: #9ca3af; }

.av-item-empty {
    text-align: center;
    padding: 40px 20px;
    color: #9ca3af;
    font-size: 14px;
    background: #f8fafc;
    border: 2px dashed #e5e7eb;
    border-radius: 14px;
    line-height: 1.6;
}

.av-item-empty i { display: block; font-size: 28px; margin-bottom: 8px; color: #d1d5db; }

/* ── TOTALIZADOR ──────────────────────────────────────────── */
.av-totalizer-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Wrappers JSF (h:panelGroup) somem do fluxo para o gap do grupo valer entre todos os chips. */
.av-tz-contents { display: contents; }

.av-totalizer {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    font-size: 14px;
    color: #6b7280;
}

.av-totalizer i { color: #9ca3af; }
.av-totalizer b { color: #07142f; font-weight: 700; }

.av-totalizer--warn {
    background: #fff7ed;
    border-color: #fed7aa;
    color: #92400e;
}

.av-totalizer--warn i { color: #f59e0b; }
.av-totalizer--warn b { color: #92400e; }

/* ── AÇÕES ────────────────────────────────────────────────── */
.av-actions {
    display: flex;
    justify-content: flex-end;
    padding-top: 24px;
    border-top: 1px solid #f3f4f6;
    margin-top: 28px;
}

.av-actions--split { justify-content: space-between; align-items: center; }

/* Barra de ações da list (ex.: botão "Nova avaliação") */
.av-list-actions {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 18px;
}

/* ── RESPONSIVO ───────────────────────────────────────────── */
@media (max-width: 960px) {
    .av-hero { grid-template-columns: 1fr; padding: 20px 22px; gap: 18px; }
    .av-hero-stats { flex-direction: row; flex-wrap: wrap; }
    .av-stat { min-width: 120px; flex: 1; }
    .av-hero-title { font-size: 1.35rem; }
    .av-field-wide { grid-column: 1 / -1; }
    .av-panel { padding: 24px 20px; }
    .av-shero { margin: -24px -20px 24px; padding: 22px 20px; }
    .av-shero-title { font-size: 1.25rem; }
    .av-add-row { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 600px) {
    .av-fields { grid-template-columns: 1fr; }
    .av-add-row { grid-template-columns: 1fr; }
}

/* ── Dialog de cota esgotada / plano vencido ───────────────── */
.av-dlg-cota .ui-dialog-content { padding: 0 !important; }

.av-dlg-cota-inner {
    display: flex;
    flex-direction: column;
    border-radius: 16px;
    overflow: hidden;
}

.av-dlg-cota-head {
    background: linear-gradient(135deg, #07142f 0%, #1e3a8a 60%, #2563eb 100%);
    padding: 28px 24px 24px;
    text-align: center;
    position: relative;
}

.av-dlg-cota-icon-wrap {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 14px;
}
.av-dlg-cota-icon-wrap .pi {
    font-size: 26px;
    color: #fbbf24;
}

.av-dlg-cota-titulo {
    color: #fff;
    font-size: 18px;
    font-weight: 700;
    margin: 0;
    letter-spacing: -0.2px;
}

.av-dlg-cota-close {
    position: absolute;
    top: 12px;
    right: 14px;
    background: rgba(255, 255, 255, 0.12);
    border: none;
    color: rgba(255, 255, 255, 0.75);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    transition: background 0.15s, color 0.15s;
}
.av-dlg-cota-close:hover {
    background: rgba(255, 255, 255, 0.22);
    color: #fff;
}

.av-dlg-cota-body {
    padding: 24px 28px 8px;
    background: #fff;
}

.av-dlg-cota-msg {
    color: #4b5563;
    font-size: 14px;
    line-height: 1.7;
    text-align: center;
    margin: 0;
}

.av-dlg-cota-stats {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin: 20px 0 0;
}

.av-dlg-cota-stat {
    flex: 1;
    background: #f8faff;
    border: 1px solid #e0e7ff;
    border-radius: 12px;
    padding: 12px 10px;
    text-align: center;
}
.av-dlg-cota-stat-label {
    font-size: 11px;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    margin-bottom: 4px;
}
.av-dlg-cota-stat-value {
    font-size: 26px;
    font-weight: 800;
    color: #1e3a8a;
    line-height: 1;
}

.av-dlg-cota-footer {
    display: flex;
    gap: 10px;
    padding: 20px 28px 24px;
    background: #fff;
    justify-content: flex-end;
}

.av-dlg-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    border: none;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.av-dlg-btn--ghost {
    background: transparent;
    border: 1px solid #e5e7eb;
    color: #6b7280;
}
.av-dlg-btn--ghost:hover {
    background: #f3f4f6;
    color: #374151;
}
.av-dlg-btn--primary {
    background: #2563eb;
    color: #fff;
}
.av-dlg-btn--primary:hover {
    background: #1d4ed8;
    color: #fff;
}
