/* ==========================================================================
   VISTA PRINCIPAL: CATÁLOGO DE ÁRBOLES DE VALOR (DISEÑO MINIMALISTA)
   ========================================================================== */

.catalog-header {
    height: 64px;
    background: #ffffff;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 28px;
    flex-shrink: 0;
    box-shadow: var(--shadow-sm);
}

.catalog-brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

.brand-logo-img {
    height: 30px;
    width: auto;
    object-fit: contain;
    display: block;
}

.brand-divider {
    width: 1px;
    height: 22px;
    background: var(--border-color);
}

.catalog-title {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: -0.01em;
}

.catalog-subtitle {
    font-size: 0.74rem;
    color: var(--text-muted);
    font-weight: 500;
}

.catalog-header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.catalog-main-content {
    flex: 1;
    overflow-y: auto;
    padding: 32px 36px 60px 36px;
    background: var(--bg-canvas);
}

.catalog-hero-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px 28px;
    margin-bottom: 28px;
    box-shadow: var(--shadow-sm);
}

.catalog-hero-banner h2 {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--text-main);
}

.catalog-hero-banner p {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.catalog-stats-pills {
    display: flex;
    align-items: center;
    gap: 12px;
}

.catalog-pill {
    background: #f1f5f9;
    border: 1px solid var(--border-color);
    padding: 6px 14px;
    border-radius: var(--radius-full);
    font-size: 0.78rem;
    color: var(--text-muted);
}

.catalog-pill strong {
    color: var(--cyan-accent);
    font-family: var(--font-mono);
}

/* Grilla de Tarjetas del Catálogo */
.catalog-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 24px;
    padding-bottom: 40px;
}

.catalog-card, .tree-catalog-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease, border-color 0.2s ease;
    position: relative;
    cursor: default;
}

.catalog-card:hover, .tree-catalog-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px -6px rgba(0, 0, 0, 0.1);
    border-color: #cbd5e1;
}

.card-status-bar {
    height: 4px;
    width: 100%;
}
.card-status-bar.green, .status-green .card-status-bar { background: var(--status-green); }
.card-status-bar.yellow, .status-yellow .card-status-bar { background: var(--status-yellow); }
.card-status-bar.red, .status-red .card-status-bar { background: var(--status-red); }

.card-body {
    padding: 22px 24px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.card-top-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.card-commodity-badge {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    background: var(--copper-light);
    color: var(--copper-primary);
    border: 1px solid #fde68a;
    padding: 2px 8px;
    border-radius: var(--radius-full);
}

.card-title {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-main);
    line-height: 1.25;
    letter-spacing: -0.01em;
}

.card-subtitle {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 4px;
    margin-bottom: 16px;
    line-height: 1.35;
}

.card-kpi-highlight, .card-root-kpi-box {
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 14px 16px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-root-label, .kpi-h-label {
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.card-root-val, .kpi-h-values {
    font-family: var(--font-mono);
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--text-main);
    margin-top: 2px;
}

.card-root-target {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 500;
}

.card-semaphores-summary {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.card-footer {
    display: flex;
    align-items: center;
    padding: 14px 24px;
    background: #f8fafc;
    border-top: 1px solid var(--border-color);
    margin-top: auto;
}

.btn-card-action, .card-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #ffffff !important;
    background: var(--cyan-accent);
    padding: 9px 18px;
    border-radius: var(--radius-md);
    font-size: 0.82rem;
    font-weight: 700;
    text-decoration: none;
    transition: background 0.15s ease, transform 0.15s ease;
}

.btn-card-action:hover, .card-action-btn:hover {
    background: #0369a1;
    transform: translateY(-1px);
}
