/* =============================================================
   Orion District Dashboard - Public Stylesheet
   Version: see ORION_VERSION in orion-dashboard.php
   ============================================================= */

/* --- CSS Custom Properties ----------------------------------- */
:root {
    /* Brand */
    --orion-primary:       #17458f;
    --orion-accent:        #f7a81b;

    /* Semantic */
    --orion-success:       #22c55e;
    --orion-warning:       #f59e0b;
    --orion-danger:        #ef4444;

    /* Text */
    --orion-text:          #1e293b;
    --orion-text-muted:    #64748b;

    /* Surface */
    --orion-bg:            #f8fafc;
    --orion-card-bg:       #ffffff;
    --orion-border:        #e2e8f0;

    /* Elevation */
    --orion-shadow:        0 2px 8px rgba(0,0,0,.08);
    --orion-shadow-lg:     0 4px 16px rgba(0,0,0,.12);

    /* Shape */
    --orion-radius:        12px;
    --orion-radius-sm:     8px;
    --orion-radius-xs:     4px;

    /* Animation */
    --orion-anim-dur:      1200ms;
    --orion-anim-short:    180ms;

    /* Focus Area Palette */
    --orion-focus-1:       #3b82f6;   /* Peace - blue */
    --orion-focus-2:       #8b5cf6;   /* Disease - purple */
    --orion-focus-3:       #06b6d4;   /* Water - cyan */
    --orion-focus-4:       #ec4899;   /* Health - pink */
    --orion-focus-5:       #f59e0b;   /* Education - amber */
    --orion-focus-6:       #10b981;   /* Community - emerald */
    --orion-focus-7:       #84cc16;   /* Environment - lime */
}

/* --- Base Widget Wrapper ------------------------------------- */
.orion-widget {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 0.9375rem;
    color: var(--orion-text);
    line-height: 1.5;
    box-sizing: border-box;
}

.orion-widget *,
.orion-widget *::before,
.orion-widget *::after {
    box-sizing: inherit;
}

/* --- Card Components ----------------------------------------- */
.orion-card {
    background: var(--orion-card-bg);
    border-radius: var(--orion-radius);
    box-shadow: var(--orion-shadow);
    padding: 16px 20px;
    margin-bottom: 20px;
}

.orion-card--shadow   { box-shadow: var(--orion-shadow-lg); }
.orion-card--bordered { box-shadow: none; border: 1px solid var(--orion-border); }
.orion-card--flat     { box-shadow: none; background: var(--orion-bg); }

.orion-card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--orion-border);
}

.orion-card__title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--orion-text);
    margin: 0;
}

.orion-card__subtitle {
    font-size: 0.75rem;
    color: var(--orion-text-muted);
    margin: 2px 0 0;
}

/* --- Widget Header ------------------------------------------- */
.orion-widget-header {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 16px;
}

.orion-widget-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--orion-text);
    margin: 0;
}

.orion-widget-year {
    font-size: 0.8125rem;
    color: var(--orion-text-muted);
    font-weight: 400;
}

/* --- Stat Grid ---------------------------------------------- */
.orion-stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 16px;
}

.orion-stat-grid--2 { grid-template-columns: repeat(2, 1fr); }
.orion-stat-grid--3 { grid-template-columns: repeat(3, 1fr); }
.orion-stat-grid--4 { grid-template-columns: repeat(4, 1fr); }

/* --- Stat Card ---------------------------------------------- */
.orion-stat-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 20px;
    border-radius: var(--orion-radius);
    background: var(--orion-card-bg);
    box-shadow: var(--orion-shadow);
    border-top: 3px solid var(--orion-primary);
    transition: transform var(--orion-anim-short) ease,
                box-shadow var(--orion-anim-short) ease;
}

.orion-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--orion-shadow-lg);
}

.orion-stat-card--accent  { border-top-color: var(--orion-accent); }
.orion-stat-card--success { border-top-color: var(--orion-success); }
.orion-stat-card--warning { border-top-color: var(--orion-warning); }
.orion-stat-card--danger  { border-top-color: var(--orion-danger); }

.orion-stat-icon {
    width: 32px;
    height: 32px;
    color: var(--orion-primary);
    flex-shrink: 0;
}

.orion-stat-value {
    font-size: 2.25rem;
    font-weight: 800;
    color: var(--orion-primary);
    line-height: 1;
    letter-spacing: -.02em;
}

.orion-stat-value--md { font-size: 1.75rem; }
.orion-stat-value--sm { font-size: 1.375rem; }
.orion-stat-value--xl { font-size: 3rem; }

.orion-stat-label {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--orion-text-muted);
    text-transform: uppercase;
    letter-spacing: .04em;
    margin: 0;
}

.orion-stat-suffix {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--orion-primary);
    margin-left: 2px;
}

/* --- Badges -------------------------------------------------- */
.orion-badge {
    display: inline-flex;
    align-items: center;
    font-size: 0.6875rem;
    font-weight: 600;
    padding: 3px 9px;
    border-radius: 9999px;
    white-space: nowrap;
    line-height: 1.4;
}

.orion-badge--primary { background: rgba(23,69,143,.1); color: var(--orion-primary); }
.orion-badge--accent  { background: rgba(247,168,27,.15); color: #b7780d; }
.orion-badge--success { background: rgba(34,197,94,.12); color: #15803d; }
.orion-badge--warning { background: rgba(245,158,11,.12); color: #92400e; }
.orion-badge--danger  { background: rgba(239,68,68,.1); color: #b91c1c; }
.orion-badge--neutral { background: var(--orion-border); color: var(--orion-text-muted); }

/* Focus area badge variants */
.orion-badge--focus-1 { background: rgba(59,130,246,.1);  color: #1d4ed8; }
.orion-badge--focus-2 { background: rgba(139,92,246,.1);  color: #6d28d9; }
.orion-badge--focus-3 { background: rgba(6,182,212,.1);   color: #0e7490; }
.orion-badge--focus-4 { background: rgba(236,72,153,.1);  color: #be185d; }
.orion-badge--focus-5 { background: rgba(245,158,11,.12); color: #92400e; }
.orion-badge--focus-6 { background: rgba(16,185,129,.1);  color: #065f46; }
.orion-badge--focus-7 { background: rgba(132,204,22,.12); color: #3f6212; }

/* --- Chart Container ----------------------------------------- */
.orion-chart-wrap {
    position: relative;
    width: 100%;
}

.orion-chart-wrap canvas {
    display: block;
    max-width: 100%;
}

/* Donut chart: center label overlay */
.orion-donut-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.orion-donut-center {
    position: absolute;
    text-align: center;
    pointer-events: none;
}

.orion-donut-center__value {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--orion-text);
    line-height: 1;
    display: block;
}

.orion-donut-center__label {
    font-size: 0.6875rem;
    color: var(--orion-text-muted);
    text-transform: uppercase;
    letter-spacing: .04em;
    display: block;
    margin-top: 3px;
}

/* --- Leaderboard Table --------------------------------------- */
.orion-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.orion-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.orion-table thead th {
    text-align: left;
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--orion-text-muted);
    text-transform: uppercase;
    letter-spacing: .04em;
    padding: 8px 12px;
    border-bottom: 2px solid var(--orion-border);
    white-space: nowrap;
    cursor: pointer;
    user-select: none;
}

.orion-table thead th:hover { color: var(--orion-primary); }

.orion-table thead th.is-sorted { color: var(--orion-primary); }

.orion-table tbody tr {
    border-bottom: 1px solid var(--orion-border);
    transition: background var(--orion-anim-short) ease;
}

.orion-table tbody tr:last-child { border-bottom: none; }
.orion-table tbody tr:hover { background: var(--orion-bg); }

.orion-table td {
    padding: 10px 12px;
    vertical-align: middle;
}

.orion-table tfoot td {
    padding: 10px 12px;
    font-weight: 700;
    font-size: 0.8125rem;
    border-top: 2px solid var(--orion-border);
}

/* Rank cell */
.orion-rank {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: 700;
    background: var(--orion-bg);
    color: var(--orion-text-muted);
    flex-shrink: 0;
}

.orion-rank--gold   { background: #fef3c7; color: #92400e; }
.orion-rank--silver { background: #f1f5f9; color: #475569; }
.orion-rank--bronze { background: #fef7ee; color: #9a3412; }

/* --- Project Cards ------------------------------------------ */
.orion-project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
}

.orion-project-card {
    background: var(--orion-card-bg);
    border-radius: var(--orion-radius);
    box-shadow: var(--orion-shadow);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: transform var(--orion-anim-short) ease,
                box-shadow var(--orion-anim-short) ease;
}

.orion-project-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--orion-shadow-lg);
}

.orion-project-title {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--orion-text);
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 0;
}

.orion-project-club {
    font-size: 0.8125rem;
    color: var(--orion-text-muted);
    margin: 0;
}

.orion-project-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.8125rem;
    color: var(--orion-text-muted);
    flex-wrap: wrap;
    margin-top: auto;
}

.orion-project-meta__item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.orion-project-meta__item svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

/* --- Ticker Layout ------------------------------------------ */
.orion-ticker-wrap {
    overflow: hidden;
    position: relative;
}

.orion-ticker-track {
    display: flex;
    gap: 16px;
    animation: orionTicker 30s linear infinite;
    width: max-content;
}

.orion-ticker-track:hover { animation-play-state: paused; }

@keyframes orionTicker {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}

/* --- Location List ------------------------------------------ */
.orion-location-list {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 400px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.orion-location-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: var(--orion-radius-sm);
    background: var(--orion-bg);
    font-size: 0.875rem;
}

.orion-location-item svg {
    width: 16px;
    height: 16px;
    color: var(--orion-primary);
    flex-shrink: 0;
}

.orion-location-text { font-weight: 500; color: var(--orion-text); }
.orion-location-club { font-size: 0.75rem; color: var(--orion-text-muted); margin-top: 2px; }

/* --- Impact Statement --------------------------------------- */
.orion-impact-statement {
    border-left: 4px solid var(--orion-accent);
    padding: 16px 20px;
    background: linear-gradient(135deg, rgba(247,168,27,.06) 0%, rgba(23,69,143,.04) 100%);
    border-radius: 0 var(--orion-radius-sm) var(--orion-radius-sm) 0;
}

.orion-impact-statement blockquote {
    margin: 0;
    font-size: 1.125rem;
    font-style: italic;
    line-height: 1.6;
    color: var(--orion-text);
}

.orion-impact-statement .orion-stat-value {
    font-size: 3rem;
    display: block;
    margin-bottom: 4px;
}

/* --- Gauge / Completion ------------------------------------- */
.orion-gauge-wrap {
    display: flex;
    align-items: center;
    gap: 20px;
}

.orion-gauge-chart { flex-shrink: 0; }

.orion-gauge-info  { flex: 1; min-width: 0; }

/* --- Progress Bar ------------------------------------------- */
.orion-progress {
    height: 8px;
    background: var(--orion-border);
    border-radius: 9999px;
    overflow: hidden;
}

.orion-progress__bar {
    height: 100%;
    border-radius: 9999px;
    background: var(--orion-primary);
    transition: width 1s ease;
}

/* --- Empty / Loading States ---------------------------------- */
.orion-empty {
    text-align: center;
    padding: 32px 20px;
    color: var(--orion-text-muted);
    font-size: 0.9375rem;
}

.orion-empty svg {
    width: 40px;
    height: 40px;
    color: var(--orion-border);
    display: block;
    margin: 0 auto 10px;
}

.orion-skeleton {
    background: linear-gradient(90deg, var(--orion-border) 25%, #f1f5f9 50%, var(--orion-border) 75%);
    background-size: 200% 100%;
    animation: orionSkeleton 1.4s ease infinite;
    border-radius: var(--orion-radius-xs);
    display: block;
}

@keyframes orionSkeleton {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* --- Print button ------------------------------------------- */
.orion-print-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 16px;
    border: 1px solid var(--orion-border);
    border-radius: var(--orion-radius-sm);
    background: var(--orion-card-bg);
    color: var(--orion-text-muted);
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    transition: border-color var(--orion-anim-short) ease,
                color var(--orion-anim-short) ease;
    text-decoration: none;
}

.orion-print-btn:hover {
    border-color: var(--orion-primary);
    color: var(--orion-primary);
}

.orion-print-btn svg { width: 16px; height: 16px; }

/* --- Divider ----------------------------------------------- */
.orion-divider {
    border: none;
    border-top: 1px solid var(--orion-border);
    margin: 20px 0;
}

/* --- Year tab strip ----------------------------------------- */
.orion-year-tabs {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.orion-year-tab {
    padding: 4px 12px;
    border-radius: 9999px;
    font-size: 0.8125rem;
    font-weight: 500;
    background: var(--orion-bg);
    color: var(--orion-text-muted);
    border: 1px solid var(--orion-border);
    cursor: pointer;
    transition: background var(--orion-anim-short) ease,
                color var(--orion-anim-short) ease;
    text-decoration: none;
}

.orion-year-tab:hover,
.orion-year-tab.is-active {
    background: var(--orion-primary);
    color: #fff;
    border-color: var(--orion-primary);
}

/* --- Responsive --------------------------------------------- */
@media (max-width: 640px) {
    .orion-stat-grid--3,
    .orion-stat-grid--4 {
        grid-template-columns: repeat(2, 1fr);
    }

    .orion-stat-value    { font-size: 1.75rem; }
    .orion-stat-value--xl { font-size: 2.25rem; }

    .orion-project-grid { grid-template-columns: 1fr; }

    .orion-gauge-wrap { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 400px) {
    .orion-stat-grid--2,
    .orion-stat-grid--3,
    .orion-stat-grid--4 {
        grid-template-columns: 1fr;
    }
}

/* --- Print -------------------------------------------------- */
@media print {
    .orion-print-btn   { display: none; }
    .orion-stat-card   { break-inside: avoid; box-shadow: none; border: 1px solid var(--orion-border); }
    .orion-card        { break-inside: avoid; box-shadow: none; border: 1px solid var(--orion-border); }
    .orion-ticker-wrap { overflow: visible; }
    .orion-ticker-track { animation: none; }
}

/* =============================================================
   Reports Monthly Club Summary  [orion_reports_monthly_club_summary]
   ============================================================= */

/* ── Outer shell ────────────────────────────────────────────── */
.orion-rmcs {
    width: 100%;
    background: var(--orion-card-bg);
    border-radius: var(--orion-radius);
    box-shadow: var(--orion-shadow);
    overflow: hidden;  /* keeps sidebar highlight inside the card */
}

/* ── Header bar ─────────────────────────────────────────────── */
.orion-rmcs__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 20px;
    border-bottom: 1px solid var(--orion-border);
    flex-wrap: wrap;
}

.orion-rmcs__title-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
}

.orion-rmcs__header-icon {
    width: 28px;
    height: 28px;
    color: var(--orion-primary);
    flex-shrink: 0;
}

.orion-rmcs__title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--orion-text);
    margin: 0;
    line-height: 1.2;
}

.orion-rmcs__subtitle {
    font-size: 0.75rem;
    color: var(--orion-text-muted);
    margin: 2px 0 0;
    line-height: 1.3;
}

.orion-rmcs__year-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 9999px;
    background: var(--orion-primary);
    color: #fff;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: .04em;
    white-space: nowrap;
}

/* ── Action buttons ─────────────────────────────────────────── */
.orion-rmcs__actions {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.orion-rmcs__action-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border: 1px solid var(--orion-border);
    border-radius: var(--orion-radius-sm);
    background: var(--orion-card-bg);
    color: var(--orion-text-muted);
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition:
        border-color var(--orion-anim-short) ease,
        color        var(--orion-anim-short) ease,
        background   var(--orion-anim-short) ease;
}

.orion-rmcs__action-btn svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

.orion-rmcs__action-btn:hover {
    border-color: var(--orion-primary);
    color: var(--orion-primary);
    background: rgba(23, 69, 143, .04);
}

/* Primary variant (Print button) */
.orion-rmcs__action-btn--primary {
    background: var(--orion-primary);
    border-color: var(--orion-primary);
    color: #fff;
}

.orion-rmcs__action-btn--primary:hover {
    background: #0f3370;
    border-color: #0f3370;
    color: #fff;
}

/* ── Body: sidebar + panels ─────────────────────────────────── */
.orion-rmcs__body {
    display: grid;
    grid-template-columns: 96px 1fr;
    min-height: 480px;
    width: 100%;          /* stretches to container width */
}

/* ── Vertical tab sidebar ───────────────────────────────────── */
.orion-rmcs__sidebar {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 14px 0;
    border-right: 1px solid var(--orion-border);
    background: var(--orion-bg);
    flex-shrink: 0;
}

/* Tab button: icon stacked above label, fully centered */
.orion-rmcs__tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 14px 6px;
    width: 100%;
    border: none;
    border-left: 3px solid transparent;
    background: transparent;
    color: var(--orion-text-muted);
    cursor: pointer;
    text-align: center;
    transition:
        background    var(--orion-anim-short) ease,
        color         var(--orion-anim-short) ease,
        border-color  var(--orion-anim-short) ease;
    border-radius: 0;
    outline: none;
}

.orion-rmcs__tab:focus-visible {
    outline: 2px solid var(--orion-primary);
    outline-offset: -2px;
}

.orion-rmcs__tab-icon {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    transition: color var(--orion-anim-short) ease;
}

.orion-rmcs__tab-label {
    font-size: 0.625rem;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: .04em;
    text-transform: uppercase;
    white-space: normal;
    text-align: center;
    word-break: break-word;
}

.orion-rmcs__tab:hover {
    background: rgba(23, 69, 143, .05);
    color: var(--orion-primary);
}

.orion-rmcs__tab.is-active {
    background: rgba(23, 69, 143, .07);
    color: var(--orion-primary);
    border-left-color: var(--orion-primary);
}

/* ── Panel container ────────────────────────────────────────── */
.orion-rmcs__panels {
    min-width: 0;   /* prevent grid blowout from wide inner tables */
    overflow: hidden;
}

.orion-rmcs__panel {
    display: none;
    height: 100%;
}

.orion-rmcs__panel.is-active {
    display: flex;
    flex-direction: column;
}

/* ── Panel header (title + year badge) ──────────────────────── */
.orion-rmcs__panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 20px 12px;
    border-bottom: 1px solid var(--orion-border);
    flex-wrap: wrap;
}

.orion-rmcs__panel-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--orion-text);
}

.orion-rmcs__panel-title svg {
    width: 18px;
    height: 18px;
    color: var(--orion-primary);
    flex-shrink: 0;
}

.orion-rmcs__panel-sub {
    font-size: 0.75rem;
    color: var(--orion-text-muted);
    font-weight: 500;
    white-space: nowrap;
}

/* ── Panel body (scrollable inner content) ──────────────────── */
.orion-rmcs__panel-body {
    flex: 1;
    padding: 16px 20px;
    overflow: auto;
    min-width: 0;
}

/* Strip nested widget headers - the panel header replaces them */
.orion-rmcs__panel-body .orion-widget-header {
    display: none;
}

/* Remove double bottom-margin on the last inner widget */
.orion-rmcs__panel-body .orion-widget:last-child {
    margin-bottom: 0;
}

/* ── Print-only cover block (hidden on screen) ──────────────── */
.orion-rmcs__print-cover {
    display: none;
}

/* ── Responsive: tablet and below ──────────────────────────────
   Sidebar collapses to a horizontal scrollable tab strip at top. */
@media (max-width: 680px) {
    .orion-rmcs__body {
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr;
    }

    .orion-rmcs__sidebar {
        flex-direction: row;
        border-right: none;
        border-bottom: 1px solid var(--orion-border);
        padding: 6px 8px;
        gap: 4px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;         /* Firefox */
    }

    .orion-rmcs__sidebar::-webkit-scrollbar { display: none; }

    .orion-rmcs__tab {
        flex-direction: row;
        flex-shrink: 0;
        border-left: none;
        border-bottom: 3px solid transparent;
        padding: 8px 14px;
        border-radius: var(--orion-radius-xs);
        gap: 6px;
        white-space: nowrap;
    }

    .orion-rmcs__tab.is-active {
        border-bottom-color: var(--orion-primary);
        border-left-color: transparent;
        background: rgba(23, 69, 143, .07);
    }

    .orion-rmcs__tab-label {
        font-size: 0.6875rem;
        text-transform: none;
        letter-spacing: 0;
        font-weight: 600;
    }

    .orion-rmcs__tab-icon {
        width: 16px;
        height: 16px;
    }
}

@media (max-width: 480px) {
    .orion-rmcs__header { padding: 12px 14px; }
    .orion-rmcs__panel-header { padding: 10px 14px 10px; }
    .orion-rmcs__panel-body   { padding: 12px 14px; }
    .orion-rmcs__title        { font-size: 0.9375rem; }
}

/* ── Print styles ────────────────────────────────────────────── */
@media print {
    /* Flatten layout: no sidebar, full-width single column */
    .orion-rmcs {
        box-shadow: none;
        border: 1px solid #ccc;
        border-radius: 0;
    }

    .orion-rmcs__actions  { display: none !important; }
    .orion-rmcs__sidebar  { display: none !important; }

    .orion-rmcs__body {
        grid-template-columns: 1fr !important;
    }

    /* Show all panels stacked */
    .orion-rmcs__panel {
        display: flex !important;
        flex-direction: column;
    }

    /* Separate each panel with a page break */
    .orion-rmcs__panel + .orion-rmcs__panel {
        page-break-before: always;
        margin-top: 0;
    }

    /* Show the print cover block at the very top */
    .orion-rmcs__print-cover {
        display: block;
        text-align: center;
        padding: 16px 0 8px;
        border-bottom: 2px solid #17458f;
        margin-bottom: 16px;
    }

    .orion-rmcs__print-heading {
        font-size: 1.125rem;
        font-weight: 700;
        color: #17458f;
    }

    .orion-rmcs__print-sub {
        font-size: 0.875rem;
        color: #64748b;
        margin-top: 4px;
    }

    .orion-rmcs__panel-header {
        border-bottom: 1px solid #ccc;
    }

    .orion-rmcs__panel-body {
        overflow: visible;
    }
}

/* =============================================================
   Monthly Impact Trend  [orion_report_monthly_impact_trend]
   ============================================================= */

.orion-rmit {
    /* inherits .orion-widget card styles */
}

.orion-rmit__legend {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 14px;
}

.orion-rmit__legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--orion-text-muted);
    text-transform: uppercase;
    letter-spacing: .04em;
}

.orion-rmit__legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* Dot colors match dataset colors */
.orion-rmit__legend-item--projects .orion-rmit__legend-dot { background: var(--orion-primary); }
.orion-rmit__legend-item--people   .orion-rmit__legend-dot { background: var(--orion-success); }
.orion-rmit__legend-item--funds    .orion-rmit__legend-dot { background: var(--orion-accent); }

.orion-rmit__chart-wrap {
    position: relative;
    width: 100%;
}
