/* ==========================================================================
   INGRA — Meu Painel (caixa de entrada, filtros, Taskscore, atalhos) e Agenda (detalhes, sincronização)
   ========================================================================== */

/* Hero / KPIs */
.ig-htile.on { outline: 2px solid var(--ig-accent); outline-offset: -2px; background: rgba(0, 27, 41, .45); }
.ig-link-claro { color: var(--ig-accent); font-weight: 700; text-decoration: none; }
.ig-link-claro:hover { text-decoration: underline; }
.ig-dash button.ig-card { font: inherit; width: 100%; }

/* Taskscore */
.ig-score .ig-card-head { align-items: flex-start; margin-bottom: 10px; }
.ig-score-sub { margin: 4px 0 0; color: var(--ig-muted); font-size: 12px; }
.ig-score-tools { display: flex; align-items: center; gap: 8px; }
.ig-seg { display: inline-flex; padding: 3px; border-radius: 999px; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .1); }
.ig-seg button { border: 0; background: transparent; color: var(--ig-muted); font-size: 12px; font-weight: 700; padding: 5px 12px; border-radius: 999px; cursor: pointer; }
.ig-seg button.on { background: var(--ig-accent); color: #001b29; box-shadow: 0 0 12px rgba(45, 212, 234, .35); }
.ig-icbtn {
    width: 32px; height: 32px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
    background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .1); color: var(--ig-ink);
}
.ig-icbtn:hover { background: rgba(45, 212, 234, .15); }
.ig-score-resumo { display: flex; flex-wrap: wrap; gap: 6px 14px; color: var(--ig-muted); font-size: 12px; margin-bottom: 8px; }
.ig-score-resumo b { color: var(--ig-ink); }
.ig-tend { display: inline-flex; align-items: center; gap: 3px; font-weight: 800; }
.ig-tend.up { color: #4ade80; }
.ig-tend.down { color: #fca5a5; }
.ig-ritmo { font-weight: 800; border-radius: 999px; padding: 1px 9px; }
.ig-ritmo.acima { color: #4ade80; background: rgba(74, 222, 128, .12); }
.ig-ritmo.abaixo { color: #fcd34d; background: rgba(252, 211, 77, .12); }
.ig-score-svg { width: 100%; height: auto; display: block; overflow: visible; }
.ig-score-svg .grade { stroke: rgba(255, 255, 255, .07); stroke-width: 1; }
.ig-score-svg .eixo { fill: var(--ig-muted); font-size: 10px; font-weight: 700; font-family: 'Plus Jakarta Sans', sans-serif; }
.ig-score-svg .barra { fill: #22b8d6; filter: drop-shadow(0 0 5px rgba(45, 212, 234, .45)); }
.ig-score-svg .anterior { fill: none; stroke: rgba(191, 240, 251, .45); stroke-width: 2; stroke-dasharray: 5 4; stroke-linejoin: round; }
.ig-score-svg .atual { fill: none; stroke: var(--ig-accent); stroke-width: 3; stroke-linejoin: round; stroke-linecap: round; filter: drop-shadow(0 0 6px rgba(45, 212, 234, .55)); }
.ig-score-svg .meta { stroke: #fbbf24; stroke-width: 2; stroke-dasharray: 2 4; stroke-linecap: round; }
.ig-score-svg .hoje { fill: #001b29; stroke: var(--ig-accent); stroke-width: 3; }
.ig-score-legenda { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 6px; font-size: 11.5px; color: var(--ig-muted); font-weight: 700; }
.ig-score-legenda span { display: inline-flex; align-items: center; gap: 6px; }
.ig-score-legenda i { display: inline-block; width: 18px; height: 3px; border-radius: 3px; }
.ig-score-legenda i.atual { background: var(--ig-accent); }
.ig-score-legenda i.anterior { background: repeating-linear-gradient(90deg, rgba(191, 240, 251, .6) 0 5px, transparent 5px 8px); }
.ig-score-legenda i.meta { background: repeating-linear-gradient(90deg, #fbbf24 0 3px, transparent 3px 6px); }

/* Ferramentas do painel de compromissos */
.ig-tool {
    height: 38px; display: inline-flex; align-items: center; gap: 6px; padding: 0 12px; border-radius: 12px; cursor: pointer;
    border: 1px solid rgba(2, 26, 51, .12); background: var(--ig-surface, #fff); color: var(--ig-text-soft, #334155); font-size: 13px; font-weight: 700; text-decoration: none;
}
.ig-tool:hover, .ig-tool.on { border-color: var(--ig-brand); color: var(--ig-link, #006699); background: var(--ig-surface-brand, #eef6fb); }
.ig-tool i { font-style: normal; font-size: 11px; background: var(--ig-brand); color: #fff; border-radius: 999px; padding: 0 6px; }

.ig-atalhos { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 4px; }
.ig-atalho {
    display: inline-flex; align-items: center; gap: 7px; border-radius: 12px; padding: 7px 12px; cursor: pointer;
    border: 1px solid rgba(2, 26, 51, .08); background: linear-gradient(160deg, var(--ig-surface-2, #f8fafc), var(--ig-surface-brand, #eef6fb)); color: var(--ig-brand-text, #01527d); font-size: 12.5px; font-weight: 700;
}
.ig-atalho:hover { border-color: rgba(0, 102, 153, .35); }
.ig-atalho i { font-style: normal; font-size: 11px; min-width: 20px; text-align: center; background: var(--ig-surface, #fff); border: 1px solid rgba(0, 102, 153, .18); border-radius: 999px; padding: 0 6px; }
.ig-atalho.on { background: linear-gradient(120deg, #013252, #01527d); color: #fff; }
.ig-atalho.on i { background: rgba(255, 255, 255, .18); border-color: transparent; color: #fff; }
.ig-atalho.alerta i { background: #ef4444; color: #fff; border-color: #ef4444; }

.ig-seletores { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ig-seletores .ig-tabs { margin: 10px 0 4px; }

.ig-filtros {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; margin: 12px 0 6px; padding: 14px;
    background: var(--ig-surface-2, #f8fafc); border: 1px solid var(--ig-line); border-radius: 16px;
}
.ig-filtros label, .ig-filtros fieldset { display: flex; flex-direction: column; gap: 4px; min-width: 0; border: 0; padding: 0; margin: 0; }
.ig-filtros label > span, .ig-filtros fieldset > span { font-size: 11px; font-weight: 800; color: var(--ig-text-2, #64748b); text-transform: uppercase; letter-spacing: .05em; }
.ig-filtros select, .ig-filtros input[type="date"] {
    width: 100%; border: 1px solid rgba(2, 26, 51, .14); border-radius: 10px; padding: 7px 10px; font-size: 13px; color: var(--ig-text); background: var(--ig-surface, #fff);
}
.ig-filtros select[multiple] { padding: 4px; }
.ig-checks { display: flex; flex-wrap: wrap; gap: 4px 12px; }
.ig-filtros .ig-check-inline { flex-direction: row; align-items: center; gap: 6px; font-size: 13px; color: var(--ig-text-soft, #334155); font-weight: 600; text-transform: none; letter-spacing: 0; }
.ig-check-inline input { border-radius: 5px; }
.ig-ordem { display: flex; gap: 6px; }
.ig-ordem button { flex: none; width: 38px; border-radius: 10px; border: 1px solid rgba(2, 26, 51, .14); background: var(--ig-surface, #fff); color: var(--ig-link, #006699); display: flex; align-items: center; justify-content: center; cursor: pointer; }
.ig-filtros-fim { display: flex; align-items: flex-end; }
.ig-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 2px; }

/* Seções da caixa de entrada */
.ig-secao + .ig-secao { margin-top: 6px; }
.ig-secao-head {
    width: 100%; display: flex; align-items: center; gap: 8px; border: 0; cursor: pointer; text-align: left;
    padding: 12px 4px 8px; background: transparent; border-bottom: 2px solid var(--ig-border-soft, #e2e8f0); color: var(--ig-heading, #013252);
    font-family: 'Fraunces', Georgia, serif; font-size: 15px; font-weight: 700;
}
.ig-secao-head i { font-style: normal; font-family: 'Plus Jakarta Sans', sans-serif; font-size: 11px; font-weight: 800; color: #fff; background: var(--ig-brand); border-radius: 999px; padding: 1px 8px; }
.ig-secao-head:hover { color: var(--ig-link, #006699); }
.ig-paginacao { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 12px 0; font-size: 12px; font-weight: 700; color: var(--ig-text-2, #64748b); }
.ig-paginacao button { width: 30px; height: 30px; border-radius: 9px; border: 1px solid rgba(2, 26, 51, .12); background: var(--ig-surface, #fff); color: var(--ig-link, #006699); display: flex; align-items: center; justify-content: center; cursor: pointer; }
.ig-paginacao button:disabled { opacity: .4; cursor: default; }

/* Linha de compromisso */
.ig-row.ig-row2 { grid-template-columns: 24px 24px 6px minmax(0, 1fr) 130px 150px; }
.ig-row2 .ig-row-title { display: block; width: 100%; border: 0; background: transparent; padding: 0; text-align: left; cursor: pointer; }
.ig-row2 .ig-row-title:hover { color: var(--ig-link, #006699); }
.ig-check.bloqueado { cursor: not-allowed; opacity: .45; border-style: dashed; }
.ig-privada { display: inline; vertical-align: -1px; color: #94a3b8; margin-right: 3px; }
.ig-chip-flag { flex: none; font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; padding: 2px 7px; border-radius: 999px; background: var(--ig-surface-3, #f1f5f9); color: var(--ig-text-soft, #334155); }
.ig-chip-flag.urgente { background: #fef2f2; color: #b91c1c; }
.ig-chip-flag.importante { background: #fffbeb; color: #b45309; }
.ig-chip-flag.pontos { background: #ecfdf5; color: #047857; }
.ig-vinculo { position: relative; display: inline-flex; align-items: center; gap: 6px; min-width: 0; font-size: 12px; color: var(--ig-text-2, #64748b); }
.ig-vinculo-txt { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ig-vinculo-acoes { display: inline-flex; gap: 2px; opacity: 0; transition: opacity .12s ease; }
.ig-row:hover .ig-vinculo-acoes, .ig-vinculo-acoes:focus-within { opacity: 1; }
.ig-vinculo-acoes a, .ig-vinculo-acoes button {
    width: 22px; height: 22px; border-radius: 7px; display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
    border: 1px solid rgba(0, 102, 153, .2); background: var(--ig-surface, #fff); color: var(--ig-link, #006699); padding: 0;
}
.ig-vinculo-acoes a:hover, .ig-vinculo-acoes button:hover { background: var(--ig-brand); color: #fff; }
.ig-row-pessoas { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-width: 0; }
.ig-row-pessoas small { font-size: 11px; color: #94a3b8; font-weight: 600; }
.ig-avatares { display: flex; }
.ig-mini-avatar {
    width: 26px; height: 26px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; margin-right: -6px;
    font-size: 10px; font-weight: 800; color: var(--ig-brand-text, #01527d); background: var(--ig-surface-brand, #eef6fb); border: 2px solid #fff;
}
.ig-mini-avatar.mais { background: var(--ig-surface-3, #f1f5f9); color: var(--ig-text-soft, #334155); }
.ig-row-prazo { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.ig-fatal { font-size: 10.5px; font-weight: 800; color: #b91c1c; background: #fef2f2; border-radius: 999px; padding: 1px 7px; }
@media (max-width: 900px) {
    .ig-row.ig-row2 { grid-template-columns: 24px 24px 6px minmax(0, 1fr); }
    .ig-row2 .ig-row-pessoas { display: none; }
    .ig-row2 .ig-row-prazo { grid-column: 4; align-items: flex-start; }
    .ig-vinculo-acoes { opacity: 1; }
}

/* Pauta de audiências */
.ig-pauta-head, .ig-pauta-row { display: grid; grid-template-columns: 110px 150px minmax(0, 1.3fr) 150px minmax(0, 1fr); gap: 12px; align-items: start; }
.ig-pauta-head { padding: 10px 4px; border-bottom: 1px solid var(--ig-line); }
.ig-pauta-head span, .ig-pauta-head button { font-size: 11px; font-weight: 800; color: var(--ig-text-2, #64748b); text-transform: uppercase; letter-spacing: .05em; text-align: left; border: 0; background: transparent; padding: 0; }
.ig-pauta-head button { cursor: pointer; }
.ig-pauta-head button:hover { color: var(--ig-link, #006699); }
.ig-pauta-row { padding: 12px 4px; border-bottom: 1px solid var(--ig-line); font-size: 13px; color: var(--ig-text-soft, #334155); }
.ig-pauta-row small { display: block; color: #94a3b8; font-size: 11.5px; margin-top: 2px; }
.ig-pauta-data b { color: var(--ig-heading, #013252); }
.ig-pauta-data.atrasada b { color: #dc2626; }
.ig-link { border: 0; background: transparent; padding: 0; color: var(--ig-link, #006699); font-weight: 700; cursor: pointer; text-align: left; }
.ig-link:hover { text-decoration: underline; }
@media (max-width: 900px) {
    .ig-pauta-head { display: none; }
    .ig-pauta-row { grid-template-columns: 1fr; gap: 4px; }
}

/* Modais de atalho (aniversariantes, andamentos, intimações) */
.ig-atalho-lista { display: flex; flex-direction: column; font-family: 'Plus Jakarta Sans', system-ui, sans-serif; }
.ig-atalho-item { display: flex; align-items: flex-start; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--ig-line); }
.ig-atalho-avatar {
    width: 36px; height: 36px; border-radius: 12px; flex: none; display: flex; align-items: center; justify-content: center;
    font-size: 12px; font-weight: 800; color: var(--ig-brand-text, #01527d); background: var(--ig-surface-brand, #eef6fb);
}
.ig-atalho-ic { width: 16px; height: 16px; }
.ig-atalho-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ig-atalho-nome { font-weight: 700; color: var(--ig-text); text-decoration: none; }
.ig-atalho-nome:hover { color: var(--ig-link, #006699); }
.ig-atalho-main small { color: var(--ig-text-2, #64748b); font-size: 12px; }
.ig-atalho-desc { color: #94a3b8 !important; }
.ig-atalho-acoes { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.ig-atalho-acoes a { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 700; padding: 5px 10px; border-radius: 999px; text-decoration: none; background: var(--ig-surface-brand, #eef6fb); color: var(--ig-brand-text, #01527d); }
.ig-atalho-acoes a.whats { background: #dcfce7; color: #166534; }
.ig-atalho-status { font-size: 11px; font-weight: 800; color: var(--ig-text-soft, #334155); background: var(--ig-surface-3, #f1f5f9); border-radius: 999px; padding: 2px 8px; white-space: nowrap; }
.ig-atalho-vazio { color: #94a3b8; text-align: center; padding: 24px 0; margin: 0; }
.ig-atalho-rodape { margin-top: 12px; align-self: flex-end; font-size: 13px; font-weight: 700; color: var(--ig-link, #006699); text-decoration: none; }

/* Modal de detalhes da tarefa */
.ig-dt-titulo { display: inline-flex; align-items: center; gap: 6px; font-family: 'Fraunces', Georgia, serif; }
.ig-dt-ic { width: 14px; height: 14px; display: inline; }
.ig-dt { font-family: 'Plus Jakarta Sans', system-ui, sans-serif; }
.ig-dt-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.ig-dt-sit { font-size: 11px; font-weight: 800; padding: 3px 10px; border-radius: 999px; }
.ig-dt-sit.pendente { background: var(--ig-surface-brand, #eef6fb); color: var(--ig-brand-text, #01527d); }
.ig-dt-sit.concluida { background: #dcfce7; color: #166534; }
.ig-dt-sit.atrasada { background: #fee2e2; color: #991b1b; }
.ig-dt-grade { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 18px; margin: 0; }
.ig-dt-grade > div.largo { grid-column: 1 / -1; }
.ig-dt-grade dt { font-size: 10.5px; font-weight: 800; color: var(--ig-text-2, #64748b); text-transform: uppercase; letter-spacing: .05em; }
.ig-dt-grade dd { margin: 3px 0 0; font-size: 14px; color: var(--ig-text); }
.ig-dt-grade dd a { color: var(--ig-link, #006699); font-weight: 700; text-decoration: none; }
.ig-dt-grade dd a:hover { text-decoration: underline; }
.ig-dt-desc { white-space: pre-line; background: var(--ig-surface-2, #f8fafc); border-radius: 12px; padding: 10px 12px; }
.ig-dt-anexos { display: flex; flex-wrap: wrap; gap: 8px; }
@media (max-width: 640px) { .ig-dt-grade { grid-template-columns: 1fr; } }

/* Agenda — eventos clicáveis (abrem o modal de detalhes) */
button.ig-agx-evento { width: 100%; border: 0; border-left-width: 3px; border-left-style: solid; text-align: left; cursor: pointer; font-family: inherit; }
button.ig-agx-bloco-ev { border: 0; border-left-width: 3px; border-left-style: solid; text-align: left; cursor: pointer; font-family: inherit; }
button.ig-agx-evento:hover, button.ig-agx-bloco-ev:hover { filter: brightness(.95); }

/* Sincronização da agenda (iCal) */
.ig-sync { display: flex; flex-direction: column; gap: 12px; font-family: 'Plus Jakarta Sans', system-ui, sans-serif; font-size: 13.5px; color: var(--ig-text-soft, #334155); }
.ig-sync-intro { margin: 0; line-height: 1.55; }
.ig-sync-url { display: flex; gap: 8px; }
.ig-sync-url input { flex: 1; min-width: 0; border: 1px solid rgba(2, 26, 51, .16); border-radius: 10px; padding: 8px 10px; font-size: 12.5px; font-family: ui-monospace, monospace; background: var(--ig-surface-2, #f8fafc); color: var(--ig-text); }
.ig-sync-url button, .ig-sync-btn {
    display: inline-flex; align-items: center; gap: 6px; border-radius: 10px; padding: 8px 14px; cursor: pointer; font-weight: 700; font-size: 13px;
    border: 1px solid rgba(0, 102, 153, .25); background: var(--ig-surface, #fff); color: var(--ig-link, #006699);
}
.ig-sync-url button { background: linear-gradient(120deg, #013252, #006699); color: #fff; border: 0; white-space: nowrap; }
.ig-sync-btn.principal { align-self: flex-start; background: linear-gradient(120deg, #013252, #006699); color: #fff; border: 0; padding: 10px 16px; }
.ig-sync-btn.perigo { color: #b91c1c; border-color: rgba(185, 28, 28, .25); }
.ig-sync-ic { width: 16px; height: 16px; }
.ig-sync-acoes { display: flex; flex-wrap: wrap; gap: 8px; }
.ig-sync-alerta { margin: 0; font-size: 12px; color: #b45309; font-weight: 600; }
.ig-sync-passos { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; }
.ig-sync-passos > div { background: var(--ig-surface-2, #f8fafc); border: 1px solid var(--ig-line); border-radius: 12px; padding: 10px 12px; }
.ig-sync-passos h4 { margin: 0 0 4px; font-family: 'Fraunces', Georgia, serif; color: var(--ig-heading, #013252); font-size: 14px; }
.ig-sync-passos p { margin: 0; font-size: 12.5px; line-height: 1.5; }
.ig-sync-nota { margin: 0; font-size: 12px; color: #94a3b8; }

/* Configurações > Caixa de entrada */
.ig-cfgcaixa { display: flex; flex-direction: column; gap: 18px; }
.ig-cfgcaixa-acoes { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
