/* Campo Informacional — Vista frontend */

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

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

/* Sections */
.mm-campo-section { margin-bottom: 2rem; }
.mm-campo-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-campo-section-desc {
    font-size: 0.85rem;
    color: #6b7280;
    margin: 0 0 1rem 0;
}

/* Heatmap */
.mm-campo-heatmap-wrap {
    overflow-x: auto;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    padding: 0.5rem;
    border: 1px solid #e5e7eb;
}
.mm-campo-heatmap {
    border-collapse: separate;
    border-spacing: 2px;
    font-size: 0.72rem;
    width: 100%;
}
.mm-campo-heatmap th {
    padding: 0.45rem 0.4rem;
    text-align: center;
    font-weight: 600;
    color: #6b7280;
    white-space: nowrap;
    border-bottom: 2px solid #0f3460;
    background: #f8fafc;
    position: sticky;
    top: 0;
}
.mm-campo-heatmap tbody tr:nth-child(even) {
    background: #f9fafb;
}
.mm-campo-heatmap-label {
    padding: 0.45rem 0.6rem;
    font-weight: 600;
    color: #0f3460;
    white-space: nowrap;
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    border-right: 1px solid #e5e7eb;
    position: sticky;
    left: 0;
    background: inherit;
    z-index: 1;
}
.mm-campo-heatmap-cell {
    padding: 0.35rem 0.4rem;
    text-align: center;
    font-weight: 600;
    border-radius: 4px;
    min-width: 38px;
    height: 32px;
    font-variant-numeric: tabular-nums;
    border: 1px solid #f0f1f3;
    transition: transform 0.1s ease;
}
.mm-campo-heatmap-cell:hover {
    transform: scale(1.15);
    z-index: 2;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

/* Clusters */
.mm-campo-clusters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 1rem;
}
.mm-campo-cluster-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-campo-cluster-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.6rem;
}
.mm-campo-cluster-severity {
    color: #fff;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
}
.mm-campo-cluster-phase {
    font-size: 0.72rem;
    color: #6b7280;
    background: #f3f4f6;
    padding: 2px 8px;
    border-radius: 10px;
}
.mm-campo-cluster-score {
    margin-left: auto;
    font-size: 1.2rem;
    font-weight: 800;
    color: #0f3460;
}
.mm-campo-cluster-title {
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.35;
    margin-bottom: 0.5rem;
    color: #1f2937;
}
.mm-campo-cluster-meta {
    font-size: 0.78rem;
    color: #6b7280;
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin-bottom: 0.6rem;
}
.mm-campo-cluster-origin {
    font-weight: 600;
    color: #0f3460;
}
.mm-campo-cluster-bars {
    display: grid;
    gap: 0.3rem;
    margin-bottom: 0.5rem;
}
.mm-campo-cluster-bar-row {
    display: grid;
    grid-template-columns: 80px 1fr 24px;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.7rem;
}
.mm-campo-cluster-bar-label {
    color: #6b7280;
    white-space: nowrap;
}
.mm-campo-cluster-bar-track {
    height: 5px;
    background: #f0f1f3;
    border-radius: 3px;
    overflow: hidden;
}
.mm-campo-cluster-bar-fill {
    height: 100%;
    background: #0f3460;
    border-radius: 3px;
}
.mm-campo-bar-amp { background: #f59e0b; }
.mm-campo-cluster-bar-val {
    text-align: right;
    color: #6b7280;
    font-variant-numeric: tabular-nums;
}
.mm-campo-cluster-footer {
    font-size: 0.72rem;
    color: #9ca3af;
}

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

/* Framework context */
.mm-campo-framework {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 1rem 1.2rem;
    margin-bottom: 2rem;
}
.mm-campo-framework-text {
    font-size: 0.82rem;
    color: #475569;
    line-height: 1.6;
    margin: 0;
}

/* Field structure */
.mm-campo-field-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1rem;
}
.mm-campo-field-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 1.2rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.mm-campo-field-card h3 {
    font-size: 0.95rem;
    font-weight: 700;
    color: #0f3460;
    margin: 0 0 0.8rem 0;
}
.mm-campo-field-bar-row {
    display: grid;
    grid-template-columns: 140px 1fr 80px;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.78rem;
    margin-bottom: 0.5rem;
}
.mm-campo-field-bar-label {
    color: #374151;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.mm-campo-field-bar-track {
    height: 8px;
    background: #f0f1f3;
    border-radius: 4px;
    overflow: hidden;
}
.mm-campo-field-bar-fill {
    height: 100%;
    background: #0891b2;
    border-radius: 4px;
    transition: width 0.3s ease;
}
.mm-campo-bar-ownership { background: #7c3aed; }
.mm-campo-bar-perc { background: #f0645a; }
.mm-campo-field-bar-val {
    text-align: right;
    color: #6b7280;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
.mm-campo-field-hhi {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.8rem;
    padding-bottom: 0.6rem;
    border-bottom: 1px solid #e5e7eb;
}
.mm-campo-field-hhi-label {
    font-size: 0.72rem;
    font-weight: 700;
    color: #6b7280;
    text-transform: uppercase;
}
.mm-campo-field-hhi-val {
    font-size: 1.1rem;
    font-weight: 800;
    color: #0f3460;
    font-variant-numeric: tabular-nums;
}
.mm-campo-field-hhi-bucket {
    font-size: 0.72rem;
    font-weight: 700;
    color: #0891b2;
    background: #ecfeff;
    padding: 2px 8px;
    border-radius: 10px;
}

/* Heatmap extras */
.mm-campo-heatmap-count {
    font-weight: 700;
}
.mm-campo-heatmap-neg {
    display: block;
    font-size: 0.62rem;
    color: #dc2626;
    font-weight: 700;
}

/* Cluster extras */
.mm-campo-cluster-borgia {
    font-size: 0.68rem;
    font-weight: 800;
    color: #7c2d12;
    background: #fef3c7;
    padding: 2px 6px;
    border-radius: 6px;
    cursor: help;
}
.mm-campo-cluster-span {
    color: #6b7280;
    font-variant-numeric: tabular-nums;
}

/* Decayed clusters */
.mm-campo-decayed {
    opacity: 0.85;
}
.mm-campo-decayed-list {
    display: grid;
    gap: 0.4rem;
}
.mm-campo-decayed-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 0.5rem 0.8rem;
    font-size: 0.8rem;
}
.mm-campo-decayed-score {
    font-weight: 800;
    color: #9ca3af;
    min-width: 28px;
    text-align: center;
}
.mm-campo-decayed-title {
    flex: 1;
    color: #4b5563;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.mm-campo-decayed-meta {
    font-size: 0.72rem;
    color: #9ca3af;
    white-space: nowrap;
}

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

@media (max-width: 768px) {
    .mm-campo-hero { padding: 1.5rem 1rem; }
    .mm-campo-hero h1 { font-size: 1.5rem; }
    .mm-campo-kpis { flex-direction: column; }
    .mm-campo-kpi { min-width: auto; }
    .mm-campo-clusters-grid { grid-template-columns: 1fr; }
}
