/* Densidad de Golpeteo — Vista frontend */

.mm-golpeteo-page {
    max-width: 98%;
    margin: 0 auto;
    padding: 0 1rem;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: #1a1a2e;
}

/* Hero */
.mm-golpeteo-hero {
    background: linear-gradient(135deg, #7c2d12 0%, #92400e 50%, #1a1a2e 100%);
    color: #fff;
    border-radius: 12px;
    padding: 2.5rem 2rem;
    margin-bottom: 2rem;
}
.mm-golpeteo-hero-content { max-width: 800px; }
.mm-golpeteo-eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.75rem;
    color: #fbbf24;
    margin: 0 0 0.5rem 0;
    font-weight: 700;
}
.mm-golpeteo-hero h1 {
    font-size: 2rem;
    margin: 0 0 0.75rem 0;
    font-weight: 800;
    line-height: 1.2;
}
.mm-golpeteo-hero-subtitle {
    font-size: 1rem;
    opacity: 0.85;
    margin: 0 0 1.5rem 0;
    line-height: 1.5;
}
.mm-golpeteo-kpis {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}
.mm-golpeteo-kpi {
    background: rgba(255,255,255,0.1);
    border-radius: 8px;
    padding: 1rem 1.5rem;
    text-align: center;
    min-width: 140px;
}
.mm-golpeteo-kpi-value {
    font-size: 1.75rem;
    font-weight: 800;
    line-height: 1;
    word-break: break-word;
}
.mm-golpeteo-kpi-label {
    font-size: 0.75rem;
    opacity: 0.75;
    margin-top: 0.4rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

/* Sections */
.mm-golpeteo-section { margin-bottom: 2rem; }
.mm-golpeteo-section-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #0f3460;
    border-bottom: 2px solid #0f3460;
    padding-bottom: 0.5rem;
    margin: 0 0 0.75rem 0;
}
.mm-golpeteo-section-desc {
    font-size: 0.85rem;
    color: #6b7280;
    margin: 0 0 1rem 0;
}

/* Chart */
.mm-golpeteo-chart-container {
    background: #fff;
    border-radius: 10px;
    padding: 1rem;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    position: relative;
    height: 350px;
}

/* Table */
.mm-golpeteo-table-wrap {
    overflow-x: auto;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.mm-golpeteo-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}
.mm-golpeteo-table th {
    background: #f8f9fa;
    padding: 0.6rem 0.8rem;
    text-align: left;
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
    white-space: nowrap;
}
.mm-golpeteo-table td {
    padding: 0.55rem 0.8rem;
    border-bottom: 1px solid #f3f4f6;
    vertical-align: middle;
}
.mm-golpeteo-table tr:hover { background: #f9fafb; }
.mm-golpeteo-rank {
    font-weight: 700;
    color: #9ca3af;
    text-align: center;
    width: 30px;
}
.mm-golpeteo-medium-name {
    font-weight: 600;
    color: #0f3460;
    min-width: 150px;
}
.mm-golpeteo-num {
    text-align: right;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

/* Borgia cards */
.mm-golpeteo-borgia-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1rem;
}
.mm-golpeteo-borgia-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 1rem 1.2rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.mm-golpeteo-borgia-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}
.mm-golpeteo-borgia-medium {
    font-weight: 700;
    color: #0f3460;
    font-size: 0.9rem;
}
.mm-golpeteo-borgia-score {
    font-size: 1.5rem;
    font-weight: 800;
    color: #7c2d12;
}
.mm-golpeteo-borgia-bars {
    display: grid;
    gap: 0.35rem;
}
.mm-golpeteo-borgia-bar-row {
    display: grid;
    grid-template-columns: 100px 1fr 30px;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.72rem;
}
.mm-golpeteo-borgia-bar-label {
    color: #6b7280;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.mm-golpeteo-borgia-bar-track {
    height: 6px;
    background: #f0f1f3;
    border-radius: 3px;
    overflow: hidden;
}
.mm-golpeteo-borgia-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #f59e0b, #dc2626);
    border-radius: 3px;
}
.mm-golpeteo-borgia-bar-val {
    text-align: right;
    color: #6b7280;
    font-variant-numeric: tabular-nums;
}
.mm-golpeteo-borgia-samples {
    margin-top: 0.5rem;
    font-size: 0.72rem;
    color: #9ca3af;
}

/* Recent headlines */
.mm-golpeteo-headlines {
    display: grid;
    gap: 0.5rem;
}
.mm-golpeteo-headline {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-left: 4px solid #dc2626;
    border-radius: 0 8px 8px 0;
    padding: 0.65rem 0.9rem;
}
.mm-golpeteo-headline-medium {
    font-size: 0.72rem;
    font-weight: 700;
    color: #7c2d12;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    margin-bottom: 0.2rem;
}
.mm-golpeteo-headline-title {
    font-size: 0.88rem;
    line-height: 1.4;
    margin-bottom: 0.3rem;
}
.mm-golpeteo-headline-title a {
    color: #0f3460;
    text-decoration: none;
}
.mm-golpeteo-headline-title a:hover { text-decoration: underline; }
.mm-golpeteo-headline-meta {
    font-size: 0.72rem;
    color: #9ca3af;
    display: flex;
    gap: 0.75rem;
    align-items: center;
}
.mm-golpeteo-headline-sentiment {
    color: #dc2626;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

/* Empty state */
.mm-golpeteo-empty {
    text-align: center;
    padding: 3rem 1rem;
    color: #6b7280;
}

/* Tooltip-enabled elements */
.mm-golpeteo-kpi[title],
.mm-golpeteo-period-selector[title],
.mm-golpeteo-section-title[title],
.mm-golpeteo-heatmap-cell[title],
.mm-golpeteo-export-btn[title],
.mm-golpeteo-vpattern-quartile[title],
.mm-golpeteo-forensic-table th[title] {
    cursor: help;
}
.mm-golpeteo-section-title[title]:hover {
    text-decoration: underline dotted;
    text-underline-offset: 3px;
}

/* Responsive */
@media (max-width: 768px) {
    .mm-golpeteo-hero { padding: 1.5rem 1rem; }
    .mm-golpeteo-hero h1 { font-size: 1.5rem; }
    .mm-golpeteo-kpis { flex-direction: column; }
    .mm-golpeteo-kpi { min-width: auto; }
    .mm-golpeteo-borgia-grid { grid-template-columns: 1fr; }
    .mm-golpeteo-table { font-size: 0.75rem; }
    .mm-golpeteo-heatmap { font-size: 0.6rem; }
    .mm-golpeteo-heatmap-hour { min-width: 18px; }
    .mm-golpeteo-aep-panel { flex-direction: column; }
}

/* ====== SRR Widget Styles ====== */

/* Period selector */
.mm-golpeteo-period-selector {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    justify-content: flex-end;
}
.mm-golpeteo-period-btn {
    display: inline-block;
    padding: 0.35rem 0.8rem;
    border-radius: 6px;
    background: #f3f4f6;
    color: #6b7280;
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 600;
    transition: all 0.15s;
}
.mm-golpeteo-period-btn:hover { background: #e5e7eb; color: #0f3460; }
.mm-golpeteo-period-btn.active {
    background: #0f3460;
    color: #fff;
}

/* Scope selector */
.mm-golpeteo-scope-selector {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    justify-content: flex-end;
}
.mm-golpeteo-scope-btn {
    display: inline-block;
    padding: 0.35rem 0.8rem;
    border-radius: 6px;
    background: #f1f5f9;
    color: #475569;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.15s;
}
.mm-golpeteo-scope-btn:hover { background: #e5e7eb; color: #0f3460; }
.mm-golpeteo-scope-btn.active {
    background: #0f3460;
    color: #fff;
}

/* SRR KPIs */
.mm-golpeteo-kpis-srr { margin-top: 0.75rem; }
.mm-golpeteo-kpi-srr { min-width: 120px; }
.mm-golpeteo-kpi-danger { color: #dc2626; }
.mm-golpeteo-kpi-warn { color: #f59e0b; }
.mm-golpeteo-kpi-ok { color: #16a34a; }

/* SAI Panel */
.mm-golpeteo-sai-panel {
    background: #fff;
    border-radius: 10px;
    padding: 1.2rem;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.mm-golpeteo-sai-bar-container {
    display: flex;
    height: 32px;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 0.75rem;
}
.mm-golpeteo-sai-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: 0.85rem;
    transition: width 0.3s;
}
.mm-golpeteo-sai-bar-amp { background: #16a34a; }
.mm-golpeteo-sai-bar-contra { background: #dc2626; }
.mm-golpeteo-sai-legend {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-bottom: 0.75rem;
}
.mm-golpeteo-sai-legend-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8rem;
    color: #6b7280;
}
.mm-golpeteo-sai-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}
.mm-golpeteo-sai-dot-amp { background: #16a34a; }
.mm-golpeteo-sai-dot-contra { background: #dc2626; }
.mm-golpeteo-sai-dot-gov { background: #0f3460; }
.mm-golpeteo-sai-metrics {
    display: flex;
    gap: 2rem;
}
.mm-golpeteo-sai-metric {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}
.mm-golpeteo-sai-metric-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    color: #9ca3af;
    letter-spacing: 0.05em;
}
.mm-golpeteo-sai-metric-value {
    font-size: 1.3rem;
    font-weight: 800;
}

/* Timeline */
.mm-golpeteo-timeline {
    display: grid;
    gap: 0.75rem;
}
.mm-golpeteo-timeline-signal {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.mm-golpeteo-timeline-gov {
    background: #0f3460;
    color: #fff;
    padding: 0.6rem 0.9rem;
    display: flex;
    gap: 0.75rem;
    align-items: center;
}
.mm-golpeteo-timeline-gov-time {
    font-size: 0.72rem;
    opacity: 0.7;
    white-space: nowrap;
}
.mm-golpeteo-timeline-gov-title {
    font-size: 0.85rem;
    font-weight: 600;
}
.mm-golpeteo-timeline-responses {
    padding: 0.4rem 0.9rem 0.6rem;
    display: grid;
    gap: 0.3rem;
}
.mm-golpeteo-timeline-response {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    padding: 0.35rem 0.5rem;
    border-radius: 4px;
    font-size: 0.78rem;
}
.mm-golpeteo-timeline-response-danger {
    background: rgba(220,38,38,0.08);
    border-left: 3px solid #dc2626;
}
.mm-golpeteo-timeline-response-warn {
    background: rgba(245,158,11,0.08);
    border-left: 3px solid #f59e0b;
}
.mm-golpeteo-timeline-response-ok {
    background: rgba(22,163,74,0.08);
    border-left: 3px solid #16a34a;
}
.mm-golpeteo-timeline-response-time {
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    min-width: 55px;
}
.mm-golpeteo-timeline-response-medium {
    font-weight: 600;
    color: #7c2d12;
    white-space: nowrap;
}
.mm-golpeteo-timeline-response-title {
    color: #374151;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Donut chart */
.mm-golpeteo-chart-donut { height: 300px; }

/* Heatmap */
.mm-golpeteo-heatmap-wrap {
    overflow-x: auto;
    background: #fff;
    border-radius: 10px;
    padding: 1rem;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.mm-golpeteo-heatmap {
    display: inline-block;
    font-size: 0.75rem;
}
.mm-golpeteo-heatmap-header {
    display: flex;
    margin-bottom: 2px;
}
.mm-golpeteo-heatmap-corner {
    width: 40px;
    flex-shrink: 0;
}
.mm-golpeteo-heatmap-hour {
    min-width: 26px;
    text-align: center;
    color: #9ca3af;
    font-size: 0.65rem;
}
.mm-golpeteo-heatmap-row {
    display: flex;
    margin-bottom: 2px;
}
.mm-golpeteo-heatmap-day {
    width: 40px;
    flex-shrink: 0;
    color: #6b7280;
    font-weight: 600;
    font-size: 0.7rem;
    display: flex;
    align-items: center;
}
.mm-golpeteo-heatmap-cell {
    min-width: 26px;
    height: 22px;
    border-radius: 2px;
}

/* OCCN */
.mm-golpeteo-occn-banner {
    background: #fff;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    margin-bottom: 0.75rem;
    text-align: center;
}
.mm-golpeteo-occn-value {
    font-size: 1.1rem;
    font-weight: 700;
}

/* Preemptive framing */
.mm-golpeteo-headline-preemptive {
    border-left-color: #f59e0b;
    background: rgba(245,158,11,0.04);
}
.mm-golpeteo-preemptive-gov {
    color: #6b7280;
    font-size: 0.72rem;
}

/* Pattern badges */
.mm-golpeteo-pattern-badge {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.mm-golpeteo-pattern-danger {
    background: rgba(220,38,38,0.15);
    color: #dc2626;
}
.mm-golpeteo-pattern-warn {
    background: rgba(245,158,11,0.15);
    color: #b45309;
}
.mm-golpeteo-pattern-ok {
    background: rgba(22,163,74,0.15);
    color: #16a34a;
}

/* FOM inversion row */
.mm-golpeteo-fom-inversion {
    background: rgba(220,38,38,0.05);
}
.mm-golpeteo-fom-inversion:hover {
    background: rgba(220,38,38,0.08);
}

/* AEP Panel */
.mm-golpeteo-aep-panel {
    display: flex;
    gap: 1.5rem;
    background: #fff;
    border-radius: 10px;
    padding: 1.2rem;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    align-items: center;
}
.mm-golpeteo-aep-score {
    text-align: center;
    min-width: 140px;
    flex-shrink: 0;
}
.mm-golpeteo-aep-score-value {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1;
}
.mm-golpeteo-aep-score-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-top: 0.3rem;
    color: #6b7280;
}
.mm-golpeteo-aep-components {
    flex: 1;
    display: grid;
    gap: 0.5rem;
}
.mm-golpeteo-aep-component {
    display: grid;
    grid-template-columns: 140px 1fr 40px;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.78rem;
}
.mm-golpeteo-aep-component-label {
    color: #6b7280;
}
.mm-golpeteo-aep-component-bar {
    height: 8px;
    background: #f0f1f3;
    border-radius: 4px;
    overflow: hidden;
}
.mm-golpeteo-aep-component-fill {
    height: 100%;
    background: linear-gradient(90deg, #f59e0b, #dc2626);
    border-radius: 4px;
    transition: width 0.3s;
}
.mm-golpeteo-aep-component-val {
    text-align: right;
    font-variant-numeric: tabular-nums;
    font-weight: 600;
}

/* LLM Alert */
.mm-golpeteo-llm-alert {
    background: rgba(220,38,38,0.08);
    border: 1px solid rgba(220,38,38,0.2);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    margin-bottom: 0.75rem;
    font-size: 0.85rem;
    color: #991b1b;
    font-weight: 500;
}

/* ====== Fase 5: Forensic ====== */

.mm-golpeteo-forensic-summary {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    background: #fff;
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 0.75rem;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.mm-golpeteo-forensic-stat {
    text-align: center;
    min-width: 100px;
}
.mm-golpeteo-forensic-stat-value {
    font-size: 1.6rem;
    font-weight: 800;
    line-height: 1.2;
}
.mm-golpeteo-forensic-stat-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    color: #9ca3af;
    letter-spacing: 0.04em;
    margin-top: 0.2rem;
}
.mm-golpeteo-forensic-timerange {
    font-size: 0.78rem;
    color: #6b7280;
    margin-bottom: 0.75rem;
    padding: 0.5rem 0.75rem;
    background: #f9fafb;
    border-radius: 6px;
    font-family: monospace;
}
.mm-golpeteo-subsection-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #374151;
    margin: 0.75rem 0 0.5rem;
}
.mm-golpeteo-forensic-table {
    font-size: 0.78rem;
}
.mm-golpeteo-forensic-hash {
    font-family: monospace;
    font-size: 0.72rem;
    color: #6b7280;
}
.mm-golpeteo-forensic-export {
    margin-top: 1rem;
    text-align: center;
}
.mm-golpeteo-export-btn {
    display: inline-block;
    padding: 0.6rem 1.5rem;
    background: #0f3460;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s;
}
.mm-golpeteo-export-btn:hover {
    background: #1a4a7a;
}
.mm-golpeteo-export-btn:active {
    transform: scale(0.98);
}

/* ====== Fase 7: V-Pattern ====== */

.mm-golpeteo-vpattern-summary {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    background: #fff;
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 0.75rem;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.mm-golpeteo-vpattern-list {
    display: grid;
    gap: 0.5rem;
}
.mm-golpeteo-vpattern-video {
    background: #fff;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    border-left: 3px solid #e5e7eb;
}
.mm-golpeteo-vpattern-detected {
    border-left-color: #dc2626;
    background: rgba(220,38,38,0.03);
}
.mm-golpeteo-vpattern-header {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
}
.mm-golpeteo-vpattern-platform {
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    color: #dc2626;
    background: rgba(220,38,38,0.1);
    padding: 0.15rem 0.4rem;
    border-radius: 3px;
}
.mm-golpeteo-vpattern-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: #374151;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.mm-golpeteo-vpattern-quartiles {
    display: grid;
    gap: 0.3rem;
    margin-bottom: 0.5rem;
}
.mm-golpeteo-vpattern-quartile {
    display: grid;
    grid-template-columns: 30px 1fr 80px;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.72rem;
}
.mm-golpeteo-vpattern-q-label {
    color: #9ca3af;
    font-weight: 700;
}
.mm-golpeteo-vpattern-q-bar {
    height: 6px;
    background: #f0f1f3;
    border-radius: 3px;
    overflow: hidden;
}
.mm-golpeteo-vpattern-q-fill {
    height: 100%;
    background: linear-gradient(90deg, #f59e0b, #dc2626);
    border-radius: 3px;
    transition: width 0.3s;
}
.mm-golpeteo-vpattern-q-len {
    text-align: right;
    color: #6b7280;
    font-variant-numeric: tabular-nums;
}
.mm-golpeteo-vpattern-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.72rem;
    color: #9ca3af;
}

/* Responsive additions */
@media (max-width: 768px) {
    .mm-golpeteo-forensic-summary { gap: 0.5rem; }
    .mm-golpeteo-forensic-stat { min-width: 80px; }
    .mm-golpeteo-vpattern-summary { gap: 0.5rem; }
    .mm-golpeteo-vpattern-quartile { grid-template-columns: 25px 1fr 60px; }
}
