/*
 * Offerboxer panels (/app and /manage) — the only stylesheet besides Filament's own.
 *
 * One component set for both panels: Filament's Blade components (section, callout, badge,
 * button, tabs, input, icon, empty-state, …) plus the x-manage.* components in
 * resources/views/components/manage. Every colour and size below comes from Filament's CSS
 * variables (--gray-*, --primary-*, --success-* …) so light and dark mode follow the panel.
 *
 * Rules for panel views (docs/manage-ui.md): no inline style attributes, no emoji as icons
 * (use heroicons through <x-filament::icon>), no bare form controls (wrap them in
 * <x-filament::input.wrapper>), no classes that are not Filament's or mg-*.
 */

/* ---------------------------------------------------------------------------
   Panel chrome
   --------------------------------------------------------------------------- */

[x-cloak] { display: none !important; }

/* Pages with several header actions wrap them instead of pushing the title off-screen. */
.fi-header { flex-wrap: wrap; gap: 0.75rem; }
.fi-header-actions-ctn { max-width: 100%; flex-wrap: wrap; }
.fi-header-actions-ctn .fi-ac { flex-wrap: wrap; row-gap: 0.5rem; }

/* Row actions in tables wrap too (Customers carries four). */
.fi-ta-actions { flex-wrap: wrap; row-gap: 0.375rem; }

/* On very narrow screens the header buttons take the full width, so a long Dutch label
   breaks instead of running off the page. */
@media (max-width: 640px) {
    .fi-header-actions-ctn,
    .fi-header-actions-ctn .fi-ac { width: 100%; }
    .fi-header-actions-ctn .fi-ac > * { flex: 1 1 auto; }
}

/* On narrow screens the row-action column sticks to the right edge, so the buttons stay
   reachable while the rest of the table scrolls underneath. */
@media (max-width: 1024px) {
    .fi-ta-table:has(th.fi-ta-actions-header-cell) thead tr > th:last-child,
    .fi-ta-table:has(th.fi-ta-actions-header-cell) tbody tr > td:last-child {
        position: sticky;
        right: 0;
        z-index: 1;
        background-color: #fff;
        box-shadow: -10px 0 8px -8px rgba(15, 23, 42, 0.18);
    }

    .dark .fi-ta-table:has(th.fi-ta-actions-header-cell) thead tr > th:last-child,
    .dark .fi-ta-table:has(th.fi-ta-actions-header-cell) tbody tr > td:last-child {
        background-color: var(--gray-900);
        box-shadow: -10px 0 8px -8px rgba(0, 0, 0, 0.5);
    }

    .fi-ta-table:has(th.fi-ta-actions-header-cell) tbody tr > td:last-child .fi-ta-actions {
        flex-direction: column;
        align-items: stretch;
        row-gap: 0.25rem;
    }
}

/* Language dropdown in the top bar and on the auth cards (shared component), the same shape as
   the site header: "NL ⌄" opens a small menu. */
.mg-language-switch { position: relative; width: max-content; flex-shrink: 0; margin: 0.5rem; }
.mg-language-switch__toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    min-height: 2.25rem;
    padding: 0.4rem 0.7rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--gray-600);
    cursor: pointer;
    list-style: none;
    user-select: none;
}
.mg-language-switch__toggle::-webkit-details-marker { display: none; }
.mg-language-switch__toggle:hover,
.mg-language-switch[open] .mg-language-switch__toggle { color: var(--gray-950); background: var(--gray-100); }
.mg-language-switch__toggle:focus-visible { outline: 2px solid var(--primary-600); outline-offset: 2px; }
.mg-language-switch__toggle svg { transition: transform 0.2s; }
.mg-language-switch[open] .mg-language-switch__toggle svg { transform: rotate(180deg); }
.mg-language-switch__menu {
    position: absolute;
    top: calc(100% + 0.375rem);
    right: 0;
    z-index: 30;
    display: grid;
    min-width: 10.5rem;
    padding: 0.375rem;
    background: #fff;
    border: 1px solid var(--gray-200);
    border-radius: 0.75rem;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.12);
}
.mg-language-switch__option {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    min-height: 2.5rem;
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    text-align: left;
    color: var(--gray-700);
    background: transparent;
    cursor: pointer;
}
.mg-language-switch__option span { min-width: 1.5rem; font-size: 0.75rem; font-weight: 700; color: var(--gray-500); }
.mg-language-switch__option:hover { background: var(--gray-100); }
.mg-language-switch__option[aria-current="true"] { color: var(--primary-600); background: var(--primary-50, rgba(37, 99, 235, 0.08)); font-weight: 600; }
.mg-language-switch__option[aria-current="true"] span { color: inherit; }
.mg-language-switch__option:focus-visible { outline: 2px solid var(--primary-600); outline-offset: 2px; }
.dark .mg-language-switch__toggle { color: var(--gray-300); }
.dark .mg-language-switch__toggle:hover,
.dark .mg-language-switch[open] .mg-language-switch__toggle { color: #fff; background: rgba(255, 255, 255, 0.08); }
.dark .mg-language-switch__menu { background: var(--gray-900); border-color: rgba(255, 255, 255, 0.12); }
.dark .mg-language-switch__option { color: var(--gray-200); }
.dark .mg-language-switch__option:hover { background: rgba(255, 255, 255, 0.08); }
.dark .mg-language-switch__option[aria-current="true"] { background: rgba(37, 99, 235, 0.25); color: #fff; }
.dark .mg-language-switch__option span { color: var(--gray-400); }

/* Brand mark + wordmark (shared component). */
.ob-brand { display: inline-flex; align-items: center; gap: 0.5rem; }
.ob-brand__mark { width: 2rem; height: 2rem; }
.ob-brand__name { font-weight: 700; font-size: 1.125rem; letter-spacing: -0.01em; color: var(--gray-950); }
.dark .ob-brand__name { color: #fff; }

/* "Hoe werkt dit?" link in every /app page header (App\Support\FaqLinks). */
.mg-help-link {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.8125rem;
    font-weight: 500;
    line-height: 1.25rem;
    color: var(--gray-600);
    box-shadow: 0 0 0 1px color-mix(in oklab, var(--gray-950) 10%, transparent);
    text-decoration: none;
    white-space: nowrap;
}
.mg-help-link:hover { color: var(--gray-950); background: var(--gray-50); }
.mg-help-link__icon { width: 1rem; height: 1rem; color: var(--gray-400); }
.dark .mg-help-link { color: var(--gray-400); box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.2); }
.dark .mg-help-link:hover { color: #fff; background: rgba(255, 255, 255, 0.05); }

/* A banner above the page (impersonation, preview account): a standing fact about the
   session, not a property of one widget. */
.mg-banner {
    position: sticky;
    top: 0;
    z-index: 40;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem 1rem;
    padding: 0.5rem 1rem;
    font-size: 0.8125rem;
    line-height: 1.25rem;
    border-bottom: 1px solid transparent;
}
.mg-banner--warning { background: var(--warning-50); color: var(--warning-800); border-color: var(--warning-200); }
.mg-banner--info { background: var(--info-50); color: var(--info-800); border-color: var(--info-200); }
.mg-banner__badge {
    flex: none;
    padding: 0.125rem 0.5rem;
    border-radius: 9999px;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: #fff;
    background: var(--info-600);
}
.mg-banner--warning .mg-banner__badge { background: var(--warning-600); }
.mg-banner__action {
    display: inline-flex;
    align-items: center;
    padding: 0.375rem 0.75rem;
    border-radius: 0.5rem;
    font-weight: 600;
    text-decoration: none;
    color: #fff;
    background: var(--warning-600);
    white-space: nowrap;
}
.mg-banner__action:hover { background: var(--warning-700); color: #fff; }
.dark .mg-banner--warning { background: rgba(245, 158, 11, 0.12); color: var(--warning-200); border-color: rgba(245, 158, 11, 0.3); }
.dark .mg-banner--info { background: rgba(59, 130, 246, 0.12); color: var(--info-200); border-color: rgba(59, 130, 246, 0.3); }

/* Sign-up: what you agree to, and who is asking (customer auth pages). */
.mg-trust { margin: 0 0 0.5rem; padding: 1rem 1.1rem; border-radius: 0.75rem; background: var(--success-50); border: 1px solid var(--success-200); }
.mg-trust__heading { margin: 0 0 0.6rem; font-size: 0.875rem; font-weight: 700; color: var(--success-800); }
.mg-trust__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.45rem; }
.mg-trust__list li { display: flex; gap: 0.5rem; align-items: flex-start; font-size: 0.8125rem; line-height: 1.4; color: var(--gray-800); }
.mg-trust__list svg { width: 1.05rem; height: 1.05rem; flex-shrink: 0; margin-top: 0.05rem; color: var(--success-600); }
.mg-operator { margin-top: 0.75rem; text-align: center; font-size: 0.75rem; line-height: 1.5; color: var(--gray-500); }
.mg-operator p { margin: 0.15rem 0; }
.mg-operator a { color: var(--primary-600); text-decoration: underline; text-underline-offset: 2px; }
.dark .mg-trust { background: rgba(22, 163, 74, 0.08); border-color: rgba(22, 163, 74, 0.3); }
.dark .mg-trust__heading { color: var(--success-200); }
.dark .mg-trust__list li { color: var(--gray-200); }
.dark .mg-operator { color: var(--gray-400); }

/* Dashboard zone heading between widget rows (results above, machinery below). */
.mg-zone { padding-top: 0.75rem; border-top: 1px solid var(--gray-200); }
.mg-zone__title { margin: 0; font-size: 1rem; line-height: 1.5rem; font-weight: 600; color: var(--gray-950); }
.mg-zone__hint { margin: 0.125rem 0 0; font-size: 0.875rem; color: var(--gray-500); }
.fi-wi-widget:first-child .mg-zone { border-top: 0; padding-top: 0; }
.dark .mg-zone { border-color: rgba(255, 255, 255, 0.1); }
.dark .mg-zone__title { color: #fff; }
.dark .mg-zone__hint { color: var(--gray-400); }

/* ---------------------------------------------------------------------------
   Layout helpers
   --------------------------------------------------------------------------- */

/* minmax(0, 1fr): a wide table inside may scroll, never widen the stack and the page. */
.mg-stack { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.5rem; }
/* Tab bars inside a stack or row wrap onto a second line instead of scrolling sideways. */
.mg-stack > .fi-tabs, .mg-row > .fi-tabs, .mg-field > .fi-tabs { flex-wrap: wrap; row-gap: 0.25rem; overflow-x: visible; }
.mg-stack--tight { gap: 0.75rem; }
.mg-stack--xs { gap: 0.375rem; }
.mg-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; }
.mg-row--between { justify-content: space-between; }
.mg-row--start { align-items: flex-start; }
.mg-row--end { justify-content: flex-end; }
.mg-row--baseline { align-items: baseline; }
.mg-row--nowrap { flex-wrap: nowrap; }
.mg-row--tight { gap: 0.375rem; }
.mg-grow { flex: 1 1 auto; min-width: 0; }
.mg-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; }
.mg-grid { display: grid; gap: 1.5rem; grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 768px) {
    .mg-grid--2, .mg-grid--3, .mg-grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .mg-grid--1-2 { grid-template-columns: minmax(14rem, 1fr) minmax(0, 2fr); }
    .mg-grid--2-1 { grid-template-columns: minmax(0, 2fr) minmax(14rem, 1fr); }
}
@media (min-width: 1280px) {
    .mg-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .mg-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.mg-grid--stretch { align-items: stretch; }
.mg-grid--tight { gap: 0.75rem; }
.mg-span-2 { grid-column: span 2; }
@media (max-width: 767px) { .mg-span-2 { grid-column: span 1; } }
.mg-center { display: flex; align-items: center; justify-content: center; height: 100%; }
.mg-text-center { text-align: center; }
.mg-narrow { max-width: 42rem; }
.mg-hidden { display: none; }

/* ---------------------------------------------------------------------------
   Text helpers
   --------------------------------------------------------------------------- */

.mg-muted { color: var(--gray-500); }
.mg-small { font-size: 0.75rem; line-height: 1rem; }
.mg-text { font-size: 0.875rem; line-height: 1.5rem; color: var(--gray-700); }
.mg-strong { font-weight: 600; color: var(--gray-950); }
.mg-mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.8125rem; }
.mg-break { overflow-wrap: anywhere; }
.mg-nowrap { white-space: nowrap; }
.mg-num { text-align: end; font-variant-numeric: tabular-nums; }
.mg-tabular { font-variant-numeric: tabular-nums; }
.mg-prose { font-size: 0.875rem; line-height: 1.5rem; color: var(--gray-700); display: grid; gap: 0.5rem; }
.mg-prose strong { color: var(--gray-950); }
.mg-list { list-style: disc; padding-inline-start: 1.25rem; font-size: 0.875rem; line-height: 1.5rem; color: var(--gray-700); display: grid; gap: 0.25rem; }
.mg-message { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 0.875rem; line-height: 1.6; color: var(--gray-700); }
.mg-divided > * + * { border-top: 1px solid var(--gray-200); padding-top: 0.75rem; margin-top: 0.75rem; }
.mg-success { color: var(--success-600); }
.mg-warning { color: var(--warning-600); }
.mg-danger { color: var(--danger-600); }
.mg-info { color: var(--info-600); }
.mg-primary { color: var(--primary-600); }
/* A heading inside a section or panel (h3/h4), one step below the section heading. */
.mg-heading { margin: 0; font-size: 0.875rem; line-height: 1.25rem; font-weight: 600; color: var(--gray-950); }
.mg-heading--lg { font-size: 1rem; line-height: 1.5rem; }
.dark .mg-heading { color: #fff; }
/* Inline link in running text or a table cell; standalone links use <x-filament::link>. */
.mg-link { color: var(--primary-600); font-weight: 500; text-decoration: none; background: none; border: 0; padding: 0; font-family: inherit; font-size: inherit; line-height: inherit; cursor: pointer; }
.mg-link:hover { text-decoration: underline; }
.mg-link:disabled { color: var(--gray-400); cursor: not-allowed; text-decoration: none; }
.dark .mg-muted { color: var(--gray-400); }
.dark .mg-text, .dark .mg-prose, .dark .mg-list, .dark .mg-message { color: var(--gray-300); }
.dark .mg-strong, .dark .mg-prose strong { color: #fff; }
.dark .mg-divided > * + * { border-color: rgba(255, 255, 255, 0.1); }
.dark .mg-success { color: var(--success-400); }
.dark .mg-warning { color: var(--warning-400); }
.dark .mg-danger { color: var(--danger-400); }
.dark .mg-info { color: var(--info-400); }
.dark .mg-primary, .dark .mg-link { color: var(--primary-400); }

/* ---------------------------------------------------------------------------
   x-manage.stat — one figure with a label, an optional hint and an optional trend
   --------------------------------------------------------------------------- */

.mg-stat {
    display: block;
    min-width: 0;
    padding: 1rem 1.25rem;
    border-radius: 0.75rem;
    background: #fff;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05), 0 0 0 1px color-mix(in oklab, var(--gray-950) 5%, transparent);
    text-decoration: none;
    color: inherit;
}
.dark .mg-stat { background: var(--gray-900); box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1); }
a.mg-stat:hover { box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05), 0 0 0 1px var(--primary-500); }
.mg-stat__label { font-size: 0.875rem; font-weight: 500; color: var(--gray-500); }
.mg-stat__value { margin-top: 0.25rem; font-size: 1.5rem; line-height: 2rem; font-weight: 600; letter-spacing: -0.025em; color: var(--gray-950); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.mg-stat__hint { margin-top: 0.25rem; font-size: 0.75rem; line-height: 1rem; color: var(--gray-500); }
.mg-stat__value--empty, .mg-stat--lg .mg-stat__value--empty { font-size: 1.125rem; line-height: 2rem; font-weight: 500; color: var(--gray-400); letter-spacing: 0; }
.mg-stat--sm .mg-stat__value { font-size: 1.125rem; line-height: 1.75rem; }
.mg-stat--lg .mg-stat__value { font-size: 2rem; line-height: 2.5rem; }
.mg-stat--primary .mg-stat__value { color: var(--primary-600); }
.mg-stat--success .mg-stat__value { color: var(--success-600); }
.mg-stat--warning .mg-stat__value { color: var(--warning-600); }
.mg-stat--danger .mg-stat__value { color: var(--danger-600); }
.mg-stat--info .mg-stat__value { color: var(--info-600); }
.mg-stat--flat { box-shadow: none; background: var(--gray-50); }
.dark .mg-stat__label, .dark .mg-stat__hint { color: var(--gray-400); }
.dark .mg-stat__value { color: #fff; }
.dark .mg-stat__value--empty { color: var(--gray-500); }
.dark .mg-stat--primary .mg-stat__value { color: var(--primary-400); }
.dark .mg-stat--success .mg-stat__value { color: var(--success-400); }
.dark .mg-stat--warning .mg-stat__value { color: var(--warning-400); }
.dark .mg-stat--danger .mg-stat__value { color: var(--danger-400); }
.dark .mg-stat--info .mg-stat__value { color: var(--info-400); }
.dark .mg-stat--flat { background: rgba(255, 255, 255, 0.05); box-shadow: none; }

/* x-manage.trend — movement under a figure: colour says whether it is good, the icon says
   which way, so it also reads for someone who does not distinguish colours. */
.mg-trend { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem; margin-top: 0.375rem; font-size: 0.8125rem; line-height: 1.25rem; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--gray-500); }
.mg-trend__icon { width: 1rem; height: 1rem; flex: none; }
.mg-trend--up { color: var(--success-600); }
.mg-trend--down { color: var(--danger-600); }
.mg-trend__period { font-weight: 400; color: var(--gray-500); }
.dark .mg-trend { color: var(--gray-400); }
.dark .mg-trend--up { color: var(--success-400); }
.dark .mg-trend--down { color: var(--danger-400); }
.dark .mg-trend__period { color: var(--gray-400); }

/* ---------------------------------------------------------------------------
   x-manage.dl — label/value pairs
   --------------------------------------------------------------------------- */

.mg-dl { display: grid; grid-template-columns: minmax(0, max-content) minmax(0, 1fr); gap: 0.5rem 1.5rem; font-size: 0.875rem; line-height: 1.25rem; margin: 0; }
.mg-dl > div { display: contents; }
.mg-dl dt { font-weight: 500; color: var(--gray-500); }
.mg-dl dd { margin: 0; color: var(--gray-950); overflow-wrap: anywhere; min-width: 0; }
.mg-dl--wide { grid-template-columns: minmax(0, 12rem) minmax(0, 1fr); }
/* Stacked: label above value, several pairs side by side. */
.mg-dl--stacked { display: grid; grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr)); gap: 0.75rem 1rem; }
.mg-dl--stacked > div { display: block; min-width: 0; }
.mg-dl--stacked dt { font-size: 0.75rem; line-height: 1rem; }
.mg-dl--stacked dd { margin-top: 0.125rem; font-weight: 600; }
@media (max-width: 640px) { .mg-dl:not(.mg-dl--stacked) { grid-template-columns: minmax(0, 1fr); gap: 0.125rem 0; } .mg-dl:not(.mg-dl--stacked) > div + div { margin-top: 0.5rem; } }
.dark .mg-dl dt { color: var(--gray-400); }
.dark .mg-dl dd { color: var(--gray-200); }

/* ---------------------------------------------------------------------------
   x-manage.table — a plain table in Filament's table style
   --------------------------------------------------------------------------- */

.mg-table-wrap { max-width: 100%; overflow-x: auto; border-radius: 0.5rem; box-shadow: 0 0 0 1px color-mix(in oklab, var(--gray-950) 5%, transparent); overscroll-behavior-x: contain; }
.mg-table-wrap--scroll { max-height: 70vh; overflow: auto; }
.mg-table { width: 100%; border-collapse: collapse; font-size: 0.875rem; line-height: 1.25rem; }
.mg-table th { padding: 0.625rem 0.75rem; text-align: start; font-weight: 600; color: var(--gray-950); background: var(--gray-50); border-bottom: 1px solid var(--gray-200); white-space: nowrap; }
.mg-table td { padding: 0.625rem 0.75rem; vertical-align: top; color: var(--gray-700); border-bottom: 1px solid var(--gray-200); }
.mg-table tbody tr:last-child td { border-bottom: 0; }
.mg-table tbody tr:hover td { background: var(--gray-50); }
.mg-table--compact th, .mg-table--compact td { padding: 0.375rem 0.5rem; }
.mg-table--middle td { vertical-align: middle; }
.mg-table--sticky thead th { position: sticky; top: 0; z-index: 1; }
.mg-table tr.mg-row--muted td { color: var(--gray-400); }
/* A badge never shortens to "M…" because the browser squeezed its column: it sets the column's minimum width. */
.mg-table .fi-badge { white-space: nowrap; }
.mg-table .fi-badge-label { overflow: visible; text-overflow: clip; }
.mg-table tr.mg-row--own td { background: var(--primary-50); }
.mg-table tr.mg-row--selected td { background: var(--success-50); }
.mg-table tr.mg-row--locked td { background: var(--gray-50); color: var(--gray-500); }
.mg-table tr.mg-row--total td { border-top: 2px solid var(--gray-300); font-weight: 600; color: var(--gray-950); }
.mg-table tr.mg-row--group td { background: var(--gray-50); font-weight: 600; color: var(--gray-950); }
.mg-table tr.mg-row--danger td { background: var(--danger-50); }
.mg-table tr.mg-row--warning td { background: var(--warning-50); }
.mg-table .mg-media { min-width: 14rem; }
.mg-table td.mg-check-cell, .mg-table th.mg-check-cell { width: 2rem; }
.dark .mg-table-wrap { box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1); }
.dark .mg-table th { color: #fff; background: var(--gray-900); border-color: rgba(255, 255, 255, 0.1); }
.dark .mg-table td { color: var(--gray-300); border-color: rgba(255, 255, 255, 0.1); }
.dark .mg-table tbody tr:hover td { background: rgba(255, 255, 255, 0.05); }
.dark .mg-table tr.mg-row--muted td { color: var(--gray-500); }
.dark .mg-table tr.mg-row--own td { background: rgba(59, 130, 246, 0.12); }
.dark .mg-table tr.mg-row--selected td { background: rgba(22, 163, 74, 0.12); }
.dark .mg-table tr.mg-row--locked td { background: rgba(255, 255, 255, 0.03); color: var(--gray-500); }
.dark .mg-table tr.mg-row--total td { border-color: rgba(255, 255, 255, 0.3); color: #fff; }
.dark .mg-table tr.mg-row--group td { background: rgba(255, 255, 255, 0.05); color: #fff; }
.dark .mg-table tr.mg-row--danger td { background: rgba(239, 68, 68, 0.1); }
.dark .mg-table tr.mg-row--warning td { background: rgba(245, 158, 11, 0.1); }

/* ---------------------------------------------------------------------------
   x-manage.checks / x-manage.check — rows with a status icon
   --------------------------------------------------------------------------- */

.mg-checks { display: grid; gap: 0.5rem; list-style: none; margin: 0; padding: 0; }
.mg-check { display: flex; align-items: flex-start; gap: 0.75rem; padding: 0.625rem 0.75rem; border-radius: 0.5rem; background: var(--gray-50); }
.mg-check__icon { flex: none; width: 1.25rem; height: 1.25rem; margin-top: 0.0625rem; color: var(--gray-400); }
.mg-check--ok .mg-check__icon { color: var(--success-600); }
.mg-check--warn .mg-check__icon { color: var(--warning-600); }
.mg-check--fail .mg-check__icon { color: var(--danger-600); }
.mg-check--info .mg-check__icon { color: var(--info-600); }
.mg-check__body { min-width: 0; flex: 1 1 auto; }
.mg-check__label { font-size: 0.875rem; font-weight: 500; line-height: 1.25rem; color: var(--gray-950); }
.mg-check__detail { margin-top: 0.125rem; font-size: 0.75rem; line-height: 1rem; color: var(--gray-500); overflow-wrap: anywhere; }
.mg-check__value { flex: none; max-width: 40%; font-size: 0.75rem; line-height: 1.25rem; color: var(--gray-500); text-align: end; overflow-wrap: anywhere; }
.dark .mg-check { background: rgba(255, 255, 255, 0.05); }
.dark .mg-check__label { color: #fff; }
.dark .mg-check__detail, .dark .mg-check__value { color: var(--gray-400); }
.dark .mg-check--ok .mg-check__icon { color: var(--success-400); }
.dark .mg-check--warn .mg-check__icon { color: var(--warning-400); }
.dark .mg-check--fail .mg-check__icon { color: var(--danger-400); }
.dark .mg-check--info .mg-check__icon { color: var(--info-400); }

/* ---------------------------------------------------------------------------
   x-manage.field — label, control, hint and error for Livewire pages without a Filament form
   --------------------------------------------------------------------------- */

.mg-field { display: grid; gap: 0.375rem; min-width: 0; }
.mg-field__label { font-size: 0.875rem; font-weight: 500; line-height: 1.25rem; color: var(--gray-950); }
.mg-field__hint { font-size: 0.75rem; line-height: 1rem; color: var(--gray-500); }
.mg-field__error { font-size: 0.75rem; line-height: 1rem; color: var(--danger-600); }
.mg-field--narrow { max-width: 24rem; }
.mg-field--xs { max-width: 9rem; }
.mg-field--inline { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.mg-choice { display: inline-flex; align-items: center; gap: 0.5rem; font-size: 0.875rem; color: var(--gray-950); cursor: pointer; }
.mg-choice--block { display: flex; align-items: flex-start; line-height: 1.25rem; }
.mg-choice--block .fi-checkbox-input { margin-top: 0.125rem; }
.mg-fields { display: grid; gap: 1rem; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 768px) { .mg-fields--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .mg-fields--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .mg-fields--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.mg-fields--row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 0.75rem; }
.mg-fields--row > * { flex: 1 1 10rem; }
.fi-input-wrp textarea.fi-input { min-height: 7rem; resize: vertical; line-height: 1.5; }
.mg-file { display: block; width: 100%; font-size: 0.875rem; color: var(--gray-700); }
.mg-file::file-selector-button { margin-inline-end: 0.75rem; padding: 0.375rem 0.75rem; border: 1px solid var(--gray-300); border-radius: 0.5rem; background: #fff; font: inherit; font-size: 0.875rem; font-weight: 600; color: var(--gray-950); cursor: pointer; }
.mg-file::file-selector-button:hover { background: var(--gray-50); }
.dark .mg-field__label, .dark .mg-choice { color: #fff; }
.dark .mg-field__hint { color: var(--gray-400); }
.dark .mg-field__error { color: var(--danger-400); }
.dark .mg-file { color: var(--gray-300); }
.dark .mg-file::file-selector-button { background: var(--gray-900); border-color: rgba(255, 255, 255, 0.2); color: #fff; }

/* ---------------------------------------------------------------------------
   x-manage.gauge, x-manage.chart, x-manage.sparkline, x-manage.bar
   --------------------------------------------------------------------------- */

.mg-gauge { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 0.125rem; }
.mg-gauge__dial { display: grid; place-items: center; }
.mg-gauge__svg, .mg-gauge__value { grid-area: 1 / 1; }
.mg-gauge__svg { display: block; transform: rotate(-90deg); }
.mg-gauge__track { stroke: var(--gray-200); }
.mg-gauge__arc { stroke: var(--primary-600); transition: stroke-dashoffset 0.4s ease; }
.mg-gauge--success .mg-gauge__arc { stroke: var(--success-600); }
.mg-gauge--warning .mg-gauge__arc { stroke: var(--warning-600); }
.mg-gauge--danger .mg-gauge__arc { stroke: var(--danger-600); }
.mg-gauge--gray .mg-gauge__arc { stroke: var(--gray-400); }
.mg-gauge__value { font-size: 1.5rem; font-weight: 700; letter-spacing: -0.025em; color: var(--gray-950); font-variant-numeric: tabular-nums; }
.mg-gauge--sm .mg-gauge__value { font-size: 1rem; }
.mg-gauge__label { margin-top: 0.375rem; font-size: 0.875rem; font-weight: 600; color: var(--gray-950); }
.mg-gauge__sublabel { font-size: 0.75rem; line-height: 1rem; color: var(--gray-500); }
.dark .mg-gauge__track { stroke: rgba(255, 255, 255, 0.1); }
.dark .mg-gauge__value, .dark .mg-gauge__label { color: #fff; }
.dark .mg-gauge__sublabel { color: var(--gray-400); }
.dark .mg-gauge--success .mg-gauge__arc { stroke: var(--success-400); }
.dark .mg-gauge--warning .mg-gauge__arc { stroke: var(--warning-400); }
.dark .mg-gauge--danger .mg-gauge__arc { stroke: var(--danger-400); }

.mg-chart { min-width: 0; }
.mg-chart__title { margin: 0 0 0.75rem; font-size: 0.875rem; font-weight: 600; color: var(--gray-950); }
.mg-chart__canvas { position: relative; height: 13.75rem; }
.mg-chart__canvas--sm { height: 11.25rem; }
.mg-chart__canvas--lg { height: 17.5rem; }
.dark .mg-chart__title { color: #fff; }

.mg-sparkline { position: relative; height: 3rem; width: 100%; min-width: 6rem; }

/* A share or progress as a thin bar: <progress>, so the fill needs no inline width. */
.mg-bar { -webkit-appearance: none; appearance: none; display: block; width: 100%; height: 0.5rem; border: 0; border-radius: 9999px; overflow: hidden; background: var(--gray-200); color: var(--primary-600); vertical-align: middle; }
.mg-bar::-webkit-progress-bar { background: transparent; }
.mg-bar::-webkit-progress-value { background: currentColor; border-radius: 9999px; transition: width 0.3s ease; }
.mg-bar::-moz-progress-bar { background: currentColor; border-radius: 9999px; }
.mg-bar--sm { height: 0.375rem; }
.mg-bar--success { color: var(--success-600); }
.mg-bar--warning { color: var(--warning-600); }
.mg-bar--danger { color: var(--danger-600); }
.mg-bar--gray { color: var(--gray-400); }
.mg-bar--inline { display: inline-block; width: 3.5rem; margin-inline-end: 0.375rem; }
.dark .mg-bar { background: rgba(255, 255, 255, 0.1); }

/* ---------------------------------------------------------------------------
   x-manage.tile — a selectable count card (filters by category or reason)
   --------------------------------------------------------------------------- */

.mg-tiles { display: grid; gap: 0.75rem; grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr)); }
.mg-tiles--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 640px) { .mg-tiles--3 { grid-template-columns: minmax(0, 1fr); } }
.mg-tile {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.125rem;
    min-width: 0;
    padding: 0.875rem 1rem;
    border: 0;
    border-radius: 0.75rem;
    background: #fff;
    box-shadow: 0 0 0 1px color-mix(in oklab, var(--gray-950) 5%, transparent);
    text-align: start;
    text-decoration: none;
    color: inherit;
    font: inherit;
    cursor: pointer;
}
.mg-tile:hover { box-shadow: 0 0 0 1px var(--primary-500); }
.mg-tile--active { box-shadow: 0 0 0 2px var(--primary-600); background: var(--primary-50); }
.mg-tile--static { cursor: default; }
.mg-tile--static:hover { box-shadow: 0 0 0 1px color-mix(in oklab, var(--gray-950) 5%, transparent); }
.mg-tile__icon { width: 1.25rem; height: 1.25rem; color: var(--gray-400); margin-bottom: 0.25rem; }
.mg-tile--active .mg-tile__icon { color: var(--primary-600); }
.mg-tile__count { font-size: 1.5rem; line-height: 2rem; font-weight: 600; letter-spacing: -0.025em; font-variant-numeric: tabular-nums; color: var(--gray-950); }
.mg-tile__label { font-size: 0.875rem; line-height: 1.25rem; font-weight: 500; color: var(--gray-700); }
.mg-tile__sub { font-size: 0.75rem; line-height: 1rem; color: var(--gray-500); }
.mg-tile--success .mg-tile__count { color: var(--success-600); }
.mg-tile--warning .mg-tile__count { color: var(--warning-600); }
.mg-tile--danger .mg-tile__count { color: var(--danger-600); }
.mg-tile--primary .mg-tile__count { color: var(--primary-600); }
.mg-tile--gray .mg-tile__count { color: var(--gray-500); }
.dark .mg-tile { background: var(--gray-900); box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1); }
.dark .mg-tile--active { background: rgba(59, 130, 246, 0.12); box-shadow: 0 0 0 2px var(--primary-500); }
.dark .mg-tile--static:hover { box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1); }
.dark .mg-tile__count { color: #fff; }
.dark .mg-tile__label { color: var(--gray-200); }
.dark .mg-tile__sub { color: var(--gray-400); }
.dark .mg-tile--success .mg-tile__count { color: var(--success-400); }
.dark .mg-tile--warning .mg-tile__count { color: var(--warning-400); }
.dark .mg-tile--danger .mg-tile__count { color: var(--danger-400); }
.dark .mg-tile--primary .mg-tile__count { color: var(--primary-400); }

/* ---------------------------------------------------------------------------
   x-manage.thumb and media rows (product image next to title and EAN)
   --------------------------------------------------------------------------- */

.mg-thumb { display: block; flex: none; width: 2.5rem; height: 2.5rem; object-fit: contain; border-radius: 0.375rem; background: #fff; box-shadow: 0 0 0 1px color-mix(in oklab, var(--gray-950) 10%, transparent); }
.mg-thumb--lg { width: 3.5rem; height: 3.5rem; }
.mg-thumb--empty { background: var(--gray-100); box-shadow: none; }
.mg-media { display: flex; align-items: center; gap: 0.75rem; min-width: 0; }
.mg-media__body { min-width: 0; flex: 1 1 auto; }
.dark .mg-thumb--empty { background: rgba(255, 255, 255, 0.08); }

/* ---------------------------------------------------------------------------
   Hero — a page or record introduction: eyebrow, title, text, optional image and meta
   --------------------------------------------------------------------------- */

.mg-hero { display: grid; gap: 1.5rem; }
@media (min-width: 768px) { .mg-hero--media { grid-template-columns: 14rem minmax(0, 1fr); align-items: start; } }
.mg-hero__image { display: block; width: 100%; max-width: 14rem; max-height: 14rem; object-fit: contain; border-radius: 0.75rem; background: #fff; box-shadow: 0 0 0 1px color-mix(in oklab, var(--gray-950) 10%, transparent); }
.mg-hero__placeholder { display: flex; align-items: center; justify-content: center; min-height: 10rem; padding: 1rem; border-radius: 0.75rem; border: 1px dashed var(--gray-300); color: var(--gray-500); font-size: 0.875rem; text-align: center; }
.mg-hero__eyebrow { margin: 0; font-size: 0.75rem; line-height: 1rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--primary-600); }
.mg-hero__title { margin: 0.25rem 0 0; font-size: 1.5rem; line-height: 2rem; font-weight: 700; letter-spacing: -0.025em; color: var(--gray-950); overflow-wrap: anywhere; }
.mg-hero__subtitle { margin: 0.5rem 0 0; font-size: 0.9375rem; line-height: 1.5; color: var(--gray-500); }
.mg-hero__text { margin: 0.75rem 0 0; max-width: 42rem; font-size: 1rem; line-height: 1.6; color: var(--gray-600); }
.mg-hero__meta { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1rem; }
.mg-hero__actions { margin-top: 1.25rem; }
.mg-hero--center { text-align: center; }
.mg-hero--center .mg-hero__text { margin-inline: auto; }
.mg-hero--center .mg-hero__meta, .mg-hero--center .mg-hero__actions { justify-content: center; }
.dark .mg-hero__eyebrow { color: var(--primary-400); }
.dark .mg-hero__title { color: #fff; }
.dark .mg-hero__subtitle, .dark .mg-hero__text { color: var(--gray-400); }
.dark .mg-hero__placeholder { border-color: rgba(255, 255, 255, 0.2); color: var(--gray-400); }

/* ---------------------------------------------------------------------------
   Steps — a numbered checklist (onboarding), as rows or as cards
   --------------------------------------------------------------------------- */

.mg-steps { list-style: none; margin: 0; padding: 0; display: grid; }
.mg-step { display: flex; gap: 0.875rem; padding: 0.875rem 0; border-top: 1px solid var(--gray-200); }
.mg-step:first-child { border-top: 0; padding-top: 0; }
.mg-step:last-child { padding-bottom: 0; }
.mg-step__num { flex: none; display: flex; align-items: center; justify-content: center; width: 1.75rem; height: 1.75rem; border-radius: 9999px; background: var(--gray-100); color: var(--gray-500); font-size: 0.75rem; font-weight: 700; }
.mg-step__num .fi-icon { width: 1rem; height: 1rem; }
.mg-step--done .mg-step__num { background: var(--success-50); color: var(--success-600); }
.mg-step--active .mg-step__num { background: var(--primary-600); color: #fff; }
.mg-step__body { min-width: 0; flex: 1 1 auto; display: grid; gap: 0.25rem; justify-items: start; }
.mg-step__title { font-size: 0.875rem; line-height: 1.25rem; font-weight: 600; color: var(--gray-950); }
.mg-step__desc { font-size: 0.75rem; line-height: 1rem; color: var(--gray-500); }
.mg-steps--cards { grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); gap: 1rem; }
.mg-steps--cards .mg-step { flex-direction: column; align-items: center; text-align: center; padding: 1.25rem; border: 0; border-radius: 0.75rem; background: var(--gray-50); }
.mg-steps--cards .mg-step__body { justify-items: center; }
.mg-steps--cards .mg-step--active { background: #fff; box-shadow: 0 0 0 2px var(--primary-600); }
.mg-steps--cards .mg-step--done { background: var(--success-50); }
.dark .mg-step { border-color: rgba(255, 255, 255, 0.1); }
.dark .mg-step__num { background: rgba(255, 255, 255, 0.1); color: var(--gray-300); }
.dark .mg-step--done .mg-step__num { background: rgba(22, 163, 74, 0.2); color: var(--success-400); }
.dark .mg-step--active .mg-step__num { background: var(--primary-500); color: #fff; }
.dark .mg-step__title { color: #fff; }
.dark .mg-step__desc { color: var(--gray-400); }
.dark .mg-steps--cards .mg-step { background: rgba(255, 255, 255, 0.05); }
.dark .mg-steps--cards .mg-step--active { background: var(--gray-900); box-shadow: 0 0 0 2px var(--primary-500); }
.dark .mg-steps--cards .mg-step--done { background: rgba(22, 163, 74, 0.12); }

/* ---------------------------------------------------------------------------
   Timeline (product activity)
   --------------------------------------------------------------------------- */

.mg-timeline { list-style: none; margin: 0; padding: 0; display: grid; }
.mg-timeline__item { position: relative; display: flex; gap: 0.75rem; padding-bottom: 1rem; }
.mg-timeline__item:last-child { padding-bottom: 0; }
.mg-timeline__item:not(:last-child)::before { content: ''; position: absolute; left: 0.4375rem; top: 1rem; bottom: 0; width: 2px; background: var(--gray-200); }
.mg-timeline__dot { flex: none; width: 1rem; height: 1rem; margin-top: 0.125rem; border-radius: 9999px; background: var(--gray-400); }
.mg-timeline__item--success .mg-timeline__dot { background: var(--success-600); }
.mg-timeline__item--info .mg-timeline__dot, .mg-timeline__item--primary .mg-timeline__dot { background: var(--primary-600); }
.mg-timeline__item--warning .mg-timeline__dot { background: var(--warning-600); }
.mg-timeline__item--danger .mg-timeline__dot { background: var(--danger-600); }
.mg-timeline__body { min-width: 0; }
.mg-timeline__title { margin: 0; font-size: 0.875rem; line-height: 1.25rem; font-weight: 500; color: var(--gray-950); }
.mg-timeline__time { margin: 0.125rem 0 0; font-size: 0.75rem; line-height: 1rem; color: var(--gray-500); }
.dark .mg-timeline__item:not(:last-child)::before { background: rgba(255, 255, 255, 0.1); }
.dark .mg-timeline__title { color: #fff; }
.dark .mg-timeline__time { color: var(--gray-400); }

/* ---------------------------------------------------------------------------
   Locked content — a plan does not include it, or the product is not managed
   --------------------------------------------------------------------------- */

.mg-locked { display: grid; gap: 0.75rem; padding: 1rem 1.25rem; border-radius: 0.75rem; background: var(--gray-50); }
.mg-locked__hint { margin: 0; font-size: 0.875rem; line-height: 1.25rem; color: var(--gray-700); }
.mg-locked__cta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; }
.mg-locked-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem 1.5rem; padding: 0.75rem 1rem; border-radius: 0.5rem; background: var(--gray-50); }
.mg-locked-row__main { min-width: 0; flex: 1 1 16rem; }
.mg-locked-row__title { font-size: 0.875rem; font-weight: 600; color: var(--gray-950); }
.mg-locked-row__meta { font-size: 0.8125rem; color: var(--gray-500); }
.mg-locked-row__hint { margin: 0.25rem 0 0; font-size: 0.8125rem; color: var(--gray-500); }
.mg-skeletons { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.mg-skeletons--rows { display: grid; }
.mg-skeleton { display: block; height: 0.75rem; width: 100%; border-radius: 9999px; background: linear-gradient(90deg, var(--gray-200) 0%, var(--gray-100) 50%, var(--gray-200) 100%); background-size: 200% 100%; animation: mg-shimmer 1.6s linear infinite; }
.mg-skeleton--inline { width: 4.5rem; height: 0.625rem; }
.mg-skeleton--wide { width: 70%; }
.mg-skeleton--inline.mg-skeleton--wide { width: 7rem; }
@keyframes mg-shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .mg-skeleton { animation: none; } }
.mg-lock-hint { display: inline-flex; align-items: center; gap: 0.25rem; font-size: 0.8125rem; color: var(--gray-500); text-decoration: none; }
.mg-lock-hint:hover { color: var(--gray-950); }
.mg-lock-hint .fi-icon { width: 0.875rem; height: 0.875rem; }
.dark .mg-locked, .dark .mg-locked-row { background: rgba(255, 255, 255, 0.05); }
.dark .mg-locked__hint { color: var(--gray-300); }
.dark .mg-locked-row__title { color: #fff; }
.dark .mg-locked-row__meta, .dark .mg-locked-row__hint, .dark .mg-lock-hint { color: var(--gray-400); }
.dark .mg-lock-hint:hover { color: #fff; }
.dark .mg-skeleton { background-image: linear-gradient(90deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.18) 50%, rgba(255, 255, 255, 0.1) 100%); }

/* ---------------------------------------------------------------------------
   Plan cards (plan picker)
   --------------------------------------------------------------------------- */

.mg-plans { display: grid; gap: 1rem; grid-template-columns: minmax(0, 1fr); padding-top: 0.75rem; }
@media (min-width: 640px) { .mg-plans { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1280px) { .mg-plans { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.mg-plan { position: relative; display: flex; flex-direction: column; min-width: 0; padding: 1.5rem 1.25rem 1.25rem; border-radius: 0.75rem; background: #fff; box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05), 0 0 0 1px color-mix(in oklab, var(--gray-950) 5%, transparent); }
.mg-plan--featured { box-shadow: 0 0 0 2px var(--primary-600), 0 4px 20px rgba(0, 102, 204, 0.12); }
.mg-plan__badge { position: absolute; top: -0.75rem; left: 50%; transform: translateX(-50%); white-space: nowrap; }
.mg-plan__name { margin: 0; font-size: 1.125rem; line-height: 1.75rem; font-weight: 700; color: var(--gray-950); }
.mg-plan__desc { margin: 0.375rem 0 0; min-height: 2.5rem; font-size: 0.8125rem; line-height: 1.25rem; color: var(--gray-500); }
.mg-plan__price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.25rem; padding: 1rem 0; margin: 1rem 0; border-top: 1px solid var(--gray-200); border-bottom: 1px solid var(--gray-200); }
.mg-plan__amount { font-size: 2rem; line-height: 1.2; font-weight: 700; letter-spacing: -0.035em; color: var(--gray-950); font-variant-numeric: tabular-nums; }
.mg-plan__period { font-size: 0.8125rem; color: var(--gray-500); }
.mg-plan__billed { flex-basis: 100%; }
.mg-plan__limits { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem; margin: 0 0 1.25rem; padding: 0.875rem; border-radius: 0.5rem; background: var(--gray-50); }
.mg-plan__limits > div:first-child { grid-column: 1 / -1; }
.mg-plan__limits dt { font-size: 0.75rem; line-height: 1rem; color: var(--gray-500); }
.mg-plan__limits dd { margin: 0.125rem 0 0; font-size: 0.9375rem; font-weight: 600; color: var(--gray-950); }
.mg-plan__features { list-style: none; margin: 0 0 1.25rem; padding: 0; flex: 1; display: grid; gap: 0.5rem; align-content: start; }
.mg-plan__features li { display: flex; gap: 0.5rem; align-items: flex-start; font-size: 0.8125rem; line-height: 1.25rem; color: var(--gray-700); }
.mg-plan__check { flex: none; width: 1.125rem; height: 1.125rem; margin-top: 0.0625rem; color: var(--primary-600); }
.mg-plan__consent { display: flex; gap: 0.5rem; align-items: flex-start; padding-top: 1rem; margin-bottom: 1rem; border-top: 1px solid var(--gray-200); font-size: 0.75rem; line-height: 1.25rem; color: var(--gray-500); cursor: pointer; }
.mg-plan__consent a { color: var(--primary-600); text-decoration: underline; text-underline-offset: 0.15em; }
.mg-plan .fi-btn { width: 100%; white-space: normal; text-align: center; }
.mg-plan .bm-plan-details { margin-bottom: 1rem; }
.dark .mg-plan { background: var(--gray-900); box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1); }
.dark .mg-plan--featured { box-shadow: 0 0 0 2px var(--primary-500); }
.dark .mg-plan__name, .dark .mg-plan__amount, .dark .mg-plan__limits dd { color: #fff; }
.dark .mg-plan__desc, .dark .mg-plan__period, .dark .mg-plan__limits dt, .dark .mg-plan__consent { color: var(--gray-400); }
.dark .mg-plan__price, .dark .mg-plan__consent { border-color: rgba(255, 255, 255, 0.1); }
.dark .mg-plan__limits { background: rgba(255, 255, 255, 0.05); }
.dark .mg-plan__features li { color: var(--gray-300); }
.dark .mg-plan__check, .dark .mg-plan__consent a { color: var(--primary-400); }

/* ---------------------------------------------------------------------------
   x-manage.code, x-manage.log-entry, x-manage.link-card, frames, panels, toolbars
   --------------------------------------------------------------------------- */

.mg-code { display: block; margin: 0; padding: 0.75rem 1rem; border-radius: 0.5rem; background: var(--gray-50); color: var(--gray-950); font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.8125rem; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; overflow-x: auto; }
.mg-code--inline { display: inline; padding: 0.125rem 0.375rem; white-space: normal; }
.mg-code--scroll { max-height: 24rem; overflow: auto; }
.dark .mg-code { background: rgba(255, 255, 255, 0.05); color: var(--gray-200); }

.mg-log { border-radius: 0.5rem; box-shadow: 0 0 0 1px color-mix(in oklab, var(--gray-950) 5%, transparent); overflow: hidden; }
.mg-log > summary { display: flex; align-items: center; gap: 0.75rem; padding: 0.5rem 0.75rem; cursor: pointer; font-size: 0.8125rem; line-height: 1.25rem; color: var(--gray-700); list-style: none; }
.mg-log > summary::-webkit-details-marker { display: none; }
.mg-log[open] > summary { border-bottom: 1px solid var(--gray-200); }
.mg-log__level { flex: none; padding: 0.125rem 0.375rem; border-radius: 0.25rem; font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.05em; background: var(--gray-100); color: var(--gray-700); }
.mg-log--error .mg-log__level, .mg-log--critical .mg-log__level, .mg-log--alert .mg-log__level, .mg-log--emergency .mg-log__level { background: var(--danger-50); color: var(--danger-700); }
.mg-log--warning .mg-log__level { background: var(--warning-50); color: var(--warning-700); }
.mg-log__meta { flex: none; color: var(--gray-500); font-variant-numeric: tabular-nums; }
.mg-log__text { min-width: 0; flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mg-log > .mg-code { border-radius: 0; box-shadow: none; }
.dark .mg-log { box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1); }
.dark .mg-log > summary { color: var(--gray-300); }
.dark .mg-log[open] > summary { border-color: rgba(255, 255, 255, 0.1); }
.dark .mg-log__level { background: rgba(255, 255, 255, 0.1); color: var(--gray-200); }
.dark .mg-log--error .mg-log__level, .dark .mg-log--critical .mg-log__level { background: rgba(239, 68, 68, 0.2); color: var(--danger-300); }
.dark .mg-log--warning .mg-log__level { background: rgba(245, 158, 11, 0.2); color: var(--warning-300); }
.dark .mg-log__meta { color: var(--gray-400); }

a.mg-link-card { display: block; padding: 0.875rem 1rem; border-radius: 0.5rem; box-shadow: 0 0 0 1px color-mix(in oklab, var(--gray-950) 5%, transparent); text-decoration: none; }
a.mg-link-card:hover { box-shadow: 0 0 0 1px var(--primary-500); background: var(--primary-50); }
.mg-link-card__title { font-size: 0.875rem; font-weight: 600; color: var(--gray-950); }
.mg-link-card__desc { margin-top: 0.125rem; font-size: 0.75rem; line-height: 1rem; color: var(--gray-500); }
.dark a.mg-link-card { box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1); }
.dark a.mg-link-card:hover { background: rgba(255, 255, 255, 0.05); box-shadow: 0 0 0 1px var(--primary-400); }
.dark .mg-link-card__title { color: #fff; }
.dark .mg-link-card__desc { color: var(--gray-400); }

.mg-frame { display: block; width: 100%; height: 28rem; margin-top: 0.5rem; border: 1px solid var(--gray-200); border-radius: 0.5rem; background: #fff; }
.dark .mg-frame { border-color: rgba(255, 255, 255, 0.1); }

.mg-panel { padding: 0.75rem 1rem; border-radius: 0.5rem; box-shadow: 0 0 0 1px color-mix(in oklab, var(--gray-950) 5%, transparent); }
.mg-panel--soft { box-shadow: none; background: var(--gray-50); }
.dark .mg-panel { box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1); }
.dark .mg-panel--soft { box-shadow: none; background: rgba(255, 255, 255, 0.05); }

/* A short notice inside a form (e.g. where credentials are asked for). */
.mg-notice { margin: 0; padding: 0.625rem 0.875rem; border-left: 3px solid var(--info-600); border-radius: 0 0.375rem 0.375rem 0; background: var(--gray-50); font-size: 0.8125rem; line-height: 1.5; color: var(--gray-700); }
.dark .mg-notice { background: rgba(255, 255, 255, 0.05); color: var(--gray-300); }

/* Native <details> used as a lightweight disclosure inside a section. */
.mg-disclosure > summary { cursor: pointer; font-size: 0.875rem; font-weight: 500; color: var(--primary-600); }
.mg-disclosure > summary::-webkit-details-marker { color: var(--gray-400); }
.mg-disclosure > :not(summary) { margin-top: 0.75rem; }
.dark .mg-disclosure > summary { color: var(--primary-400); }

/* Sticky action bar under a selectable table (bulk actions). */
.mg-toolbar { position: sticky; bottom: 0; z-index: 2; display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; padding: 0.75rem 1rem; border-radius: 0.5rem; background: #fff; box-shadow: 0 0 0 1px color-mix(in oklab, var(--gray-950) 5%, transparent), 0 -4px 12px rgba(15, 23, 42, 0.06); }
.dark .mg-toolbar { background: var(--gray-900); box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1); }

/* A heroicon next to a title. */
.mg-icon { width: 1.25rem; height: 1.25rem; flex: none; color: var(--primary-600); }
.mg-icon--muted { color: var(--gray-400); }
.dark .mg-icon { color: var(--primary-400); }
.dark .mg-icon--muted { color: var(--gray-500); }

/* Status dot next to a label. */
.mg-dot { display: inline-block; flex: none; width: 0.5rem; height: 0.5rem; border-radius: 9999px; background: var(--gray-400); vertical-align: middle; }
.mg-dot--success { background: var(--success-500); }
.mg-dot--warning { background: var(--warning-500); }
.mg-dot--danger { background: var(--danger-500); }
.mg-dot--info { background: var(--info-500); }
.mg-dot--primary { background: var(--primary-500); }

/* FAQ sections scroll under the sticky top bar. */
.mg-anchor { scroll-margin-top: 5rem; }

/* Audited staff view: visible independently of the current resource page. */
.mg-staff-view { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem; padding: 0.75rem 1.25rem; font-size: 0.875rem; background: var(--warning-50); color: var(--warning-900); border-bottom: 1px solid var(--warning-300); }
.dark .mg-staff-view { background: var(--warning-950); color: var(--warning-100); border-color: var(--warning-800); }

/* Human-reviewed prospect conversations keep their line breaks without loading mail HTML. */
.mg-mail-body { white-space: pre-wrap; overflow-wrap: anywhere; }

/* ---------- Prospect demo: banner variant and the "nothing can be changed" notice ---------- */
.mg-banner--demo .mg-banner__badge { background: var(--info-600); }
.mg-banner__action--demo { background: var(--primary-600); }
.mg-banner__action--demo:hover { background: var(--primary-700); color: #fff; }

.mg-demo-modal { position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center; padding: 1rem; }
.mg-demo-modal[hidden] { display: none; }
.mg-demo-modal__backdrop { position: absolute; inset: 0; background: rgba(15, 23, 42, 0.55); }
.mg-demo-modal__panel { position: relative; width: 100%; max-width: 28rem; padding: 1.5rem; border-radius: 0.75rem; background: #fff; box-shadow: 0 20px 40px rgba(15, 23, 42, 0.25); }
.dark .mg-demo-modal__panel { background: var(--gray-800); color: var(--gray-200); }
.mg-demo-modal__title { margin: 0 0 0.5rem; font-size: 1.125rem; font-weight: 600; }
.mg-demo-modal__body { margin: 0 0 1.25rem; font-size: 0.9375rem; line-height: 1.5; }
.mg-demo-modal__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; }
.mg-demo-modal__cta { display: inline-flex; align-items: center; padding: 0.5rem 1rem; border-radius: 0.5rem; background: var(--primary-600); color: #fff; font-weight: 600; font-size: 0.9375rem; }
.mg-demo-modal__cta:hover { background: var(--primary-700); color: #fff; }
.mg-demo-modal__close { padding: 0.5rem 0.75rem; border-radius: 0.5rem; background: transparent; color: inherit; font-size: 0.9375rem; font-weight: 500; }
.mg-demo-modal__close:hover { background: rgba(15, 23, 42, 0.06); }
.dark .mg-demo-modal__close:hover { background: rgba(255, 255, 255, 0.08); }

/* ---------------------------------------------------------------------------
   Dashboard review 2026-10-22: alignment, hierarchy and calmer cards
   --------------------------------------------------------------------------- */

/* Header actions that wrap under the title stay on the right, where a header's actions belong. */
.fi-header-actions-ctn { margin-inline-start: auto; justify-content: flex-end; }
.fi-header-actions-ctn .fi-ac { justify-content: flex-end; }

/* The selected page in the menu: in dark mode hover and active shared one grey, so the current
   page was indistinguishable from the one under the mouse. */
.fi-sidebar-item.fi-active > .fi-sidebar-item-btn { background: var(--primary-50); box-shadow: inset 3px 0 0 var(--primary-600); }
.fi-sidebar-item.fi-active > .fi-sidebar-item-btn .fi-sidebar-item-label { color: var(--primary-700); font-weight: 600; }
.fi-sidebar-item.fi-active > .fi-sidebar-item-btn .fi-icon { color: var(--primary-600); }
.dark .fi-sidebar-item.fi-active > .fi-sidebar-item-btn { background: color-mix(in oklab, var(--primary-500) 18%, transparent); box-shadow: inset 3px 0 0 var(--primary-400); }
.dark .fi-sidebar-item.fi-active > .fi-sidebar-item-btn .fi-sidebar-item-label { color: var(--primary-300); }
.dark .fi-sidebar-item.fi-active > .fi-sidebar-item-btn .fi-icon { color: var(--primary-400); }

/* A banner above the page and the top bar stack instead of sliding over each other: the top bar
   and the sidebar start below the banner. The banner script keeps --mg-banner-h exact when the
   banner wraps on a narrow screen. */
.fi-body:has(> .mg-banner) { --mg-banner-h: 3rem; }
.fi-body:has(> .mg-banner) > .mg-banner { min-height: var(--mg-banner-h); }
.fi-body:has(> .mg-banner) > .fi-topbar-ctn { top: var(--mg-banner-h); }
@media (min-width: 64rem) {
    .fi-body.fi-body-has-topbar:has(> .mg-banner) .fi-sidebar { top: calc(4rem + var(--mg-banner-h)); height: calc(100dvh - 4rem - var(--mg-banner-h)); }
}
.mg-banner__message { flex: 1; min-width: 0; }

/* Widgets next to each other in a dashboard row are the same height. */
.fi-wi-widget > .fi-section { height: 100%; }

/* A section whose content fills its height: centred (mg-fill) or held at the bottom
   (mg-fill--end, so controls under descriptions of different length line up). */
/* In a Blade view the class sits on the section; in a form schema Filament puts it on the
   wrapper (.fi-sc-section) around it. */
.fi-section.mg-fill, .fi-sc-section.mg-fill { height: 100%; }
:is(.fi-section.mg-fill, .fi-sc-section.mg-fill > .fi-section) { display: flex; flex-direction: column; flex: 1; }
:is(.fi-section.mg-fill, .fi-sc-section.mg-fill > .fi-section) > .fi-section-content-ctn { flex: 1; display: flex; flex-direction: column; }
:is(.fi-section.mg-fill, .fi-sc-section.mg-fill > .fi-section) > .fi-section-content-ctn > .fi-section-content { flex: 1; display: flex; flex-direction: column; justify-content: center; }
/* --end: the header takes the spare height, so the dividers and the controls under them sit at
   the same height in every card of the row. */
:is(.fi-section.mg-fill--end, .fi-sc-section.mg-fill--end > .fi-section) > .fi-section-header { flex: 1; align-items: flex-start; }
:is(.fi-section.mg-fill--end, .fi-sc-section.mg-fill--end > .fi-section) > .fi-section-content-ctn { flex: none; }
.fi-sc-component:has(> .fi-sc-section.mg-fill) { height: 100%; }

/* Tiles: the icon sits next to the count; badges and extras keep their distance from the text
   and line up at the bottom of a row of tiles. */
.mg-tile__head { display: inline-flex; align-items: center; gap: 0.5rem; }
.mg-tile__head .mg-tile__icon { margin-bottom: 0; }
.mg-tile__extra { display: flex; flex-wrap: wrap; gap: 0.375rem; margin-top: auto; padding-top: 0.75rem; }

/* Bands: a short ranked list of counts with a dot and a thin share bar (distance to the buy box). */
.mg-bands { display: grid; gap: 0.125rem; }
.mg-band { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; column-gap: 0.625rem; row-gap: 0.375rem; padding: 0.5rem 0.625rem; margin: 0 -0.625rem; border-radius: 0.5rem; text-decoration: none; color: inherit; }
.mg-band .mg-bar { grid-column: 2 / 4; }
a.mg-band:hover { background: var(--gray-50); }
.dark a.mg-band:hover { background: rgba(255, 255, 255, 0.05); }
.mg-band__label { font-size: 0.875rem; line-height: 1.25rem; color: var(--gray-700); }
.mg-band__count { font-size: 1rem; line-height: 1.5rem; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--gray-950); }
.dark .mg-band__label { color: var(--gray-200); }
.dark .mg-band__count { color: #fff; }
.mg-figure { display: flex; align-items: baseline; flex-wrap: wrap; gap: 0.25rem 0.5rem; }

/* An info icon whose text shows on hover or focus, instead of a paragraph under a heading. */
.mg-tip { display: inline-flex; align-items: center; justify-content: center; width: 1.25rem; height: 1.25rem; border-radius: 9999px; color: var(--gray-400); cursor: help; }
.mg-tip svg { width: 1.125rem; height: 1.125rem; }
.mg-tip:hover, .mg-tip:focus-visible { color: var(--gray-700); outline: none; }
.dark .mg-tip:hover, .dark .mg-tip:focus-visible { color: var(--gray-200); }
th .mg-tip { width: 1rem; height: 1rem; vertical-align: -0.2rem; }
th .mg-tip svg { width: 0.875rem; height: 0.875rem; }

/* The plan card: price and actions on the left, what the plan includes on the right. */
.mg-plan-card { display: grid; gap: 1.5rem; grid-template-columns: minmax(0, 1fr); }
.mg-plan-card > * { align-content: start; }
@media (min-width: 768px) { .mg-plan-card { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.mg-plan-card__features { padding-inline-start: 0; }
@media (min-width: 768px) { .mg-plan-card__features { padding-inline-start: 1.5rem; border-inline-start: 1px solid var(--gray-200); } }
.dark .mg-plan-card__features { border-color: rgba(255, 255, 255, 0.1); }
.mg-checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; }
.mg-checklist li { display: flex; gap: 0.5rem; align-items: flex-start; font-size: 0.875rem; line-height: 1.25rem; color: var(--gray-700); }
.mg-checklist svg { flex: none; width: 1.125rem; height: 1.125rem; color: var(--success-600); }
.dark .mg-checklist li { color: var(--gray-200); }
.dark .mg-checklist svg { color: var(--success-400); }
/* A sticky banner must be opaque: the dark tints above are translucent and let the page show
   through while scrolling. Mixed onto the dark page colour they keep their look. */
.dark .mg-banner--warning { background: color-mix(in oklab, var(--warning-500) 12%, var(--gray-950)); }
.dark .mg-banner--info { background: color-mix(in oklab, var(--info-500) 12%, var(--gray-950)); }
.mg-banner__link { font-weight: 600; text-decoration: underline; text-underline-offset: 2px; color: inherit; white-space: nowrap; }
.mg-banner__link:hover { text-decoration-thickness: 2px; }

/* A table in a narrow card: headers may wrap and cells sit closer, so it fits without scrolling. */
.mg-table--fit th { white-space: normal; }
.mg-table--fit :is(th, td) { padding-inline: 0.375rem; }
.mg-table--fit :is(th, td):first-child { padding-inline-start: 0; }
.mg-table--fit :is(th, td):last-child { padding-inline-end: 0; }

/* ---------------------------------------------------------------------------
   Feedback button and dialog on every /app page, the ideas board and
   "Mijn feedback" (2026-10-18). The button sits above the support-chat
   launcher (support-chat.css: right 24px, bottom 24px, z-index 45).
   --------------------------------------------------------------------------- */
.mg-feedback__fab { position: fixed; right: 1.5rem; bottom: 5.75rem; z-index: 40; display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.625rem 1rem; border: 0; border-radius: 9999px; background: var(--primary-600); color: #fff; font-family: inherit; font-size: 0.875rem; font-weight: 600; cursor: pointer; box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18); }
.mg-feedback__fab:hover { background: var(--primary-700); }
.mg-feedback__fab .mg-icon, .dark .mg-feedback__fab .mg-icon { width: 1.125rem; height: 1.125rem; color: #fff; }
@media (max-width: 640px) { .mg-feedback__fab { right: 1rem; bottom: calc(5.25rem + env(safe-area-inset-bottom)); } }
.mg-feedback__backdrop { position: fixed; inset: 0; z-index: 50; display: flex; align-items: flex-end; justify-content: center; padding: 1rem; background: rgba(0, 0, 0, 0.45); }
@media (min-width: 640px) { .mg-feedback__backdrop { align-items: center; } }
.mg-feedback__dialog { position: relative; width: 100%; max-width: 30rem; border-radius: 1rem; padding: 1.5rem; background: #fff; box-shadow: 0 24px 64px rgba(0, 0, 0, 0.25); }
.dark .mg-feedback__dialog { background: var(--gray-900); box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1); }
.mg-feedback__close { position: absolute; top: 0.75rem; right: 0.75rem; border: 0; background: none; padding: 0.25rem; cursor: pointer; }
.mg-feedback__close .mg-icon, .dark .mg-feedback__close .mg-icon { color: var(--gray-400); }
.mg-feedback__close:hover .mg-icon { color: var(--gray-600); }

/* One idea on the board: the vote toggle, then title, badge, text and the team's reply. */
.mg-idea { display: flex; align-items: flex-start; gap: 1rem; }
.mg-idea__body { min-width: 0; flex: 1; }
.mg-vote { flex: none; display: flex; flex-direction: column; align-items: center; gap: 0.125rem; min-width: 4rem; padding: 0.5rem 0.625rem; border-radius: 0.75rem; border: 1px solid var(--gray-300); background: #fff; color: var(--gray-700); font-family: inherit; cursor: pointer; }
.mg-vote:hover { border-color: var(--primary-600); color: var(--primary-600); }
.mg-vote--on, .mg-vote--on:hover { border-color: var(--primary-600); background: var(--primary-600); color: #fff; }
.mg-vote:disabled { opacity: 0.6; cursor: wait; }
.dark .mg-vote { background: var(--gray-900); border-color: var(--gray-700); color: var(--gray-200); }
.dark .mg-vote--on { background: var(--primary-600); border-color: var(--primary-600); color: #fff; }
.mg-vote .mg-icon, .dark .mg-vote .mg-icon { width: 0.875rem; height: 0.875rem; color: inherit; }
.mg-vote__count { font-size: 1.125rem; font-weight: 700; line-height: 1.1; }
.mg-vote__label { font-size: 0.6875rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
