/* Moretto ERP — neutral SPA skeleton. Scoped, static, no shimmer or global :has(). */
.mtt-ns-host { position: relative; }
.mtt-ns-host > .mtt-nav-skeleton {
    --mtt-ns-surface: var(--moretto-surface, #fff);
    --mtt-ns-soft: var(--moretto-surface-soft, #f6f7f8);
    --mtt-ns-line: var(--moretto-surface-muted, #e9ebed);
    position: absolute;
    inset: 0;
    z-index: 30;
    min-height: min(74vh, 850px);
    padding: 0 0 24px;
    background: var(--ui-bg, var(--mtt-ns-soft));
    color: transparent;
    pointer-events: auto;
    overflow: hidden;
    font-family: Poppins, sans-serif;
}
.mtt-nav-skeleton .mtt-ns-block {
    display: block;
    background: var(--mtt-ns-line);
    border-radius: 5px;
    min-width: 0;
    height: 11px;
    opacity: .78;
}
.mtt-nav-skeleton .mtt-ns-header,
.mtt-nav-skeleton .mtt-ns-toolbar,
.mtt-nav-skeleton .mtt-ns-table-row,
.mtt-nav-skeleton .mtt-ns-total {
    display: flex;
    align-items: center;
    gap: 12px;
}
.mtt-nav-skeleton .mtt-ns-header {
    justify-content: space-between;
    margin-bottom: 16px;
    min-height: 40px;
}
.mtt-nav-skeleton .mtt-ns-header > div { width: 55%; display: grid; gap: 8px; }
.mtt-nav-skeleton .mtt-ns-header > div .mtt-ns-block:first-child { width: 42%; height: 18px; }
.mtt-nav-skeleton .mtt-ns-header > div .mtt-ns-block:last-child { width: 65%; height: 9px; }
.mtt-nav-skeleton .mtt-ns-header > .mtt-ns-block { width: 100px; height: 30px; border-radius: 9px; }
.mtt-nav-skeleton .mtt-ns-card {
    min-width: 0;
    border-radius: 11px;
    background: var(--mtt-ns-surface);
    border: 1px solid var(--mtt-ns-line);
    padding: 14px;
}
.mtt-nav-skeleton .mtt-ns-toolbar { margin-bottom: 17px; }
.mtt-nav-skeleton .mtt-ns-toolbar .mtt-ns-block:first-child { width: 37%; height: 30px; }
.mtt-nav-skeleton .mtt-ns-toolbar .mtt-ns-block:nth-child(2) { width: 125px; height: 30px; }
.mtt-nav-skeleton .mtt-ns-toolbar .mtt-ns-block:nth-child(3) { width: 80px; height: 30px; margin-left: auto; }
.mtt-nav-skeleton .mtt-ns-table-row { border-top: 1px solid var(--mtt-ns-line); min-height: 47px; }
.mtt-nav-skeleton .mtt-ns-table-row .mtt-ns-block:nth-child(1) { width: 11%; }
.mtt-nav-skeleton .mtt-ns-table-row .mtt-ns-block:nth-child(2) { width: 39%; }
.mtt-nav-skeleton .mtt-ns-table-row .mtt-ns-block:nth-child(3) { width: 22%; }
.mtt-nav-skeleton .mtt-ns-table-row .mtt-ns-block:nth-child(4) { width: 13%; margin-left: auto; }
.mtt-nav-skeleton .mtt-ns-kpis { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; }
.mtt-nav-skeleton .mtt-ns-kpis .mtt-ns-card { display: grid; gap: 15px; min-height: 100px; }
.mtt-nav-skeleton .mtt-ns-kpis .mtt-ns-block:first-child { width: 54%; }
.mtt-nav-skeleton .mtt-ns-kpis .mtt-ns-block:last-child { width: 38%; height: 24px; }
.mtt-nav-skeleton .mtt-ns-dashboard { display: grid; grid-template-columns: 1.65fr 1fr; gap: 12px; margin-top: 12px; }
.mtt-nav-skeleton .mtt-ns-chart { min-height: 260px; display: flex; flex-direction: column; gap: 24px; }
.mtt-nav-skeleton .mtt-ns-chart .mtt-ns-block:first-child { width: 30%; }
.mtt-nav-skeleton .mtt-ns-chart .mtt-ns-block:last-child { width: 100%; height: 175px; opacity: .38; }
.mtt-nav-skeleton .mtt-ns-settings { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.mtt-nav-skeleton .mtt-ns-field { display: grid; gap: 10px; padding: 10px 0; }
.mtt-nav-skeleton .mtt-ns-field .mtt-ns-block:first-child { width: 30%; height: 10px; }
.mtt-nav-skeleton .mtt-ns-field .mtt-ns-block:last-child { width: 92%; height: 29px; }
.mtt-nav-skeleton .mtt-ns-pos { display: grid; grid-template-columns: minmax(0,1.8fr) minmax(265px,1fr); gap: 12px; }
.mtt-nav-skeleton .mtt-ns-pos-list, .mtt-nav-skeleton .mtt-ns-pos-cart { min-height: 410px; }
.mtt-nav-skeleton .mtt-ns-tiles { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 10px; }
.mtt-nav-skeleton .mtt-ns-tiles .mtt-ns-block { height: 105px; border-radius: 8px; opacity: .55; }
.mtt-nav-skeleton .mtt-ns-total { justify-content: space-between; margin-top: 14px; }
.mtt-nav-skeleton .mtt-ns-total .mtt-ns-block { width: 32%; height: 27px; }
@media (max-width: 900px) {
    .mtt-nav-skeleton .mtt-ns-kpis { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .mtt-nav-skeleton .mtt-ns-dashboard, .mtt-nav-skeleton .mtt-ns-settings, .mtt-nav-skeleton .mtt-ns-pos { grid-template-columns: 1fr; }
    .mtt-nav-skeleton .mtt-ns-pos-list, .mtt-nav-skeleton .mtt-ns-pos-cart { min-height: 0; }
}
@media (max-width: 540px) {
    .mtt-nav-skeleton .mtt-ns-tiles { grid-template-columns: repeat(3,minmax(0,1fr)); }
    .mtt-nav-skeleton .mtt-ns-tiles .mtt-ns-block { height: 85px; }
    .mtt-nav-skeleton .mtt-ns-header > .mtt-ns-block { width: 75px; }
}

/* Native Filament deferred content. Static placeholders keep approved surfaces and motion intact. */
[data-erp-catalog-snapshot] { display: none !important; }
.erp-progressive-table[data-erp-history-revalidating] > .fi-ta { display: none !important; }
.erp-snapshot-status:not([hidden]) { padding: .4rem 1rem; font-size: .7rem; color: var(--ui-text-muted, #6b7280); }
[data-erp-snapshot-state="recent"] td > span { display: block; font-size: .75rem; overflow-wrap: anywhere; }
[data-erp-snapshot-state="recent"] td > small { display: block; font-size: .65rem; color: var(--ui-text-muted, #6b7280); }
.erp-loading-block {
    display: block;
    width: 72%;
    min-width: 2.5rem;
    height: .75rem;
    margin-block: .5rem;
    border-radius: .3rem;
    background: var(--moretto-surface-muted, #e9ebed);
    color: transparent;
}
.dark .erp-loading-block { background: var(--ui-border, #374151); }
.erp-loading-block--short { width: 44%; height: .5rem; }
.erp-progressive-table { min-width: 0; }
.erp-progressive-table--loading .fi-ta-table-loading-ctn { display: none; }
.erp-table-placeholder {
    overflow: hidden;
    min-height: 22rem;
    border: 1px solid var(--ui-border, #e5e7eb);
    border-radius: 0 0 .75rem .75rem;
    background: var(--moretto-surface, var(--ui-surface, #fff));
}
.dark .erp-table-placeholder { background: var(--ui-surface, #18181b); }
.erp-table-placeholder__scroll { overflow-x: auto; }
.erp-table-placeholder table { width: 100%; table-layout: fixed; border-collapse: collapse; }
.erp-table-placeholder th {
    padding: .7rem 1rem;
    text-align: start;
    font-size: .72rem;
    font-weight: 600;
    color: var(--ui-text-muted, #6b7280);
    white-space: nowrap;
}
.erp-table-placeholder th:first-child { padding-inline: .25rem; }
.erp-table-placeholder td { height: 3.5rem; padding: .6rem 1rem; border-top: 1px solid var(--ui-border, #e5e7eb); }
.erp-dashboard-placeholder .mtt-dashboard-kpi { min-height: 5.45rem; }
.erp-dashboard-placeholder__panel { min-height: 12.5rem; }
.erp-dashboard-placeholder__risk { min-height: 7rem; }
.erp-dashboard-placeholder__footer { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .48rem; }
.erp-dashboard-placeholder__footer .mtt-dashboard-kpi { min-height: 4rem; }
.mco-sales-table { min-width: 0; }
.mco-sales-overview .erp-loading-block { min-width: 4rem; height: 1lh; margin-block: 0; }
.mco-sales-overview[aria-busy] .mco-sales-currency-chip { min-height: 2.4375rem; }
.mco-sales-currency-chip .erp-loading-block { height: .75rem; }
@media (max-width: 767px) {
    .erp-table-placeholder { min-height: 22rem; }
    .erp-table-placeholder table { min-width: 38rem; }
    .erp-dashboard-placeholder__footer { grid-template-columns: 1fr; }
    .erp-dashboard-placeholder .mtt-dashboard-kpi { min-height: 4.65rem; }
    .erp-dashboard-placeholder .mtt-dashboard-kpi .erp-loading-block { margin-block: .3rem; }
}
