/* V5 Assets tab (Project Detail) — scoped to #tab-assets. */
#tab-assets .wa5-sub { margin: 4px 0 0; color: var(--st-muted); font-size: 14px; }
#tab-assets .section-header { align-items: flex-start; }
#tab-assets .wa5-progress { margin: 0 0 16px; padding: 16px 18px; border: 1px solid var(--st-line); border-radius: 14px; background: var(--st-surface); }
#tab-assets .wa5-progress-top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
#tab-assets .wa5-progress-top strong { font-size: 15px; font-weight: 800; color: var(--st-ink); }
#tab-assets .wa5-progress-top span { color: var(--st-muted); font-size: 13px; }
#tab-assets .wa5-progress i { display: block; height: 8px; border-radius: 999px; background: var(--st-surface-2); overflow: hidden; }
#tab-assets .wa5-progress b { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--st-primary), var(--st-primary-2)); transition: width .3s ease; }
#tab-assets .wa5-drop { display: flex; align-items: center; gap: 16px; margin: 0 0 16px; padding: 22px; border: 2px dashed color-mix(in srgb, var(--st-primary) 40%, var(--st-line)); border-radius: 16px; background: color-mix(in srgb, var(--st-primary) 5%, var(--st-surface)); transition: border-color .15s ease, background-color .15s ease; }
#tab-assets .wa5-drop.over, #tab-assets .wa5-drop:focus-visible { border-color: var(--st-primary); background: color-mix(in srgb, var(--st-primary) 11%, var(--st-surface)); outline: none; }
#tab-assets .wa5-drop-icon { display: grid; place-items: center; flex: none; width: 52px; height: 52px; border-radius: 14px; background: color-mix(in srgb, var(--st-primary) 14%, var(--st-surface)); color: var(--st-primary); }
#tab-assets .wa5-drop-icon svg { width: 24px; height: 24px; }
#tab-assets .wa5-drop > div { flex: 1; min-width: 0; display: grid; gap: 3px; }
#tab-assets .wa5-drop strong { font-size: 15px; font-weight: 800; color: var(--st-ink); }
#tab-assets .wa5-drop small { color: var(--st-muted); font-size: 12.5px; }
#tab-assets .wa5-needs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 0 0 20px; }
#tab-assets .wa5-need { display: flex; align-items: center; gap: 12px; padding: 14px; border: 1px solid var(--st-line); border-radius: 14px; background: var(--st-surface); min-width: 0; }
#tab-assets .wa5-need.ok { border-color: color-mix(in srgb, var(--st-teal) 45%, var(--st-line)); background: color-mix(in srgb, var(--st-teal) 7%, var(--st-surface)); }
#tab-assets .wa5-need-icon { display: grid; place-items: center; flex: none; width: 34px; height: 34px; border-radius: 10px; background: color-mix(in srgb, var(--st-primary) 12%, var(--st-surface)); color: var(--st-primary); font-weight: 800; }
#tab-assets .wa5-need.ok .wa5-need-icon { background: var(--st-teal); color: #fff; }
#tab-assets .wa5-need-text { flex: 1; min-width: 0; display: grid; gap: 2px; }
#tab-assets .wa5-need-text strong { font-size: 14px; font-weight: 800; color: var(--st-ink); }
#tab-assets .wa5-need-text small { color: var(--st-muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#tab-assets .wa5-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-items: start; }
#tab-assets .wa5-side { display: none; }
#tab-assets .am-section { margin: 0; padding: 16px 18px; border: 1px solid var(--st-line); border-radius: 16px; background: var(--st-surface); }
#tab-assets .am-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
#tab-assets .am-title { margin: 0; font-size: 16px; font-weight: 800; color: var(--st-ink); }
#tab-assets .am-total-badge { padding: 2px 10px; border-radius: 999px; background: var(--st-surface-2); color: var(--st-muted); font-size: 12px; font-weight: 700; }
#tab-assets .am-header-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
#tab-assets .am-header-actions input, #tab-assets .am-header-actions select { height: 36px; padding: 0 12px; border: 1px solid var(--st-line); border-radius: 10px; background: var(--st-surface); color: var(--st-ink); font: inherit; font-size: 13px; }
#tab-assets .am-action-btn { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; border: 1px solid var(--st-line); border-radius: 10px; background: var(--st-surface); color: var(--st-ink); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
#tab-assets .am-action-btn.primary { border-color: transparent; background: linear-gradient(135deg, var(--st-primary), var(--st-primary-2)); color: #fff; font-weight: 700; }
#tab-assets .am-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 12px; }
#tab-assets .am-tab { height: 32px; padding: 0 12px; border: 1px solid var(--st-line); border-radius: 999px; background: var(--st-surface); color: var(--st-muted); font: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer; }
#tab-assets .am-tab.active { border-color: var(--st-primary); background: color-mix(in srgb, var(--st-primary) 10%, var(--st-surface)); color: var(--st-primary); }
#tab-assets .am-table-wrap { overflow-x: auto; border: 1px solid var(--st-line); border-radius: 12px; }
#tab-assets .am-empty, #tab-assets .am-panel-loading { padding: 28px; text-align: center; color: var(--st-muted); border: 1px dashed var(--st-line); border-radius: 12px; }
@media (max-width: 900px) { #tab-assets .wa5-needs { grid-template-columns: 1fr; } #tab-assets .wa5-drop { flex-wrap: wrap; } }

/* layout fixes: needs cards, Asset Manager header, readiness strip */
#tab-assets .wa5-needs { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
#tab-assets .wa5-need .inline-btn { flex: none; padding: 0 12px; }
#tab-assets .am-header { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
#tab-assets .am-header-left { display: flex; align-items: center; gap: 10px; }
#tab-assets .am-header-actions { width: 100%; }
#tab-assets .am-header-actions input { flex: 1 1 180px; min-width: 0; width: auto !important; }
#tab-assets .am-header-actions select { flex: 0 0 auto; width: auto !important; }
#tab-assets .am-status-strip { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 0 0 14px; padding: 12px 14px; border: 1px solid var(--st-line); border-radius: 12px; background: var(--st-surface-2); }
#tab-assets .am-status-pill { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border: 1px solid var(--st-line); border-radius: 999px; background: var(--st-surface); color: var(--st-muted); font-size: 12.5px; font-weight: 700; }
#tab-assets .am-status-pill-ok { border-color: color-mix(in srgb, var(--st-teal) 45%, var(--st-line)); background: color-mix(in srgb, var(--st-teal) 9%, var(--st-surface)); color: var(--st-teal); }
#tab-assets .am-status-pill-missing { border-color: color-mix(in srgb, #e5534b 40%, var(--st-line)); background: color-mix(in srgb, #e5534b 8%, var(--st-surface)); color: #d1453d; }
#tab-assets .am-readiness-pct { color: var(--st-ink); font-family: inherit; }
#tab-assets table { width: 100%; border-collapse: collapse; }
#tab-assets th { padding: 10px 14px; background: var(--st-surface-2); color: var(--st-muted); font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; text-align: left; border-bottom: 1px solid var(--st-line); }
#tab-assets td { padding: 12px 14px; border-bottom: 1px solid var(--st-line); color: var(--st-ink); font-size: 13.5px; }
#tab-assets tr:last-child td { border-bottom: 0; }
#tab-assets tbody tr:hover td { background: color-mix(in srgb, var(--st-primary) 5%, var(--st-surface)); }

/* audit: toggle glyph + continuous row dividers */
#tab-assets #amViewToggleIcon { font-family: "Segoe UI Symbol", "Noto Sans Symbols 2", sans-serif; font-variant-emoji: text; font-size: 16px; line-height: 1; color: var(--st-primary); }
#tab-assets #amViewToggleBtn { width: 36px; height: 36px; padding: 0; justify-content: center; }
#tab-assets tbody tr { border-bottom: 1px solid var(--st-line); }
#tab-assets tbody tr:last-child { border-bottom: 0; }
#tab-assets td { border-bottom: 0; }
#tab-assets td .am-btn, #tab-assets td button { height: 28px; padding: 0 10px; border: 1px solid var(--st-line); border-radius: 8px; background: var(--st-surface); color: var(--st-ink); font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; }
#tab-assets td button:hover { border-color: var(--st-primary); color: var(--st-primary); }
#tab-assets td .am-btn-danger, #tab-assets td button[onclick*="confirmDelete"] { color: #d1453d; }
@media (max-width: 640px) {
  #tab-assets .wa5-drop { flex-direction: column; align-items: stretch; text-align: center; gap: 12px; }
  #tab-assets .wa5-drop-icon { margin: 0 auto; }
  #tab-assets .wa5-drop .inline-btn { width: 100%; }
  #tab-assets .am-header-actions input { max-width: none; }
  #tab-assets .section-header { flex-direction: column; align-items: stretch; }
  #tab-assets .section-meta .inline-btn { width: 100%; }
}

/* toggle: real icon instead of a glyph */
#tab-assets #amViewToggleIcon { font-size: 0; display: block; width: 18px; height: 18px; background: var(--st-primary);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='7' height='7' rx='1.5'/%3E%3Crect x='14' y='3' width='7' height='7' rx='1.5'/%3E%3Crect x='3' y='14' width='7' height='7' rx='1.5'/%3E%3Crect x='14' y='14' width='7' height='7' rx='1.5'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='7' height='7' rx='1.5'/%3E%3Crect x='14' y='3' width='7' height='7' rx='1.5'/%3E%3Crect x='3' y='14' width='7' height='7' rx='1.5'/%3E%3Crect x='14' y='14' width='7' height='7' rx='1.5'/%3E%3C/svg%3E") center / contain no-repeat; }
#tab-assets #amViewToggleBtn[data-view="grid"] #amViewToggleIcon {
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M4 6h16M4 12h16M4 18h16'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M4 6h16M4 12h16M4 18h16'/%3E%3C/svg%3E") center / contain no-repeat; }

/* file rows: fixed icon tile so names line up; clearer table */
#tab-assets .am-cell-file { display: flex; align-items: center; gap: 12px; }
#tab-assets .am-file-icon { display: grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: 10px; background: color-mix(in srgb, var(--st-primary) 10%, var(--st-surface)); font-size: 16px; line-height: 1; overflow: hidden; }
#tab-assets .am-file-icon img { width: 100%; height: 100%; object-fit: cover; }
#tab-assets .am-file-info { display: grid; gap: 2px; min-width: 0; }
#tab-assets .am-file-name { color: var(--st-ink); font-size: 14px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#tab-assets .am-file-size { color: var(--st-muted); font-size: 12px; }
#tab-assets .am-type-badge { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 999px; background: color-mix(in srgb, var(--st-primary) 10%, var(--st-surface)); color: var(--st-primary); font-size: 11.5px; font-weight: 800; text-transform: capitalize; }
#tab-assets .am-usage-chip { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 999px; font-size: 11.5px; font-weight: 700; background: var(--st-surface-2); color: var(--st-muted); }
#tab-assets .am-usage-used { background: color-mix(in srgb, var(--st-teal) 12%, var(--st-surface)); color: var(--st-teal); }
#tab-assets .am-cell-actions { display: flex; gap: 6px; flex-wrap: wrap; }
#tab-assets td { vertical-align: middle; }
/* readiness strip: title, bar and pills in a clear layout */
#tab-assets .am-readiness-row { align-items: center; gap: 18px; }
#tab-assets .am-readiness-detail { min-width: 200px; max-width: 280px; }
#tab-assets .am-completeness-bar { height: 8px; border-radius: 999px; background: var(--st-surface); overflow: hidden; margin: 4px 0; }
#tab-assets .am-completeness-fill { height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--st-primary), var(--st-primary-2)); }
#tab-assets .am-status-strip { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
#tab-assets .am-status-pills { display: flex; gap: 8px; flex-wrap: wrap; }

/* filter pills with counts + breathing room below */
#tab-assets .am-tabs { margin: 4px 0 18px; padding-bottom: 14px; gap: 8px; }
#tab-assets .am-tab { display: inline-flex; align-items: center; gap: 8px; }
#tab-assets .am-tab-count, #tab-assets .am-missing-badge { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: color-mix(in srgb, var(--st-ink) 8%, var(--st-surface)); color: var(--st-muted); font-size: 11px; font-weight: 800; line-height: 1; }
#tab-assets .am-tab.active .am-tab-count { background: var(--st-primary); color: #fff; }
#tab-assets .am-table-wrap { margin-top: 2px; }
#tab-assets .am-section { padding-bottom: 22px; }

/* icon-only row actions (no white hover flash) */
#tab-assets .am-icon-btn { display: inline-grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 1px solid var(--st-line); border-radius: 9px; background: var(--st-surface); color: var(--st-muted); cursor: pointer; transition: background-color .15s ease, border-color .15s ease, color .15s ease; }
#tab-assets .am-icon-btn svg { width: 16px; height: 16px; }
#tab-assets .am-icon-btn:hover, #tab-assets .am-icon-btn:focus-visible { outline: none; border-color: var(--st-primary); background: color-mix(in srgb, var(--st-primary) 12%, var(--st-surface)); color: var(--st-primary); }
#tab-assets .am-icon-btn.am-btn-danger { color: #d1453d; }
#tab-assets .am-icon-btn.am-btn-danger:hover, #tab-assets .am-icon-btn.am-btn-danger:focus-visible { border-color: #d1453d; background: color-mix(in srgb, #d1453d 12%, var(--st-surface)); color: #d1453d; }
#tab-assets tbody tr:hover td { background: color-mix(in srgb, var(--st-primary) 5%, var(--st-surface)); }
#tab-assets .am-cell-actions { display: flex; gap: 6px; flex-wrap: nowrap; }
/* grid mode */
#tab-assets .am-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
#tab-assets .am-grid-card { position: relative; border: 1px solid var(--st-line); border-radius: 16px; background: var(--st-surface); padding: 10px 10px 12px; overflow: hidden; cursor: pointer; transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease; }
#tab-assets .am-grid-card:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--st-primary) 45%, var(--st-line)); box-shadow: 0 12px 28px color-mix(in srgb, var(--st-primary) 12%, transparent); }
#tab-assets .am-grid-thumb { display: grid; place-items: center; height: 120px; border-radius: 11px; background: var(--st-surface-2); font-size: 34px; overflow: hidden; }
#tab-assets .am-grid-name { margin-top: 10px; color: var(--st-ink); font-size: 13.5px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#tab-assets .am-grid-meta { display: flex; justify-content: space-between; gap: 8px; margin-top: 2px; color: var(--st-muted); font-size: 12px; text-transform: capitalize; }
#tab-assets .am-grid-actions { position: absolute; z-index: 2; top: 16px; right: 16px; display: flex; gap: 6px; opacity: 0; transform: translateY(-4px); transition: opacity .15s ease, transform .15s ease; }
#tab-assets .am-grid-card:hover .am-grid-actions, #tab-assets .am-grid-card:focus-within .am-grid-actions { opacity: 1; transform: none; }
#tab-assets .am-grid-actions .am-icon-btn { background: color-mix(in srgb, var(--st-surface) 94%, transparent);   /* no backdrop-filter: one per tile in a scrolling grid forces a blur pass per asset on every hover */ box-shadow: 0 4px 12px rgba(6, 25, 32, .18); }
@media (hover: none) { #tab-assets .am-grid-actions { opacity: 1; transform: none; } }
#tab-assets tbody tr td, #tab-assets .am-cell-actions { background: transparent; }
#tab-assets tbody tr:hover td, #tab-assets tbody tr:hover .am-cell-actions { background: color-mix(in srgb, var(--st-primary) 6%, var(--st-surface)); }
#tab-assets .am-cell-actions { padding: 12px 14px; }

/* Upload Asset button (manager header) and Asset Readiness strip hidden per owner request — markup and renderers untouched; upload stays via drop zone, Choose file and the cards */
#tab-assets .am-header-actions .am-action-btn.primary, #tab-assets #amStatusStrip { display: none !important; }

/* typed file tiles (SVG glyph, per-type colour; images show a real thumbnail) */
#tab-assets .am-file-icon { display: grid; place-items: center; flex: none; width: 44px; height: 44px; padding: 0; background: none; border-radius: 12px; overflow: visible; font-size: 0; }
.am-ft { --ft: var(--st-primary, #167da0); position: relative; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; overflow: hidden; background: color-mix(in srgb, var(--ft) 13%, var(--st-surface, #fff)); color: var(--ft); border: 1px solid color-mix(in srgb, var(--ft) 22%, transparent); }
.am-ft svg { width: 22px; height: 22px; }
.am-ft img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.am-ft-document { --ft: #3b82c4; } .am-ft-spreadsheet { --ft: #1f9d6b; } .am-ft-archive { --ft: #b7791f; } .am-ft-video { --ft: #8b5cf6; }
.am-ft-audio { --ft: #d6498a; } .am-ft-font { --ft: #0f9aa8; } .am-ft-design { --ft: #e5642f; } .am-ft-logo { --ft: #167da0; } .am-ft-file { --ft: #566a73; }
#tab-assets .am-grid-thumb .am-ft { width: 72px; height: 72px; border-radius: 18px; }
#tab-assets .am-grid-thumb .am-ft svg { width: 34px; height: 34px; }
#tab-assets .am-grid-thumb { font-size: 0; }
#tab-assets .am-sidebar-icon .am-ft { width: 28px; height: 28px; border-radius: 8px; } #tab-assets .am-sidebar-icon .am-ft svg { width: 14px; height: 14px; }
/* list polish */
#tab-assets .am-cell-file { gap: 14px; padding-top: 12px; padding-bottom: 12px; }
#tab-assets .am-file-name { max-width: 460px; font-size: 14px; }
#tab-assets .am-file-size { color: var(--st-muted); font-size: 12px; font-weight: 600; }
#tab-assets .am-table-wrap table { table-layout: auto; }
#tab-assets th:nth-child(2), #tab-assets td:nth-child(2) { width: 130px; }
#tab-assets th:nth-child(3), #tab-assets td:nth-child(3) { width: 100px; color: var(--st-muted); font-weight: 600; }
#tab-assets th:nth-child(4), #tab-assets td:nth-child(4) { width: 130px; }
#tab-assets th:last-child, #tab-assets td:last-child { width: 130px; }

/* row actions: icon buttons keep a solid themed background; the row hover never turns them white */
#tab-assets .am-icon-btn { background: var(--st-surface-2) !important; border: 1px solid var(--st-line); color: var(--st-muted); }
#tab-assets tbody tr:hover .am-icon-btn { background: color-mix(in srgb, var(--st-primary) 8%, var(--st-surface-2)) !important; border-color: color-mix(in srgb, var(--st-primary) 28%, var(--st-line)); color: var(--st-ink); }
#tab-assets .am-icon-btn:hover, #tab-assets .am-icon-btn:focus-visible { background: color-mix(in srgb, var(--st-primary) 16%, var(--st-surface-2)) !important; border-color: var(--st-primary); color: var(--st-primary); }
#tab-assets .am-icon-btn.am-btn-danger { background: color-mix(in srgb, #d1453d 8%, var(--st-surface-2)) !important; border-color: color-mix(in srgb, #d1453d 28%, var(--st-line)); color: #d1453d; }
#tab-assets .am-icon-btn.am-btn-danger:hover, #tab-assets .am-icon-btn.am-btn-danger:focus-visible { background: color-mix(in srgb, #d1453d 18%, var(--st-surface-2)) !important; border-color: #d1453d; color: #d1453d; }
#tab-assets tbody tr:hover td { background: color-mix(in srgb, var(--st-primary) 5%, var(--st-surface)) !important; }
#tab-assets .am-grid-actions .am-icon-btn { background: var(--st-surface) !important; }

/* hidden per owner request: "N of 3 ready" progress card */
#tab-assets .wa5-progress { display: none !important; }
#tab-assets tbody tr:hover .am-icon-btn.am-btn-danger { background: color-mix(in srgb, #d1453d 10%, var(--st-surface-2)) !important; border-color: color-mix(in srgb, #d1453d 30%, var(--st-line)); color: #d1453d; }

/* toolbar: heading + count hidden (owner request); filter pills left, search / sort / view toggle right, one row */
#tab-assets .am-section { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 16px; align-items: center; }
#tab-assets .am-section > * { grid-column: 1 / -1; }
#tab-assets .am-section > .am-tabs { grid-column: 1; grid-row: 1; margin: 0; padding: 0; border: 0; }
#tab-assets .am-section > .am-header { grid-column: 2; grid-row: 1; display: flex; margin: 0; width: auto; }
#tab-assets .am-header-left { display: none !important; }
#tab-assets .am-header-actions { width: auto; flex: 0 0 auto; flex-wrap: nowrap; }
#tab-assets .am-header-actions input { flex: 0 0 240px; width: 240px !important; max-width: none; }
#tab-assets .am-section > .am-status-strip { grid-row: 2; }
#tab-assets .am-section > .am-table-wrap, #tab-assets .am-section > .am-grid, #tab-assets .am-section > .am-empty, #tab-assets .am-section > .am-panel-loading, #tab-assets .am-section > .am-panel-error { grid-row: 3; margin-top: 16px; }
@media (max-width: 1180px) {
  #tab-assets .am-section { grid-template-columns: minmax(0, 1fr); row-gap: 12px; }
  #tab-assets .am-section > .am-tabs, #tab-assets .am-section > .am-header { grid-column: 1; grid-row: auto; }
  #tab-assets .am-section > .am-header { justify-content: flex-start; }
  #tab-assets .am-header-actions { flex-wrap: wrap; }
  #tab-assets .am-header-actions input { flex: 1 1 200px; width: auto !important; }
}
#tab-assets .am-header-actions input { flex: 0 0 200px; width: 200px !important; }
#tab-assets .am-tabs { gap: 6px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
#tab-assets .am-tab { flex: none; padding: 0 10px; }

/* row actions = same icon style as the grid cards; the actions cell stays a real table cell so the row hover covers it fully */
#tab-assets td.am-cell-actions { display: table-cell !important; white-space: nowrap; vertical-align: middle; }
#tab-assets td.am-cell-actions .am-icon-btn { display: inline-grid; vertical-align: middle; margin-right: 6px; }
#tab-assets td.am-cell-actions .am-icon-btn:last-child { margin-right: 0; }
#tab-assets .am-icon-btn, #tab-assets tbody tr:hover .am-icon-btn { background: var(--st-surface) !important; border: 1px solid var(--st-line); border-radius: 10px; color: var(--st-muted); box-shadow: 0 2px 8px rgba(6, 25, 32, .10); }
#tab-assets .am-icon-btn:hover, #tab-assets .am-icon-btn:focus-visible, #tab-assets tbody tr:hover .am-icon-btn:hover { background: var(--st-surface) !important; border-color: var(--st-primary); color: var(--st-primary); }
#tab-assets .am-icon-btn.am-btn-danger, #tab-assets tbody tr:hover .am-icon-btn.am-btn-danger { background: var(--st-surface) !important; border-color: var(--st-line); color: #d1453d; }
#tab-assets .am-icon-btn.am-btn-danger:hover, #tab-assets tbody tr:hover .am-icon-btn.am-btn-danger:hover { background: var(--st-surface) !important; border-color: #d1453d; color: #d1453d; }
#tab-assets tbody tr:hover, #tab-assets tbody tr:hover td { background: color-mix(in srgb, var(--st-primary) 6%, var(--st-surface)) !important; }

/* filter pills were clipped by the horizontal scroller — give the row vertical room so borders / focus rings show */
#tab-assets .am-section > .am-tabs { padding: 5px 4px !important; margin: -5px -4px !important; overflow-y: visible; }
#tab-assets .am-tab { height: 34px; }

/* filter pills: label + count badge perfectly centred, colours from the design tokens */
#tab-assets .am-tab { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 34px; padding: 0 8px 0 14px; line-height: 1; }
#tab-assets .am-tab .am-tab-count, #tab-assets .am-tab .am-missing-badge {
  display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box; min-width: 22px; height: 22px; padding: 0 7px; margin: 0;
  border-radius: 999px; line-height: 1; font-size: 11.5px; font-weight: 800; font-variant-numeric: tabular-nums;
  background: color-mix(in srgb, var(--st-primary) 12%, var(--st-surface)); color: var(--st-primary);
}
#tab-assets .am-tab.active .am-tab-count, #tab-assets .am-tab.active .am-missing-badge { background: var(--st-primary); color: #fff; }
#tab-assets .am-tab:not(.active) { color: var(--st-ink); }
#tab-assets .am-tab-missing .am-missing-badge { background: color-mix(in srgb, var(--st-primary) 12%, var(--st-surface)); color: var(--st-primary); }
/* action icons: svg exactly centred in the button */
#tab-assets .am-icon-btn { display: inline-flex !important; align-items: center; justify-content: center; padding: 0; line-height: 0; }
#tab-assets .am-icon-btn svg { display: block; flex: none; margin: 0; }
#tab-assets .am-header-actions input { flex: 0 0 160px !important; width: 160px !important; }
#tab-assets .am-header-actions select, #tab-assets .am-header-actions .v5sel-btn { min-width: 110px; }
#tab-assets .am-tab { padding: 0 7px 0 12px; gap: 6px; }

/* row/grid action icons: #566a73 (owner-specified) in every resting state, including row hover; Delete stays red */
#tab-assets .am-icon-btn, #tab-assets tbody tr:hover .am-icon-btn, #tab-assets td button, #tab-assets td .am-btn { color: #566a73 !important; }
#tab-assets .am-icon-btn:hover, #tab-assets .am-icon-btn:focus-visible, #tab-assets tbody tr:hover .am-icon-btn:hover { color: var(--st-primary) !important; }
#tab-assets .am-icon-btn.am-btn-danger, #tab-assets tbody tr:hover .am-icon-btn.am-btn-danger { color: #d1453d !important; }

/* ── multi-select ── */
#tab-assets .am-check { appearance: none; -webkit-appearance: none; display: inline-grid; place-items: center; width: 20px; height: 20px; margin: 0; border: 1.5px solid var(--st-line); border-radius: 6px; background: var(--st-surface); cursor: pointer; transition: background-color .12s ease, border-color .12s ease; }
#tab-assets .am-check:hover { border-color: var(--st-primary); }
#tab-assets .am-check:checked, #tab-assets .am-check:indeterminate { border-color: var(--st-primary); background: var(--st-primary); }
#tab-assets .am-check:checked::after { content: ""; width: 10px; height: 5px; border: solid #fff; border-width: 0 0 2.2px 2.2px; transform: translateY(-1px) rotate(-45deg); }
#tab-assets .am-check:indeterminate::after { content: ""; width: 10px; height: 2.2px; background: #fff; border-radius: 2px; }
#tab-assets .am-check:focus-visible { outline: none; box-shadow: 0 0 0 4px color-mix(in srgb, var(--st-primary) 18%, transparent); }
#tab-assets th.am-cell-check, #tab-assets td.am-cell-check { width: 44px; padding-left: 16px; padding-right: 0; }
#tab-assets th:nth-child(2), #tab-assets td:nth-child(2) { width: auto; }
#tab-assets th:nth-child(3), #tab-assets td:nth-child(3) { width: 130px; }
#tab-assets th:nth-child(4), #tab-assets td:nth-child(4) { width: 100px; }
#tab-assets th:nth-child(5), #tab-assets td:nth-child(5) { width: 130px; }
#tab-assets tr.am-row-selected td { background: color-mix(in srgb, var(--st-primary) 10%, var(--st-surface)) !important; }
#tab-assets .am-grid-check { position: absolute; z-index: 3; top: 16px; left: 16px; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; background: color-mix(in srgb, var(--st-surface) 92%, transparent); box-shadow: 0 2px 8px rgba(6, 25, 32, .14); opacity: 0; transition: opacity .15s ease; cursor: pointer; }
#tab-assets .am-grid-card:hover .am-grid-check, #tab-assets .am-grid-card:focus-within .am-grid-check, #tab-assets .am-grid-selected .am-grid-check { opacity: 1; }
#tab-assets .am-grid-selected { border-color: var(--st-primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--st-primary) 18%, transparent); }
@media (hover: none) { #tab-assets .am-grid-check { opacity: 1; } }
#tab-assets .am-bulk { position: sticky; top: 8px; z-index: 5; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: 16px 0 0; padding: 10px 14px; border: 1px solid color-mix(in srgb, var(--st-primary) 40%, var(--st-line)); border-radius: 14px; background: color-mix(in srgb, var(--st-primary) 9%, var(--st-surface)); box-shadow: 0 10px 26px color-mix(in srgb, var(--st-primary) 14%, transparent); }
#tab-assets .am-bulk-count { color: var(--st-ink); font-size: 14px; font-weight: 800; }
#tab-assets .am-bulk-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
#tab-assets .am-bulk-clear { margin-left: 0; }
#tab-assets .am-bulk:not(.am-bulk-trash) #amBulkTrash, #tab-assets .am-bulk.am-bulk-trash #amBulkNormal { display: none; }
#tab-assets .am-bulk-cat { display: inline-flex; align-items: center; gap: 8px; color: var(--st-muted); font-size: 12.5px; font-weight: 700; }
#tab-assets .am-bulk-cat select { height: 36px; padding: 0 12px; border: 1px solid var(--st-line); border-radius: 10px; background: var(--st-surface); color: var(--st-ink); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
#tab-assets .am-bulk-btn { height: 36px; padding: 0 16px; border: 1px solid var(--st-line); border-radius: 10px; background: var(--st-surface); color: var(--st-ink); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; transition: border-color .15s ease, color .15s ease; }
#tab-assets .am-bulk-btn:hover { border-color: var(--st-primary); color: var(--st-primary); }
#tab-assets .am-bulk-danger { color: #d1453d; }
#tab-assets .am-bulk-danger:hover { border-color: #d1453d; color: #d1453d; }
#tab-assets .am-bulk-clear { color: var(--st-muted); }
#tab-assets .am-bulk-cat, #tab-assets .am-bulk-cat span { white-space: nowrap; flex-wrap: nowrap; }
#tab-assets .am-bulk-cat select { width: 190px; min-width: 190px; }
#tab-assets .am-bulk-cat .v5sel-btn { width: 190px; min-width: 190px; min-height: 36px; border-radius: 10px; font-size: 13px; }
#tab-assets .am-bulk-count { white-space: nowrap; }
#tab-assets .wa5-drop { cursor: pointer; }
#tab-assets .wa5-drop:hover { border-color: var(--st-primary); background: color-mix(in srgb, var(--st-primary) 9%, var(--st-surface)); }
#tab-assets .wa5-drop .inline-btn { cursor: pointer; }
