/* Shared MeterSense admin iframe pages — use with theme.js + theme-dark.css */

:root {
    --ms-bg: #f4f8fb;
    --ms-card: #ffffff;
    --ms-border: #c5d4e8;
    --ms-text: #003060;
    --ms-text-body: #334155;
    --ms-text-muted: #64748b;
    --admin-surface-alt: #f8fafc;
    --admin-pre-bg: #f1f5f9;
    --admin-thead-bg: #f8f9fa;
}

html[data-bs-theme="dark"] {
    --ms-bg: #001529;
    --ms-card: #002447;
    --ms-border: #1a4d7a;
    --ms-text: #e8f2fa;
    --ms-text-body: #e8f2fa;
    --ms-text-muted: #8eb0cc;
    --admin-surface-alt: #001a33;
    --admin-pre-bg: #001a33;
    --admin-thead-bg: #003060;
}

body.admin-page {
    background-color: var(--ms-bg);
    color: var(--ms-text-body);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

body.admin-page h1,
body.admin-page h2,
body.admin-page h3,
body.admin-page h4,
body.admin-page h5,
body.admin-page h6,
body.admin-page .h1,
body.admin-page .h2,
body.admin-page .h3,
body.admin-page .h4,
body.admin-page .h5,
body.admin-page .h6 {
    color: var(--ms-text);
}

body.admin-page .text-muted,
body.admin-page .section-title {
    color: var(--ms-text-muted) !important;
}

body.admin-page pre,
body.admin-page .admin-pre {
    background: var(--admin-pre-bg);
    border: 1px solid var(--ms-border);
    color: var(--ms-text-body);
}

body.admin-page .table-responsive thead th,
body.admin-page .table thead th {
    background-color: var(--admin-thead-bg);
    color: var(--ms-text-muted);
    border-color: var(--ms-border);
    box-shadow: 0 1px 0 var(--ms-border);
}

body.admin-page .table-light {
    --bs-table-bg: var(--admin-thead-bg);
    --bs-table-color: var(--ms-text-body);
    --bs-table-border-color: var(--ms-border);
}

body.admin-page .card-custom,
body.admin-page .stat-card {
    background: var(--ms-card);
    border-color: var(--ms-border);
}

body.admin-page .card-custom .table th {
    background: var(--admin-thead-bg);
    color: var(--ms-text-muted);
}

html[data-bs-theme="dark"] body.admin-page .status-active {
    background: rgba(22, 101, 52, 0.25);
    color: #86efac;
}

html[data-bs-theme="dark"] body.admin-page .status-inactive {
    background: var(--admin-surface-alt);
    color: var(--ms-text-muted);
}

html[data-bs-theme="dark"] body.admin-page .status-ok {
    color: #86efac;
}

html[data-bs-theme="dark"] body.admin-page .status-fail {
    color: #fca5a5;
}

html[data-bs-theme="dark"] body.admin-page .status-done {
    color: #86efac;
}

html[data-bs-theme="dark"] body.admin-page .status-partial {
    color: #fcd34d;
}
