.rd-repositorio {
    --rd-primaria: #1a5276;
    --rd-primaria-escura: #0f3a56;
    --rd-acento: #2e86c1;
    --rd-fundo: #f7f9fb;
    --rd-borda: #e3e8ee;
    --rd-texto: #2c3e50;
    --rd-texto-suave: #6b7c8c;
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px 16px 60px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--rd-texto);
    box-sizing: border-box;
}
.rd-repositorio *, .rd-repositorio *::before, .rd-repositorio *::after {
    box-sizing: border-box;
}

/* Toolbar */
.rd-toolbar {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 20px;
    background: #fff;
    padding: 16px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(15, 58, 86, 0.06);
    border: 1px solid var(--rd-borda);
}
.rd-busca-wrapper {
    position: relative;
    flex: 1 1 320px;
}
.rd-icone-busca {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: var(--rd-texto-suave);
    pointer-events: none;
}
#rd-busca-input {
    width: 100%;
    padding: 12px 14px 12px 42px;
    border: 1.5px solid var(--rd-borda);
    border-radius: 8px;
    font-size: 15px;
    transition: border-color .15s ease, box-shadow .15s ease;
    outline: none;
}
#rd-busca-input:focus {
    border-color: var(--rd-acento);
    box-shadow: 0 0 0 3px rgba(46, 134, 193, 0.15);
}
#rd-filtro-categoria {
    padding: 12px 14px;
    border: 1.5px solid var(--rd-borda);
    border-radius: 8px;
    font-size: 15px;
    background: #fff;
    min-width: 220px;
    cursor: pointer;
    outline: none;
}
#rd-filtro-categoria:focus {
    border-color: var(--rd-acento);
}

.rd-resultados-info {
    font-size: 13px;
    color: var(--rd-texto-suave);
    margin-bottom: 14px;
    min-height: 18px;
}

/* Grid */
.rd-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 18px;
}

.rd-card {
    background: #fff;
    border: 1px solid var(--rd-borda);
    border-radius: 14px;
    padding: 20px;
    display: flex;
    gap: 14px;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
    animation: rdFadeIn .3s ease;
}
.rd-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 24px rgba(15, 58, 86, 0.12);
    border-color: var(--rd-acento);
}
@keyframes rdFadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

.rd-card-icon {
    flex: 0 0 auto;
    width: 40px;
    height: 40px;
}
.rd-card-icon svg {
    width: 100%;
    height: 100%;
}

.rd-card-body {
    flex: 1;
    min-width: 0;
}
.rd-card-categoria {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--rd-primaria);
    background: rgba(26, 82, 118, 0.08);
    padding: 3px 9px;
    border-radius: 100px;
    margin-bottom: 8px;
}
.rd-card-titulo {
    font-size: 16px;
    font-weight: 700;
    line-height: 1.35;
    margin: 0 0 6px;
    color: var(--rd-texto);
    word-break: break-word;
}
.rd-card-descricao {
    font-size: 13.5px;
    color: var(--rd-texto-suave);
    line-height: 1.5;
    margin: 0 0 8px;
}
.rd-card-data {
    font-size: 12px;
    color: var(--rd-texto-suave);
    margin: 0 0 12px;
}
.rd-card-acoes {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.rd-btn {
    display: inline-block;
    font-size: 13px;
    font-weight: 600;
    padding: 8px 14px;
    border-radius: 7px;
    text-decoration: none;
    transition: background .15s ease, color .15s ease;
    cursor: pointer;
}
.rd-btn-primario {
    background: var(--rd-primaria);
    color: #fff;
}
.rd-btn-primario:hover {
    background: var(--rd-primaria-escura);
    color: #fff;
}
.rd-btn-secundario {
    background: var(--rd-fundo);
    color: var(--rd-primaria);
    border: 1px solid var(--rd-borda);
}
.rd-btn-secundario:hover {
    background: var(--rd-borda);
}

.rd-vazio {
    text-align: center;
    padding: 50px 20px;
    color: var(--rd-texto-suave);
    font-size: 15px;
    grid-column: 1 / -1;
}

/* Loading state */
.rd-grid.rd-carregando {
    opacity: .5;
    pointer-events: none;
    transition: opacity .15s ease;
}

@media (max-width: 480px) {
    .rd-toolbar { flex-direction: column; }
    #rd-filtro-categoria { min-width: 100%; }
}
