/* ════════════════════════════════════════════════════════════════
   이달의 동네 인사이트 (main.jte — 이달의 시장 렌즈 아래)
   - 탭 2개 (새로 등장 / 변동 큰), 각 TOP 4 카드
   - 모바일 2×2 / PC 4×1
   - 사회 차원 배지: 한국어 + 색상 (라벨 허브 cat-* 일관)
   ════════════════════════════════════════════════════════════════ */

/* 탭 */
.mi-tab-wrap {
    display: flex;
    gap: 2px;
    margin-bottom: 14px;
    border-bottom: 2px solid #e2e8f0;
}
.mi-tab {
    padding: 8px 18px;
    font-size: 15px;
    font-weight: 600;
    color: #64748b;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    cursor: pointer;
    transition: all 0.15s;
}
.mi-tab.active { color: #2563eb; border-bottom-color: #2563eb; }
.mi-tab:hover:not(.active) { color: #334155; }

/* 탭 컨텐츠 */
.mi-tab-content { display: none; }
.mi-tab-content.active { display: block; }

/* 카드 그리드 — PC 4×1, 모바일 2×2 */
.mi-card-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}
@media (max-width: 768px) {
    .mi-card-grid { grid-template-columns: repeat(2, 1fr); }
}

/* 카드 */
.mi-card {
    background: #fff;
    border-radius: 10px;
    padding: 14px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
    display: flex;
    flex-direction: column;
    gap: 6px;
    text-decoration: none;
    color: inherit;
    transition: all 0.15s;
}
.mi-card:hover,
.mi-card:focus,
.mi-card:active {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.1);
    text-decoration: none;
}
.mi-card:hover *,
.mi-card:focus * {
    text-decoration: none;
}

/* 사회 차원 배지 (라벨 허브 cat-* 와 일관, 한국어 표시) */
.mi-cat-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 600;
    align-self: flex-start;
}
.mi-cat-badge.cat-nat        { background: #dbeafe; color: #1d4ed8; }
.mi-cat-badge.cat-sido       { background: #d1fae5; color: #065f46; }
.mi-cat-badge.cat-parent     { background: #fed7aa; color: #9a3412; }
.mi-cat-badge.cat-temporal   { background: #ede9fe; color: #6d28d9; }
.mi-cat-badge.cat-yoy        { background: #ede9fe; color: #6d28d9; }
.mi-cat-badge.cat-composite  { background: #fee2e2; color: #b91c1c; }
.mi-cat-badge.cat-default    { background: #e2e8f0; color: #334155; }

/* 카드 본문 */
.mi-card-label {
    font-size: 15px;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.4;
    min-height: 38px;
}
.mi-card-score {
    font-size: 19px;
    font-weight: 700;
    color: #1e40af;
    margin: 2px 0;
}
.mi-card-score.negative { color: #991b1b; }
.mi-card-detail {
    font-size: 13px;
    color: #475569;
    line-height: 1.45;
}
.mi-card-cta {
    margin-top: auto;
    padding-top: 8px;
    border-top: 1px solid #e2e8f0;
    font-size: 13px;
    font-weight: 600;
    color: #2563eb;
    text-align: right;
}

/* 빈 상태 (탭 내 카드 없음) */
.mi-empty {
    padding: 24px;
    text-align: center;
    color: #475569;
    font-size: 15px;
    background: #f8fafc;
    border-radius: 10px;
    border: 1px dashed #cbd5e1;
}

/* 라벨 허브 CTA (섹션 끝) */
.mi-hub-cta {
    margin-top: 14px;
    text-align: center;
}
.mi-hub-link {
    display: inline-block;
    padding: 8px 18px;
    background: #1e293b;
    color: #f1f5f9;
    text-decoration: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    transition: background 0.15s;
}
.mi-hub-link:hover,
.mi-hub-link:focus,
.mi-hub-link:active {
    background: #334155;
    text-decoration: none;
}
