/* =========================================================
   Market Insight — 상권 원상복구 트렌드 지도
   전용 스타일시트
   ========================================================= */

/* ─── 전체 페이지 래퍼 ─────────────────────────────────── */
.mi-page {
    background:
        radial-gradient(circle at top left, rgba(255, 237, 213, 0.9), transparent 28%),
        radial-gradient(circle at top right, rgba(219, 234, 254, 0.8), transparent 24%),
        linear-gradient(180deg, #f8fafc 0%, #f5f7fb 100%);
    min-height: calc(100vh - 70px);
}

/* ─── KPI 카드 ──────────────────────────────────────────── */
.mi-kpi-icon {
    line-height: 1;
}
.mi-kpi-card {
    border: 1px solid rgba(15, 23, 42, 0.05) !important;
    overflow: hidden;
}
.mi-kpi-card .card-body {
    position: relative;
}
.mi-kpi-card .card-body::after {
    content: "";
    position: absolute;
    inset: auto -20% -35% auto;
    width: 120px;
    height: 120px;
    border-radius: 999px;
    background: rgba(255,255,255,0.36);
    filter: blur(2px);
}
.mi-kpi-subtext {
    margin-top: 8px;
    font-size: 12px;
    color: #94a3b8;
}

.mi-overview-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(320px, 0.9fr);
    gap: 18px;
}
.mi-overview-hero,
.mi-overview-side {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.mi-overview-hero {
    padding: 28px;
    border-radius: 24px;
    background:
        radial-gradient(circle at top right, rgba(249, 115, 22, 0.16), transparent 24%),
        radial-gradient(circle at bottom left, rgba(56, 189, 248, 0.12), transparent 22%),
        linear-gradient(135deg, #ffffff, #f8fafc);
    color: #0f172a;
    border: 1px solid rgba(226, 232, 240, 0.9);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
}
.mi-overview-label {
    display: inline-flex;
    align-items: center;
    margin-bottom: 10px;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(241, 245, 249, 0.92);
    color: #64748b;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.mi-overview-title {
    font-size: clamp(1.35rem, 2vw, 2rem);
    font-weight: 700;
    margin-bottom: 10px;
    line-height: 1.15;
}
.mi-overview-text {
    color: #475569;
    max-width: 760px;
}
.mi-overview-lead {
    margin-bottom: 18px;
}
.mi-signal-strip {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}
.mi-signal-card {
    padding: 16px 16px 14px;
    border-radius: 18px;
    background: rgba(255,255,255,0.86);
    border: 1px solid rgba(226, 232, 240, 0.94);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.6);
}
.mi-signal-card strong {
    display: block;
    font-size: 1.05rem;
    margin-bottom: 4px;
    color: #0f172a;
}
.mi-signal-card small {
    color: #64748b;
    line-height: 1.4;
}
.mi-signal-label {
    display: block;
    margin-bottom: 6px;
    color: #fdba74;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.mi-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-radius: 999px;
    padding: 7px 12px;
    font-size: 12px;
    font-weight: 700;
}
.mi-pill-source { background: rgba(254, 215, 170, 0.18); color: #fdba74; }
.mi-pill-muted { background: rgba(255,255,255,0.08); color: #e2e8f0; }
.mi-overview-hero .mi-pill-muted { background: rgba(241, 245, 249, 0.92); color: #475569; }
.mi-pill-success { background: rgba(34, 197, 94, 0.16); color: #86efac; }
.mi-pill-danger { background: rgba(248, 113, 113, 0.14); color: #fecaca; }
.mi-pill-warning { background: rgba(250, 204, 21, 0.14); color: #fde68a; }
.mi-pill-secondary { background: rgba(148, 163, 184, 0.14); color: #cbd5e1; }
.mi-overview-hero .mi-pill-success { color: #166534; background: rgba(187, 247, 208, 0.7); }
.mi-overview-hero .mi-pill-danger { color: #991b1b; background: rgba(254, 202, 202, 0.72); }
.mi-overview-hero .mi-pill-warning { color: #92400e; background: rgba(254, 240, 138, 0.72); }
.mi-overview-hero .mi-pill-secondary { color: #475569; background: rgba(226, 232, 240, 0.9); }
.mi-meta-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}
.mi-meta-item {
    padding: 14px 16px;
    border-radius: 16px;
    background: rgba(255,255,255,0.9);
    border: 1px solid rgba(226, 232, 240, 0.92);
}
.mi-meta-label {
    display: block;
    font-size: 12px;
    color: #64748b;
    margin-bottom: 4px;
}
.mi-sync-card {
    background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(248,250,252,0.96));
    border: 1px solid rgba(226, 232, 240, 0.82) !important;
}
.mi-sync-block {
    background: rgba(255,255,255,0.78);
    border-color: rgba(226, 232, 240, 0.85) !important;
}
.mi-sync-alert {
    background: linear-gradient(90deg, rgba(224, 242, 254, 0.88), rgba(239, 246, 255, 0.92));
    border: 1px solid rgba(186, 230, 253, 0.9);
}
.mi-note-card {
    padding: 22px 22px 20px;
    border-radius: 22px;
    background: rgba(255,255,255,0.9);
    border: 1px solid rgba(148, 163, 184, 0.14);
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
}
.mi-note-card-warning {
    background: linear-gradient(180deg, rgba(255,251,235,0.98), rgba(255,247,237,0.96));
}
.mi-note-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}
.mi-note-kicker,
.mi-section-kicker {
    display: inline-flex;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #f97316;
}
.mi-note-body {
    color: #475569;
    font-size: 14px;
    line-height: 1.65;
}
.mi-note-list {
    padding-left: 18px;
    margin: 0;
    color: #475569;
    font-size: 13px;
    line-height: 1.7;
}

.mi-reveal {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity .55s ease, transform .55s ease;
    transition-delay: var(--mi-delay, 0s);
}
.mi-reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* ─── 바로가기 링크 카드 ─────────────────────────────────── */
.mi-link-card {
    transition: transform .15s ease, box-shadow .15s ease;
    cursor: pointer;
}
.mi-link-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,.08) !important;
}
.mi-link-icon {
    width : 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* ─── 업종 탭 바 ────────────────────────────────────────── */
.mi-tab-bar {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.mi-tab {
    display: inline-block;
    padding: 6px 18px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    background: #fff;
    color: #495057;
    border: 1px solid #dee2e6;
    transition: background .12s, color .12s, border-color .12s;
}
.mi-tab:hover {
    background: #f0f1f3;
    color: #212529;
}
.mi-tab.active {
    background: #0d6efd;
    color: #fff;
    border-color: #0d6efd;
}

/* ─── 지도 페이지 필터 바 ───────────────────────────────── */
.mi-map-filter {
    position: sticky;
    top: 0;
    z-index: 20;
    min-height: 52px;
}

/* ─── 지도 범례 ─────────────────────────────────────────── */
.mi-legend {
    font-size: 12px;
    min-width: 110px;
}

/* ─── 상세 패널 ─────────────────────────────────────────── */
.mi-detail-panel {
    max-height: calc(100vh - 200px);
    overflow-y: auto;
}

/* ─── 자산 승계 카드 ────────────────────────────────────── */
.mi-asset-card {
    transition: transform .15s ease, box-shadow .15s ease;
}
.mi-asset-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0,0,0,.1) !important;
}

/* ─── 커서 유틸 ─────────────────────────────────────────── */
.cursor-pointer { cursor: pointer; }

/* ─── 반응형 보정 ───────────────────────────────────────── */
@media (max-width: 575.98px) {
    .mi-page .container {
        padding-left: 16px;
        padding-right: 16px;
    }
    .mi-map-filter {
        gap: 8px !important;
    }
    .mi-detail-panel {
        width: calc(100vw - 20px) !important;
    }
}

@media (max-width: 991.98px) {
    .mi-overview-grid {
        grid-template-columns: 1fr;
    }
    .mi-signal-strip {
        grid-template-columns: 1fr;
    }
}
