/* Familias oficiales del DTC — corrección mínima, sin rediseño del expediente. */
.dtc-oficial-head {
    display: grid;
    gap: 4px;
    margin-bottom: 12px;
}
.dtc-oficial-head h3 {
    margin: 0;
    font: 700 20px/1.2 'Lexend', system-ui, sans-serif;
    color: #14243b;
}
.dtc-oficial-head p {
    margin: 0;
    max-width: 760px;
    color: #5c6b80;
    font: 400 13px/1.5 'Source Sans 3', system-ui, sans-serif;
}
.dtc-oficial-updated {
    color: #7b8798;
    font-size: 11px;
}
.dtc-oficial-summary {
    display: flex;
    align-items: stretch;
    gap: 8px;
    flex-wrap: wrap;
    margin: 0 0 14px;
}
.dtc-oficial-summary-total,
.dtc-oficial-chip {
    display: inline-flex;
    align-items: baseline;
    gap: 5px;
    border: 1px solid #dce4ee;
    border-radius: 10px;
    background: #fff;
    padding: 8px 11px;
}
.dtc-oficial-summary-total b,
.dtc-oficial-chip b {
    font: 700 17px/1 'Lexend', system-ui, sans-serif;
    color: #14243b;
}
.dtc-oficial-summary-total small,
.dtc-oficial-chip small {
    color: #607086;
    font: 700 10px/1 'Lexend', system-ui, sans-serif;
    letter-spacing: .04em;
    text-transform: uppercase;
}
.dtc-oficial-chip.habil { border-color: #b7e5d1; background: #f1fbf6; }
.dtc-oficial-chip.habil b, .dtc-oficial-chip.habil small { color: #087850; }
.dtc-oficial-chip.no-habil { border-color: #f0c7c7; background: #fff7f7; }
.dtc-oficial-chip.no-habil b, .dtc-oficial-chip.no-habil small { color: #a12727; }
.dtc-oficial-chip.pendiente { border-color: #f0ddb0; background: #fffaf0; }
.dtc-oficial-chip.pendiente b, .dtc-oficial-chip.pendiente small { color: #8a5a00; }

.dtc-oficial-list {
    display: grid;
    gap: 6px;
    max-height: 420px;
    overflow: auto;
    padding-right: 2px;
}
.dtc-oficial-row {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 10px;
    min-height: 48px;
    padding: 8px 10px;
    border: 1px solid #e1e8f0;
    border-radius: 10px;
    background: #fff;
}
.dtc-oficial-index {
    color: #95a1b1;
    font: 700 10px/1 'Lexend', system-ui, sans-serif;
}
.dtc-oficial-identity {
    display: grid;
    gap: 2px;
    min-width: 0;
}
.dtc-oficial-rut {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #1a2c45;
    font: 700 13px/1.2 'Lexend', system-ui, sans-serif;
}
.dtc-oficial-identity small {
    color: #8b97a7;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: .05em;
}
.dtc-oficial-badge {
    border-radius: 999px;
    padding: 5px 8px;
    font: 800 9px/1 'Lexend', system-ui, sans-serif;
    letter-spacing: .04em;
    white-space: nowrap;
}
.dtc-oficial-badge.habil { color: #087850; background: #ddf7ea; }
.dtc-oficial-badge.no-habil { color: #a12727; background: #fde8e8; }
.dtc-oficial-badge.pendiente { color: #8a5a00; background: #fff1cc; }
.dtc-oficial-badge.otro { color: #53647a; background: #e9eef5; }
.dtc-oficial-photo {
    color: #6b7b8f;
    font-size: 11px;
    text-align: right;
    white-space: nowrap;
}
.dtc-oficial-photo.omitida { color: #a35d00; }

.dtc-oficial-download {
    display: grid;
    gap: 4px;
    margin: 14px 0 4px;
    padding: 12px;
    border: 1px solid #dce4ee;
    border-radius: 12px;
    background: #f8fafc;
}
.dtc-oficial-download-button {
    justify-self: start;
    border: 0;
    border-radius: 8px;
    background: #14243b;
    color: #fff;
    padding: 9px 13px;
    font: 700 12px/1 'Lexend', system-ui, sans-serif;
    cursor: pointer;
}
.dtc-oficial-download-button:disabled {
    cursor: not-allowed;
    opacity: .48;
}
.dtc-oficial-download-note {
    margin: 0;
    color: #7b8798;
    font-size: 11px;
    line-height: 1.45;
}
.dtc-oficial-download-note.bloqueada { color: #8a5a00; }
.dtc-oficial-download-note.disponible { color: #087850; }
.dtc-oficial-download-status {
    min-height: 1.2em;
    margin: 0;
    color: #6b7b8f;
    font-size: 11px;
    line-height: 1.45;
}
.dtc-oficial-download-status.error { color: #b03636; }
.dtc-oficial-download-status.success { color: #087850; }

.dtc-oficial-photos {
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid #e4eaf1;
}
.dtc-oficial-photos-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}
.dtc-oficial-photos-head h4 {
    margin: 0;
    color: #14243b;
    font: 700 15px/1.2 'Lexend', system-ui, sans-serif;
}
.dtc-oficial-photos-head p {
    margin: 0;
    color: #6b7b8f;
    font-size: 11px;
}
.dtc-oficial-photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
    gap: 8px;
}
.dtc-oficial-photo-card {
    margin: 0;
    overflow: hidden;
    border: 1px solid #dfe7ef;
    border-radius: 9px;
    background: #fff;
}
.dtc-oficial-photo-card img {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    background: #edf2f7;
}
.dtc-oficial-photo-card figcaption {
    padding: 5px 7px;
    color: #53647a;
    font-size: 10px;
    font-weight: 700;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.dtc-oficial-photo-card.rota img { opacity: .25; }
.dtc-oficial-empty-photos {
    margin: 0;
    color: #7b8798;
    font-size: 12px;
}
.dtc-oficial-omisiones {
    margin-top: 12px;
    padding: 10px 12px;
    border: 1px solid #f0ddb0;
    border-radius: 9px;
    background: #fffaf0;
    color: #7a5200;
    font-size: 11px;
    line-height: 1.5;
}
.dtc-oficial-omisiones strong { display: block; margin-bottom: 3px; }
.dtc-oficial-omisiones p { margin: 0 0 3px; }

.dtc-oficial-state {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    padding: 14px;
    border: 1px solid #e1e8f0;
    border-radius: 10px;
    background: #fbfcfe;
    color: #53647a;
}
.dtc-oficial-state strong { display: block; color: #1a2c45; font-size: 13px; }
.dtc-oficial-state p { margin: 3px 0 0; font-size: 12px; line-height: 1.45; }
.dtc-oficial-state.error { border-color: #f0c7c7; background: #fff8f8; }
.dtc-oficial-state.empty { border-style: dashed; }
.dtc-oficial-state.compact { margin-top: 8px; }
.dtc-oficial-spinner {
    width: 15px;
    height: 15px;
    flex: 0 0 15px;
    margin-top: 2px;
    border: 2px solid #c8d5e4;
    border-top-color: #14243b;
    border-radius: 50%;
    animation: dtc-oficial-spin .8s linear infinite;
}
@keyframes dtc-oficial-spin { to { transform: rotate(360deg); } }
.dtc-oficial-retry {
    margin-top: 8px;
    border: 1px solid #c9d5e3;
    border-radius: 7px;
    background: #fff;
    color: #14243b;
    padding: 6px 9px;
    font: 700 11px/1 'Lexend', system-ui, sans-serif;
    cursor: pointer;
}
.dtc-v2-download-card.dtc-oficial-bloqueada { border-color: #ead7ac; background: #fffdf8; }
.dtc-v2-download-card.dtc-oficial-bloqueada > button { opacity: .5; cursor: not-allowed; }
.dtc-v2-project-badge.postulado { color: #1d4d8f; background: #e7f0fb; }

@media (max-width: 640px) {
    .dtc-oficial-row { grid-template-columns: 22px minmax(0, 1fr) auto; }
    .dtc-oficial-photo { grid-column: 2 / -1; text-align: left; }
    .dtc-oficial-summary { gap: 6px; }
    .dtc-oficial-summary-total, .dtc-oficial-chip { padding: 7px 8px; }
}
