/* =========================================================
   TOKENS / BASE
========================================================= */
:root {
  /* Cores principais */
  --brand-secondary: #0A2A54;
  --brand-primary:      #22B2D6;
  --brand-action:    #10b26a;

  /* Superfícies */
  --surface:   #FFFFFF;
  --surface-2: #F8FBFF;
  --surface-3: #EFF6FB;
  --bg:        #F6F8FB;

  /* Estado / feedback */
  --success: var(--brand-action);
  --warning: #D97706;
  --danger:  #C63D39;

  /* UI auxiliares */
  --muted:   #6B7280;
  --border:  #d6e5ecff;

  /* Tabela */
  --table-head:      #F1F5FB;
  --table-row-alt:   #eef3fb;
  --table-row-hover: #ECF4FF;

  /* Sombras */
  --shadow-card: 0 6px 16px rgba(10,42,84,.06);
  --shadow-btn:  0 2px 6px rgba(15,23,42,.10);
}

* { box-sizing: border-box; }

body.pc-modal-open { overflow: hidden; }

/* =========================================================
   BOTÕES (Global)
========================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  border: 1px solid transparent;
  border-radius: 10px;
  font-weight: 600;
  color: var(--brand-secondary);
  text-decoration: none;
  background: var(--surface);
  cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
}

.btn svg { width: 18px; height: 18px; }
.btn:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(0,0,0,.06); }

/* Variantes */
.btn-sm { padding: 6px 10px; font-size: .8rem; }

.btn-ghost {
  border-color: var(--border);
  background: transparent;
  border: 1px dashed var(--border);
  color: var(--brand-secondary);
  font-weight: 600;
  transition: all .15s ease;
}
.btn-ghost:hover {
  background: var(--surface-3);
  border-color: #C8D4E0;
  color: var(--brand-secondary);
}

.btn-light { background: var(--surface-3); border-color: #DBE6F0; }
.btn-light:hover { background: #DBE6F0; }

.btn-primary {
  background: linear-gradient(135deg, #2EC4EA, var(--brand-primary));
  color: #fff;
  border: none;
}

.btn-danger { background: var(--danger); color: #fff; border: none; }
.btn-danger:hover { background: #a82f33; }

.btn-disabled, .btn[disabled] {
  opacity: .45;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

/* --- Botões Específicos (Modal/Ações) --- */
.btn-negociar-disponivel {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--brand-action);
  color: #fff;
  box-shadow: 0 6px 18px rgba(12,150,80,0.18);
  font-weight: 700;
  transition: transform .12s ease, box-shadow .12s ease, filter .12s ease;
}

.btn-negociar-disponivel:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(12,150,80,0.22);
  filter: brightness(1.04);
}

.btn-negociar-disponivel.is-disabled {
  background: var(--surface-3, #CBD5E1); cursor: not-allowed; opacity: 0.8; transform: none; box-shadow: none; color: var(--muted, #64748B);
}

.btn-reserved {
    background-color: var(--danger);
    color: #ffffff;
    border-color: var(--danger);
    cursor: not-allowed;
    opacity: 0.9;
}
.btn-reserved:hover {
    background-color: var(--danger);
}
.btn-reserved svg {
    fill: #ffffff;
    width: 14px;
    height: 14px;
}

.btn-accent, .btn-reservar {
  background: var(--success);
  color: #fff;
  border: 1px solid var(--success);
  font-weight: 700;
  transition: transform .1s ease, box-shadow .15s ease, filter .12s ease;
}
.btn-accent:hover, .btn-reservar:hover {
  background: #19906b;
  border-color: #19906b;
  box-shadow: 0 6px 18px rgba(15,175,157,.25);
  filter: brightness(1.05);
}

.btn.is-loading {
  position: relative;
  pointer-events: none;
  opacity: .85;
}
.btn.is-loading::after {
  content: "";
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid currentColor;
  border-top-color: transparent;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* =========================================================
   CARD DE COTA (Componente)
========================================================= */
.pc-cota {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow-card);
}
.cota-col { display: flex; align-items: center; gap: 12px; }
.cota-col--main { display: flex; align-items: center; justify-content: space-between; padding: 12px 20px; }
.cota-col--acoes { display: flex; justify-content: space-between; gap: 10px; padding: 8px 20px; border-top: 1px solid #DFDFDF; }
.cota-icon { width: 42px; height: 42px; }
.cota-adm { color: var(--brand-secondary); font-weight: 700; text-align: center; width: fit-content; }
.cota-credito { color: var(--success); font-size: 1.3rem; font-weight: 700; }
.cota-segmento { color: var(--muted); font-size: .9rem; }
.cota-dado { display: flex; flex-direction: column; gap: 4px; }
.cota-dado-label { color: var(--muted); font-size: .85rem; }
.cota-dado-valor { color: #0F172A; font-weight: 600; }
.cota-status { display: inline-flex; padding: 8px 12px; border-radius: 10px; background: var(--surface-3); color: var(--brand-secondary); font-size: .9rem; font-weight: 700; }
.cota-botoes { display: flex; gap: 10px; }
.cota-botoes .btn { width: 220px; padding: 6px 12px; border-radius: 5px; box-shadow: -1px 1px 2px 0 #dee0e7ad; }
.cota-col--check .cota-check { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: .9rem; }

/* Estados Especiais */
tr.is-disabled, .pc-cota.is-disabled { opacity: .45; filter: grayscale(.2); }
tr.is-disabled input[type="checkbox"], .pc-cota.is-disabled input[type="checkbox"] { cursor: not-allowed; }
.pulse-deny { outline: 2px solid rgba(255,0,0,.25); transition: outline-color .2s; }

/* =========================================================
   TABELA DE COTAS (Componente)
========================================================= */
.cotas-table-wrapper {
  margin-top: 10px;
  overflow: hidden;
  overflow-x: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow-card);
}
.cotas-table { width: 100%; min-width: 960px; }
.cotas-table thead { background: var(--table-head); }
.cotas-table th { padding: 9px 12px; color: #64748B; text-align: center; font-size: .75rem; font-weight: 700; letter-spacing: .06em; height: 70px; text-transform: uppercase; }
.cotas-table td { padding: 10px 16px; vertical-align: middle; color: #0F172A; font-size: .9rem; }
.cotas-table tbody tr:nth-child(odd) { background: #fff; }
.cotas-table tbody tr:nth-child(even) { background: var(--table-row-alt); }
.cotas-table tbody tr:hover { background: var(--table-row-hover); }

/* Helpers de Tabela */
.cota-pill-combo { display: inline-flex; align-items: center; gap: 10px; padding: 2px 8px; border-radius: 999px; background: var(--surface-3); border: 1px solid #DBE6F0; color: var(--brand-secondary); font-size: .72rem; font-weight: 700; }
.cota-pill-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--brand-primary); display: inline-block; }
.cota-segmento-pill { display: inline-flex; align-items: center; padding: 4px 10px; border-radius: 999px; background: var(--surface-3); color: var(--brand-secondary); font-size: .8rem; font-weight: 600; }
.cota-segmento-pill--imovel { background: #E0F7F4; color: #0FAF9D; }
.cota-segmento-pill--veiculo { background: #E3F2FF; color: #2279D6; }
.th-sort.is-sortable { cursor: pointer; user-select: none; position: relative; }
.th-sort.is-sortable::after { content: '↕'; font-size: 11px; opacity: .35; margin-left: 6px; }

/* =========================================================
   PAGINAÇÃO
========================================================= */
.cotas-pagination { margin-top: 16px; }
.cotas-pagination > ul.page-numbers { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: center; list-style: none; padding: 12px; margin: 0; border-radius: 12px; }
.cotas-pagination .page-numbers li { list-style: none; }
.cotas-pagination .page-numbers a.page-numbers, .cotas-pagination .page-numbers span.page-numbers { min-width: 40px; height: 40px; padding: 0 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2); color: var(--brand-secondary); display: inline-flex; align-items: center; justify-content: center; font-weight: 600; font-size: 14px; text-decoration: none; box-shadow: var(--shadow-btn); transition: background .15s ease; }
.cotas-pagination .page-numbers a.page-numbers:hover { background: var(--surface-3); border-color: var(--brand-primary); transform: translateY(-1px); }
.cotas-pagination .page-numbers span.current { background: var(--brand-primary); border-color: var(--brand-primary); color: #fff; }
.cotas-pagination .cp-icon svg { width: 18px; height: 18px; }
.cotas-pagination .page-numbers a.prev .cp-icon svg { transform: rotate(180deg); }

/* Filtros Inline (ajuste fino) */
.cotas-filter-field--inline { display: flex; gap: 10px; }
.cotas-filter-field--inline > div { flex: 1; }
.cotas-filter-apply { border: none; border-radius: 999px; padding: 8px 18px; font-size: 14px; font-weight: 600; cursor: pointer; background: #2279D6; color: #FFFFFF; }
.cotas-filter-reset { font-size: 13px; text-decoration: underline; color: #2279D6; }

@media (max-width: 480px) {
  .cotas-pagination > ul.page-numbers { gap: 6px; padding: 10px; }
  .cotas-pagination .page-numbers a.page-numbers, .cotas-pagination .page-numbers span.page-numbers { min-width: 36px; height: 36px; font-size: 13px; }
}

/* =========================================================
   ESTILO DE PÁGINAS (Namespace: pc-page-*)
========================================================= */

/* Wrapper principal para dar espaçamento do header/footer */
.pc-main-content {
    padding: 40px 0;
    min-height: 60vh; /* Garante que o footer não suba em páginas vazias */
    background-color: var(--bg, #F6F8FB);
}

/* Container focado em leitura (não tão largo quanto a listagem) */
.pc-container-narrow {
    width: 100%;
    max-width: 960px; /* Largura ideal para leitura */
    margin: 0 auto;
    padding: 0 20px;
}

/* O Card da Página */
.pc-page-card {
    background-color: var(--surface, #FFFFFF);
    border: 1px solid var(--border, #d6e5ec);
    border-radius: 12px;
    box-shadow: var(--shadow-card, 0 4px 12px rgba(0,0,0,0.05));
    padding: 40px;
    margin-bottom: 30px;
}

/* Cabeçalho (Título) */
.pc-page-header {
    margin-bottom: 32px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border, #d6e5ec);
}

.pc-page-title {
    color: var(--brand-secondary, #0A2A54);
    font-size: 2rem; /* 32px */
    font-weight: 800;
    line-height: 1.2;
    margin: 0;
}

/* Corpo do Texto (Tipografia Rica) */
.pc-page-body {
    color: var(--text-main, #334155);
    font-size: 1.05rem; /* Levemente maior para leitura confortável */
    line-height: 1.7;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* --- Elementos internos do the_content() --- */

/* Títulos internos */
.pc-page-body h2, 
.pc-page-body h3, 
.pc-page-body h4 {
    color: var(--brand-secondary, #0A2A54);
    font-weight: 700;
    margin-top: 1.5em;
    margin-bottom: 0.75em;
    line-height: 1.3;
}

.pc-page-body h2 { font-size: 1.5rem; }
.pc-page-body h3 { font-size: 1.25rem; }

/* Parágrafos e Listas */
.pc-page-body p {
    margin-bottom: 1.5em;
}

.pc-page-body ul, 
.pc-page-body ol {
    margin-bottom: 1.5em;
    padding-left: 1.5rem;
    color: var(--muted, #64748B);
}

.pc-page-body li {
    margin-bottom: 0.5em;
}

/* Links no texto */
.pc-page-body a {
    color: var(--brand-primary, #22B2D6);
    text-decoration: none;
    font-weight: 600;
    border-bottom: 1px solid transparent;
    transition: all 0.2s;
}

.pc-page-body a:hover {
    color: var(--brand-secondary, #0A2A54);
    border-bottom-color: currentColor;
}

/* Citações (Blockquote) */
.pc-page-body blockquote {
    border-left: 4px solid var(--brand-primary, #22B2D6);
    background: var(--surface-2, #F8FBFF);
    margin: 2em 0;
    padding: 1em 1.5em;
    font-style: italic;
    color: var(--brand-secondary, #0A2A54);
    border-radius: 0 8px 8px 0;
}

/* Imagens no conteúdo */
.pc-page-body img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1em 0;
}

/* =========================================================
   RESPONSIVIDADE (Mobile)
========================================================= */
@media (max-width: 768px) {
    .pc-main-content {
        padding: 20px 0;
    }

    .pc-page-card {
        padding: 24px 20px; /* Padding menor no mobile */
        border-radius: 8px;
    }

    .pc-page-title {
        font-size: 1.5rem; /* 24px */
        padding-bottom: 16px;
        margin-bottom: 24px;
    }

    .pc-page-body {
        font-size: 0.95rem; /* Fonte base um pouco menor */
    }
}