/* Oficina de Partes — gestión documental (scoped; no altera estilos globales) */
.ofp-wrap { --ofp-accent: #1d4ed8; --ofp-teal: #0d9488; }

.ofp-hero {
    background: linear-gradient(135deg, #1e3a8a 0%, #1d4ed8 55%, #0d9488 100%);
    color: #fff;
    border-radius: 14px;
    padding: 24px 22px;
    margin-bottom: 20px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, .12);
}
.ofp-hero h2, .ofp-hero h1 { margin: 0 0 8px; color: #fff; font-size: 1.35rem; }
.ofp-hero p { margin: 0; opacity: .92; font-size: .95rem; line-height: 1.5; }
.ofp-hero-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .18);
    border: 1px solid rgba(255, 255, 255, .25);
    margin-bottom: 10px;
}

.ofp-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    margin: 18px 0;
}
.ofp-step {
    background: var(--muni-surface, #fff);
    border: 1px solid var(--muni-border, #e2e8f0);
    border-radius: 12px;
    padding: 14px 12px;
    text-align: center;
}
.ofp-step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--ofp-accent, #1d4ed8);
    color: #fff;
    font-weight: 700;
    font-size: 13px;
    margin-bottom: 8px;
}
.ofp-step strong { display: block; font-size: .9rem; margin-bottom: 4px; }
.ofp-step span { font-size: .8rem; color: var(--muni-muted, #64748b); line-height: 1.35; }

.ofp-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}
.ofp-stat {
    background: var(--muni-surface, #fff);
    border: 1px solid var(--muni-border, #e2e8f0);
    border-radius: 12px;
    padding: 16px;
    text-align: center;
    transition: box-shadow .15s ease;
}
.ofp-stat:hover { box-shadow: 0 4px 12px rgba(15, 23, 42, .08); }
.ofp-stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.1;
    color: var(--ofp-accent, #1d4ed8);
}
.ofp-stat-value.ofp-stat-warn { color: #b45309; }
.ofp-stat-value.ofp-stat-danger { color: #b91c1c; }
.ofp-stat-value.ofp-stat-ok { color: #047857; }
.ofp-stat-label { font-size: .8rem; color: var(--muni-muted, #64748b); margin-top: 4px; }

.ofp-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: flex-end;
    margin-bottom: 16px;
    padding: 14px;
    background: var(--muni-bg-subtle, #f8fafc);
    border-radius: 10px;
    border: 1px solid var(--muni-border, #e2e8f0);
}
.ofp-filters label { font-size: .85rem; }
.ofp-filters input, .ofp-filters select {
    min-width: 8rem;
    font-size: .9rem;
}

.ofp-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 9px;
    border-radius: 999px;
    white-space: nowrap;
}
.ofp-badge-pendiente { background: #fef3c7; color: #92400e; }
.ofp-badge-resuelto { background: #d1fae5; color: #065f46; }
.ofp-badge-vencido { background: #fee2e2; color: #991b1b; }
.ofp-badge-urgente { background: #ffedd5; color: #9a3412; }

.ofp-priority { width: 4px; padding: 0 !important; }
.ofp-priority-bar {
    display: block;
    width: 4px;
    min-height: 36px;
    border-radius: 2px;
    margin: 0 auto;
}
.ofp-priority-alta { background: #dc2626; }
.ofp-priority-media { background: #f59e0b; }
.ofp-priority-normal { background: #94a3b8; }

.ofp-timeline {
    list-style: none;
    margin: 16px 0 0;
    padding: 0;
    position: relative;
}
.ofp-timeline::before {
    content: "";
    position: absolute;
    left: 11px;
    top: 8px;
    bottom: 8px;
    width: 2px;
    background: var(--muni-border, #e2e8f0);
}
.ofp-timeline li {
    position: relative;
    padding: 0 0 18px 32px;
}
.ofp-timeline li:last-child { padding-bottom: 0; }
.ofp-timeline-dot {
    position: absolute;
    left: 4px;
    top: 4px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--ofp-accent, #1d4ed8);
    border: 3px solid var(--muni-surface, #fff);
    box-shadow: 0 0 0 2px var(--muni-border, #e2e8f0);
}
.ofp-timeline-dot.resolucion { background: #059669; }
.ofp-timeline-dot.derivacion { background: #0d9488; }
.ofp-timeline-dot.notificacion { background: #7c3aed; }
.ofp-timeline time {
    display: block;
    font-size: .8rem;
    color: var(--muni-muted, #64748b);
    margin-bottom: 2px;
}
.ofp-timeline strong { font-size: .95rem; }
.ofp-timeline p { margin: 4px 0 0; font-size: .88rem; color: var(--muni-text, #334155); }

.ofp-detail-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}
.ofp-quick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--muni-border, #e2e8f0);
}

.ofp-legal-note {
    font-size: .85rem;
    color: var(--muni-muted, #64748b);
    border-left: 3px solid var(--ofp-teal, #0d9488);
    padding: 10px 14px;
    margin: 16px 0;
    background: #f0fdfa;
    border-radius: 0 8px 8px 0;
}

.ofp-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 14px;
    margin-top: 16px;
}
.ofp-info-card {
    border: 1px solid var(--muni-border, #e2e8f0);
    border-radius: 12px;
    padding: 16px;
    background: var(--muni-surface, #fff);
}
.ofp-info-card h4 { margin: 0 0 8px; font-size: .95rem; }

@media (max-width: 640px) {
    .ofp-stats { grid-template-columns: repeat(2, 1fr); }
    .ofp-filters { flex-direction: column; align-items: stretch; }
    .ofp-filters input, .ofp-filters select { width: 100%; }
}
