.gp-portal {
    max-width: 900px;
    margin: 0 auto;
    padding: 24px 16px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: #1d2327;
}
.gp-portal h1 { font-size: 24px; margin: 0 0 4px; }
.gp-portal h2 { font-size: 16px; margin: 0 0 12px; }
.gp-portal .gp-muted { color: #757575; font-size: 13px; }

/* Login */
.gp-portal-login-box {
    max-width: 360px;
    margin: 60px auto;
    text-align: center;
}
.gp-portal-login-box form p { text-align: left; }
.gp-portal-login-box input[type="text"],
.gp-portal-login-box input[type="password"] {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d0d5dd;
    border-radius: 6px;
    box-sizing: border-box;
    margin-top: 4px;
}
.gp-portal-login-box input[type="submit"] {
    width: 100%;
    padding: 10px;
    background: var(--g-red, #e8192c);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    margin-top: 8px;
}
.gp-portal-lost-password { margin-top: 12px; font-size: 13px; }

/* Header / logout */
/* MELHORIA (pedido do usuário — "fique nesse estilo pro meu cliente"):
   mesmo tratamento do cabeçalho usado no wp-admin (Kanban, Painel
   Criativo internos) — faixa escura com friso vermelho, pra ficar visualmente
   consistente entre a experiência da equipe e a do cliente. Como esta
   regra é global (.gp-portal-header aparece em toda tela do Portal —
   dashboard, detalhe da demanda, referências), o cliente vê o mesmo
   cabeçalho em qualquer lugar do Portal, não só aqui. */
.gp-portal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    background: linear-gradient(180deg, var(--g-black-4, #1a1a1a) 0%, var(--g-black-3, #141414) 100%);
    border: 1px solid var(--g-border, rgba(255,255,255,.10));
    border-left: 4px solid var(--g-red, #e8192c);
    border-radius: 10px;
    padding: 16px 20px;
}
.gp-portal-header h1 { color: var(--g-white-1, #f5f5f5); display: flex; align-items: center; flex-wrap: wrap; }
.gp-portal-logout {
    font-size: 13px;
    color: var(--g-white-3, #a8a8a8);
    text-decoration: none;
}
.gp-portal-logout:hover { color: var(--g-white-1, #f5f5f5); }
/* MELHORIA (Painel Criativo): agrupa "Painel Criativo" + "Sair" no
   cabeçalho, sem quebrar o layout existente do dashboard. */
.gp-portal-header-actions { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.gp-portal-nav-link { font-size: 13px; color: #ff8a93; text-decoration: none; font-weight: 600; }
.gp-portal-nav-link:hover { text-decoration: underline; color: #ffb3ba; }
.gp-portal-intro { color: #646970; font-size: 13px; margin: -8px 0 20px; }
.gp-portal-count-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 10px;
    border-radius: 20px;
    background: rgba(232,25,44,.16);
    color: #ff8a93;
    border: 1px solid rgba(232,25,44,.35);
    font-size: 11px;
    font-weight: 700;
    margin-left: 8px;
}

/* MELHORIA (pedido do usuário — mesmo estilo do wp-admin): barra de
   filtros por plataforma, mesma faixa escura do cabeçalho. Duplicada de
   Assets/css/main.css (com prefixo -portal-) porque o Portal carrega só
   portal.css, nunca main.css — as duas telas usam CSS totalmente
   separados de propósito (uma é wp-admin, a outra é uma página comum do
   site, sem nenhuma dependência do admin). */
.gp-portal-toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    background: var(--g-black-4, #1a1a1a);
    border: 1px solid var(--g-border, rgba(255,255,255,.10));
    border-radius: 10px;
    padding: 10px 14px;
    margin-bottom: 20px;
}
.gp-portal-toolbar-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.gp-portal-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    border-radius: 20px;
    border: 1px solid var(--g-border, rgba(255,255,255,.10));
    background: var(--g-black-3, #141414);
    color: var(--g-white-3, #a8a8a8);
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}
.gp-portal-chip:hover { border-color: var(--g-red, #e8192c); color: #fff; }
.gp-portal-chip-active { background: var(--g-red, #e8192c); border-color: var(--g-red, #e8192c); color: #fff; }

/* Seções e cards */
.gp-portal-section { margin-bottom: 28px; }
.gp-portal-alert {
    background: #fff8e5;
    border: 1px solid #f0d98a;
    border-radius: 8px;
    padding: 16px;
}
.gp-portal-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
}
.gp-portal-card, a.gp-portal-card {
    display: block;
    background: #fff;
    border: 1px solid #e2e4e7;
    border-radius: 8px;
    padding: 14px;
    text-decoration: none;
    color: inherit;
    margin-bottom: 16px;
}
a.gp-portal-card:hover { border-color: var(--g-red, #e8192c); }
.gp-portal-card-title { font-size: 14px; margin-top: 4px; }
.gp-portal-card-meta { font-size: 12px; color: #757575; margin-top: 4px; }

.gp-portal-action-needed { border-color: #f0d98a; background: #fffbea; }
.gp-portal-approved-badge {
    display: inline-block;
    background: #e6f6ea;
    color: #1a7a3a;
    padding: 8px 14px;
    border-radius: 6px;
    font-weight: 600;
}

.gp-btn {
    display: inline-block;
    padding: 9px 16px;
    border-radius: 6px;
    border: 1px solid #d0d5dd;
    background: #fff;
    cursor: pointer;
    font-size: 13px;
    margin-right: 8px;
    margin-top: 8px;
}
.gp-btn-primary { background: var(--g-red, #e8192c); color: #fff; border-color: var(--g-red, #e8192c); }

.gp-portal-comment {
    border-top: 1px solid #f0f0f1;
    padding: 10px 0;
}
#gp-portal-comment-input {
    width: 100%;
    box-sizing: border-box;
    padding: 10px;
    border: 1px solid #d0d5dd;
    border-radius: 6px;
    margin-top: 8px;
}
.gp-portal-denied {
    text-align: center;
    padding: 60px 20px;
    color: #757575;
}

/* ── MELHORIA (Painel Criativo) — grade de referências no Portal ─────── */
/* MELHORIA (pedido do usuário — 4 por linha): auto-fit com minmax chega a
   4 colunas nos ~900px de largura do Portal (900 / ~200px ≈ 4) sem
   precisar de media query por viewport — cada card nunca fica menor que
   190px (ainda dá pra ver o embed), e quebra pra menos colunas sozinho
   em telas estreitas/mobile. */
.gp-portal-reference-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 16px;
}
.gp-portal-reference-card {
    background: #fff;
    border: 1px solid #e2e4e7;
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow .15s ease, transform .15s ease;
}
.gp-portal-reference-card:hover { box-shadow: 0 8px 20px rgba(20,25,35,.10); transform: translateY(-2px); }
.gp-portal-reference-embed {
    background: #f5f5f5;
    min-height: 180px;
    max-height: 420px;
    overflow-y: auto;
    display: flex;
    align-items: center;
    justify-content: center;
}
.gp-portal-reference-embed iframe, .gp-portal-reference-embed blockquote { max-width: 100% !important; }
.gp-portal-reference-fallback { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 24px; }
.gp-portal-reference-fallback span { font-size: 28px; }
/* MELHORIA (pedido do usuário — mesmo estilo do wp-admin): link "Ver mais
   no Instagram/TikTok/..." logo abaixo do vídeo, igual ao "Abrir
   original" da tela interna. */
.gp-portal-reference-open-link {
    display: block;
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 600;
    color: var(--g-red, #e8192c);
    text-decoration: none;
}
.gp-portal-reference-open-link:hover { text-decoration: underline; }
.gp-portal-reference-info { padding: 0 12px 8px; flex: 1; }
.gp-portal-reference-platform-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 9px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .3px;
}
.gp-portal-reference-info strong { display: block; margin: 6px 0 4px; font-size: 13px; color: #1d2327; }
.gp-portal-reference-info p { font-size: 12px; color: #646970; margin: 0; }
.gp-portal-reference-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; }
.gp-portal-tag-pill {
    display: inline-flex;
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 600;
    background: #f0f0f1;
    color: #50575e;
}
.gp-portal-tag-pill-client { background: #fdeced; color: #a3122a; }

/* MELHORIA (pedido do usuário — "usar este modelo") */
.gp-portal-reference-cta { padding: 0 12px 12px; }
.gp-portal-reference-cta .gp-btn-primary,
#gp-portal-submit-use-reference {
    display: block;
    width: 100%;
    text-align: center;
    padding: 8px 12px;
    border-radius: 6px;
    border: none;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}
#gp-portal-submit-use-reference { width: auto; display: inline-block; padding: 8px 16px; font-size: 13px; }
.gp-portal-btn-ghost {
    padding: 8px 16px;
    border-radius: 6px;
    border: 1px solid #d0d5dd;
    background: #fff;
    color: #1d2327;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

/* MELHORIA (paginação, pedido do usuário): 16 por página. */
.gp-portal-pagination { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 20px; flex-wrap: wrap; }
.gp-portal-pagination-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    padding: 0 10px;
    border-radius: 6px;
    border: 1px solid #d0d5dd;
    background: #fff;
    color: #1d2327;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
}
.gp-portal-pagination-link:hover { border-color: var(--g-red, #e8192c); color: var(--g-red, #e8192c); }
.gp-portal-pagination-link-active { background: var(--g-red, #e8192c); border-color: var(--g-red, #e8192c); color: #fff; }
.gp-portal-pagination-link-active:hover { color: #fff; }

/* MELHORIA — mini-modal do Portal (não existia nenhum até agora; o
   Portal só tinha prompt()/confirm() nativos do navegador pras ações que
   precisavam de um texto do cliente). Visual mais simples que o do
   wp-admin, de propósito — mesmo espírito "extremamente simples" do
   resto do Portal. */
.gp-portal-modal-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,.5);
    display: none; align-items: center; justify-content: center;
    z-index: 100000; padding: 16px;
}
.gp-portal-modal { background: #fff; border-radius: 10px; max-width: 420px; width: 100%; }
.gp-portal-modal-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 20px; border-bottom: 1px solid #eee;
}
.gp-portal-modal-header h2 { margin: 0; font-size: 16px; }
.gp-portal-modal-close { background: none; border: none; font-size: 22px; line-height: 1; cursor: pointer; color: #757575; }
.gp-portal-modal-body { padding: 16px 20px; }
.gp-portal-modal-body label { display: block; font-size: 12px; font-weight: 600; margin-bottom: 4px; }
.gp-portal-modal-body textarea {
    width: 100%; box-sizing: border-box; padding: 8px 10px; border: 1px solid #d0d5dd;
    border-radius: 6px; font-family: inherit; font-size: 13px; resize: vertical;
}
.gp-portal-modal-footer { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 20px 20px; }

/* MELHORIA — modal genérico de confirmação (aprovar, aprovar tudo,
   solicitar correção), reaproveitando os estilos acima. */
.gp-portal-confirm-items {
    list-style: none; margin: 0 0 4px; padding: 0;
    max-height: 200px; overflow-y: auto;
    border: 1px solid #eee; border-radius: 6px;
}
.gp-portal-confirm-items li {
    padding: 8px 12px; font-size: 13px; border-bottom: 1px solid #f0f0f0;
}
.gp-portal-confirm-items li:last-child { border-bottom: none; }
.gp-portal-confirm-error { color: var(--g-red, #e8192c); font-size: 12px; margin: 6px 0 0; }

/* ══════════════════════════════════════════════════════════════════════
   NOVO (fusão com o módulo de Tarefas) — "Minhas Tarefas"
   ══════════════════════════════════════════════════════════════════════ */
.gp-portal-task-list { display: flex; flex-direction: column; gap: 10px; }
.gp-portal-task-card {
    background: #fff; border: 1px solid #eee; border-radius: 8px; padding: 14px 16px;
}
.gp-portal-task-card-head {
    display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
}
.gp-portal-task-card-head strong { font-size: 14px; }
.gp-portal-task-card-desc { color: #646970; font-size: 13px; margin: 6px 0 0; }
.gp-portal-task-card-meta {
    display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: #757575; margin-top: 8px;
}
.gp-portal-badge {
    display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 600;
    white-space: nowrap;
}
.gp-portal-badge-warning { background: #fcf0d4; color: #856404; }
.gp-portal-badge-info    { background: #e8f4fd; color: #1565c0; }
.gp-portal-badge-success { background: #d7f0dd; color: #00a32a; }

/* ══════════════════════════════════════════════════════════════════════
   NOVO — "Nova Demanda"
   ══════════════════════════════════════════════════════════════════════ */
.gp-portal-form { max-width: 560px; }
.gp-portal-form-row { margin-bottom: 16px; }
.gp-portal-form-row label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.gp-portal-form-row input[type="text"],
.gp-portal-form-row input[type="date"],
.gp-portal-form-row select,
.gp-portal-form-row textarea {
    width: 100%; box-sizing: border-box; padding: 9px 12px; border: 1px solid #d0d5dd;
    border-radius: 6px; font-family: inherit; font-size: 13px;
}
.gp-portal-form-row textarea { resize: vertical; }
.gp-portal-btn-primary {
    background: var(--g-red, #e8192c); color: #fff; border: none; border-radius: 6px;
    padding: 10px 22px; font-size: 14px; font-weight: 600; cursor: pointer;
}
.gp-portal-btn-primary:disabled { opacity: .6; cursor: default; }
.gp-portal-form-feedback {
    padding: 10px 14px; border-radius: 6px; font-size: 13px; margin-bottom: 16px;
}
.gp-portal-form-feedback-success { background: #d7f0dd; color: #00622a; }
.gp-portal-form-feedback-error   { background: #fde8e8; color: #8c1515; }
