/* =========================================================
   DMU Summary Card
   ---------------------------------------------------------
   Vertical info tile: title + optional status pill in head,
   optional description, label/value stat rows, optional
   "View →" footer. Renders as <a> or <div>. Reused anywhere
   a record should be presented as a compact card linking to
   its detail view.
   ========================================================= */

.dmu-summary-card {
    --dmu-summary-card-pad-x: 1.25rem;
    --dmu-summary-card-pad-y: 1rem;

    display: flex;
    flex-direction: column;
    gap: var(--dmu-summary-card-pad-y);
    height: 100%;
    padding: var(--dmu-summary-card-pad-y) var(--dmu-summary-card-pad-x);
    background: var(--dmu-surface-0);
    border: 1px solid var(--dmu-border-0);
    border-radius: 18px;
    box-shadow: var(--dmu-shadow-sm);
    color: var(--dmu-text-0);
    text-decoration: none;
    overflow: hidden;
    transition: border-color 0.18s ease;
}

a.dmu-summary-card:hover {
    border-color: rgba(var(--primary-rgb), 0.4);
    color: var(--dmu-text-0);
    text-decoration: none;
}

.dmu-summary-card__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.dmu-summary-card__head-text {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    min-width: 0;
    flex: 1 1 auto;
}

.dmu-summary-card__title {
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.3;
    color: var(--dmu-text-0);
    margin: 0;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.dmu-summary-card__divider {
    height: 1px;
    background-color: var(--dmu-border-0);
    margin-left: calc(var(--dmu-summary-card-pad-x) * -1);
    margin-right: calc(var(--dmu-summary-card-pad-x) * -1);
    flex-shrink: 0;
}

.dmu-summary-card__description {
    font-size: 0.82rem;
    color: var(--dmu-text-2);
    line-height: 1.45;
    margin: 0;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.dmu-summary-card__stats {
    display: grid;
    grid-template-columns: 1fr;
    grid-auto-rows: 1fr;
    flex-grow: 1;
}

.dmu-summary-card__stat {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    min-height: 2.25rem;
}

.dmu-summary-card__stat + .dmu-summary-card__stat {
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

html[data-color^="dark-"] .dmu-summary-card__stat + .dmu-summary-card__stat {
    border-top-color: var(--dmu-border-0);
}

.dmu-summary-card__stat-label {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--dmu-text-3);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.dmu-summary-card__stat-value {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--dmu-text-0);
    text-align: right;
    min-width: 0;
}

.dmu-summary-card__foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--primary);
    transition: color 0.15s ease;
}

.dmu-summary-card__foot i {
    width: 16px;
    height: 16px;
    transition: transform 0.15s ease;
}

a.dmu-summary-card:hover .dmu-summary-card__foot {
    color: var(--primary-darker, var(--primary));
}

a.dmu-summary-card:hover .dmu-summary-card__foot i {
    transform: translateX(3px);
}
