/* =========================================================================
   Meta Muse Agent — Scoped Styles (Light & Dark theme compatible)
   Matches RPM glassmorphic aesthetic & META_MUSE_DASHBOARD_SPEC tokens.
   ========================================================================= */

.mm-root {
    padding: 0.75rem 1.25rem 4rem 1.25rem;
    animation: mmFadeIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    color: #F8FAFC;
    font-family: 'Outfit', 'Inter', system-ui, sans-serif;
}

body.light-theme .mm-root {
    color: #1f2a24;
}

@keyframes mmFadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

.mm-header {
    background: #ffffff;
    border: 1px solid #ece6d8;
    border-radius: 14px;
    padding: 1.1rem 1.3rem;
    box-shadow: 0 2px 10px rgba(27, 94, 70, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
    margin-bottom: 1rem;
}

body:not(.light-theme) .mm-header {
    background: #17221d;
    border-color: #25332c;
}

.mm-header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.mm-icon-box {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: #e5f3ec;
    color: #1b5e46;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

body:not(.light-theme) .mm-icon-box {
    background: #14301f;
    color: #7fd1a6;
}

.mm-title {
    font-size: 1.1rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    margin: 0;
    text-transform: uppercase;
}

.mm-subtitle {
    font-size: 0.8rem;
    color: #7a857f;
}

.mm-pill-tabs {
    display: flex;
    gap: 4px;
    background: #ffffff;
    border: 1px solid #ece6d8;
    border-radius: 999px;
    padding: 5px;
    margin-bottom: 1rem;
    overflow-x: auto;
}

body:not(.light-theme) .mm-pill-tabs {
    background: #17221d;
    border-color: #25332c;
}

.mm-pill-tab {
    flex: 1;
    border: none;
    background: transparent;
    color: inherit;
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 500;
    white-space: nowrap;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.mm-pill-tab:hover {
    background: rgba(27, 94, 70, 0.08);
}

.mm-pill-tab.active {
    background: #ff9f0a;
    color: #ffffff;
    font-weight: 700;
}

.mm-banner {
    border-radius: 12px;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    font-size: 0.84rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    border: 1px solid;
}

.mm-banner-info { background: #e5f3ec; border-color: #c6e3d3; color: #1b5e46; }
.mm-banner-warn { background: #fdf3e2; border-color: #f5e0b8; color: #a86412; }
.mm-banner-muted { background: #f1f1ef; border-color: #e0e0dc; color: #5c6660; }

body:not(.light-theme) .mm-banner-info { background: #14301f; border-color: #1f4a32; color: #7fd1a6; }
body:not(.light-theme) .mm-banner-warn { background: #33260f; border-color: #4d3916; color: #f2b763; }
body:not(.light-theme) .mm-banner-muted { background: #1d2823; border-color: #2b3a33; color: #9aa8a0; }

.mm-kpis {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(195px, 1fr));
    gap: 14px;
    margin-bottom: 1rem;
}

.mm-kpi {
    border-radius: 14px;
    padding: 15px;
    border: 1px solid;
    min-height: 98px;
}

.mm-kpi-lbl {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: #7a857f;
}

.mm-kpi-val {
    font-size: 25px;
    font-weight: 700;
    margin-top: 4px;
    line-height: 1.15;
}

.mm-kpi-sub {
    font-size: 11.5px;
    color: #7a857f;
    margin-top: 4px;
}

.mm-k-green { background: #e5f3ec; border-color: #c6e3d3; } .mm-k-green .mm-kpi-val { color: #1b5e46; }
.mm-k-blue { background: #eaf1fb; border-color: #cfe0f5; } .mm-k-blue .mm-kpi-val { color: #2b6cb0; }
.mm-k-teal { background: #e0f0ef; border-color: #bfdcda; } .mm-k-teal .mm-kpi-val { color: #1f7a74; }
.mm-k-purple { background: #f3eafb; border-color: #e2d0f4; } .mm-k-purple .mm-kpi-val { color: #7b2cbf; }
.mm-k-amber { background: #fdf3e2; border-color: #f5e0b8; } .mm-k-amber .mm-kpi-val { color: #a86412; }
.mm-k-red { background: #fdecec; border-color: #f6cccc; } .mm-k-red .mm-kpi-val { color: #c53030; }
.mm-k-locked { background: #f1f1ef; border-color: #e0e0dc; border-style: dashed; } .mm-k-locked .mm-kpi-val { color: #9a9a94; font-size: 16px; }

body:not(.light-theme) .mm-k-green { background: #14301f; border-color: #1f4a32; } body:not(.light-theme) .mm-k-green .mm-kpi-val { color: #7fd1a6; }
body:not(.light-theme) .mm-k-blue { background: #16243a; border-color: #22385a; } body:not(.light-theme) .mm-k-blue .mm-kpi-val { color: #7fb2f0; }
body:not(.light-theme) .mm-k-teal { background: #123331; border-color: #1d4a47; } body:not(.light-theme) .mm-k-teal .mm-kpi-val { color: #7fd3cc; }
body:not(.light-theme) .mm-k-purple { background: #2a1b3a; border-color: #3c2853; } body:not(.light-theme) .mm-k-purple .mm-kpi-val { color: #c99af0; }
body:not(.light-theme) .mm-k-amber { background: #33260f; border-color: #4d3916; } body:not(.light-theme) .mm-k-amber .mm-kpi-val { color: #f2b763; }
body:not(.light-theme) .mm-k-red { background: #3a1717; border-color: #552222; } body:not(.light-theme) .mm-k-red .mm-kpi-val { color: #f08a8a; }
body:not(.light-theme) .mm-k-locked { background: #1d2823; border-color: #2b3a33; }

.mm-card {
    background: #ffffff;
    border: 1px solid #ece6d8;
    border-radius: 14px;
    box-shadow: 0 2px 10px rgba(27, 94, 70, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
    overflow: hidden;
}

body:not(.light-theme) .mm-card {
    background: #17221d;
    border-color: #25332c;
}

.mm-card-h {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 13px 16px;
    border-bottom: 1px solid #ece6d8;
    font-weight: 700;
    font-size: 0.94rem;
}

body:not(.light-theme) .mm-card-h {
    border-bottom-color: #25332c;
}

.mm-card-b {
    padding: 15px 16px;
}

.mm-chart-box {
    position: relative;
    height: 260px;
}

.mm-btn {
    border-radius: 999px;
    padding: 6px 14px;
    font-size: 0.8rem;
    font-weight: 600;
    border: 1px solid #1b5e46;
    background: #1b5e46;
    color: #ffffff;
    cursor: pointer;
}

.mm-btn-outline {
    background: transparent;
    color: #1b5e46;
}

body:not(.light-theme) .mm-btn-outline {
    color: #7fd1a6;
    border-color: #7fd1a6;
}

.mm-empty-box {
    text-align: center;
    padding: 2rem 1rem;
    color: #7a857f;
    font-size: 0.88rem;
}

.mm-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.83rem;
}

.mm-table th {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #7a857f;
    font-weight: 600;
    padding: 8px 10px;
    border-bottom: 1px solid #ece6d8;
}

.mm-table td {
    padding: 9px 10px;
    border-bottom: 1px solid rgba(122, 133, 127, 0.14);
}
