/* ── View states (DESIGN.md §5; revamp E1, E2, N6) ──────────────────────────
   Empty, loading placeholder, error, and the inline notice that replaced
   the full-width banners. Markup builders: static/lib/states.js. */

/* E1: icon in a soft circle, one sentence, one hint, one action.
   .empty is the older markup (empty-glyph / empty-text / empty-hint); it
   takes the same look so every table's empty state matches. */
.empty-state, .empty {
    display: grid;
    justify-items: center;
    gap: 6px;
    padding: 40px 24px;
    text-align: center;
    color: var(--text-2);
}
.empty-state-sm, .empty.empty-sm { padding: 24px 16px; }
td.empty { display: table-cell; padding: 24px 16px; color: var(--text-3); }
.empty-ico, .empty .empty-glyph {
    display: grid; place-items: center;
    width: 40px; height: 40px;
    margin: 0 0 4px;
    border-radius: 50%;
    background: var(--sunken);
    color: var(--text-3);
}
/* Older markup puts a text glyph in .empty-glyph: hide the glyph and draw
   the search icon's ring instead, so no Unicode icon shows (G11). */
.empty .empty-glyph { font-size: 0; position: relative; }
.empty .empty-glyph::before {
    content: '';
    width: 12px; height: 12px;
    border-radius: 50%;
    box-shadow: inset 0 0 0 1.75px currentColor;
}
.empty .empty-illustration { display: none; }
.empty-title, .empty .empty-text {
    margin: 0;
    font-family: var(--sans);
    font-size: var(--fs-14);
    font-weight: 600;
    letter-spacing: 0;
    color: var(--text);
}
.empty-hint {
    margin: 0;
    max-width: 52ch;
    font-family: var(--sans);
    font-size: var(--fs-13);
    color: var(--text-2);
    opacity: 1;
}
.empty-state > .btn, .empty > .btn, .empty .btn-toolbar, .empty .btn-generate-report { margin-top: 8px; }
/* Under the action: the reason behind it, small and muted (Investigate's
   "Main lists laptops only."). */
.empty-note {
    margin: 0;
    max-width: 52ch;
    font-family: var(--sans);
    font-size: var(--fs-12);
    color: var(--text-3);
}

/* E2: static placeholders (no shimmer), shown after 200 ms and kept at
   least 400 ms by static/lib/loading-delay.js. */
.ph { display: grid; gap: 12px; padding: 16px; }
.ph-row { display: flex; align-items: center; gap: 10px; }
.ph-row::before { content: ''; width: 24px; height: 24px; border-radius: var(--radius-xs); background: var(--sunken); flex: none; }
.ph-row::after { content: ''; height: 10px; border-radius: 5px; background: var(--sunken); flex: 1; }
.ph-row.ph-short::after { flex: 0 0 64%; }
/* Values still loading inside a KPI or a drawer line. */
.skeleton {
    color: transparent !important;
    border-radius: var(--radius-xs);
    background: var(--sunken);
    min-width: 72px;
    min-height: 1em;
}
.skeleton-line { height: 10px; margin-bottom: 8px; border-radius: 5px; background: var(--sunken); }
.skeleton-line.w80 { width: 80%; }
.skeleton-line.w60 { width: 60%; }

/* Errors: what failed, which source, the next step. */
.error-state { display: flex; align-items: flex-start; gap: 12px; padding: 20px; }
.error-ico {
    display: grid; place-items: center;
    width: 34px; height: 34px;
    flex: none;
    border-radius: var(--radius-sm);
    background: var(--error-dim);
    color: var(--error);
}
.error-title { margin: 0; font-weight: 600; color: var(--text); }
.error-detail { margin: 2px 0 0; font-size: var(--fs-13); color: var(--text-2); max-width: 64ch; }
.error-actions { display: flex; gap: var(--sp-2); margin-top: 10px; flex-wrap: wrap; }

/* N6/E4: a compact inline notice in sans, with an icon and a real button,
   full width of the content column (M1). */
.notice {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 12px var(--gutter) 0;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    font-family: var(--sans);
    font-size: var(--fs-13);
    line-height: 1.45;
    color: var(--text);
    background: var(--surface-2);
    box-shadow: inset 0 0 0 1px var(--border);
}
.notice[hidden] { display: none; }
.notice .notice-ico { flex: none; color: var(--text-3); }
.notice .notice-text { flex: 1 1 auto; min-width: 0; }
.notice > .btn { flex: none; margin-left: auto; }
.notice-warn { background: var(--warn-dim); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--warn) 35%, transparent); }
.notice-warn .notice-ico, .notice-warn b { color: var(--warn); }
.notice-error { background: var(--error-dim); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--error) 35%, transparent); }
.notice-error .notice-ico { color: var(--error); }
.notice-info .notice-ico { color: var(--accent); }
/* Inside a page (Costs FX notice), the column gutter is already there. */
.tab-panel .notice, .tab-panel .stale-banner { margin: 0 0 var(--sp-4); }

@media (max-width: 900px) {
    .notice { margin: 12px var(--gutter-sm) 0; flex-wrap: wrap; }
    .notice > .btn { margin-left: 0; }
}
