/* ==========================================================================
   "Pedidos para você" — card do Dashboard do Painel do Mestre
   (spec-aprovacao-eventos D7/D8; JS em engine/core/mestre_dashboard.js,
   bloco "Pedidos para você"). Mora dentro de .mdash, então usa as variáveis
   --mdash-* e a casca .mdash-panel / .mdash-section-head do Dashboard.
   Prefixo próprio: apv-.
   ========================================================================== */

.apv-dash-slot {
    margin-bottom: 16px;
    min-width: 0;
}

.apv-card {
    min-width: 0;
}

/* Sem nada esperando: uma linha só, compacta. */
.apv-card--vazio {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 14px;
    color: var(--mdash-muted, rgba(232, 216, 184, 0.52));
    font-size: 0.8rem;
    font-style: italic;
}

.apv-card .apv-vazio-ic {
    color: #8fd19e;
    font-style: normal;
}

/* Grupos (.apv-grupo, .apv-grupo-tit/-ic/-nome/-n) e o espaço entre eles:
   só em aprovacao.css (E-6), iguais aos do modal. Daqui para baixo, tudo
   escopado sob .apv-card. */

.apv-card .apv-lista {
    display: grid;
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
}

/* Linha: [ícone + texto = botão de abrir] [ação] [✕]. */
.apv-card .apv-item {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    padding: 6px 8px;
    border: 1px solid var(--mdash-line-soft, rgba(201, 168, 76, 0.16));
    border-left: 3px solid var(--mdash-gold, #c9a84c);
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.18);
}

.apv-card .apv-item--urgente { border-left-color: #e0705f; }
.apv-card .apv-item--ruim    { border-left-color: #d9826f; }
.apv-card .apv-item--ok      { border-left-color: #6fbf82; }

.apv-card .apv-item-main {
    display: flex;
    flex: 1 1 auto;
    align-items: flex-start;
    gap: 8px;
    min-width: 0;
    padding: 2px 0;
    border: 0;
    background: none;
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.apv-card .apv-item-main:hover b {
    text-decoration: underline;
}

.apv-card .apv-item-ic {
    flex: 0 0 auto;
    width: 22px;
    font-size: 1rem;
    line-height: 1.3;
    text-align: center;
}

.apv-card .apv-item-txt {
    display: grid;
    min-width: 0;
    line-height: 1.35;
}

.apv-card .apv-item-txt b {
    overflow: hidden;
    color: var(--mdash-gold-light, #f3da9c);
    font-size: 0.84rem;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.apv-card .apv-item-txt small {
    color: var(--mdash-text, #e8d8b8);
    font-size: 0.72rem;
    overflow-wrap: anywhere;
}

.apv-card .apv-prazo,
.apv-card .apv-quando {
    color: var(--mdash-muted, rgba(232, 216, 184, 0.52));
}

.apv-card .apv-prazo--vencido,
.apv-card .apv-restrito {
    color: #f0a29a;
}

.apv-card .apv-motivo {
    color: var(--mdash-muted, rgba(232, 216, 184, 0.52));
    font-style: italic;
}

.apv-card .apv-item-acao {
    flex: 0 0 auto;
    white-space: nowrap;
}

.apv-card .apv-item-x {
    flex: 0 0 auto;
    width: 28px;
    height: 28px;
    padding: 0;
    border: 1px solid var(--mdash-line, rgba(201, 168, 76, 0.25));
    border-radius: 50%;
    background: none;
    color: var(--mdash-muted, rgba(232, 216, 184, 0.52));
    font-size: 0.8rem;
    line-height: 1;
    cursor: pointer;
}

.apv-card .apv-item-x:hover {
    border-color: var(--mdash-gold, #c9a84c);
    color: var(--mdash-gold-light, #f3da9c);
}

/* Celular e tablet estreito: a ação desce para baixo do texto, o ✕ fica no
   canto — nada empurra a linha além da largura da tela. */
@media (max-width: 560px) {
    .apv-card .apv-item {
        flex-wrap: wrap;
    }

    .apv-card .apv-item-main {
        flex-basis: calc(100% - 40px);
    }

    .apv-card .apv-item-acao {
        margin-left: 30px;
    }
}

html[data-viewport="mobile"] .apv-card .apv-item {
    flex-wrap: wrap;
}

html[data-viewport="mobile"] .apv-card .apv-item-main {
    flex-basis: calc(100% - 40px);
}

html[data-viewport="mobile"] .apv-card .apv-item-acao {
    margin-left: 30px;
}

html[data-viewport="mobile"] .apv-card .apv-item-x {
    width: 36px;
    height: 36px;
}
