/* Visual language adapted from the supplied asset-library-design.html. */
:root {
  --bg: #141517;
  --panel: #1b1d20;
  --sidebar: #101113;
  --surface2: #232529;
  --surface3: #2b2e33;
  --text: #f0f1f2;
  --muted: #a4a6ac;
  --line: #303237;
  --accent: #fb8b4b;
  --accent-bg: #35281f;
  --accent-ink: #ffad7b;
  --green: #9acaad;
  --side: 238px;
}
body.light {
  --bg: #f4f5f7;
  --panel: #fff;
  --sidebar: #fafbfc;
  --surface2: #f0f2f4;
  --surface3: #e5e8ed;
  --text: #20232a;
  --muted: #606773;
  --line: #dce1e7;
  --accent: #e76b29;
  --accent-bg: #fff0e5;
  --accent-ink: #b34a12;
  --green: #2c7150;
}
body {
  background: var(--bg);
  color: var(--text);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5;
}
aside {
  width: var(--side);
  padding: 28px 16px 18px;
  background: var(--sidebar);
  border-right: 1px solid var(--line);
  z-index: 35;
  overflow-y: auto;
}
main {
  margin-left: var(--side);
  width: calc(100% - var(--side));
  max-width: 1740px;
  padding: 34px 36px;
}
header {
  margin-bottom: 26px;
  padding-top: 14px;
}
h1 {
  font-size: 30px;
  font-weight: 650;
  letter-spacing: -1px;
}
h2 {
  font-size: 19px;
  font-weight: 600;
}
h3 {
  font-size: 15px;
  font-weight: 600;
}
#subtitle {
  font-size: 13px;
  max-width: 800px;
}
.eyebrow {
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 1.9px;
}
.brand {
  font-size: 17px;
  gap: 11px;
}
.logo {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--accent);
  color: #24160e;
}
.brand-sub {
  display: block;
  font-size: 9px;
  color: var(--muted);
  letter-spacing: 1.7px;
  font-weight: 400;
}
.brand > div {
  line-height: 1.4;
}
aside small {
  margin: 34px 12px 10px;
  font-size: 10px;
}
nav {
  gap: 3px;
}
nav button {
  border: 1px solid transparent;
  border-radius: 8px;
  min-height: 42px;
  padding: 10px 12px;
  font-size: 13px;
}
nav button.active {
  color: var(--accent-ink);
  background: var(--accent-bg);
  border-color: color-mix(in srgb, var(--accent) 15%, transparent);
}
nav button:hover {
  background: var(--panel);
}
button,
.action-link {
  border-radius: 7px;
  padding: 9px 13px;
  font-size: 13px;
  min-height: 36px;
}
button:hover,
.action-link:hover {
  border-color: var(--muted);
  background: var(--surface2);
}
button.primary,
.primary,
.light .primary {
  background: var(--accent);
  color: #24160e;
  border-color: var(--accent);
  font-weight: 600;
}
body.light .primary {
  color: white;
}
input,
select {
  border-radius: 7px;
  padding: 10px 12px;
  font-size: 13px;
  background: var(--panel);
}
#toolbar {
  margin-bottom: 16px;
  gap: 9px;
  flex-wrap: wrap;
}
#search {
  min-width: 200px;
}
#type {
  display: none;
}
.grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.card {
  position: relative;
  background: var(--panel);
  border-radius: 10px;
  border: 1px solid var(--line);
}
.card:hover {
  border-color: var(--muted);
}
.card.selected {
  border-color: var(--accent);
}
.preview {
  height: auto;
  aspect-ratio: 1.18;
  background: linear-gradient(145deg, #303b34, #24282b);
  color: var(--muted);
  object-fit: contain;
}
.card-body {
  padding: 16px;
}
.card h3 {
  font-size: 16px;
  line-height: 1.35;
  margin: 8px 0;
}
.card p {
  font-size: 12px;
}
.tag {
  font-size: 11px;
  text-transform: none;
  letter-spacing: 0;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 3px 6px;
  color: var(--muted);
}
.card-actions {
  border-top: 1px solid var(--line);
  padding-top: 12px;
  margin-top: 13px;
}
.card-actions button {
  font-size: 12px;
  padding: 6px 8px;
}
.panel {
  padding: 22px;
  border-radius: 12px;
}
.advanced {
  background: var(--panel);
}
.badge {
  border-radius: 5px;
  padding: 3px 7px;
  background: var(--surface2);
  color: var(--muted);
  border: 1px solid var(--line);
}
.status-completed,
.status-succeeded,
.status-ready {
  color: var(--green);
  background: #21312a;
  border-color: transparent;
}
.status-failed {
  color: #f2a0a0;
  background: #392728;
  border-color: transparent;
}
.status-running {
  color: var(--accent-ink);
  background: var(--accent-bg);
  border-color: transparent;
}
th {
  background: var(--surface2);
  font-size: 11px;
  letter-spacing: 0.5px;
  color: var(--muted);
  font-weight: 500;
}
td,
th {
  padding: 13px 16px;
}
table {
  font-size: 13px;
}
pre {
  background: var(--sidebar);
  color: var(--muted);
  border: 1px solid var(--line);
}
dialog {
  background: var(--panel);
  border-radius: 14px;
  box-shadow: 0 24px 80px #0007;
}
dialog::backdrop {
  background: #080b1090;
  backdrop-filter: blur(4px);
}
.tag-pill {
  border-color: color-mix(in srgb, var(--accent) 30%, var(--line));
  background: var(--accent-bg);
  color: var(--accent-ink);
}
.tag-pill button {
  min-height: 25px;
}
.asset-tabs {
  display: flex;
  gap: 22px;
  border-bottom: 1px solid var(--line);
  margin: 0 0 18px;
  overflow: auto;
}
.asset-tab {
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  background: none;
  color: var(--muted);
  padding: 0 0 12px;
  white-space: nowrap;
  min-height: 32px;
}
.asset-tab.active {
  border-color: var(--accent);
  color: var(--text);
}
.catalog-overview {
  margin-bottom: 24px;
}
.library-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  margin-bottom: 22px;
}
.library-stat {
  padding: 15px 20px;
  border-right: 1px solid var(--line);
}
.library-stat:last-child {
  border: 0;
}
.library-stat small {
  color: var(--muted);
  display: block;
  font-size: 12px;
}
.library-stat strong {
  font-size: 25px;
  font-weight: 550;
  display: block;
  margin-top: 4px;
}
.section-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.section-line h2 {
  font-size: 16px;
  margin: 0;
}
.section-line button {
  background: none;
  border: 0;
  color: var(--muted);
  font-size: 12px;
}
.quick-collections {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 26px;
}
.collection-mini {
  height: 86px;
  position: relative;
  overflow: hidden;
  text-align: left;
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 16px;
  border-radius: 9px;
}
.collection-mini strong {
  font-size: 14px;
  display: block;
  position: relative;
  z-index: 1;
}
.collection-mini small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  position: relative;
  z-index: 1;
}
.collection-mini img {
  position: absolute;
  width: 120px;
  height: 100%;
  object-fit: cover;
  right: 0;
  top: 0;
  opacity: 0.38;
  mask-image: linear-gradient(to right, transparent, black);
}
.catalog-selection {
  position: fixed;
  z-index: 40;
  bottom: 24px;
  left: calc(50% + 119px);
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface3);
  border: 1px solid var(--muted);
  box-shadow: 0 12px 40px #0007;
  border-radius: 10px;
  padding: 12px 16px;
}
.card-pick {
  position: absolute;
  top: 12px;
  left: 12px;
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
  z-index: 2;
  padding: 0;
}
.card-favorite {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 30px;
  min-height: 29px;
  padding: 0;
  background: #171c1a70;
  border: 1px solid #ffffff35;
  color: #fff;
  border-radius: 6px;
}
.card-favorite.chosen {
  color: #ffd491;
}
.catalog-filter-panel {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  padding: 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 9px;
  margin: 0 0 14px;
}
.catalog-filter-panel label {
  margin: 0;
  flex: 1;
  min-width: 160px;
}
.active-filters {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.active-filters .filter-chip {
  display: flex;
  align-items: center;
  gap: 7px;
  background: var(--accent-bg);
  border: 1px solid color-mix(in srgb, var(--accent) 25%, var(--line));
  color: var(--accent-ink);
  border-radius: 5px;
  font-size: 11px;
  padding: 3px 7px;
  min-height: 28px;
}
.result-count {
  margin-left: auto;
  font-size: 12px;
  color: var(--muted);
}
.layout-buttons,
.theme-picker {
  display: flex;
  border: 1px solid var(--line);
  background: var(--panel);
  padding: 3px;
  gap: 3px;
  border-radius: 7px;
}
.layout-buttons button,
.theme-picker button {
  padding: 5px 10px;
  border: 0;
  min-height: 30px;
}
.layout-buttons .active,
.theme-picker .active {
  background: var(--surface3);
}
.list-layout {
  display: block;
}
.list-layout .card {
  display: grid;
  grid-template-columns: 100px 1fr;
  margin-bottom: 10px;
}
.list-layout .preview {
  height: 100%;
  min-height: 115px;
  aspect-ratio: auto;
  max-height: 170px;
}
.list-layout .card-pick {
  left: 8px;
  top: 8px;
}
.list-layout .card-favorite {
  top: 8px;
  right: 8px;
}
.list-layout .card-body {
  padding: 12px 48px 12px 16px;
}
.list-layout .card-actions {
  margin-top: 8px;
  padding-top: 8px;
}
.collection-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.collection-card {
  border: 1px solid var(--line);
  border-radius: 11px;
  overflow: hidden;
  background: var(--panel);
}
.collection-cover {
  height: 170px;
  background: linear-gradient(135deg, #405649, #242a27);
  position: relative;
}
.collection-cover img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.collection-card[data-color="terracotta"] .collection-cover {
  background: linear-gradient(135deg, #71472e, #302522);
}
.collection-card[data-color="steel"] .collection-cover {
  background: linear-gradient(135deg, #364e65, #20272f);
}
.collection-card[data-color="graphite"] .collection-cover {
  background: linear-gradient(135deg, #505157, #222325);
}
.collection-body {
  padding: 18px;
}
.collection-body h3 {
  margin: 0;
}
.collection-body p {
  font-size: 12px;
  color: var(--muted);
}
.collection-body .row {
  margin-top: 16px;
  gap: 8px;
}
.dropzone {
  padding: 32px 24px;
  border: 1px dashed var(--muted);
  border-radius: 10px;
  text-align: center;
  background: var(--panel);
  margin-bottom: 20px;
}
.dropzone.dragging {
  border-color: var(--accent);
  background: var(--accent-bg);
}
.dropzone h2 {
  margin: 6px 0;
}
.dropzone p {
  font-size: 13px;
  color: var(--muted);
}
.mobile-menu,
.mobile-scrim {
  display: none;
}
.detail-tabs {
  display: flex;
  gap: 20px;
  border-bottom: 1px solid var(--line);
  margin: 18px 0;
}
.detail-tabs button {
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  padding: 10px 0;
  background: none;
}
.detail-tabs button.active {
  border-color: var(--accent);
}
.auth-pending main {
  max-width: 1740px;
}
.auth-pending #login {
  max-width: 600px;
}
.auth-pending #login .panel {
  padding: 36px;
}
.auth-pending #login input {
  background: var(--bg);
}
.auth-pending .library-topbar {
  display: none !important;
}
.library-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  padding: 0 0 17px;
  margin-bottom: 20px;
  font-size: 12px;
  color: var(--muted);
}
.library-topbar strong {
  color: var(--text);
  font-weight: 500;
}
.library-topbar small {
  font-size: 11px;
}
.auth-pending #catalog-selection {
  display: none !important;
}
@media (min-width: 1600px) {
  main {
    padding: 36px 48px;
  }
  .grid {
    gap: 22px;
  }
}
@media (max-width: 1100px) {
  :root {
    --side: 212px;
  }
  main {
    padding: 28px 25px;
  }
  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .catalog-selection {
    left: calc(50% + 106px);
  }
  .quick-collections,
  .collection-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 720px) {
  aside {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: 238px;
    transform: translateX(-100%);
    transition: transform 0.2s;
    padding: 28px 16px;
  }
  aside.open {
    transform: none;
  }
  .mobile-scrim.visible {
    display: block;
    position: fixed;
    inset: 0;
    background: #0008;
    z-index: 34;
  }
  .mobile-menu {
    display: block;
  }
  .library-topbar {
    margin-bottom: 18px;
  }
  .library-topbar small {
    display: none;
  }
  main {
    margin: 0;
    width: 100%;
    padding: 20px 18px;
  }
  header {
    margin-bottom: 22px;
    gap: 12px;
  }
  h1 {
    font-size: 27px;
  }
  nav {
    display: grid;
    overflow: visible;
  }
  nav button {
    white-space: normal;
  }
  aside small,
  aside footer {
    display: grid;
  }
  .brand {
    margin-bottom: 0;
  }
  #toolbar {
    gap: 8px;
  }
  #search {
    flex-basis: 100%;
  }
  .grid {
    gap: 11px;
  }
  .preview {
    aspect-ratio: 1;
  }
  .card-body {
    padding: 12px 10px;
  }
  .card h3 {
    font-size: 14px;
  }
  .card p,
  .card-actions button {
    font-size: 11px;
  }
  .card-actions {
    flex-wrap: wrap;
    gap: 5px;
  }
  .library-stats {
    grid-template-columns: repeat(2, 1fr);
  }
  .library-stat {
    padding: 12px 15px;
    border-bottom: 1px solid var(--line);
  }
  .library-stat strong {
    font-size: 22px;
  }
  .library-stat:nth-child(2) {
    border-right: 0;
  }
  .library-stat:nth-child(3) {
    border-bottom: 0;
  }
  .quick-collections {
    gap: 9px;
  }
  .collection-mini {
    padding: 13px 10px;
  }
  .collection-mini strong {
    font-size: 12px;
  }
  .collection-mini small {
    font-size: 11px;
  }
  .catalog-selection {
    left: 12px;
    right: 12px;
    transform: none;
    bottom: 12px;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 6px;
    font-size: 12px;
    padding: 10px;
  }
  .catalog-selection button {
    font-size: 11px;
    padding: 6px 9px;
  }
  .collection-grid {
    gap: 12px;
  }
  .collection-cover {
    height: 140px;
  }
  .collection-body {
    padding: 13px;
  }
  .collection-body .row {
    flex-wrap: wrap;
  }
  .auth-pending aside {
    transform: none;
    position: static;
    width: 100%;
    height: auto;
  }
  .auth-pending main {
    padding-top: 0;
  }
  .auth-pending #login .panel {
    padding: 24px;
  }
  .list-layout .card {
    grid-template-columns: 80px 1fr;
  }
  .list-layout .card-body {
    padding: 10px 36px 10px 10px;
  }
  #detail.asset-drawer {
    width: 100%;
    height: 100%;
    max-height: 100vh;
    margin: 0;
    border-radius: 0;
    padding: 22px;
  }
  .asset-tabs {
    gap: 18px;
  }
  .job-list {
    grid-template-columns: 1fr;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    animation: none !important;
    transition: none !important;
  }
}
dialog.asset-drawer {
  position: fixed;
  inset: 0 0 0 auto;
  margin: 0;
  width: 540px;
  height: 100dvh;
  max-height: 100dvh;
  border-radius: 0;
  border-right: 0;
  padding: 25px;
}
.asset-drawer .preview {
  height: 300px;
  aspect-ratio: auto;
}
.asset-drawer .detail-tabs {
  position: sticky;
  top: -25px;
  background: var(--panel);
  padding-top: 12px;
  z-index: 3;
}
.asset-drawer .facts {
  grid-template-columns: 130px 1fr;
}
.asset-drawer .profile-controls {
  grid-template-columns: 1fr;
}
.asset-drawer form {
  margin-top: 24px;
}
.catalog-pagination {
  display: flex;
  gap: 15px;
  align-items: center;
  justify-content: center;
  margin-top: 24px;
}
.catalog-pagination span {
  color: var(--muted);
  font-size: 12px;
}
@media (max-width: 720px) {
  dialog.asset-drawer {
    width: 100%;
    padding: 22px;
  }
  .asset-drawer .facts {
    grid-template-columns: 1fr;
  }
  .asset-drawer .preview {
    height: 280px;
  }
}
.member.can-upload [data-page="uploads"],
.member.can-upload #upload-shortcut {
  display: block !important;
}
.auth-pending.member.can-upload #upload-shortcut {
  display: none !important;
}
.mesh-status-list {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}
.mesh-status-card {
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 14px;
  min-width: 0;
}
.mesh-status-card > strong {
  display: block;
  font-size: 13px;
  margin-bottom: 8px;
}
.mesh-status-card > .row {
  margin-top: 12px;
  gap: 8px;
}
.mesh-status-card .action-link,
.mesh-status-card button {
  font-size: 12px;
}
.mesh-status-card .advanced {
  margin-bottom: 0;
}
.mesh-status-card .facts {
  grid-template-columns: 1fr;
  font-size: 12px;
}
.mesh-status-card dd {
  overflow-wrap: anywhere;
}
.mesh-status-card .badge {
  display: inline-flex;
}
.derived-section input[type="range"] {
  width: 100%;
  accent-color: var(--accent);
}
.trust-trusted {
  color: var(--green);
  background: #21312a;
  border-color: transparent;
}
.trust-untrusted {
  color: #f2a0a0;
  background: #392728;
  border-color: transparent;
}
.trust-unknown {
  color: var(--muted);
  background: var(--surface2);
}
.card-body > .badge {
  font-size: 10px;
  margin: 3px 0 7px;
}
.source-trust {
  margin: 12px 0 24px;
  padding: 16px;
  background: var(--surface2);
  border: 1px solid var(--line);
  border-radius: 10px;
}
.source-trust p {
  font-size: 12px;
}
.source-trust .advanced {
  background: var(--panel);
}
.member [data-page="workers"] {
  display: none !important;
}
.worker-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 16px;
}
.worker-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 20px;
  min-width: 0;
}
.worker-card .row {
  justify-content: space-between;
}
.worker-card h3 {
  margin: 0;
}
.worker-card .facts {
  grid-template-columns: 100px 1fr;
  font-size: 12px;
}
.access-collections {
  max-height: 360px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-top: 14px;
}
.access-collection {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  border-bottom: 1px solid var(--line);
  gap: 12px;
}
.access-collection:last-child {
  border: 0;
}
.access-collection label {
  min-width: 0;
  overflow-wrap: anywhere;
}
.access-collection small {
  white-space: nowrap;
}
.collection-access > input {
  width: 100%;
}
@media (max-width: 600px) {
  .worker-list {
    grid-template-columns: 1fr;
  }
  .worker-card .facts {
    grid-template-columns: 1fr;
  }
  .access-collection {
    align-items: flex-start;
  }
  .access-collection small {
    padding-top: 18px;
  }
}
.lmstudio-form { display: grid; gap: 12px; }
.lmstudio-form .row { flex-wrap: wrap; }
.lmstudio-form input { max-width: 100%; }
