/* Microsoft 365 / Fluent UI theme layer */
:root {
    --fluent-brand: #0078d4;
    --fluent-brand-hover: #106ebe;
    --fluent-brand-pressed: #005a9e;
    --fluent-brand-light: #eff6fc;
    --fluent-brand-lighter: #deecf9;
    --fluent-bg: #faf9f8;
    --fluent-bg-alt: #f3f2f1;
    --fluent-surface: #ffffff;
    --fluent-border: #edebe9;
    --fluent-border-strong: #d2d0ce;
    --fluent-text: #323130;
    --fluent-text-secondary: #605e5c;
    --fluent-text-muted: #8a8886;
    --fluent-success: #107c10;
    --fluent-warning: #797775;
    --fluent-danger: #d13438;
    --fluent-shadow-4: 0 1.6px 3.6px rgba(0, 0, 0, 0.132), 0 0.3px 0.9px rgba(0, 0, 0, 0.108);
    --fluent-shadow-8: 0 3.2px 7.2px rgba(0, 0, 0, 0.132), 0 0.6px 1.8px rgba(0, 0, 0, 0.108);
    --fluent-shadow-16: 0 6.4px 14.4px rgba(0, 0, 0, 0.132), 0 1.2px 3.6px rgba(0, 0, 0, 0.108);
    --fluent-radius: 4px;
    --fluent-radius-pill: 999px;
    --erp-blue: #0078d4;
    --erp-blue-dark: #106ebe;
    --erp-blue-soft: #eff6fc;
    --erp-border: #edebe9;
    --erp-grid: #edebe9;
    --erp-sidebar: #ffffff;
    --erp-text: #323130;
    --katana-green: #0078d4;
    --katana-green-soft: #eff6fc;
    --katana-ink: #323130;
    --katana-muted: #605e5c;
    --katana-line: #edebe9;
    --katana-canvas: #faf9f8;
    --katana-panel: #ffffff;
    --blue: #0078d4;
    --blue-soft: #eff6fc;
    --page: #faf9f8;
    --line: #edebe9;
    --ink: #323130;
    --muted: #605e5c;
    --green: #107c10;
    --shadow: var(--fluent-shadow-4);
}

body.m365-theme,
body.m365-theme.login-page {
    font-family: "Segoe UI", "Segoe UI Web (West European)", "Segoe UI", -apple-system, BlinkMacSystemFont, "Roboto", "Helvetica Neue", sans-serif;
    -webkit-font-smoothing: antialiased;
    color: var(--fluent-text);
}

body.m365-theme:not(.login-page) {
    padding-top: 48px;
    background: var(--fluent-bg);
    font-size: 14px;
    line-height: 1.4;
}

body.m365-theme:not(.login-page) h1,
body.m365-theme:not(.login-page) h2,
body.m365-theme:not(.login-page) h3 {
    font-family: inherit;
    font-weight: 600;
    color: var(--fluent-text);
}

/* Suite header */
body.m365-theme .global-bar {
    height: 48px;
    color: var(--fluent-text);
    background: var(--fluent-surface);
    border-bottom: 1px solid var(--fluent-border);
    box-shadow: none;
}

body.m365-theme .global-brand {
    width: 220px;
    padding: 0 16px;
    color: var(--fluent-text);
    background: transparent;
    border-right: 1px solid var(--fluent-border);
}

body.m365-theme .brand-glyph {
    width: 28px;
    height: 28px;
    color: #fff;
    background: var(--fluent-brand);
    border-radius: var(--fluent-radius);
    font-size: 13px;
    font-weight: 600;
}

body.m365-theme .global-brand strong {
    font-size: 15px;
    font-weight: 600;
    letter-spacing: -0.01em;
}

body.m365-theme .global-search {
    width: min(420px, 36vw);
    height: 32px;
    margin: 8px 12px;
    color: var(--fluent-text-muted);
    background: var(--fluent-bg-alt);
    border: 1px solid transparent;
    border-radius: var(--fluent-radius);
    transition: border-color 0.1s, background 0.1s;
}

body.m365-theme .global-search:focus-within {
    background: var(--fluent-surface);
    border-color: var(--fluent-brand);
    box-shadow: 0 0 0 1px var(--fluent-brand);
}

body.m365-theme .global-search input {
    font-size: 14px;
    font-style: normal;
}

body.m365-theme .global-search input::placeholder {
    color: var(--fluent-text-muted);
}

body.m365-theme .global-icon {
    width: 44px;
    color: var(--fluent-text-secondary);
    border-left: 1px solid var(--fluent-border);
}

body.m365-theme .global-icon:hover:not(:disabled) {
    color: var(--fluent-brand);
    background: var(--fluent-bg-alt);
}

body.m365-theme .company-context {
    border-left: 1px solid var(--fluent-border);
    padding: 6px 14px;
}

body.m365-theme .company-context small {
    color: var(--fluent-text-muted);
    font-size: 11px;
    text-transform: none;
    letter-spacing: 0;
}

body.m365-theme .company-context strong {
    color: var(--fluent-text);
    font-size: 12px;
    font-weight: 600;
}

body.m365-theme .global-user {
    border-left: 1px solid var(--fluent-border);
}

body.m365-theme .global-user .avatar {
    width: 32px;
    height: 32px;
    color: #fff;
    background: var(--fluent-brand);
    font-size: 13px;
    font-weight: 600;
}

body.m365-theme .global-user span strong {
    font-size: 13px;
    font-weight: 600;
}

body.m365-theme .global-user span small {
    color: var(--fluent-text-muted);
    font-size: 11px;
}

/* Left navigation — Fluent nav pane */
body.m365-theme .sidebar {
    top: 48px;
    width: 228px;
    padding: 8px 10px 56px;
    color: var(--fluent-text);
    background: var(--fluent-surface);
    border-right: 1px solid var(--fluent-border);
    box-shadow: none;
}

body.m365-theme .nav-label {
    padding: 12px 12px 6px;
    color: var(--fluent-text-muted);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

body.m365-theme .nav a,
body.m365-theme .sidebar-footer a {
    min-height: 36px;
    margin: 2px 0;
    padding: 0 12px;
    gap: 10px;
    color: var(--fluent-text);
    border-radius: var(--fluent-radius);
    font-size: 14px;
    font-weight: 400;
}

body.m365-theme .nav a:hover,
body.m365-theme .sidebar-footer a:hover {
    color: var(--fluent-text);
    background: var(--fluent-bg-alt);
}

body.m365-theme .nav a.active {
    color: var(--fluent-brand);
    background: var(--fluent-brand-light);
    box-shadow: inset 3px 0 0 var(--fluent-brand);
}

body.m365-theme .nav-icon {
    width: 20px;
    height: 20px;
    color: var(--fluent-text-secondary);
    background: transparent;
    font-size: 15px;
}

body.m365-theme .nav a.active .nav-icon {
    color: var(--fluent-brand);
}

body.m365-theme .sidebar-footer {
    padding-top: 8px;
    background: var(--fluent-surface);
    border-top: 1px solid var(--fluent-border);
}

body.m365-theme .main-shell {
    width: calc(100% - 228px);
    min-height: calc(100vh - 48px);
    margin-left: 228px;
    background: var(--fluent-bg);
}

body.icon-rail-shell.m365-theme .main-shell {
    width: calc(100% - var(--erp-rail-width, 48px));
    margin-left: var(--erp-rail-width, 48px);
}

body.icon-rail-shell.rail-pinned.m365-theme .main-shell {
    width: calc(100% - var(--erp-rail-expanded, 228px));
    margin-left: var(--erp-rail-expanded, 228px);
}

/* Page header */
body.m365-theme .topbar {
    min-height: 56px;
    padding: 12px 24px;
    align-items: center;
    background: var(--fluent-surface);
    border-bottom: 1px solid var(--fluent-border);
    box-shadow: none;
}

body.m365-theme .topbar h1 {
    margin: 2px 0 0;
    font-size: 20px;
    font-weight: 600;
    letter-spacing: -0.02em;
}

body.m365-theme .breadcrumb {
    color: var(--fluent-text-muted);
    font-size: 12px;
}

body.m365-theme .screen-commands button,
body.m365-theme .screen-commands .button {
    height: 32px;
    padding: 0 12px;
    color: var(--fluent-text);
    background: var(--fluent-surface);
    border: 1px solid var(--fluent-border-strong);
    border-radius: var(--fluent-radius);
    font-size: 14px;
    text-transform: none;
}

body.m365-theme .screen-commands button:hover {
    color: var(--fluent-text);
    background: var(--fluent-bg-alt);
}

body.m365-theme .content,
body.m365-theme .content-gi {
    padding: 16px 24px 40px;
    background: var(--fluent-bg);
}

body.m365-theme .module-heading,
body.m365-theme .workspace-title {
    min-height: auto;
    margin: 0 0 16px;
    padding: 0 0 12px;
    border-bottom: 1px solid var(--fluent-border);
}

body.m365-theme .module-heading-tabs {
    display: flex;
    align-items: flex-end;
    gap: 16px;
}

body.m365-theme .module-heading-tabs .view-selector a {
    height: 36px;
    padding: 0 4px;
    margin-right: 16px;
    font-size: 14px;
    font-weight: 400;
    border-bottom: 2px solid transparent;
}

body.m365-theme .module-heading-tabs .view-selector a.active {
    color: var(--fluent-brand);
    border-color: var(--fluent-brand);
    font-weight: 600;
}

/* Footer */
body.m365-theme .footer {
    height: 28px;
    color: var(--fluent-text-muted);
    background: var(--fluent-surface);
    border-top: 1px solid var(--fluent-border);
    font-size: 12px;
}

body.m365-theme .footer strong {
    color: var(--fluent-text-secondary);
    font-weight: 600;
    text-transform: none;
}

/* Buttons */
body.m365-theme .button {
    min-height: 32px;
    padding: 0 16px;
    border-radius: var(--fluent-radius);
    font-size: 14px;
    font-weight: 600;
    box-shadow: none;
}

body.m365-theme .button-primary,
body.m365-theme .command-primary,
body.m365-theme .quick-action-button,
body.m365-theme .payment-action-primary {
    color: #fff;
    background: var(--fluent-brand);
    border: 1px solid var(--fluent-brand);
    box-shadow: none;
}

body.m365-theme .button-primary:hover,
body.m365-theme .command-primary:hover,
body.m365-theme .quick-action-button:hover,
body.m365-theme .payment-action-primary:hover {
    background: var(--fluent-brand-hover);
    border-color: var(--fluent-brand-hover);
    transform: none;
}

body.m365-theme .button-secondary,
body.m365-theme .payment-action-secondary {
    color: var(--fluent-text);
    background: var(--fluent-surface);
    border: 1px solid var(--fluent-border-strong);
}

body.m365-theme .button-secondary:hover,
body.m365-theme .payment-action-secondary:hover {
    color: var(--fluent-text);
    background: var(--fluent-bg-alt);
    border-color: var(--fluent-border-strong);
}

/* Panels & command bar */
body.m365-theme .panel,
body.m365-theme .data-panel {
    background: var(--fluent-surface);
    border: 1px solid var(--fluent-border);
    border-radius: var(--fluent-radius);
    box-shadow: var(--fluent-shadow-4);
}

body.m365-theme .record-command-bar {
    height: auto;
    min-height: 44px;
    padding: 8px 12px;
    background: var(--fluent-surface);
    border-bottom: 1px solid var(--fluent-border);
}

body.m365-theme .record-command-bar .command-primary {
    height: 32px;
    border-radius: var(--fluent-radius);
    background: var(--fluent-brand);
    box-shadow: none;
}

/* Pivot tabs */
body.m365-theme .table-toolbar {
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
    padding: 0 0 8px;
    border-bottom: 1px solid var(--fluent-border);
}

body.m365-theme .view-selector a {
    height: 36px;
    padding: 0 10px;
    margin-right: 4px;
    color: var(--fluent-text-secondary);
    border-bottom: 2px solid transparent;
    border-radius: 0;
    font-size: 14px;
    font-weight: 400;
}

body.m365-theme .view-selector a:hover {
    color: var(--fluent-text);
    background: transparent;
}

body.m365-theme .view-selector a.active {
    color: var(--fluent-brand);
    border-color: var(--fluent-brand);
    font-weight: 600;
    background: transparent;
}

body.m365-theme .payment-views a span,
body.m365-theme .sales-views a span,
body.m365-theme .inventory-category-tabs a span {
    min-width: 20px;
    height: 20px;
    color: var(--fluent-text-secondary);
    background: var(--fluent-bg-alt);
    border-radius: var(--fluent-radius-pill);
    font-size: 11px;
    font-weight: 600;
}

body.m365-theme .payment-views a.active span,
body.m365-theme .sales-views a.active span,
body.m365-theme .inventory-category-tabs a.active span {
    color: #fff;
    background: var(--fluent-brand);
}

body.m365-theme .inventory-category-tabs {
    margin-top: 4px;
}

body.m365-theme .toolbar-report-link {
    display: inline-flex;
    align-items: center;
    height: 32px;
    padding: 0 12px;
    margin-right: 8px;
    color: var(--fluent-brand);
    border: 1px solid var(--fluent-border-strong);
    border-radius: var(--fluent-radius);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
}

body.m365-theme .toolbar-report-link:hover {
    background: var(--fluent-brand-light);
}

body.m365-theme .search-box {
    height: 32px;
    background: var(--fluent-surface);
    border: 1px solid var(--fluent-border-strong);
    border-radius: var(--fluent-radius);
}

body.m365-theme .search-box:focus-within {
    border-color: var(--fluent-brand);
    box-shadow: 0 0 0 1px var(--fluent-brand);
}

body.m365-theme .search-box input {
    font-size: 14px;
}

/* Tables */
body.m365-theme .data-panel table th,
body.m365-theme .erp-grid-panel table th {
    height: 36px;
    padding: 0 12px;
    color: var(--fluent-text);
    background: var(--fluent-bg-alt);
    border: none;
    border-bottom: 1px solid var(--fluent-border-strong);
    font-size: 12px;
    font-weight: 600;
}

body.m365-theme .data-panel table td,
body.m365-theme .erp-grid-panel table td {
    height: 40px;
    padding: 8px 12px;
    color: var(--fluent-text);
    border: none;
    border-bottom: 1px solid var(--fluent-border);
    font-size: 14px;
}

body.m365-theme .data-panel tbody tr:nth-child(even) {
    background: transparent;
}

body.m365-theme .data-panel tbody tr:hover {
    background: var(--fluent-bg-alt);
    box-shadow: none;
}

body.m365-theme .data-panel tbody tr.row-needs-action td:first-child {
    box-shadow: inset 3px 0 0 var(--fluent-brand);
}

body.m365-theme .grid-link,
body.m365-theme .table-action {
    color: var(--fluent-brand);
    font-size: 14px;
    font-weight: 400;
    text-decoration: none;
}

body.m365-theme .grid-link:hover,
body.m365-theme .table-action:hover {
    text-decoration: underline;
}

body.m365-theme .grid-footer {
    color: var(--fluent-text-muted);
    font-size: 12px;
}

/* Badges */
body.m365-theme .badge {
    border-radius: var(--fluent-radius-pill);
    font-size: 12px;
    font-weight: 600;
}

body.m365-theme .badge-success {
    color: var(--fluent-success);
    background: #dff6dd;
}

body.m365-theme .badge-warning {
    color: #8a6116;
    background: #fff4ce;
}

body.m365-theme .badge-danger,
body.m365-theme .badge-error {
    color: var(--fluent-danger);
    background: #fde7e9;
}

body.m365-theme .badge-info,
body.m365-theme .badge-primary {
    color: var(--fluent-brand);
    background: var(--fluent-brand-light);
}

/* KPI / overview cards */
body.m365-theme .inventory-overview,
body.m365-theme .sales-overview,
body.m365-theme .payments-overview,
body.m365-theme .production-kpis,
body.m365-theme .product-overview,
body.m365-theme .customer-overview,
body.m365-theme .reject-overview {
    gap: 12px;
}

body.m365-theme .inventory-hero-card,
body.m365-theme .sales-hero-card,
body.m365-theme .customer-hero-card,
body.m365-theme .product-hero-card,
body.m365-theme .payment-kpi-primary {
    color: var(--fluent-text);
    background: var(--fluent-surface);
    border: 1px solid var(--fluent-border);
    border-left: 4px solid var(--fluent-brand);
    border-radius: var(--fluent-radius);
    box-shadow: var(--fluent-shadow-4);
}

body.m365-theme .inventory-hero-card strong,
body.m365-theme .sales-hero-card strong,
body.m365-theme .customer-hero-card strong,
body.m365-theme .product-hero-card strong {
    color: var(--fluent-text);
    font-size: 22px;
}

body.m365-theme .inventory-hero-card p,
body.m365-theme .sales-hero-card p,
body.m365-theme .customer-hero-card p,
body.m365-theme .product-hero-card p,
body.m365-theme .inventory-card-label,
body.m365-theme .sales-card-label,
body.m365-theme .customer-card-label,
body.m365-theme .product-card-label {
    color: var(--fluent-text-secondary);
}

body.m365-theme .inventory-stat-card,
body.m365-theme .sales-stat-card,
body.m365-theme .customer-stat-card,
body.m365-theme .product-stat-card,
body.m365-theme .payment-kpi,
body.m365-theme .reject-kpi {
    background: var(--fluent-surface);
    border: 1px solid var(--fluent-border);
    border-top: 3px solid var(--fluent-brand);
    border-radius: var(--fluent-radius);
    box-shadow: var(--fluent-shadow-4);
}

body.m365-theme .payment-kpi-primary {
    border-left-color: var(--fluent-brand);
}

body.m365-theme .payment-kpi-primary span,
body.m365-theme .payment-kpi-primary small {
    color: var(--fluent-text-secondary);
}

body.m365-theme .payment-kpi-primary strong {
    color: var(--fluent-text);
}

body.m365-theme .inventory-insight-bar,
body.m365-theme .sales-insight-bar,
body.m365-theme .product-insight-bar,
body.m365-theme .customer-insight-bar,
body.m365-theme .payments-callout,
body.m365-theme .customer-recent-panel {
    background: var(--fluent-surface);
    border: 1px solid var(--fluent-border);
    border-radius: var(--fluent-radius);
    box-shadow: none;
}

body.m365-theme .inventory-chip,
body.m365-theme .sales-chip,
body.m365-theme .category-chip {
    border-radius: var(--fluent-radius-pill);
    font-size: 12px;
}

body.m365-theme .production-flow-strip {
    background: var(--fluent-surface);
    border: 1px solid var(--fluent-border);
    border-radius: var(--fluent-radius);
}

body.m365-theme .production-flow-strip b {
    background: var(--fluent-brand);
}

body.m365-theme .exception-tile {
    border-radius: var(--fluent-radius);
}

body.m365-theme .tile-blue {
    background: var(--fluent-brand);
}

body.m365-theme .erp-widget,
body.m365-theme .erp-grid-panel {
    border: 1px solid var(--fluent-border);
    border-radius: var(--fluent-radius);
    box-shadow: var(--fluent-shadow-4);
}

body.m365-theme .widget-title {
    font-size: 12px;
    font-weight: 600;
    text-transform: none;
    letter-spacing: 0;
}

body.m365-theme .quick-grid a {
    border: 1px solid var(--fluent-border);
    border-radius: var(--fluent-radius);
    box-shadow: var(--fluent-shadow-4);
}

/* Modals */
body.m365-theme .modal-card,
body.m365-theme .product-detail-card,
body.m365-theme .shift-posting-card,
body.m365-theme .production-run-card {
    border: 1px solid var(--fluent-border);
    border-radius: var(--fluent-radius);
    box-shadow: var(--fluent-shadow-16);
}

body.m365-theme .entry-command-bar,
body.m365-theme .dialog-footer {
    background: var(--fluent-bg-alt);
    border-color: var(--fluent-border);
}

body.m365-theme .modal-header h2 {
    font-size: 20px;
    font-weight: 600;
}

body.m365-theme .form-grid label,
body.m365-theme .form-stack label {
    font-size: 14px;
    color: var(--fluent-text);
}

body.m365-theme .form-grid input,
body.m365-theme .form-grid select,
body.m365-theme .form-grid textarea,
body.m365-theme .form-stack input,
body.m365-theme .form-stack select {
    min-height: 32px;
    border: 1px solid var(--fluent-border-strong);
    border-radius: var(--fluent-radius);
    font-size: 14px;
}

body.m365-theme .form-grid input:focus,
body.m365-theme .form-grid select:focus,
body.m365-theme .form-grid textarea:focus,
body.m365-theme .form-stack input:focus {
    border-color: var(--fluent-brand);
    outline: 1px solid var(--fluent-brand);
}

body.m365-theme .field-hint {
    font-size: 12px;
    color: var(--fluent-text-muted);
}

body.m365-theme .alert {
    border-radius: var(--fluent-radius);
    font-size: 14px;
}

body.m365-theme .alert-success {
    background: #dff6dd;
    border-color: #9fd89f;
    color: #0b6a0b;
}

body.m365-theme .alert-error {
    background: #fde7e9;
    border-color: #f1bbbc;
    color: #a4262c;
}

/* Login */
body.m365-theme.login-page {
    background: var(--fluent-bg);
}

body.m365-theme .login-shell {
    min-height: 100vh;
    grid-template-columns: 1fr 1fr;
}

body.m365-theme .login-story {
    color: #fff;
    background: linear-gradient(160deg, #004578 0%, #0078d4 48%, #50a0e8 100%);
}

body.m365-theme .login-panel {
    background: var(--fluent-surface);
}

body.m365-theme .login-card {
    max-width: 440px;
    padding: 0 8px;
}

body.m365-theme .login-card h2 {
    font-size: 24px;
    font-weight: 600;
    letter-spacing: -0.02em;
}

body.m365-theme .login-card .button-primary {
    min-height: 36px;
    font-size: 15px;
}

body.m365-theme .demo-note {
    border: 1px solid var(--fluent-border);
    border-radius: var(--fluent-radius);
    background: var(--fluent-bg-alt);
}

@media (max-width: 900px) {
    body.m365-theme .main-shell {
        width: 100%;
        margin-left: 0;
    }

    body.m365-theme .sidebar {
        box-shadow: var(--fluent-shadow-16);
    }
}


/* ============================================================
   RMS360-style Scale Overlay (appended)
   ============================================================ */

/* ============================================================
   RMS360-style Scale Overlay — erp-theme + m365-theme
   Load AFTER erp-professional.css and fluent-m365.css (whichever
   is active). Changes SIZE, WEIGHT, and SPACING only — no colors,
   no --erp-primary/--fluent-brand, no rail/sidebar layout structure.
   The RMS-inspired login (body.rms-login-page) is left as-is; it's
   an intentionally distinct retro-terminal skin, not the main app UI.
   ============================================================ */

/* ---- 1. Base type scale ---- */
body.erp-theme,
body.m365-theme:not(.login-page) {
    font-size: 16px !important;
    line-height: 1.5 !important;
}

/* ---- 2. Page / section headings ---- */
body.erp-theme .topbar h1,
body.m365-theme .topbar h1 {
    font-size: 26px !important;
    font-weight: 700 !important;
    letter-spacing: -0.3px !important;
}
body.erp-theme .workspace-title h2,
body.erp-theme .module-heading h2,
body.m365-theme .workspace-title h2,
body.m365-theme .module-heading h2 {
    font-size: 22px !important;
    font-weight: 700 !important;
}
body.erp-theme .workspace-title p,
body.erp-theme .module-heading p,
body.m365-theme .workspace-title p,
body.m365-theme .module-heading p {
    font-size: 13px !important;
}
body.erp-theme .breadcrumb,
body.m365-theme .breadcrumb {
    font-size: 12px !important;
}
body.erp-theme .modal-header h2,
body.m365-theme .modal-header h2 {
    font-size: 24px !important;
    font-weight: 700 !important;
}
body.erp-theme .login-card h2,
body.m365-theme .login-card h2 {
    font-size: 26px !important;
    font-weight: 700 !important;
}

/* ---- 3. KPI / metric numbers — the bold "237,524.00" look ---- */
body.erp-theme .exception-tile strong,
body.m365-theme .exception-tile strong,
body.erp-theme .inventory-hero-card strong,
body.erp-theme .sales-hero-card strong,
body.erp-theme .customer-hero-card strong,
body.erp-theme .product-hero-card strong,
body.m365-theme .inventory-hero-card strong,
body.m365-theme .sales-hero-card strong,
body.m365-theme .customer-hero-card strong,
body.m365-theme .product-hero-card strong {
    font-size: 30px !important;
    font-weight: 700 !important;
    letter-spacing: -0.5px !important;
}
body.erp-theme .inventory-stat-card strong,
body.erp-theme .sales-stat-card strong,
body.erp-theme .customer-stat-card strong,
body.erp-theme .product-stat-card strong,
body.erp-theme .payment-kpi strong,
body.erp-theme .reject-kpi strong,
body.erp-theme .production-kpis strong,
body.m365-theme .inventory-stat-card strong,
body.m365-theme .sales-stat-card strong,
body.m365-theme .customer-stat-card strong,
body.m365-theme .product-stat-card strong,
body.m365-theme .payment-kpi strong,
body.m365-theme .reject-kpi strong,
body.m365-theme .production-kpis strong {
    font-size: 26px !important;
    font-weight: 700 !important;
}
body.erp-theme .exception-tile small,
body.erp-theme .inventory-stat-card span,
body.erp-theme .sales-stat-card span,
body.erp-theme .payment-kpi span,
body.erp-theme .production-kpis span,
body.m365-theme .exception-tile small,
body.m365-theme .inventory-stat-card span,
body.m365-theme .sales-stat-card span,
body.m365-theme .payment-kpi span,
body.m365-theme .production-kpis span {
    font-size: 12px !important;
    font-weight: 600 !important;
}
body.erp-theme .exception-tile,
body.m365-theme .exception-tile {
    min-height: 90px !important;
    padding: 16px 18px !important;
}

/* ---- 4. Tables — bigger rows, bolder headers ---- */
body.erp-theme .data-panel table th,
body.erp-theme .erp-grid-panel table th,
body.m365-theme .data-panel table th,
body.m365-theme .erp-grid-panel table th {
    height: 48px !important;
    font-size: 13px !important;
    font-weight: 700 !important;
}
body.erp-theme .data-panel table td,
body.erp-theme .erp-grid-panel table td,
body.m365-theme .data-panel table td,
body.m365-theme .erp-grid-panel table td {
    height: 52px !important;
    font-size: 15px !important;
}
body.erp-theme .data-panel table td strong,
body.m365-theme .data-panel table td strong {
    font-weight: 700 !important;
}

/* ---- 5. Buttons — bigger, bolder ---- */
body.erp-theme .button,
body.erp-theme .command-primary,
body.erp-theme .quick-action-button,
body.m365-theme .button,
body.m365-theme .command-primary,
body.m365-theme .quick-action-button {
    min-height: 44px !important;
    padding: 0 18px !important;
    font-size: 14px !important;
    font-weight: 700 !important;
}

/* ---- 6. Badges ---- */
body.erp-theme .badge,
body.m365-theme .badge {
    padding: 5px 10px !important;
    font-size: 12px !important;
    font-weight: 700 !important;
}

/* ---- 7. Forms ---- */
body.erp-theme .form-grid input,
body.erp-theme .form-grid select,
body.erp-theme .form-grid textarea,
body.m365-theme .form-grid input,
body.m365-theme .form-grid select,
body.m365-theme .form-grid textarea {
    min-height: 44px !important;
    font-size: 14px !important;
}

/* ---- 8. Sidebar / nav text ---- */
body.icon-rail-shell.erp-theme .icon-rail-link,
body.icon-rail-shell.erp-theme .icon-rail-text {
    font-size: 14px !important;
}
body.erp-theme:not(.icon-rail-shell) .nav a,
body.erp-theme:not(.icon-rail-shell) .sidebar-footer a,
body.m365-theme .nav a,
body.m365-theme .sidebar-footer a {
    font-size: 14px !important;
    font-weight: 500 !important;
}