/* Shared typography for legacy admin and CRM; no remote font dependency. */
.ramarket-source-tabs { display: flex; flex-wrap: wrap; gap: 6px; padding: 5px; margin-bottom: 18px; border-radius: 12px; background: #f2f5fa; width: fit-content; }
body .ramarket-source-tabs button { padding: 10px 16px; border: 1px solid transparent; border-radius: 9px; color: #475569; background: transparent; box-shadow: none; cursor: pointer; }
body .ramarket-source-tabs button[aria-pressed="true"] { background: #fff; border-color: #dce5f1; color: #145bea; }
body .ramarket-source-tabs button:focus-visible { outline: 2px solid #145bea; outline-offset: 2px; }
:root {
    --font-ui: "Segoe UI", -apple-system, BlinkMacSystemFont, Arial, sans-serif;
    --weight-text: 400;
    --weight-control: 500;
    --weight-heading: 600;
}
/* Explicit migration boundary: neutralize accumulated 800/900 legacy weights. */
body * {
    font-family: inherit !important;
    font-weight: var(--weight-text) !important;
}
body :is(h1, h2, h3, h4, strong, b) {
    font-weight: var(--weight-heading) !important;
}
body :is(button, input, select, textarea, label, th, summary, nav a, .nav a, .sidebar a, .parent-terminal-link, .terminal-meta a) {
    font-weight: var(--weight-control) !important;
}
body :is(h2, h3, th, summary, label) {
    letter-spacing: normal;
}
body :is(input, textarea)::placeholder {
    font-weight: var(--weight-text) !important;
}
body :is(td, input, .stat-card, .payment-method-card, .daily-chart-legend) {
    font-variant-numeric: tabular-nums;
}
body,
.crm-theme body {
    font-family: var(--font-ui);
    font-weight: 400;
    line-height: 1.5;
}
button, input, select, textarea {
    font-family: inherit;
}
.terminal-filter input,
.terminal-filter input::placeholder,
.terminal-card p,
.terminal-card small,
.terminal-group summary small,
.terminal-group summary b {
    font-weight: 400;
    line-height: 1.5;
}
.terminal-group summary,
.terminal-card h3,
.crm-theme .terminal-card h3 {
    font-weight: 600;
    letter-spacing: normal;
    line-height: 1.35;
}
.terminal-card h3,
.crm-theme .terminal-card h3 {
    font-size: 18px;
}
.terminal-card span,
.terminal-meta b,
.terminal-meta a,
.crm-theme .terminal-meta a {
    font-weight: 600;
}
#terminals > summary h2 {
    font-weight: 600;
    text-transform: none;
    letter-spacing: normal;
}

/* Shared chart treatment, including the non-CRM admin route. */
body .daily-line-chart { gap: 20px; padding-top: 8px; }
body .daily-chart-legend { gap: 10px; }
body .daily-chart-legend span {
    border: 0; background: #f4f7fc; padding: 8px 12px; border-radius: 20px;
    font-size: 13px; color: #34435a;
}
body .daily-chart-legend .daily-rate-warning { background: #fff1f2; color: #b42318; }
body .daily-grid-line { stroke: #e9eef5; stroke-width: 1; stroke-dasharray: none; }
body .daily-grid-line-vertical { display: none; }
body .daily-axis { stroke: #dce4ef; stroke-width: 1; }
body .daily-axis-labels text, body .daily-y-label { fill: #64748b; font-size: 12px; }
body .daily-point-label { font-size: 11px; stroke-width: 3px; }
body .daily-line-chart polyline { stroke-width: 2.5; }
body .daily-line-chart circle { stroke: white; stroke-width: 1.5; }
body .daily-line-chart svg { min-height: 200px; }
body .chart-empty {
    min-height: 220px; display: flex; flex-direction: column; align-items: center;
    justify-content: center; gap: 8px; padding: 24px; box-sizing: border-box;
    border: 1px solid #e4eaf3; border-radius: 14px; text-align: center;
    background: linear-gradient(180deg, #f7faff, #fff); color: #64748b;
}
body .chart-empty strong { font-size: 18px; color: #24344b; }
body .chart-empty p { margin: 0; font-size: 14px; }
