/* The asset workspace uses the existing DIME brand tokens and local assets. */
.dam-shell {
  --dam-sidebar-width: 248px;
  --dam-inspector-width: 320px;
  --dam-surface: #191c16;
  --dam-raised: #22261d;
  --dam-text: #eeeae1;
  --dam-muted: #a3a797;
  --dam-page-gutter: 32px;
  --dam-page-gap: 24px;
  --dam-radius: 10px;
  display: grid;
  grid-template-columns: var(--dam-sidebar-width) minmax(0, 1fr);
  min-height: 100vh;
  min-height: 100dvh;
  background: #121510;
  color: var(--dam-text);
}
.dam-shell.has-inspector {
  grid-template-columns: var(--dam-sidebar-width) minmax(0, 1fr) var(--dam-inspector-width);
}
.dam-shell [hidden] { display: none !important; }
.dam-shell :is(button, a, input, select, textarea):focus-visible {
  outline: 2px solid var(--gold, #e6bd62);
  outline-offset: 3px;
}
.dam-shell :is(button, a) { -webkit-tap-highlight-color: transparent; }
.dam-shell button { font: inherit; }
.dam-shell svg { width: 18px; height: 18px; flex-shrink: 0; }
.dam-shell :is(h1, h2, h3, p) { overflow-wrap: anywhere; }
.dam-shell :is(input, select) { min-width: 0; max-width: 100%; }
.dam-shell .sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.dam-skip { position: fixed; top: 10px; left: 12px; z-index: 100; padding: 12px 18px; border-radius: 6px; background: var(--gold, #e6bd62); color: #272315; transform: translateY(-180%); font-size: 12px; }
.dam-skip:focus { transform: none; }
.dam-shell :is(.btn, input, select) { min-height: 38px; }
.dam-shell .btn { border-radius: 6px; }
.dam-shell .btn.primary { box-shadow: 0 1px 0 #ffffff12 inset; }
.dam-shell .btn:disabled { box-shadow: none; }
.dam-shell .small-note { color: var(--dam-muted); }

/* Navigation and the source hierarchy remain present across every workspace view. */
.dam-sidebar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  flex-direction: column;
  width: var(--dam-sidebar-width);
  min-width: 0;
  height: 100vh;
  height: 100dvh;
  padding: 24px 14px 16px;
  background: #181b15;
  border-right: 1px solid var(--line, #31332c);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #454e38 transparent;
}
.dam-brand {
  display: flex;
  align-items: center;
  gap: 13px;
  min-height: 52px;
  padding: 0 10px;
  margin-bottom: 20px;
}
.dam-brand a { display: inline-flex; align-items: center; flex-shrink: 0; }
.dam-brand img, .dam-brand .brand-logo {
  display: block;
  width: 87px;
  height: auto;
  max-height: 50px;
  object-fit: contain;
}
.dam-brand span, .dam-brand .brand-space {
  font-size: 9px;
  line-height: 1.75;
  letter-spacing: 1.7px;
  text-transform: uppercase;
  color: #c6c8b9;
}
.dam-brand .brand-line { display: none; }
.dam-scope {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  margin-bottom: 18px;
  border: 1px solid #393f30;
  border-radius: 8px;
  background: #1d2118;
}
.dam-scope > div:last-child { min-width: 0; }
.dam-scope .avatar { background: #37301e; color: var(--gold, #e6bd62); }
.dam-scope strong { display: block; font-size: 12px; font-weight: 600; }
.dam-scope small {
  display: block;
  margin-top: 4px;
  color: var(--dam-muted);
  font-size: 10px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.dam-nav { display: grid; gap: 3px; }
.dam-nav :is(a, button) {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 39px;
  padding: 9px 11px;
  border: 1px solid transparent;
  border-radius: 6px;
  text-align: left;
  font-size: 12px;
  font-weight: 500;
  color: #b4b9aa;
}
.dam-nav :is(a, button):hover { background: #252b20; color: var(--dam-text); }
.dam-nav :is(.active, .is-active, [aria-current="page"]) {
  background: #38331f;
  border-color: #494027;
  color: #f1d187;
}
.dam-nav .counter, .dam-count {
  margin-left: auto;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 10px;
  font-variant-numeric: tabular-nums;
  color: #dfc68c;
  background: #4d4329;
}
.dam-nav-label, .dam-sidebar .navlabel, .dam-navlabel {
  margin: 20px 10px 9px;
  font-size: 9px;
  letter-spacing: 1.6px;
  font-weight: 600;
  text-transform: uppercase;
  color: #929a86;
}
.dam-navlabel { display: flex; align-items: center; justify-content: space-between; }
.dam-navlabel span:last-child { font-size: 10px; font-variant-numeric: tabular-nums; letter-spacing: 0; color: #a7b494; }
.dam-folder-disclosure {
  flex: 1;
  min-height: 100px;
  margin-top: 14px;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #454e38 transparent;
}
.dam-folder-disclosure:not([open]) { flex: 0 0 auto; min-height: 0; }
.dam-folder-disclosure > summary {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 8px 11px;
  background: #181b15;
  color: #929a86;
  font-size: 9px;
  font-weight: 600;
  line-height: 1.7;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  cursor: pointer;
}
.dam-folder-disclosure > summary:hover { color: var(--gold, #e6bd62); }
.dam-folder-disclosure > summary:focus-visible { outline: 2px solid var(--gold, #e6bd62); outline-offset: -2px; }
.dam-folder-count { float: right; font-size: 10px; font-variant-numeric: tabular-nums; letter-spacing: 0; color: #a7b494; }
.dam-folder-tree {
  margin: 0 -5px;
  padding: 4px 5px 14px;
}
.dam-folder-tree :is(ul, ol) { list-style: none; padding: 0; margin: 0; }
.dam-folder-children { padding-left: 12px !important; }
.dam-folder-row {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  min-height: 34px;
  margin-bottom: 2px;
  padding: 3px 5px;
  border: 1px solid transparent;
  border-radius: 5px;
  color: #aeb6a1;
}
.dam-folder-row:hover { background: #22291c; color: #e2e7d6; }
.dam-folder-row :is(a, button) { min-width: 0; }
.dam-folder-row > :is(a, button):not(.dam-folder-toggle):not(.dam-tree-toggle) {
  display: flex;
  align-items: center;
  gap: 7px;
  flex: 1;
  padding: 5px 2px;
  text-align: left;
  font-size: 11px;
  line-height: 1.5;
}
.dam-folder-row :is(.dam-folder-name, .dam-folder-title) {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dam-folder-row > a > span:first-of-type { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.dam-folder-row .dam-hidden-label { margin-left: auto; color: #b4a177; font-size: 8px; flex-shrink: 0; }
.dam-folder-row :is(svg, .dam-folder-icon) { width: 15px; height: 15px; color: #afa56f; }
.dam-folder-row :is(.active, [aria-current="page"]),
.dam-folder-row.is-selected, .dam-folder-row.active, .dam-folder-row.is-active {
  background: #2f3626;
  color: #efe9d2;
  border-color: #4c543d;
}
.dam-folder-row .dam-folder-count {
  margin-left: auto;
  font-size: 9px;
  font-variant-numeric: tabular-nums;
  color: #9ca88f;
}
.dam-folder-toggle, .dam-tree-toggle {
  display: grid;
  place-items: center;
  width: 24px;
  height: 26px;
  padding: 0;
  border-radius: 4px;
  flex-shrink: 0;
  flex: 0 0 24px;
  color: #8f9a80;
}
.dam-folder-toggle svg, .dam-tree-toggle svg { width: 13px; height: 13px; }
.dam-folder-toggle:hover, .dam-tree-toggle:hover { background: #3a432d; color: #eee9d5; }
.dam-folder-toggle[aria-expanded="true"] svg, .dam-tree-toggle.is-open svg { transform: rotate(90deg); }
.dam-folder-spacer, .dam-tree-spacer { width: 24px; flex-shrink: 0; }
.dam-empty-tree { padding: 8px 11px; color: #9aa88b; font-size: 11px; line-height: 1.7; }
.dam-management { flex-shrink: 0; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line, #31332c); max-height: 38vh; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #454e38 transparent; }
.dam-management summary { padding: 5px 11px 11px; color: #aeb79f; font-size: 10px; line-height: 1.7; cursor: pointer; }
.dam-management summary:hover { color: var(--gold, #e6bd62); }
.dam-management summary:focus-visible { outline: 2px solid var(--gold, #e6bd62); outline-offset: -2px; }
.dam-management .dam-nav :is(a, button) { font-size: 11px; min-height: 36px; }
.dam-sidebar-footer { display: flex; flex-shrink: 0; align-items: center; gap: 10px; margin-top: 14px; padding: 14px 6px 0; border-top: 1px solid var(--line, #31332c); }
.dam-sidebar-footer > div { min-width: 0; }
.dam-sidebar-footer strong { display: block; color: #d2dac4; font-size: 11px; font-weight: 550; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.dam-sidebar-footer small { display: block; color: #9caa8b; font-size: 10px; margin-top: 4px; }
.dam-sidebar-bottom { margin-top: auto; padding-top: 12px; }
.dam-sidebar :is(.source-mini, .person) { margin: 0; padding: 14px 6px; }
.dam-sidebar .source-mini { border-top: 1px solid var(--line, #31332c); }
.dam-sidebar .source-mini p { font-size: 10px; line-height: 1.6; }
.dam-sidebar .person { padding-bottom: 0; }
.dam-sidebar .person > div:not(.avatar) { min-width: 0; }
.dam-sidebar .person strong { font-size: 11px; }
.dam-sidebar .person small { font-size: 10px; }

.dam-main { min-width: 0; max-width: 100%; }
.dam-main :is(.dam-topbar, .topbar) {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  min-width: 0;
  min-height: 66px;
  height: auto;
  padding: 12px 28px;
  border-bottom: 1px solid var(--line, #31332c);
  background: #151911;
}
.dam-topbar-start, .dam-topbar-end, .dam-topbar-left, .dam-topbar-actions { display: flex; align-items: center; gap: 12px; min-width: 0; }
.dam-topbar-title { font-size: 12px; font-weight: 550; color: #c1c9b5; }
.dam-topbar-scope { font-size: 10px; color: #829673; border-left: 1px solid #3a462f; padding-left: 12px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.dam-topbar-actions > button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 8px 12px; min-width: 36px; min-height: 36px; border: 1px solid #38442c; border-radius: 6px; color: #b7c7a1; font-size: 12px; white-space: nowrap; }
.dam-topbar-actions > button:hover { background: #2a3520; color: var(--gold, #e6bd62); }
.dam-private { color: #b9a779; font-size: 9px; letter-spacing: 1px; text-transform: uppercase; white-space: nowrap; }
.dam-demo-switch { display: flex; align-items: center; gap: 8px; font-size: 10px; color: #aaa78b; }
.dam-demo-switch select { max-width: 180px; font-size: 10px; padding: 7px 9px; }
.dam-main .pilot-switch { font-size: 9px; letter-spacing: 1px; }
.dam-main .pilot-switch select { width: auto; max-width: 180px; }
.dam-main .content { width: 100%; max-width: none; padding: 28px; }
.dam-library { padding: 26px 28px 40px; min-width: 0; }
.dam-main .content .dam-library { padding: 0; }
.dam-library-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}
.dam-library-header > div { min-width: 0; }
.dam-library-header h1 {
  margin: 8px 0;
  font-size: clamp(23px, 2.2vw, 30px);
  line-height: 1.2;
  letter-spacing: -.8px;
  font-weight: 550;
}
.dam-library-header p { margin: 0; color: var(--dam-muted); font-size: 12px; line-height: 1.7; }
.dam-library-header .eyebrow { font-size: 9px; color: #a6ad95; }
.dam-library-header .collection-actions { justify-content: flex-end; }
.dam-library-header .status { display: inline-block; vertical-align: middle; letter-spacing: 0; margin: 0 0 3px 7px; }
.dam-resource { display: inline-flex; align-items: center; margin: 0 0 18px; padding: 9px 12px; border: 1px solid #3e492f; border-radius: 6px; background: #202819; color: #c9b57b; font-size: 11px; line-height: 1.5; }
.dam-resource:hover { border-color: #827342; color: #ebd18f; }
.dam-breadcrumbs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  padding: 0;
  margin: 0 0 16px;
  color: #99a38b;
  font-size: 11px;
  line-height: 1.5;
}
.dam-breadcrumbs :is(a, button) { padding: 4px 0; color: #b0bca0; }
.dam-breadcrumbs :is(a, button):hover { color: var(--gold, #e6bd62); }
.dam-breadcrumbs [aria-current="page"] { color: #e1e6d6; }
.dam-breadcrumbs svg { width: 12px; height: 12px; color: #748064; }
.dam-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
  margin: 0 0 18px;
  padding: 12px;
  background: #1a1f16;
  border: 1px solid #343d2b;
  border-radius: 8px;
}
.dam-search {
  display: flex;
  align-items: center;
  gap: 7px;
  flex: 1 1 220px;
  min-width: 140px;
  min-height: 38px;
  padding-left: 10px;
  border: 1px solid #404b34;
  border-radius: 6px;
  color: #a1ac94;
  background: #12180e;
}
.dam-search:focus-within { border-color: var(--gold, #e6bd62); outline: 2px solid var(--gold, #e6bd62); outline-offset: 2px; }
.dam-search input {
  width: 100%;
  min-height: 36px;
  border: 0;
  padding: 8px;
  background: transparent;
  color: #e8eddf;
  font-size: 12px;
}
.dam-search input:focus-visible { outline: none; }
.dam-search input::placeholder { color: #919e81; }
.dam-toolbar select { background: #1c2417; border-color: #3d4733; padding: 8px 28px 8px 10px; font-size: 11px; }
.dam-toolbar > label { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--dam-muted); }
.dam-view-toggle { display: flex; border: 1px solid #414b36; border-radius: 6px; padding: 2px; flex-shrink: 0; }
.dam-view-toggle button { min-width: 33px; min-height: 32px; padding: 5px; border-radius: 4px; color: #a4ad98; }
.dam-view-toggle :is(.active, [aria-pressed="true"]) { background: #353e29; color: #f4d88e; }
.dam-view-toggle button:hover { color: #f4d88e; }
.dam-toolbar .btn { padding: 8px 11px; font-size: 11px; }
.dam-toolbar .btn[aria-expanded="true"] { border-color: #867043; background: #332e1d; color: #f2d18b; }
.dam-filter-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px;
  margin: -6px 0 20px;
  padding: 16px;
  border: 1px solid #38432e;
  border-radius: 7px;
  background: #171e12;
}
.dam-filter-row label { display: flex; flex-direction: column; gap: 6px; flex: 1 1 140px; font-size: 10px; color: #b0ba9e; }
.dam-filter-row select { width: 100%; font-size: 11px; background: #20291a; }
.dam-filter-row .btn { font-size: 11px; }
.dam-results-summary, .dam-results-heading, .dam-section-label { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 20px 0 12px; font-size: 11px; color: var(--dam-muted); }
.dam-results-summary h2, .dam-results-heading h2, .dam-section-label h2 { margin: 0; font-size: 12px; color: #d6dec9; font-weight: 550; }
.dam-section-label { margin-top: 23px; }
.dam-section-heading { margin: 24px 0 12px; font-size: 12px; color: #b7c1a7; font-weight: 600; }

.dam-folders { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; margin-bottom: 22px; }
.dam-folder-tile {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
  min-height: 74px;
  padding: 12px;
  border: 1px solid #38432e;
  border-radius: 8px;
  background: #1e2618;
  text-align: left;
}
.dam-folder-tile:hover { border-color: #8b7847; background: #29321f; }
.dam-folder-tile > div, .dam-folder-tile > span { min-width: 0; }
.dam-folder-tile > svg:first-child { width: 36px; height: 36px; padding: 7px; background: #343b27; border-radius: 6px; color: #d7bd76; }
.dam-folder-tile :is(.dam-folder-icon, .folder-icon) { width: 40px; height: 40px; border-radius: 6px; display: grid; place-items: center; flex-shrink: 0; background: #343b27; color: #d7bd76; }
.dam-folder-tile img { width: 40px; height: 40px; flex-shrink: 0; border-radius: 6px; object-fit: cover; }
.dam-folder-tile strong { display: block; font-size: 11px; line-height: 1.5; font-weight: 550; }
.dam-folder-tile small { display: block; font-size: 10px; line-height: 1.5; margin-top: 4px; color: #9fab8e; }
.dam-folder-tile > svg:last-child { margin-left: auto; color: #8b9778; width: 14px; height: 14px; }

.dam-assets { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); align-items: start; gap: 14px; }
.dam-asset-card {
  position: relative;
  min-width: 0;
  border: 1px solid #36402d;
  border-radius: 8px;
  background: #1b2215;
  overflow: hidden;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.dam-asset-card:hover { border-color: #7d895f; }
.dam-asset-card:is(.is-selected, [aria-selected="true"]) {
  border-color: var(--gold, #e6bd62);
  box-shadow: 0 0 0 1px var(--gold, #e6bd62);
  background: #262b1c;
}
.dam-asset-thumb {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  width: 100%;
  height: 184px;
  padding: 0;
  overflow: hidden;
  background: #29311f;
  border-bottom: 1px solid #333d29;
}
.dam-asset-thumb img { display: block; width: 100%; height: 100%; object-fit: contain; }
.dam-asset-thumb.cover img { object-fit: cover; }
.dam-asset-thumb .pdf-preview { width: 100%; min-height: 0; background: #29311f; }
.dam-asset-thumb .pdf-preview svg { width: 35px; height: 35px; color: #c6b875; }
.dam-asset-thumb .pdf-preview span { font-size: 10px; letter-spacing: 1px; }
.dam-asset-thumb :is(.format, .dam-format, .dam-asset-kind) { position: absolute; top: 10px; left: 10px; padding: 4px 6px; border: 1px solid #d8dfc12b; border-radius: 4px; background: #12180de0; color: #e0e6ce; font-size: 8px; font-weight: 550; letter-spacing: .8px; text-transform: uppercase; }
.dam-file-icon { display: grid; place-items: center; color: #c4bc7b; }
.dam-file-icon svg { width: 42px; height: 42px; }
.dam-select-hint { display: inline-flex; align-items: center; gap: 5px; position: absolute; right: 9px; bottom: 9px; padding: 5px 7px; border: 1px solid #a7b28c38; border-radius: 5px; background: #131d0ecf; color: #e2e7d4; opacity: 0; font-size: 9px; transition: opacity .15s ease; }
.dam-select-hint svg { width: 13px; height: 13px; }
.dam-asset-card:hover .dam-select-hint, .dam-asset-thumb:focus-visible .dam-select-hint, .dam-asset-card.is-selected .dam-select-hint { opacity: 1; }
.dam-asset-select { position: absolute; z-index: 2; top: 9px; right: 9px; display: grid; place-items: center; width: 26px; height: 26px; border: 1px solid #ffffff45; border-radius: 5px; background: #131c10c9; }
.dam-asset-select input { accent-color: var(--gold, #e6bd62); width: 15px; min-height: 15px; margin: 0; }
.dam-asset-body { min-width: 0; padding: 13px 13px 11px; }
.dam-asset-body :is(h3, .dam-asset-title) { display: block; margin: 0 0 7px; color: #e0e7d2; font-size: 11px; line-height: 1.6; font-weight: 550; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.dam-asset-title { width: 100%; text-align: left; padding: 0; }
.dam-asset-title:hover { color: var(--gold, #e6bd62); }
.dam-asset-meta { display: flex; align-items: center; justify-content: space-between; gap: 9px; color: #9eac8b; font-size: 10px; line-height: 1.5; }
.dam-asset-meta span:first-child { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.dam-asset-meta span:last-child { flex-shrink: 0; font-variant-numeric: tabular-nums; }
.dam-asset-actions { display: flex; align-items: center; gap: 7px; margin-top: 10px; padding-top: 9px; border-top: 1px solid #35402b; }
.dam-asset-actions .tag, .dam-asset-tag { display: inline-block; max-width: 100%; padding: 4px 6px; border-radius: 4px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; background: #303c23; color: #c3ceae; font-size: 9px; }
.dam-asset-actions :is(.download, .dam-info-button, a) { display: grid; place-items: center; min-width: 29px; min-height: 29px; padding: 5px; border-radius: 5px; color: #b6c59e; }
.dam-asset-actions :is(.download, .dam-info-button, a):hover { background: #35402a; color: var(--gold, #e6bd62); }
.dam-asset-actions :is(.download, a) { margin-left: auto; }
.dam-asset-actions .btn { min-height: 28px; padding: 5px 8px; font-size: 10px; }
.dam-assets.is-list { display: flex; flex-direction: column; gap: 7px; }
.dam-assets.is-list .dam-asset-card { display: flex; align-items: center; width: 100%; }
.dam-assets.is-list .dam-asset-thumb { width: 88px; height: 82px; flex-shrink: 0; border-bottom: 0; border-right: 1px solid #35402b; }
.dam-assets.is-list .dam-asset-thumb :is(.format, .dam-format, .dam-asset-kind, .dam-select-hint) { display: none; }
.dam-assets.is-list .dam-file-icon svg { width: 28px; height: 28px; }
.dam-assets.is-list .dam-asset-thumb .pdf-preview { gap: 5px; }
.dam-assets.is-list .dam-asset-thumb .pdf-preview svg { width: 24px; height: 24px; }
.dam-assets.is-list .dam-asset-thumb .pdf-preview span { font-size: 8px; }
.dam-assets.is-list .dam-asset-body { flex: 1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(110px, .45fr); gap: 6px 20px; align-items: center; padding: 12px 16px; }
.dam-assets.is-list .dam-asset-body :is(h3, .dam-asset-title) { margin-bottom: 0; }
.dam-assets.is-list .dam-asset-meta { grid-column: 1; justify-content: flex-start; }
.dam-assets.is-list .dam-asset-actions { grid-column: 2; grid-row: 1 / span 2; margin: 0; padding: 0; border: 0; justify-content: flex-end; }
.dam-assets.is-list .dam-asset-actions :is(.tag, .dam-asset-tag) { max-width: 150px; }
.dam-assets.is-list .dam-asset-actions :is(.download, a) { margin-left: 0; }
.dam-empty { grid-column: 1 / -1; width: 100%; padding: 54px 24px; text-align: center; background: #171e12; border: 1px dashed #48553a; border-radius: 9px; }
.dam-empty > svg { width: 32px; height: 32px; color: #a1ad7d; margin-bottom: 12px; }
.dam-empty > span { display: grid; place-items: center; margin-bottom: 15px; color: #a1ad7d; }
.dam-empty > span svg { width: 30px; height: 30px; }
.dam-empty h2, .dam-empty h3 { font-size: 18px; line-height: 1.4; margin: 0 0 10px; font-weight: 500; color: #d8e1c6; }
.dam-empty p { max-width: 480px; margin: 0 auto; color: #a7b494; font-size: 12px; line-height: 1.8; }
.dam-empty .btn { margin-top: 18px; }
.dam-pagination { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 12px; margin: 24px 0 0; color: var(--dam-muted); font-size: 11px; }
.dam-pagination > div { display: flex; align-items: center; gap: 8px; }

/* Details are separate from selection and do not alter an asset's permissions. */
.dam-inspector {
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  z-index: 25;
  min-width: 0;
  width: var(--dam-inspector-width);
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  background: #1a2115;
  border-left: 1px solid #3d4931;
}
.dam-shell:not(.has-inspector) .dam-inspector:not(.is-open) { display: none; }
.dam-inspector-header { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 66px; padding: 15px 20px; border-bottom: 1px solid #3d4931; }
.dam-inspector-header h2 { margin: 0; font-size: 13px; font-weight: 550; }
.dam-inspector-header button { min-width: 32px; min-height: 32px; padding: 6px; border-radius: 5px; color: #afbd9a; }
.dam-inspector-header button:hover { background: #303c25; color: #f1d18b; }
.dam-inspector-content, .dam-inspector-body, .dam-inspector-scroll { padding: 18px 20px; flex: 1; min-height: 0; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #46553a transparent; }
.dam-inspector-preview { position: relative; display: flex; align-items: center; justify-content: center; width: 100%; aspect-ratio: 1; max-height: 36vh; margin: 0 0 19px; background: #10190b; border: 1px solid #3a492e; border-radius: 7px; overflow: hidden; }
.dam-inspector-preview > span svg { width: 42px; height: 42px; color: #c8be84; }
.dam-inspector-preview .btn { position: absolute; inset: auto 12px 12px 12px; font-size: 11px; color: #ece5cf; background: #16210de6; border-color: #6c7b55; }
.dam-inspector-preview .btn:hover { background: #31401fed; color: var(--gold, #e6bd62); }
.dam-inspector-preview :is(img, video) { display: block; width: 100%; height: 100%; max-height: 36vh; object-fit: contain; }
.dam-inspector-preview iframe { width: 100%; height: 100%; border: 0; background: #fff; }
.dam-inspector-preview .pdf-preview { width: 100%; background: #222e19; }
.dam-inspector-preview .pdf-preview svg { width: 42px; height: 42px; }
.dam-inspector-title { font-size: 16px; line-height: 1.5; font-weight: 550; color: #e4eacd; margin: 0 0 8px; overflow-wrap: anywhere; }
.dam-inspector-description { color: #a7b697; font-size: 11px; line-height: 1.8; margin: 0 0 22px; white-space: pre-wrap; }
.dam-inspector-meta { display: grid; grid-template-columns: 86px minmax(0, 1fr); gap: 12px 10px; margin: 22px 0; padding: 18px 0; border-block: 1px solid #37462b; font-size: 11px; line-height: 1.6; }
.dam-inspector-meta dt { color: #94a780; }
.dam-inspector-meta dd { min-width: 0; margin: 0; color: #d4dec3; overflow-wrap: anywhere; }
.dam-inspector-meta .tag { display: inline-block; white-space: normal; margin: 2px 2px 2px 0; }
.dam-inspector-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 18px; }
.dam-inspector-tags :is(.tag, span) { display: inline-block; padding: 5px 7px; border-radius: 4px; font-size: 10px; line-height: 1.5; background: #303e23; color: #c3d1ab; white-space: normal; }
.dam-inspector-section { margin: 22px 0; }
.dam-inspector-section h4 { margin: 0 0 10px; font-size: 10px; font-weight: 550; color: #a3b28f; text-transform: uppercase; letter-spacing: 1px; }
.dam-inspector-section p { color: #9aaa88; font-size: 11px; line-height: 1.7; margin: 0; }
.dam-inspector-collections { display: grid; gap: 7px; }
.dam-inspector-collections a { display: flex; align-items: flex-start; gap: 7px; padding: 8px 9px; border: 1px solid #3a4a2b; border-radius: 5px; background: #222e19; color: #c9d7b5; font-size: 10px; line-height: 1.6; overflow-wrap: anywhere; }
.dam-inspector-collections a:hover { border-color: #7b8554; color: var(--gold, #e6bd62); }
.dam-inspector-collections a svg { width: 15px; height: 15px; margin-top: 2px; }
.dam-inspector-actions { display: flex; gap: 9px; flex-wrap: wrap; margin: 18px 0 0; }
.dam-inspector-actions .btn { flex: 1; font-size: 11px; }
.dam-inspector-footer { padding: 16px 20px; border-top: 1px solid #3d4931; color: #96a686; font-size: 10px; line-height: 1.7; background: #17200f; }
.dam-inspector-footer p { margin: 0; }
.dam-inspector-footer { display: grid; gap: 9px; }
.dam-inspector-footer .btn { width: 100%; font-size: 11px; }
.dam-icon-button { display: inline-grid; place-items: center; min-width: 36px; min-height: 36px; border: 1px solid #414d35; border-radius: 6px; color: #b5c19e; background: #202a18; }
.dam-icon-button:hover { color: var(--gold, #e6bd62); background: #303b25; }
.dam-menu-toggle, .dam-sidebar-close, .dam-scrim { display: none; }
.dam-inspector-empty { display: grid; place-content: center; padding: 24px; min-height: 280px; text-align: center; color: #a7b494; }
.dam-inspector-empty svg { width: 32px; height: 32px; margin: 0 auto 12px; }
.dam-inspector-empty h3 { font-size: 15px; color: #d3dfbf; margin: 0 0 8px; }
.dam-inspector-empty p { margin: 0; font-size: 11px; line-height: 1.7; }

@media (max-width: 1280px) {
  .dam-shell { --dam-sidebar-width: 224px; --dam-inspector-width: 296px; }
  .dam-library, .dam-main .content { padding: 24px; }
  .dam-main :is(.dam-topbar, .topbar) { padding-inline: 24px; }
  .dam-assets { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
  .dam-inspector-content, .dam-inspector-body, .dam-inspector-scroll { padding-inline: 17px; }
}
@media (max-width: 1000px) {
  .dam-shell, .dam-shell.has-inspector { display: block; }
  .dam-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: min(285px, calc(100vw - 44px));
    z-index: 60;
    visibility: hidden;
    transform: translateX(-100%);
    box-shadow: 12px 0 40px #0007;
    transition: transform .18s ease, visibility .18s;
  }
  .dam-sidebar.is-open { visibility: visible; transform: none; }
  .dam-sidebar-close { display: inline-grid; place-items: center; position: absolute; top: 12px; right: 9px; min-width: 30px; min-height: 30px; border-radius: 5px; color: #b4bea2; }
  .dam-brand { padding-right: 24px; }
  .dam-menu-toggle { display: inline-grid; place-items: center; min-width: 36px; min-height: 36px; padding: 6px; border: 1px solid #414d35; border-radius: 6px; color: #b5c19e; background: #202a18; }
  .dam-scrim.is-active { display: block; position: fixed; inset: 0; z-index: 55; width: 100%; height: 100vh; height: 100dvh; background: #070d04b8; border: 0; padding: 0; }
  .dam-inspector {
    display: flex;
    position: fixed;
    inset: 0 0 0 auto;
    z-index: 65;
    width: min(360px, calc(100vw - 24px));
    visibility: hidden;
    transform: translateX(100%);
    transition: transform .18s ease, visibility .18s;
    box-shadow: -12px 0 40px #0008;
  }
  .dam-inspector.is-open { visibility: visible; transform: none; }
  .dam-shell:not(.has-inspector) .dam-inspector:not(.is-open) { display: flex; }
  .dam-toolbar .dam-search { flex-basis: 220px; }
  .dam-assets { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
  .dam-folder-row { min-height: 40px; }
  .dam-folder-toggle, .dam-tree-toggle { height: 34px; }
}
@media (max-width: 640px) {
  .dam-main :is(.dam-topbar, .topbar) { min-height: 60px; padding: 10px 16px; gap: 10px; }
  .dam-topbar-title { font-size: 11px; }
  .dam-topbar-left, .dam-topbar-actions { gap: 8px; }
  .dam-topbar-scope { display: none; }
  .dam-private { font-size: 8px; letter-spacing: .5px; }
  .dam-demo-switch { font-size: 9px; gap: 5px; }
  .dam-demo-switch select { max-width: 130px; font-size: 9px; padding: 6px; }
  .dam-main .pilot-switch { letter-spacing: .3px; font-size: 8px; }
  .dam-main .pilot-switch select { max-width: 130px; font-size: 10px; }
  .dam-library, .dam-main .content { padding: 22px 16px 32px; }
  .dam-library-header { flex-wrap: wrap; margin-bottom: 18px; }
  .dam-library-header h1 { font-size: 25px; }
  .dam-library-header .collection-actions { justify-content: flex-start; }
  .dam-toolbar { gap: 8px; padding: 10px; }
  .dam-toolbar .dam-search { flex-basis: 100%; }
  .dam-toolbar > select { flex: 1 1 100px; }
  .dam-toolbar > label { flex: 1 1 100px; min-width: 0; }
  .dam-toolbar > label select { width: 100%; }
  .dam-toolbar .btn { min-height: 38px; }
  .dam-filter-row { gap: 10px; padding: 12px; }
  .dam-filter-row label { flex-basis: calc(50% - 10px); min-width: 120px; }
  .dam-folders { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .dam-folder-tile { gap: 8px; padding: 10px; align-items: flex-start; }
  .dam-folder-tile :is(.folder-icon, .dam-folder-icon, img), .dam-folder-tile > svg:first-child { width: 30px; height: 30px; }
  .dam-folder-tile > svg:last-child { display: none; }
  .dam-folder-tile strong { font-size: 10px; }
  .dam-folder-tile small { font-size: 9px; }
  .dam-assets { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .dam-asset-thumb { height: 160px; }
  .dam-asset-body { padding: 10px; }
  .dam-asset-body :is(h3, .dam-asset-title) { font-size: 10px; }
  .dam-asset-meta { font-size: 9px; gap: 5px; }
  .dam-asset-actions { gap: 3px; }
  .dam-asset-actions :is(.tag, .dam-asset-tag) { font-size: 8px; }
  .dam-asset-actions .btn { padding: 4px 6px; font-size: 9px; }
  .dam-asset-actions :is(.download, .dam-info-button, a) { min-height: 30px; min-width: 27px; }
  .dam-assets.is-list .dam-asset-thumb { width: 64px; height: 80px; }
  .dam-assets.is-list .dam-asset-body { padding: 10px; grid-template-columns: minmax(0, 1fr) auto; gap: 5px 7px; }
  .dam-assets.is-list .dam-asset-actions :is(.tag, .dam-asset-tag) { display: none; }
  .dam-assets.is-list .dam-asset-actions .btn { display: none; }
  .dam-main .page-title { flex-wrap: wrap; gap: 12px; }
  .dam-main .page-title h1 { font-size: 25px; }
  .dam-main .table-wrap { max-width: 100%; }
  .dam-main .detail-list { grid-template-columns: 1fr; gap: 8px; }
  .dam-main .cards { grid-template-columns: 1fr; }
}
@media (max-width: 380px) {
  .dam-assets { grid-template-columns: 1fr; }
  .dam-folders { grid-template-columns: 1fr; }
  .dam-asset-thumb { height: 205px; }
  .dam-main .pilot-switch { max-width: 160px; }
}
@media (prefers-reduced-motion: reduce) {
  .dam-shell *, .dam-shell *::before, .dam-shell *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

/* Global attention queues: counts represent work pending, not an unread inbox. */
.hq-notifications{position:relative;font-size:12px}
.hq-notifications>summary{display:flex;align-items:center;gap:8px;cursor:pointer;list-style:none;padding:8px 10px;border:1px solid #38442c;border-radius:6px;min-height:36px;color:#e6bd62}
.hq-notifications>summary::-webkit-details-marker{display:none}
.hq-notifications summary svg{width:20px;height:20px}
.hq-notifications summary:focus-visible{outline:2px solid #e6bd62;outline-offset:3px}
.hq-notification-panel{position:absolute;right:0;top:calc(100% + 10px);width:340px;max-width:calc(100vw - 32px);z-index:60;padding:18px;background:#1c2416;border:1px solid #4b573d;border-radius:10px;box-shadow:0 16px 45px #0008}
.hq-notification-panel header{display:flex;align-items:center;justify-content:space-between;gap:12px}
.hq-notification-panel p{font-size:12px;line-height:1.5;color:#b3bba9}
.hq-notification-panel nav{display:grid;gap:6px}
.hq-notification-panel nav a{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:12px;border:1px solid #3a462f;border-radius:6px;text-decoration:none;color:#e6e9df}
.hq-notification-panel nav a:hover{background:#2c3821;border-color:#e6bd62}
.hq-notification-panel nav strong{color:#e6bd62}
.ct-review-preview{border:1px solid #414934;border-radius:8px;padding:14px;margin:0 0 24px;background:#11170d}
.ct-review-preview h3{margin:0 0 12px;font-size:14px}
.ct-review-preview .preview-large{display:block;width:100%;max-height:48vh;object-fit:contain}
.ct-review-preview a{color:#e6bd62}
.ct-pdf-preview{width:100%;height:50vh;min-height:260px;border:0;background:#fff}
@media(max-width:700px){.hq-notification-panel{position:fixed;top:70px;right:16px}.dam-topbar-actions .dam-private{display:none}}

.hq-notifications [hidden],.dam-nav .dam-count[hidden]{display:none}

/* Assigned store identity stays visible on every page, including mobile. */
.dam-store-identity{display:flex;align-items:center;gap:24px;flex-wrap:wrap;padding:18px 28px;background:#1b2215;border-bottom:1px solid #3c462f}
.dam-identity-label{font-size:10px;letter-spacing:1.3px;text-transform:uppercase;color:#e6bd62;font-weight:600}
.dam-store-identity dl{display:flex;flex-wrap:wrap;gap:16px 32px;margin:0;flex:1;min-width:0}
.dam-store-identity dl>div{min-width:0;max-width:100%}
.dam-store-identity dt{color:#abb69d;font-size:11px;margin-bottom:4px}
.dam-store-identity dd{margin:0;font-size:15px;font-weight:600;color:#edf0e5;overflow-wrap:anywhere}
.dam-store-identity>a{display:flex;align-items:center;gap:6px;font-size:12px;color:#e6bd62;text-decoration:none}
.dam-store-identity>a svg{width:14px;height:14px}
.dam-scope strong{overflow-wrap:anywhere}
@media(max-width:700px){.dam-store-identity{padding:16px;gap:12px}.dam-identity-label{flex-basis:100%}.dam-store-identity dl{flex-basis:100%;gap:16px 24px}.dam-store-identity dd{font-size:16px}.dam-store-identity>a{padding-block:6px}}

.dam-scope-type{display:block;font-size:10px;letter-spacing:1px;text-transform:uppercase;color:#e6bd62;margin-bottom:5px}
.home-settings-panel{padding:24px;margin-bottom:20px}
.home-settings-panel label{display:flex;flex-direction:column;gap:8px;margin:16px 0;font-size:13px}
.home-settings-panel input,.home-settings-panel textarea{width:100%;padding:12px;background:#171914;color:var(--dam-text);border:1px solid var(--line);border-radius:7px;font:inherit}
.home-settings-panel textarea{min-height:90px;resize:vertical}
.home-settings-panel fieldset{border:1px solid var(--line);padding:18px;margin:20px 0;border-radius:8px}
.home-state-options{display:flex;flex-wrap:wrap;gap:10px 24px}
.home-state-options label{flex-direction:row;align-items:center}.home-state-options input{width:auto}
.home-row-actions,.home-settings-actions{display:flex;flex-wrap:wrap;align-items:center;gap:10px}.home-settings-actions>p{width:100%}
.home-resources{margin:20px 0}.home-resources h2{font-size:14px}.home-resources>div{display:flex;flex-wrap:wrap;gap:12px}.home-resources small{display:block;margin-top:5px}

.pdf-inline-preview{padding:12px;border:1px solid var(--line);border-radius:8px}.pdf-inline-toolbar{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap}.pdf-inline-preview canvas{display:block;margin:12px auto;background:white;max-width:100%;height:auto}.pdf-inline-preview a{color:var(--gold)}

/* Public mailer content is rendered from the reviewed snapshot without the app. */
.mailer-public-page{background:#f7f4ed;color:#25251f;min-height:100vh}
.mailer-public-deck{width:min(100% - 40px,960px);margin:0 auto;padding:48px 0 64px;overflow-wrap:anywhere}
.mailer-public-deck header{padding-bottom:32px;border-bottom:1px solid #d7d2c5}
.mailer-public-deck header img{display:block;width:156px;height:auto;margin-bottom:32px}
.mailer-public-deck h1{font-size:clamp(32px,6vw,58px);line-height:1.1;margin:16px 0}
.mailer-public-deck h2{font-size:clamp(22px,3vw,32px);line-height:1.25;margin:0 0 16px}
.mailer-public-deck p{white-space:pre-line;line-height:1.7;margin:12px 0}
.mailer-public-deck .btn{min-height:44px;margin-top:12px;white-space:normal}
.mailer-public-deck section,.mailer-public-deck footer{padding:28px 0;border-bottom:1px solid #d7d2c5}
.mailer-public-deck section article{display:inline-block;vertical-align:top;width:min(100%,280px);padding:16px 20px 16px 0}
.mailer-public-deck section article strong{font-size:30px}
.mailer-public-deck section article small{color:#59594e}
.mailer-public-deck footer a{display:block;width:fit-content;margin:10px 0;color:#6a4b10;text-decoration:underline}
#mailer-publish-form .mailer-public-deck{width:100%;padding:24px;color:#25251f;background:#f7f4ed;border-radius:10px}
#mailer-publish-form .mailer-public-deck h1{font-size:32px}
#mailer-form fieldset{border:1px solid var(--line,#deded6);border-radius:8px;margin:18px 0;padding:16px;min-width:0}
#mailer-form .field,#mailer-targets-form .field{display:grid;gap:7px;margin:14px 0}
#mailer-form input,#mailer-form textarea,#mailer-targets-form select{max-width:100%;width:100%;box-sizing:border-box}
#mailer-form [data-mailer-slide]>.btn,#mailer-form [data-mailer-stat]>.btn{margin:4px 4px 0 0}
#mailer-targets-form [data-mailer-target-import-preview]{margin:12px 0;font-weight:600}
.mailer-qr{display:grid;gap:20px;overflow-wrap:anywhere}
.mailer-qr [data-mailer-qr-image]{min-height:240px}
.mailer-qr svg{display:block;width:240px;max-width:100%;height:auto}
@media(max-width:600px){.mailer-public-deck{width:calc(100% - 32px);padding-top:28px}.mailer-public-deck section article{width:100%;padding-right:0}}

/* Shared dashboard rhythm. These rules stay inside the signed-in workspace. */
.dam-shell .btn { min-height: 44px; font-size: 12px; font-weight: 550; line-height: 1.5; }
.dam-brand a { min-height: 44px; }
.dam-sidebar { padding-top: 22px; }
.dam-nav { gap: 4px; }
.dam-nav :is(a, button) { min-height: 44px; padding: 10px 12px; border-radius: 8px; font-size: 12px; line-height: 1.5; }
.dam-nav :is(.active, .is-active, [aria-current="page"]), .dam-nav :is(.active, .is-active, [aria-current="page"]):hover { border-color: #5a4e2e; background: #35301f; color: #f1d187; box-shadow: inset 2px 0 0 var(--gold); }
.dam-management .dam-nav :is(a, button) { min-height: 42px; font-size: 11px; }
.dam-folder-disclosure > summary, .dam-management > summary {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 12px;
  border-radius: 7px;
  color: #aeb79f;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.6;
  letter-spacing: 0;
  text-transform: none;
  list-style: none;
}
.dam-folder-disclosure > summary::-webkit-details-marker, .dam-management > summary::-webkit-details-marker { display: none; }
.dam-folder-disclosure > summary::before, .dam-management > summary::before {
  content: '';
  width: 6px;
  height: 6px;
  margin-inline: 1px 3px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(-45deg);
  flex-shrink: 0;
}
.dam-folder-disclosure[open] > summary::before, .dam-management[open] > summary::before { transform: rotate(45deg); }
.dam-folder-disclosure > summary:hover, .dam-management > summary:hover { background: #252b20; }
.dam-folder-disclosure > summary .dam-folder-count { float: none; margin-left: auto; }
.dam-folder-row { min-height: 42px; gap: 7px; border-radius: 7px; }
.dam-folder-row > :is(a, button):not(.dam-folder-toggle):not(.dam-tree-toggle) { min-height: 34px; font-size: 11px; }
.dam-folder-toggle, .dam-tree-toggle { width: 30px; height: 34px; flex-basis: 30px; border-radius: 6px; }
.dam-folder-spacer, .dam-tree-spacer { width: 30px; }
.dam-sidebar-footer { padding-top: 16px; gap: 12px; }
.dam-sidebar-footer small { line-height: 1.5; }
/* The open accordion owns the remaining rail space; identity stays in view. */
.dam-sidebar { min-height: 0; overflow-y: hidden; }
.dam-sidebar > :is(.dam-brand, .dam-scope, .dam-nav, .dam-sidebar-footer) { flex-shrink: 0; }
.dam-sidebar > :is(.dam-folder-disclosure, .dam-management) { flex: 0 0 auto; min-height: 0; max-height: none; overflow-y: hidden; }
.dam-sidebar > :is(.dam-folder-disclosure, .dam-management)[open] { flex: 1 1 0; min-height: 0; overflow-y: auto; }
.dam-management { padding-top: 0; margin-top: 12px; }
.dam-management > summary { position: sticky; top: 0; z-index: 1; background: #181b15; }
.dam-sidebar-footer { margin-top: auto; }
/* Short windows use one rail scrollbar so every link and the account remain reachable. */
@media (max-height: 640px) {
  .dam-sidebar { overflow-y: auto; }
  .dam-sidebar > :is(.dam-folder-disclosure, .dam-management),
  .dam-sidebar > :is(.dam-folder-disclosure, .dam-management)[open] { flex: 0 0 auto; overflow-y: visible; }
  .dam-sidebar-footer { margin-top: 14px; }
}

.dam-main :is(.dam-topbar, .topbar) { min-height: 72px; padding: 12px var(--dam-page-gutter); gap: 18px; }
.dam-topbar-left { flex: 1; gap: 14px; }
.dam-topbar-title { font-size: 13px; line-height: 1.5; color: #d7ddcc; }
.dam-topbar-scope { font-size: 11px; color: var(--dam-muted); }
.dam-topbar-actions { flex-shrink: 0; gap: 10px; }
.dam-topbar-actions > button, .dam-icon-button, .dam-menu-toggle { min-width: 44px; min-height: 44px; border-radius: 8px; }
.dam-topbar-actions > button { padding: 10px 12px; }
.dam-shell .dam-topbar-actions .dam-private { display: inline-flex; align-items: center; min-height: 28px; padding: 5px 8px; border: 1px solid #403c29; border-radius: 5px; background: #252419; color: #d4c498; line-height: 1.5; }
.dam-sidebar-close { min-width: 40px; min-height: 40px; }
.dam-main .content, .dam-library { padding: 28px var(--dam-page-gutter) 48px; }
.dam-main .content .dam-library { padding: 0; }
.dam-shell .dam-main .mg-page { max-width: 1320px; min-width: 0; }
.dam-shell .dam-main :is(.dam-library-header, .page-title),
.dam-shell .dam-main .mg-page > .mg-header,
.dam-shell .dam-main .mg-page > .section-head:has(h1) { align-items: flex-start; gap: 24px; margin: 0 0 var(--dam-page-gap); }
.dam-shell .dam-main :is(.dam-library-header, .page-title) > div,
.dam-shell .dam-main .mg-page > .mg-header > div { min-width: 0; }
.dam-shell .dam-main :is(.dam-library-header, .page-title) h1,
.dam-shell .dam-main .mg-page > :is(.mg-header, .section-head) h1 { font-size: clamp(28px, 2.3vw, 32px); font-weight: 550; letter-spacing: -.9px; line-height: 1.2; margin: 8px 0 10px; }
.dam-shell .dam-main :is(.dam-library-header, .page-title) p,
.dam-shell .dam-main .mg-page > :is(.mg-header, .section-head) p:not(.eyebrow) { max-width: 680px; margin: 0; color: var(--dam-muted); font-size: 13px; line-height: 1.7; }
.dam-shell .dam-main .mg-header-actions { padding-top: 8px; gap: 10px; }
.dam-library-header .collection-actions { gap: 10px; }
.dam-breadcrumbs { margin-bottom: 18px; gap: 8px; }
.dam-breadcrumbs :is(a, button) { min-height: 32px; display: inline-flex; align-items: center; }
.dam-toolbar { padding: 12px; gap: 10px; margin-bottom: var(--dam-page-gap); border-color: #39412f; border-radius: var(--dam-radius); background: var(--dam-surface); }
.dam-search { min-height: 44px; border-color: #414936; border-radius: 8px; background: #131710; }
.dam-search input { min-height: 42px; padding: 11px 10px; font-size: 13px; }
.dam-toolbar select { min-height: 44px; font-size: 12px; padding-block: 10px; }
.dam-toolbar .btn { min-height: 44px; font-size: 12px; }
.dam-view-toggle { padding: 3px; border-radius: 8px; }
.dam-view-toggle button { min-width: 38px; min-height: 36px; border-radius: 5px; }
.dam-filter-row { padding: 16px; gap: 14px; margin-top: -10px; margin-bottom: var(--dam-page-gap); border-radius: var(--dam-radius); }
.dam-filter-row label { font-size: 11px; }
.dam-filter-row select { min-height: 44px; font-size: 12px; }
.dam-results-summary, .dam-results-heading, .dam-section-label { margin-block: var(--dam-page-gap) 14px; font-size: 12px; line-height: 1.6; }
.dam-results-summary h2, .dam-results-heading h2, .dam-section-label h2 { font-size: 14px; font-weight: 550; color: #e0e5d5; }
.dam-section-label p { margin: 5px 0 0; font-size: 12px; line-height: 1.6; color: var(--dam-muted); }
.dam-section-label > span { flex-shrink: 0; font-variant-numeric: tabular-nums; }

/* State and nested-folder cards use the same artwork, title and action rhythm. */
.dam-folders { grid-template-columns: repeat(auto-fill, minmax(min(220px, 100%), 1fr)); gap: 12px; margin-bottom: var(--dam-page-gap); }
.dam-folder-tile { align-items: center; min-height: 84px; padding: 16px; gap: 14px; border-color: #39412f; border-radius: var(--dam-radius); background: var(--dam-surface); }
.dam-folder-tile:hover { border-color: #827246; background: var(--dam-raised); }
.dam-folder-tile :is(.dam-folder-icon, .folder-icon, img), .dam-folder-tile > svg:first-child { width: 48px; height: 48px; border-radius: 8px; }
.dam-folder-tile > svg:first-child { padding: 11px; background: #303626; }
.dam-folder-tile strong { font-size: 13px; font-weight: 550; line-height: 1.5; color: #e8eadf; }
.dam-folder-tile small { margin-top: 4px; color: var(--dam-muted); font-size: 11px; line-height: 1.5; }
.dam-folder-tile > svg:last-child { width: 16px; height: 16px; color: #9da68d; }
.dam-folder-tile:focus-visible, .dam-asset-thumb:focus-visible { outline-offset: -3px; }

.dam-assets { grid-template-columns: repeat(auto-fill, minmax(min(230px, 100%), 1fr)); gap: 16px; }
.dam-asset-card { border-radius: var(--dam-radius); border-color: #39412f; background: var(--dam-surface); }
.dam-asset-thumb { height: 190px; background: #23291c; }
.dam-asset-body { padding: 16px 16px 12px; }
.dam-asset-body :is(h3, .dam-asset-title) { font-size: 12px; line-height: 1.6; color: #e6eadd; }
.dam-asset-meta { font-size: 11px; color: var(--dam-muted); }
.dam-asset-actions { gap: 8px; margin-top: 12px; padding-top: 10px; }
.dam-asset-actions :is(.download, .dam-info-button, a) { min-width: 40px; min-height: 40px; border-radius: 7px; }
.dam-asset-actions .btn { min-height: 40px; }
.dam-asset-tag { font-size: 10px; padding: 5px 7px; }
.dam-select-hint { padding: 7px 9px; border-radius: 6px; font-size: 10px; }
.dam-assets.is-list { gap: 10px; }
.dam-assets.is-list .dam-asset-thumb { width: 96px; height: 96px; }
.dam-assets.is-list .dam-asset-body { padding: 14px 18px; gap: 7px 20px; }
.dam-assets.is-list .dam-asset-title { font-size: 13px; }
.dam-assets.is-list .dam-asset-actions .btn { display: inline-flex; }
.dam-shell .dam-collection-grid { gap: 16px; }
.dam-shell .dam-collection-card { border-radius: var(--dam-radius); background: var(--dam-surface); }
.dam-shell .dam-collection-cover { height: 170px; }
.dam-shell .dam-collection-cover:focus-visible { outline-offset: -3px; }
.dam-shell .dam-collection-body { padding: 17px; }
.dam-shell .dam-collection-body h3 { font-size: 15px; }
.dam-shell .dam-collection-body p { font-size: 12px; }
.dam-shell .dam-collection-bottom { font-size: 11px; }
.dam-shell .dam-collection-open { min-height: 44px; font-size: 12px; }

.dam-inspector { background: var(--dam-surface); border-color: #39412f; }
.dam-inspector-header { min-height: 72px; padding: 14px 20px; }
.dam-inspector-header h2 { font-size: 14px; }
.dam-inspector-header button { min-width: 44px; min-height: 44px; border-radius: 8px; }
.dam-inspector-content, .dam-inspector-body, .dam-inspector-scroll { padding: 20px; }
.dam-inspector-preview { border-radius: var(--dam-radius); margin-bottom: 20px; }
.dam-inspector-title { font-size: 18px; line-height: 1.45; }
.dam-inspector-description { color: var(--dam-muted); font-size: 12px; line-height: 1.75; }
.dam-inspector-meta { font-size: 12px; gap: 14px 10px; }
.dam-inspector-collections a { min-height: 40px; font-size: 11px; padding: 10px; }
.dam-inspector-actions { gap: 10px; }
.dam-inspector-actions .btn { flex: 1 1 140px; font-size: 12px; }
.dam-inspector-footer { padding: 16px 20px; font-size: 11px; }

/* Management and review pages inherit page spacing without touching dialogs. */
.dam-shell .dam-main .mg-page .mg-toolbar { padding: 0; gap: 12px 16px; margin-bottom: 20px; border: 0; border-radius: 0; background: transparent; align-items: center; }
.dam-shell .dam-main .mg-page .mg-search input,
.dam-shell .dam-main .mg-page .mg-filter select { height: 44px; font-size: 12px; border-radius: 8px; }
.dam-shell .dam-main .mg-page .mg-guidance { margin-bottom: var(--dam-page-gap); padding: 18px 20px; border-radius: var(--dam-radius); }
.dam-shell .dam-main .mg-page .mg-guidance p { font-size: 12px; line-height: 1.75; }
.dam-shell .dam-main .mg-page .mg-stats { margin-bottom: var(--dam-page-gap); border-radius: var(--dam-radius); }
.dam-shell .dam-main .mg-page .mg-stats > div { padding: 18px 20px; }
.dam-shell .dam-main .mg-page .mg-stats dd { font-size: 26px; line-height: 1.2; }
.dam-shell .dam-main .mg-page :is(.wf-list, .wf-records, .ct-submissions) { gap: 16px; }
.dam-shell .dam-main .mg-page .wf-record { padding: 22px; border-radius: var(--dam-radius); }
.dam-shell .dam-main .mg-page .wf-record-header h2 { font-size: 17px; font-weight: 550; line-height: 1.45; }
.dam-shell .dam-main .mg-page .wf-record-body { font-size: 13px; line-height: 1.75; }
.dam-shell .dam-main .mg-page .wf-record :is(.wf-record-footer, .wf-record-actions) { margin-top: 20px; }
/* Plain record headers and action rows share the review-page spacing. */
.dam-shell .dam-main .mg-page .wf-record > header:not([class]) { display: flex; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; gap: 12px 16px; }
.dam-shell .dam-main .mg-page .wf-record > header:not([class]) h2 { flex: 1 1 260px; min-width: 0; margin: 0; font-size: 17px; font-weight: 550; line-height: 1.45; }
.dam-shell .dam-main .mg-page .wf-record > footer:not([class]) { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.dam-shell .dam-main .mg-page .wf-record > footer:not([class]) .btn { max-width: 100%; }
.dam-shell .mg-row-actions > .btn + .btn { margin-inline-start: 8px; }
/* Text controls keep their label width; only icon close buttons stay square. */
#modal .modal-head > button.btn { display: inline-flex; align-items: center; justify-content: center; width: auto; height: auto; min-width: 44px; min-height: 44px; padding: 10px 16px; }
#mailer-form :is([data-mailer-slide], [data-mailer-stat]) > .btn { margin: 6px 8px 0 0; }
#mailer-targets-form .wf-record:has(> [data-mailer-target-mailed]) { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
#mailer-targets-form .wf-record:has(> [data-mailer-target-mailed]) > :is(h3, p) { flex: 1 1 100%; margin: 0; }
.dam-shell .dam-main .mg-page .mg-header-actions .btn,
.dam-shell .dam-main .mg-page .mg-card-actions .btn,
.dam-shell .dam-main .mg-page .mg-row-actions .btn { min-height: 44px; font-size: 12px; font-weight: 550; line-height: 1.5; }
.dam-shell .dam-main .home-resources { margin-block: 0 var(--dam-page-gap); }
.dam-shell .dam-main .home-resources h2 { margin: 0 0 12px; font-size: 14px; }
.dam-shell .dam-main .home-resources > div { gap: 10px; }

/* A persistent identity line makes the current team clear on every page. */
.dashboard-identity { display: flex; align-items: center; flex-wrap: wrap; gap: 20px 28px; padding: 18px var(--dam-page-gutter); border-bottom: 1px solid var(--line); background: #191e15; }
.dashboard-identity-heading { flex: 1 1 240px; min-width: 0; }
.dashboard-role { display: block; margin-bottom: 5px; color: var(--gold); font-size: 10px; font-weight: 600; letter-spacing: 1.2px; line-height: 1.5; text-transform: uppercase; }
.dashboard-identity-title { display: block; color: var(--dam-text); font-size: 15px; font-weight: 550; line-height: 1.5; overflow-wrap: anywhere; }
.dashboard-identity-description { color: var(--dam-muted); font-size: 11px; line-height: 1.7; margin: 4px 0 0; }
.dashboard-identity .dashboard-identity-facts { display: flex; flex: 0 1 auto; flex-wrap: wrap; gap: 14px 28px; min-width: 0; margin: 0; }
.dashboard-identity .dashboard-identity-facts > div { min-width: 0; max-width: 100%; }
.dashboard-identity .dashboard-identity-facts dt { color: var(--dam-muted); font-size: 10px; line-height: 1.5; margin-bottom: 4px; }
.dashboard-identity .dashboard-identity-facts dd { color: #e0e5d5; font-size: 12px; font-weight: 550; line-height: 1.5; margin: 0; overflow-wrap: anywhere; }
.dashboard-identity .dashboard-identity-link { display: inline-flex; align-items: center; gap: 7px; min-height: 40px; font-size: 11px; color: #dbc998; }
.dashboard-identity-link:hover { color: var(--gold); }
.dashboard-identity-link svg { width: 15px; height: 15px; }

/* Compact facts and task rows let home keep its focus on the folder library. */
.dam-shell .dashboard-overview { display: grid; align-items: stretch; grid-template-columns: minmax(170px, .65fr) minmax(0, 2fr); gap: 12px 24px; margin: 0 0 var(--dam-page-gap); padding: 20px; border: 1px solid #39412f; border-radius: var(--dam-radius); background: var(--dam-surface); }
.dashboard-metrics { display: grid; grid-column: 1; grid-row: 1 / span 2; align-content: center; gap: 16px; padding-right: 24px; border-right: 1px solid var(--line); min-width: 0; }
.dashboard-metric { display: flex; align-items: center; gap: 12px; min-width: 0; }
.dashboard-metric-icon { display: grid; place-items: center; flex-shrink: 0; width: 34px; height: 34px; border-radius: 8px; color: #c6b77d; background: #2b3122; }
.dashboard-metric-icon svg { width: 18px; height: 18px; }
.dashboard-metric-copy { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.dashboard-metric-value { display: block; font-size: 23px; line-height: 1.1; font-weight: 550; letter-spacing: -.6px; color: #e9ecdf; font-variant-numeric: tabular-nums; }
.dashboard-metric-label { display: block; color: var(--dam-muted); font-size: 11px; line-height: 1.5; }
.dashboard-task-heading { grid-column: 2; min-width: 0; }
.dashboard-task-heading h2 { font-size: 14px; line-height: 1.5; font-weight: 550; color: #e0e5d5; margin: 0 0 3px; }
.dashboard-task-heading p { color: var(--dam-muted); font-size: 11px; line-height: 1.6; margin: 0; }
.dashboard-tasks { display: grid; grid-column: 2; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; min-width: 0; }
.dashboard-task { display: flex; align-items: center; gap: 10px; min-width: 0; min-height: 68px; padding: 10px 12px; border: 1px solid #353d2c; border-radius: 8px; background: #1d2318; }
.dashboard-task:hover { background: var(--dam-raised); border-color: #776a42; }
.dashboard-task-icon { display: grid; place-items: center; flex-shrink: 0; color: #baae77; }
.dashboard-task-icon svg { width: 18px; height: 18px; }
.dashboard-task-copy { flex: 1; min-width: 0; }
.dashboard-task-title { display: block; font-size: 12px; line-height: 1.5; font-weight: 550; color: #e0e5d5; }
.dashboard-task-description { display: block; color: var(--dam-muted); font-size: 10px; line-height: 1.55; margin-top: 3px; }
.dashboard-task-count { display: grid; place-items: center; flex-shrink: 0; min-width: 26px; min-height: 26px; padding: 4px 6px; border-radius: 6px; background: #37301e; color: #efd18a; font-size: 11px; font-variant-numeric: tabular-nums; }
.dashboard-task-arrow { display: grid; place-items: center; flex-shrink: 0; color: #9fa68e; }
.dashboard-task-arrow svg { width: 14px; height: 14px; }
.dashboard-management { display: flex; align-items: center; flex-wrap: wrap; grid-column: 2; gap: 8px 18px; padding-top: 4px; }
.dashboard-management a { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; font-size: 11px; color: #c6cbb7; }
.dashboard-management a:hover { color: var(--gold); }
.dashboard-management svg { width: 15px; height: 15px; }

.dam-shell .hq-notifications > summary { position: relative; display: grid; place-items: center; width: 44px; height: 44px; min-width: 44px; min-height: 44px; padding: 0; line-height: 1; border-radius: 8px; background: var(--dam-surface); }
.dam-shell .hq-notifications > summary .dam-count { position: absolute; top: -6px; right: -6px; display: grid; place-items: center; min-width: 18px; height: 18px; padding: 0 4px; margin: 0; border: 2px solid var(--dam-surface); line-height: 1; border-radius: 5px; font-size: 9px; background: #e6bd62; color: #282315; }
.dam-shell .hq-notifications[open] > summary, .dam-shell .hq-notifications > summary:hover { border-color: #8a7543; background: #292c1d; }
.dam-shell .hq-notification-panel { border-radius: var(--dam-radius); padding: 20px; }

/* Shared UI controls and action groups across every workspace page. */
.dam-shell .dam-topbar-actions { align-items: center; }
.dam-topbar-actions > :is(button, details) { flex-shrink: 0; }
.dam-topbar-actions > button:not([data-action="logout"]) { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; }
.dam-shell .dam-menu-toggle { width: 44px; height: 44px; padding: 0; }
.dam-shell .dam-sidebar-close { width: 44px; height: 44px; min-width: 44px; min-height: 44px; padding: 0; }
.dam-topbar-actions :is(button, summary) svg { display: block; width: 18px; height: 18px; }
.dam-topbar-actions :is(.theme-toggle, .ob-help-button, .hq-notifications > summary) svg { width: 20px; height: 20px; }
.dam-shell .dam-main .mg-page :is(.mg-header, .mg-section-header) { flex-wrap: wrap; }
.dam-shell .mg-search { max-width: none; }
.dam-shell .mg-toolbar .mg-results-label { display: flex; align-items: center; flex: 0 1 auto; min-height: 44px; margin: 0 0 0 auto; line-height: 1.6; }
.dam-shell .mg-toolbar--compact .mg-filter { flex: 0 1 auto; flex-direction: row; align-items: center; gap: 10px; min-width: 0; }
.dam-shell .mg-toolbar--compact .mg-filter > span { flex-shrink: 0; font-size: 12px; }
.dam-shell .mg-toolbar--compact .mg-filter select { width: auto; min-width: 160px; max-width: 100%; }
.dam-shell .mg-section-header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px 20px; margin: 24px 0 16px; }
.dam-shell .mg-section-header h2 { min-width: 0; margin: 0; font-size: 18px; line-height: 1.4; overflow-wrap: anywhere; }
.dam-shell .dam-main .mg-page > h2 { margin: 24px 0 16px; font-size: 18px; line-height: 1.4; }
.dam-shell .mg-disclosure { border-top: 1px solid var(--line); margin: 24px 0; }
.dam-shell .mg-disclosure > summary { padding: 16px 0; font-size: 13px; font-weight: 550; cursor: pointer; }
.dam-shell .dam-main :is(.record-actions, .wf-record-actions),
#modal .record-actions { display: flex; align-items: center; flex-wrap: wrap; justify-content: flex-start; gap: 12px; margin-top: 20px; }
.dam-shell .dam-main .record-actions-secondary { margin-left: auto; }
.dam-shell .mg-row-actions { white-space: normal; }
.dam-shell .mg-row-actions > .btn { margin: 4px 0; }
.dam-shell .mg-card-actions { align-items: center; gap: 10px; }
.dam-shell .mailers-page > .mailer-record + .mailer-record { margin-top: 16px; }
.dam-shell .dam-main .mg-page .tag-option .btn { min-height: 44px; }
.dam-shell .dam-view-toggle button { min-width: 44px; min-height: 44px; }
.dam-shell .dam-asset-title { min-height: 44px; display: flex; align-items: center; }
.dam-shell .dam-collection-body h3 a { display: block; }
.dam-shell .dam-main :is(.btn, .wf-pagination button), #modal .btn, .wf-join .btn { min-height: 44px; max-width: 100%; font-size: 12px; line-height: 1.5; }
.dam-shell .dam-main :is(h1, h2, h3), #modal :is(h2, h3) { overflow-wrap: anywhere; }
.dam-shell .dam-main .mg-empty { padding: 40px 20px; }
#modal .modal-head > button:not(.btn), #modal .modal-head > .icon-btn { width: 44px; height: 44px; min-width: 44px; min-height: 44px; padding: 0; }
#modal .modal-body :is(fieldset, .panel) { min-width: 0; max-width: 100%; }
#modal .modal-body { font-size: 13px; line-height: 1.7; }
.dam-shell .mailer-record > p { font-size: 13px; line-height: 1.7; }
#modal .modal-body :is(input, select):not([type="checkbox"]):not([type="radio"]) { min-height: 44px; }
#modal .modal-body :is(.mg-card-actions, .home-row-actions) { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
#modal .modal-body .wf-record + .wf-record { margin-top: 14px; }
#modal .modal-body .wf-record h3 { margin: 0 0 8px; font-size: 15px; line-height: 1.5; }
#modal .form-section + .form-section { margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--line); }
#modal .form-section > h3 { margin: 0 0 18px; font-size: 16px; line-height: 1.5; }
#modal :is(.mailer-slide-row, .mailer-stat-row) { margin: 18px 0; padding: 18px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
#modal :is(.mailer-slide-row, .mailer-stat-row) > legend { padding: 0 8px; color: var(--muted); font-size: 12px; font-weight: 600; }
.dam-shell .dam-main :is(.home-row-actions, .home-actions) { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.dam-shell .dam-main .home-settings-panel { min-width: 0; }
.dam-shell .dam-main .home-settings-panel :is(input, select, textarea) { max-width: 100%; }
@media (max-width: 700px) {
 .dam-shell .dam-topbar-actions { flex-wrap: wrap; max-width: 100%; }
 .dam-shell .dam-demo-switch { order: 10; flex: 1 1 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
 .dam-shell .dam-demo-switch select { min-width: 0; max-width: 100%; min-height: 44px; }
 .dam-shell .mg-toolbar--compact .mg-filter { flex: 1 1 auto; }
 .dam-shell .mg-toolbar--compact .mg-filter select { flex: 1; min-width: 0; }
 .dam-shell .mg-toolbar .mg-results-label { flex: 1 1 100%; min-height: 0; margin: 0; }
 .dam-shell .dam-main .record-actions-secondary { margin-left: 0; }
 .dam-shell .mg-section-header { gap: 12px; }
 .dam-shell .mg-disclosure > summary { min-height: 44px; }
.dam-shell .dam-main .mg-history-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
 .dam-shell .dam-main .mg-history-table, .dam-shell .dam-main .mg-history-table :is(tbody, tr, td) { display: block; width: 100%; min-width: 0; }
 .dam-shell .dam-main .mg-history-table tr { padding: 16px; border-bottom: 1px solid var(--line); }
 .dam-shell .dam-main .mg-history-table tr:last-child { border-bottom: 0; }
 .dam-shell .dam-main .mg-history-table td { padding: 6px 0; border: 0; overflow-wrap: anywhere; }
 .dam-shell .dam-main .mg-history-table td[data-label]::before { content: attr(data-label); display: block; color: var(--muted); font-size: 11px; margin-bottom: 4px; }
 .dam-shell .mg-stats > div:last-child:nth-child(odd) { grid-column: 1 / -1; }
}

@media (max-width: 1365px) {
  .dam-shell { --dam-page-gutter: 28px; }
  .dam-shell .dashboard-overview { grid-template-columns: minmax(170px, .65fr) minmax(0, 2fr); gap: 12px 20px; }
  .dashboard-metrics { padding-right: 20px; }
}
@media (max-width: 1000px) {
  .dam-shell { --dam-page-gutter: 24px; }
  .dam-shell .dam-tree-toggle { width: 44px; height: 44px; flex: 0 0 44px; }
  .dam-shell .dam-tree-spacer { width: 44px; }
  .dam-shell .dam-folder-row > a { min-height: 44px; }
  .dam-shell .dashboard-overview { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .dashboard-metrics { grid-column: 1; grid-row: auto; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); padding: 0 0 18px; border-right: 0; border-bottom: 1px solid var(--line); }
  .dashboard-task-heading, .dashboard-tasks, .dashboard-management { grid-column: 1; }
  .dam-main .content, .dam-library { padding-top: 24px; }
}
@media (max-width: 768px) {
  .dam-shell { --dam-page-gutter: 20px; --dam-page-gap: 22px; }
  .dam-main :is(.dam-topbar, .topbar) { min-height: 68px; gap: 12px; }
  .dam-topbar-left { gap: 10px; }
  .dam-topbar-scope { display: none; }
  .dam-shell .dam-main :is(.dam-library-header, .page-title),
  .dam-shell .dam-main .mg-page > .mg-header,
  .dam-shell .dam-main .mg-page > .section-head:has(h1) { flex-wrap: wrap; gap: 16px; }
  .dam-shell .dam-main .mg-header-actions { padding-top: 0; }
  .dam-library-header .collection-actions { justify-content: flex-start; }
  .dam-toolbar { gap: 10px; }
  .dam-toolbar .dam-search { flex-basis: 100%; }
  .dam-toolbar > label { flex: 1 1 130px; min-width: 0; }
  .dam-toolbar > label select { width: 100%; }
  .dam-filter-row label { flex-basis: calc(50% - 7px); min-width: 120px; }
  .dam-folders, .dam-assets { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dam-folder-tile { padding: 14px; gap: 12px; align-items: center; }
  .dam-folder-tile > svg:last-child { display: block; }
  .dam-asset-thumb { height: 180px; }
  .dam-asset-body { padding: 14px; }
  .dam-asset-actions :is(.download, .dam-info-button, a) { min-width: 44px; min-height: 44px; }
  .dam-assets.is-list .dam-asset-thumb { width: 80px; height: 100px; }
  .dam-assets.is-list .dam-asset-body { padding: 12px 14px; gap: 6px 12px; }
  .dam-shell .dam-main .mg-page .mg-toolbar { padding: 0; gap: 12px; }
  .dam-shell .dam-main .mg-page .mg-search { max-width: none; flex-basis: 100%; }
  .dam-shell .dam-main .mg-page .mg-filter { flex: 1 1 130px; }
  .dam-shell .dam-main .mg-page .wf-record { padding: 18px; }
  .dam-shell .dam-main .mg-page .mg-guidance { padding: 18px; }
  .dashboard-identity { gap: 14px 20px; padding-block: 16px; }
  .dashboard-identity-heading { flex-basis: 100%; }
  .dashboard-identity .dashboard-identity-facts { flex: 1 1 220px; gap: 12px 24px; }
  .dam-shell .dashboard-overview { padding: 18px; gap: 16px; }
  .dashboard-metrics { grid-template-columns: 1fr; gap: 14px; padding-bottom: 16px; }
  .dashboard-metric-copy { flex-direction: row; align-items: baseline; flex-wrap: wrap; gap: 6px 10px; }
  .dashboard-metric-value { min-width: 50px; font-size: 22px; }
  .dashboard-tasks { grid-template-columns: 1fr; gap: 8px; }
  .dashboard-task { min-height: 64px; padding: 12px; }
  .dashboard-task-description { font-size: 11px; }
  .dashboard-management { gap: 8px 16px; }
  .dashboard-management a { min-height: 40px; }
}
@media (max-width: 480px) {
  .dam-shell { --dam-page-gutter: 16px; }
  .dam-main :is(.dam-topbar, .topbar) { flex-wrap: wrap; padding-block: 10px; gap: 10px; }
  .dam-topbar-left { flex: 1 1 130px; }
  .dam-topbar-actions { gap: 8px; }
  .dam-topbar-actions > button > span { display: none; }
  .dam-topbar-actions > button { padding: 10px; }
  .dam-demo-switch { gap: 6px; max-width: 166px; }
  .dam-demo-switch select { max-width: 118px; }
  .dam-main .content, .dam-library { padding-top: 22px; padding-bottom: 36px; }
  .dam-shell .dam-main :is(.dam-library-header, .page-title) h1,
  .dam-shell .dam-main .mg-page > :is(.mg-header, .section-head) h1 { font-size: 28px; }
  .dam-shell .dam-main :is(.dam-library-header, .page-title) p,
  .dam-shell .dam-main .mg-page > :is(.mg-header, .section-head) p:not(.eyebrow) { font-size: 12px; }
  .dam-library-header .collection-actions { width: 100%; }
  .dam-toolbar { padding: 10px; }
  .dam-toolbar > label { flex-basis: 120px; }
  .dam-filter-row { padding: 14px; }
  .dam-filter-row label { flex-basis: 100%; }
  .dam-folders, .dam-assets { grid-template-columns: 1fr; gap: 12px; }
  .dam-folder-tile { min-height: 84px; padding: 16px; }
  .dam-asset-thumb { height: 215px; }
  .dam-asset-body { padding: 16px; }
  .dam-assets.is-list .dam-asset-body { grid-template-columns: minmax(0, 1fr) auto; padding: 12px; }
  .dam-assets.is-list .dam-asset-title { font-size: 12px; }
  .dam-inspector { width: calc(100vw - 16px); max-width: 360px; }
  .dam-shell .dam-main .mg-page .mg-stats > div { padding: 16px; }
  .dam-shell .dam-main .mg-page .mg-stats dd { font-size: 24px; }
  .dam-shell .dam-main .mg-page .mg-guidance { padding: 16px; }
  .dam-shell .dam-main .mg-page .wf-record { padding: 16px; }
  .dashboard-identity .dashboard-identity-facts { gap: 12px 20px; }
  .dashboard-identity-title { font-size: 14px; }
  .dam-shell .dashboard-overview { padding: 16px; }
  .dashboard-task { gap: 10px; }
  .dashboard-task-title { font-size: 12px; }
  .dam-shell .hq-notification-panel { right: 16px; max-width: calc(100vw - 32px); padding: 18px; }
}
@media (max-width: 700px) {
  .dam-shell .mg-people-table td.mg-row-actions { display: flex; flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 8px; white-space: normal; }
  .dam-shell .mg-people-table td.mg-row-actions > .btn { width: 100%; min-width: 0; margin: 0; }
  .dam-shell .mg-people-table td.mg-row-actions > .btn + .btn { margin: 0; }
}

/* Home keeps discovery first; Global review links remain compact and scannable. */
#app > .loading { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 20px; padding: 24px; color: var(--muted); font-size: 13px; line-height: 1.7; text-align: center; }
#app > .loading img { width: 132px; height: auto; }
#app > .loading p { margin: 0; }
.dam-folder-section + .dashboard-overview { margin-top: var(--dam-page-gap); }
@media (min-width: 1200px) {
 .dashboard-overview[data-dashboard-role="hq"] .dashboard-tasks { grid-template-columns: repeat(3, minmax(0, 1fr)); }
 .dashboard-overview[data-dashboard-role="hq"] .dashboard-task { min-height: 48px; }
 .dashboard-overview[data-dashboard-role="hq"] .dashboard-task-description { display: none; }
}

/* File cards keep every label visible and the same action order in both views. */
.dam-shell .dam-assets:not(.is-list) { grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr)); align-items: stretch; }
.dam-shell .dam-assets:not(.is-list) .dam-asset-card { display: flex; flex-direction: column; }
.dam-shell .dam-asset-card .dam-asset-body { flex: 1; display: flex; flex-direction: column; min-width: 0; padding: 16px; }
.dam-shell .dam-asset-card .dam-asset-title { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; min-width: 0; max-width: 100%; margin: 0 0 8px; overflow: hidden; overflow-wrap: anywhere; white-space: normal; font-size: 13px; line-height: 1.6; }
.dam-asset-context { display: flex; flex-wrap: wrap; align-items: center; gap: 5px 8px; min-width: 0; margin-bottom: 8px; font-size: 11px; line-height: 1.65; color: var(--dam-muted, var(--muted)); }
.dam-asset-context:empty { display: none; }
.dam-asset-state { display: inline-flex; max-width: 100%; padding: 2px 6px; border: 1px solid var(--line, #39412f); border-radius: 4px; color: var(--theme-accent, #d9c082); overflow-wrap: anywhere; }
.dam-asset-audience { min-width: 0; overflow-wrap: anywhere; }
.dam-shell .dam-asset-card .dam-asset-meta { align-items: flex-start; gap: 8px; min-width: 0; font-size: 11px; line-height: 1.7; }
.dam-shell .dam-asset-card .dam-asset-meta > span:first-child { overflow: visible; overflow-wrap: anywhere; white-space: normal; text-overflow: clip; }
.dam-shell .dam-asset-card .dam-asset-meta > span:last-child { text-align: right; }
.dam-asset-tags { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 6px; min-width: 0; margin: 12px 0 16px; }
.dam-shell .dam-asset-tags .dam-asset-tag { display: inline-block; min-width: 0; max-width: 100%; padding: 4px 7px; border-radius: 5px; overflow: visible; overflow-wrap: anywhere; white-space: normal; text-overflow: clip; color: var(--theme-sage-text, #c3ceae); background: var(--theme-raised, #303c23); font-size: 10px; line-height: 1.6; }
.dam-asset-tags-empty { margin: 12px 0 16px; color: var(--dam-muted, var(--muted)); font-size: 11px; line-height: 1.7; }
.dam-shell .dam-asset-card .dam-asset-actions { display: grid; gap: 8px; align-items: stretch; margin: auto 0 0; padding: 14px 0 0; border-top: 1px solid var(--line, #39412f); }
.dam-asset-quick-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; min-width: 0; }
.dam-shell .dam-asset-card .dam-asset-action { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 44px; width: 44px; height: 44px; min-width: 44px; min-height: 44px; padding: 10px; border: 1px solid var(--line, #39412f); border-radius: 7px; color: var(--theme-sage-text, #c4cfb0); background: transparent; }
.dam-shell .dam-asset-card .dam-asset-action:hover { color: var(--theme-accent, #f1d187); background: var(--dam-raised, #2b3122); }
.dam-shell .dam-asset-card .dam-asset-action:focus-visible,
.dam-shell .dam-asset-card .dam-asset-download:focus-visible { outline: 2px solid var(--gold, #e6bd62); outline-offset: 2px; }
.dam-shell .dam-asset-card .dam-asset-actions > .dam-asset-download { display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-width: 0; min-height: 44px; margin: 0; padding: 10px 12px; border: 1px solid var(--line, #39412f); border-radius: 7px; color: var(--theme-sage-text, #c4cfb0); background: transparent; font-size: 12px; font-weight: 550; line-height: 1.5; }
.dam-shell .dam-asset-card .dam-asset-actions > .dam-asset-download:hover { color: var(--theme-accent, #f1d187); background: var(--dam-raised, #2b3122); }
.dam-asset-action > svg,
.dam-asset-download > svg { flex-shrink: 0; width: 18px; height: 18px; }
.dam-asset-new { position: absolute; top: 10px; right: 10px; display: inline-flex; padding: 4px 7px; border: 1px solid #ead293; border-radius: 4px; color: #30270e; background: #efd48c; font-size: 9px; font-weight: 600; line-height: 1.6; text-transform: uppercase; letter-spacing: .6px; }
.dam-shell .dam-assets.is-list .dam-asset-card { align-items: stretch; }
.dam-shell .dam-assets.is-list .dam-asset-thumb { align-self: stretch; width: 112px; height: auto; min-height: 156px; }
.dam-shell .dam-assets.is-list .dam-asset-body { display: grid; grid-template-columns: minmax(0, 1fr) 200px; align-items: start; gap: 0 24px; }
.dam-shell .dam-assets.is-list .dam-asset-body > :is(.dam-asset-title, .dam-asset-context, .dam-asset-meta, .dam-asset-tags, .dam-asset-tags-empty) { grid-column: 1; }
.dam-shell .dam-assets.is-list .dam-asset-title { margin-bottom: 6px; }
.dam-shell .dam-assets.is-list .dam-asset-tags { margin-bottom: 0; }
.dam-shell .dam-assets.is-list .dam-asset-actions { grid-column: 2; grid-row: 1 / span 4; align-self: end; margin: 0; padding: 0; border: 0; }
.dam-shell .dam-assets.is-list .dam-asset-thumb .dam-asset-new { left: 8px; right: auto; top: auto; bottom: 8px; }
@media (max-width: 768px) {
 .dam-shell .dam-assets:not(.is-list) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
 .dam-shell .dam-assets.is-list .dam-asset-card { display: grid; grid-template-columns: 80px minmax(0, 1fr); }
 .dam-shell .dam-assets.is-list .dam-asset-card > .bt-asset-select { grid-column: 1 / -1; width: 100%; min-height: 38px; padding: 8px 12px; border-right: 0; border-bottom: 1px solid var(--line, #39412f); }
 .dam-shell .dam-assets.is-list .bt-asset-select .sr-only { position: static; width: auto; height: auto; overflow: visible; clip: auto; white-space: normal; font-size: 10px; }
 .dam-shell .dam-assets.is-list .dam-asset-thumb { grid-column: 1; grid-row: auto / span 3; width: 80px; min-height: 96px; height: 100%; border-right: 0; }
 .dam-shell .dam-assets.is-list .dam-asset-body { display: contents; }
 .dam-shell .dam-assets.is-list .dam-asset-body > :is(.dam-asset-title, .dam-asset-context, .dam-asset-meta) { grid-column: 2; margin: 0; padding-inline: 12px 16px; }
 .dam-shell .dam-assets.is-list .dam-asset-title { padding-top: 12px; }
 .dam-shell .dam-assets.is-list .dam-asset-context { padding-top: 4px; }
 .dam-shell .dam-assets.is-list .dam-asset-meta { flex-wrap: wrap; justify-content: flex-start; padding-block: 4px 12px; }
 .dam-shell .dam-assets.is-list .dam-asset-body > :is(.dam-asset-tags, .dam-asset-tags-empty) { grid-column: 1 / -1; margin: 12px 16px; }
 .dam-shell .dam-assets.is-list .dam-asset-actions { grid-column: 1 / -1; grid-row: auto; margin: 0 16px 16px; padding-top: 12px; border-top: 1px solid var(--line, #39412f); }
 .dam-shell .dam-assets.is-list .dam-asset-quick-actions { justify-content: flex-start; }
}
@media (max-width: 480px) {
 .dam-shell .dam-assets:not(.is-list) { grid-template-columns: 1fr; }
}
@media (forced-colors: active) {
 .dam-asset-new { border-color: Highlight; }
 .dam-shell .dam-asset-card .dam-asset-action:focus-visible,
 .dam-shell .dam-asset-card .dam-asset-download:focus-visible { outline-color: Highlight; }
}
