/* central-consulta.css — Central de Consulta (Fase 58)
 * Visual "bem visual" (diretriz do usuário): cards agrupados por categoria,
 * ícone grande por tipo, chip colorido, hover com elevação, copiar com feedback.
 * Escopado sob #view-central pra não vazar. */

#view-central:not(.hidden) {
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: 22px 24px 40px;
}

#view-central .view-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

#view-central #central-busca {
    min-width: 260px;
}

.central-grupo {
    margin-bottom: 6px;
}

.central-grupo-titulo {
    font-size: 14px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--text-muted, #5b6b82);
    border-left: 4px solid var(--brand-primary, #003da5);
    padding-left: 10px;
    margin: 14px 0 10px;
}

.central-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 14px;
}

.central-card {
    background: var(--bg-surface, #fff);
    border: 1px solid var(--border, #e3e8ef);
    border-radius: 12px;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: box-shadow .18s ease, transform .18s ease;
}

.central-card:hover {
    box-shadow: 0 10px 28px rgba(15, 23, 42, .12);
    transform: translateY(-2px);
}

.central-card-head {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.central-card-icon {
    font-size: 26px;
    line-height: 1;
    flex-shrink: 0;
}

.central-card-titulo {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.central-card-titulo strong {
    font-size: 15px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.central-chip {
    align-self: flex-start;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: #fff;
    padding: 3px 9px;
    border-radius: 100px;
}

.central-card-acts {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
}

.central-act {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    padding: 4px 6px;
    border-radius: 6px;
    opacity: .55;
    text-decoration: none;
    color: inherit;
    transition: opacity .15s ease, background .15s ease;
}

.central-act:hover {
    opacity: 1;
    background: var(--bg-hover, rgba(15, 23, 42, .06));
}

.central-act:disabled {
    opacity: .2;
    cursor: default;
}

.central-act:disabled:hover {
    background: none;
}

.central-act--del:hover {
    color: #d63031;
}

.central-card-body {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.central-campo {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.central-campo-rotulo {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--text-muted, #8a93a3);
    min-width: 52px;
    flex-shrink: 0;
}

.central-campo-valor {
    font-size: 13px;
    font-family: var(--font-mono, ui-monospace, monospace);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.central-link {
    font-size: 13px;
    color: var(--brand-primary, #0a4dba);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
    min-width: 0;
}

.central-copy {
    background: none;
    border: 1px solid var(--border, #e3e8ef);
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    padding: 2px 7px;
    flex-shrink: 0;
    transition: background .15s ease, border-color .15s ease;
}

.central-copy:hover {
    background: var(--brand-primary, #0a4dba);
    border-color: var(--brand-primary, #0a4dba);
}

.central-descricao {
    font-size: 12px;
    color: var(--text-muted, #8a93a3);
    border-top: 1px dashed var(--border, #e3e8ef);
    padding-top: 8px;
}

.central-muted {
    color: var(--text-muted, #8a93a3);
    font-style: italic;
}

/* Dark mode — segue as variáveis do tema; só ajusta sombras/hover */
html[data-theme="dark"] .central-card:hover {
    box-shadow: 0 10px 28px rgba(0, 0, 0, .45);
}

html[data-theme="dark"] .central-act:hover {
    background: rgba(255, 255, 255, .08);
}

/* Ícone/logo custom do item — imagem adapta ao slot do ícone */
.central-card-icon-img {
    width: 30px;
    height: 30px;
    object-fit: contain;
    border-radius: 6px;
    flex-shrink: 0;
}

.central-arquivo-data {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted, #8a93a3);
}

/* Drag-and-drop: cards dentro do bloco + bloco inteiro (Fase 58, pedido do usuário) */
.central-card-grip {
    cursor: grab;
    color: var(--text-muted, #8a93a3);
    font-size: 14px;
    line-height: 1;
    padding: 2px 2px 2px 0;
    flex-shrink: 0;
    user-select: none;
}

.central-card-grip:active {
    cursor: grabbing;
}

.central-card.central-dragging {
    opacity: .4;
    outline: 2px dashed var(--brand-primary, #0a4dba);
}

.central-grupo-titulo--draggable {
    cursor: grab;
    user-select: none;
}

.central-grupo-titulo--draggable:active {
    cursor: grabbing;
}

.central-grupo.central-grupo-dragging {
    opacity: .4;
}
