/* ==========================================================================
   Artist dashboard.

   A close copy of the distributor backstage the label works in daily, down to
   the type and the greys — 220px fixed rail on #3b3b3b, collapsible nav
   sections, white page title over the dark chrome, a grey filter strip, then
   dense white rows on a #e6e6e6 ground. Open Sans at 13px, the same as theirs.

   The one thing not copied is the accent: their orange becomes the site's
   coral, so the dashboard still reads as kingmichaelbeats rather than as
   somebody else's product.
   ========================================================================== */

@import url("https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,300..800;1,300..800&display=swap");

:root {
  /* Chrome, straight off the distributor. */
  --kp-chrome: #3b3b3b;
  --kp-chrome-active: #2a2a2a;
  --kp-chrome-hover: #333;
  --kp-idle: #adb5bd;
  --kp-filterbar: #666;
  --kp-ground: #e6e6e6;
  --kp-surface: #fff;
  --kp-line: #ddd;
  --kp-text: #676a6c;
  --kp-heading: #333;

  /* Ours, in place of their orange. */
  --kp-accent: #ff6183;
  --kp-accent-strong: #e8446a;

  --kp-green: #1ab394;
  --kp-amber: #f8ac59;
  --kp-red: #ed5565;

  --kp-font: "Open Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --kp-rail-w: 220px;
}

* { box-sizing: border-box; }

body.db-body {
  margin: 0;
  min-height: 100vh;
  background: var(--kp-chrome);
  color: var(--kp-text);
  font-family: var(--kp-font);
  font-size: 13px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--kp-accent); }

/* ==========================================================================
   Shell
   ========================================================================== */

.db-app { display: flex; min-height: 100vh; }

/* --- Left rail ------------------------------------------------------------ */

.db-rail {
  width: var(--kp-rail-w);
  flex: none;
  background: var(--kp-chrome);
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.db-rail-brand { display: block; padding: 22px 0 18px; text-align: center; }
.db-rail-brand img { height: 66px; width: 66px; border-radius: 50%; }

.db-nav { display: flex; flex-direction: column; }

.db-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 23px 14px 15px;
  color: var(--kp-idle);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  border-left: 4px solid transparent;
  cursor: pointer;
  background: none;
  border-top: none;
  border-right: none;
  border-bottom: none;
  width: 100%;
  font-family: inherit;
  text-align: left;
  transition: background .12s ease, color .12s ease;
}

.db-nav-item:hover { background: var(--kp-chrome-hover); color: #fff; }

.db-nav-item.is-active {
  background: var(--kp-chrome-active);
  color: #fff;
  border-left-color: var(--kp-accent);
}

.db-nav-item svg { width: 15px; height: 15px; flex: none; }
.db-nav-item--primary svg { color: var(--kp-accent); }

/* Chevron on sections that open. Rotates when the section is expanded, the
   same affordance the distributor uses. */
.db-nav-caret {
  margin-left: auto;
  width: 11px;
  height: 11px;
  transition: transform .18s ease;
}

.db-nav-item[aria-expanded="true"] .db-nav-caret { transform: rotate(90deg); }
.db-nav-item[aria-expanded="true"] { color: #fff; }

.db-nav-sub { display: none; background: var(--kp-chrome-active); }
.db-nav-sub.is-open { display: block; }

.db-nav-sub .db-nav-item {
  padding: 10px 23px 10px 35px;
  font-weight: 400;
  border-left-width: 4px;
}

.db-nav-sub .db-nav-item.is-active { background: #232323; font-weight: 600; }

.db-rail-foot {
  margin-top: auto;
  padding: 18px 15px;
  font-size: 10px;
  color: #6d6d6d;
  letter-spacing: .04em;
}

.db-rail-foot a { color: #8a8a8a; text-decoration: none; display: block; }
.db-rail-foot a:hover { color: #fff; }

/* --- Main column ---------------------------------------------------------- */

.db-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.db-topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  padding: 16px 15px 14px;
  background: var(--kp-chrome);
}

.db-page-title {
  font-size: 35px;
  font-weight: 300;
  line-height: 1.15;
  color: #fff;
  margin: 0;
}

.db-page-sub { color: #9a9a9a; font-size: 13px; margin: 4px 0 0; max-width: 70ch; }

/* USER / ACCOUNT pair, right-aligned over the dark chrome. */
.db-whoami { display: grid; grid-template-columns: auto auto; gap: 4px 12px; align-items: center; margin: 0; }
.db-whoami dt { font-size: 11px; letter-spacing: .04em; text-transform: uppercase; color: #9a9a9a; text-align: right; }
.db-whoami dd { margin: 0; font-size: 13px; color: #fff; text-transform: uppercase; text-align: right; }

/* Thin strip for page actions, right-aligned like theirs. */
.db-actionbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  padding: 11px 15px;
  background: var(--kp-chrome);
  border-top: 1px solid #4a4a4a;
  min-height: 44px;

  /* Follows the page down. The release form is long, and Submit, Delete and the
     count of what is left were all stranded at the top of it - so checking what
     remained meant scrolling up, and scrolling back to carry on. Below the
     typeahead's z-index on purpose: a dropdown opened near the top of the form
     should still draw over this rather than be clipped by it. */
  position: sticky;
  top: 0;
  z-index: 30;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .25);
}

/* --- Confirmations the page owns ------------------------------------------ */

.db-confirm {
  border: 1.5px solid var(--db-line, #d8d4cf);
  border-radius: 4px;
  padding: 0;
  max-width: 28rem;
  width: calc(100% - 2rem);
  background: #fff;
  color: inherit;
}
.db-confirm::backdrop { background: rgba(0, 0, 0, .42); }

/* --- Pointing at the field somebody just asked about ---------------------- */

/* Applied when an item in the "things left" list is clicked. Scrolling to a
   field is not enough on a form this dense: it arrives somewhere in the middle
   of a grid of identical-looking inputs and leaves you comparing labels. This
   says which one, then gets out of the way.

   The accent is the tenant's own where one is set, so a label sees its colour
   rather than ours. */
@keyframes db-highlight-flash {
  0%   { box-shadow: 0 0 0 6px rgba(255, 97, 131, 0); }
  12%  { box-shadow: 0 0 0 4px var(--kp-accent, #ff6183); }
  70%  { box-shadow: 0 0 0 4px var(--kp-accent, #ff6183); }
  100% { box-shadow: 0 0 0 6px rgba(255, 97, 131, 0); }
}

.db-highlight {
  animation: db-highlight-flash 2.6s ease-out;
  border-radius: 4px;
  /* Above neighbouring fields, so the ring is not clipped by the one next to it. */
  position: relative;
  z-index: 1;
}

/* A ring that simply appears and disappears, for anyone who has asked not to be
   shown movement. The point is to identify the field, which does not need a
   pulse to work. */
@media (prefers-reduced-motion: reduce) {
  .db-highlight {
    animation: none;
    box-shadow: 0 0 0 4px var(--kp-accent, #ff6183);
  }
}

/* The count of what is still outstanding, when there is something to show. */
.db-readiness-open {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-style: dotted;
}
.db-readiness-open:hover { color: #fff; }

.db-actionbar-left { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.db-actionbar-right { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin-left: auto; }

/* Action-bar controls are plain uppercase text, not buttons. */
.db-action {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  font-size: 13px;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #fff;
  cursor: pointer;
  text-decoration: none;
}

.db-action:hover:not(:disabled) { color: var(--kp-accent); }
.db-action:disabled { color: #7a7a7a; cursor: not-allowed; }
.db-action--accent { color: var(--kp-accent); }
.db-action--danger:hover { color: var(--kp-red); }

/* Grey filter strip, full width, label centred. */
.db-filterbar {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 12px 15px;
  background: var(--kp-filterbar);
  color: #fff;
  font-size: 13px;
}

.db-filterbar-title { font-weight: 600; display: flex; align-items: center; gap: 7px; }
.db-filterbar-reset { position: absolute; right: 15px; color: #fff; background: none; border: none; font: inherit; cursor: pointer; }
.db-filterbar-reset:hover { text-decoration: underline; }

.db-filters {
  display: none;
  gap: 12px;
  flex-wrap: wrap;
  padding: 14px 15px;
  background: #757575;
}

.db-filters.is-open { display: flex; }
.db-filters label { color: #fff; font-size: 12px; display: flex; align-items: center; gap: 7px; }

.db-content { flex: 1; background: var(--kp-ground); padding: 20px 15px 60px; }

/* --- Mobile --------------------------------------------------------------- */

.db-rail-toggle {
  display: none;
  background: none;
  border: 1px solid #666;
  border-radius: 3px;
  padding: 6px 8px;
  cursor: pointer;
  color: #fff;
}

@media (max-width: 900px) {
  .db-rail {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 60;
    transform: translateX(-100%);
    transition: transform .2s ease;
  }
  .db-rail.is-open { transform: none; box-shadow: 0 0 0 100vmax rgba(0, 0, 0, .5); }
  .db-rail-toggle { display: inline-flex; }
  .db-page-title { font-size: 26px; }
}

/* ==========================================================================
   Tables and list rows
   ========================================================================== */

.db-tablemeta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  padding: 0 2px 14px;
  font-size: 13px;
  color: var(--kp-text);
}

.db-tablemeta input[type="number"] {
  width: 58px;
  padding: 5px 7px;
  border: 1px solid #ccc;
  border-radius: 2px;
  font: inherit;
}

.db-panel {
  background: var(--kp-surface);
  border: 1px solid var(--kp-line);
  margin-bottom: 22px;
}

.db-thead {
  display: grid;
  align-items: center;
  gap: 0;
  border-bottom: 1px solid var(--kp-line);
  font-size: 15px;
  color: var(--kp-heading);
}

.db-thead > * { padding: 16px 14px; }
.db-thead > * + * { border-left: 1px solid var(--kp-line); text-align: center; }

.db-row {
  display: grid;
  align-items: stretch;
  border-bottom: 1px solid var(--kp-line);
  text-decoration: none;
  color: inherit;
  transition: background .1s ease;
}

.db-row:last-child { border-bottom: none; }
.db-row:hover { background: #fafafa; }
.db-row > * { padding: 14px; }
.db-row > * + * { border-left: 1px solid var(--kp-line); }

/* Release rows: art | details | confirmed | delivered | actions */
.db-row--release { grid-template-columns: 1fr 150px 175px 145px; }
.db-thead--release { grid-template-columns: 1fr 150px 175px 145px; }

.db-row-main { display: flex; gap: 16px; align-items: flex-start; min-width: 0; }

.db-row-art {
  width: 115px;
  height: 115px;
  flex: none;
  background: #f0f0f0;
  border: 1px solid var(--kp-line);
  display: grid;
  place-items: center;
  overflow: hidden;
  font-size: 10px;
  color: #999;
}

.db-row-art img { width: 100%; height: 100%; object-fit: cover; display: block; }

.db-row-title {
  color: var(--kp-accent);
  font-size: 15px;
  font-weight: 400;
  margin: 0 0 8px;
  display: block;
}

.db-row:hover .db-row-title { color: var(--kp-accent-strong); text-decoration: underline; }

/* The distributor packs four columns of metadata beside the artwork; the same
   density is what makes a long catalogue scannable. */
.db-row-cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(165px, 1fr));
  gap: 4px 22px;
  font-size: 12px;
  color: var(--kp-text);
  min-width: 0;
}

.db-row-cols div { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.db-row-cols dl { margin: 0; }
.db-row-cols dt { display: none; }
.db-row-cols dd { margin: 0 0 2px; }

.db-cell-center { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 6px; }

.db-state { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; }
.db-state svg { width: 22px; height: 22px; }
.db-state--ok { color: var(--kp-green); }
.db-state--wait { color: var(--kp-amber); }
.db-state--no { color: var(--kp-red); }
.db-state--idle { color: #999; }

.db-rowactions { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 9px; }

.db-rowactions a, .db-rowactions button {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  font-size: 12px;
  letter-spacing: .03em;
  text-transform: uppercase;
  color: var(--kp-text);
  cursor: pointer;
  text-decoration: none;
}

.db-rowactions a:hover, .db-rowactions button:hover { color: var(--kp-accent); }
.db-rowactions .is-accent { color: var(--kp-accent); }

/* Track rows: number | details | status | actions */
.db-row--track { grid-template-columns: 1fr 175px 145px; }
.db-thead--track { grid-template-columns: 1fr 175px 145px; }

.db-row-num {
  width: 46px;
  height: 46px;
  flex: none;
  background: #f0f0f0;
  border: 1px solid var(--kp-line);
  display: grid;
  place-items: center;
  font-size: 15px;
  color: var(--kp-heading);
}

@media (max-width: 1100px) {
  .db-row--release, .db-thead--release,
  .db-row--track, .db-thead--track { grid-template-columns: 1fr; }
  .db-row > * + *, .db-thead > * + * { border-left: none; border-top: 1px solid var(--kp-line); text-align: left; }
  .db-cell-center, .db-rowactions { flex-direction: row; justify-content: flex-start; gap: 18px; }
}

/* --- Pagination ----------------------------------------------------------- */

.db-pager { display: flex; align-items: center; gap: 0; }

.db-pager button {
  padding: 6px 12px;
  background: var(--kp-surface);
  border: 1px solid var(--kp-line);
  margin-left: -1px;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  color: var(--kp-accent);
}

.db-pager button:first-child { border-radius: 2px 0 0 2px; }
.db-pager button:last-child { border-radius: 0 2px 2px 0; }
.db-pager button:hover:not(:disabled) { background: #f2f2f2; }
.db-pager button[aria-current="page"] { background: var(--kp-accent); border-color: var(--kp-accent); color: #fff; }
.db-pager button:disabled { color: #bbb; cursor: not-allowed; }

/* ==========================================================================
   Panels, forms, buttons inside the content area
   ========================================================================== */

.db-card {
  background: var(--kp-surface);
  border: 1px solid var(--kp-line);
  padding: 20px;
  margin-bottom: 22px;
}

.db-card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; margin-bottom: 18px; flex-wrap: wrap; }

.db-section-title { font-size: 16px; font-weight: 600; color: var(--kp-heading); margin: 0; }
.db-hint { font-size: 12px; color: #8a8a8a; margin: 4px 0 0; }
.db-eyebrow { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: #999; margin: 0 0 8px; }

.db-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin-bottom: 22px; }

.db-tile { background: var(--kp-surface); border: 1px solid var(--kp-line); border-top: 3px solid var(--kp-accent); padding: 15px; }
.db-tile--muted { border-top-color: #bbb; }
.db-tile--ok { border-top-color: var(--kp-green); }
.db-tile--wait { border-top-color: var(--kp-amber); }
.db-tile-label { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: #999; margin: 0 0 6px; font-weight: 600; }
.db-tile-value { font-size: 30px; font-weight: 300; line-height: 1; color: var(--kp-heading); }
.db-tile-note { font-size: 12px; color: #9a9a9a; margin: 6px 0 0; }

.db-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 15px;
  background: var(--kp-accent);
  color: #fff;
  border: 1px solid var(--kp-accent);
  border-radius: 3px;
  font-family: inherit;
  font-size: 13px;
  line-height: 1.4;
  cursor: pointer;
  text-decoration: none;
  transition: background .12s ease;
}

.db-btn:hover:not(:disabled) { background: var(--kp-accent-strong); border-color: var(--kp-accent-strong); }
.db-btn:disabled { opacity: .55; cursor: not-allowed; }
.db-btn--ghost { background: var(--kp-surface); color: var(--kp-text); border-color: #ccc; }
.db-btn--ghost:hover:not(:disabled) { background: #f2f2f2; color: var(--kp-heading); border-color: #bbb; }
.db-btn--danger { background: var(--kp-surface); color: var(--kp-red); border-color: #ccc; }
.db-btn--danger:hover:not(:disabled) { background: var(--kp-red); color: #fff; border-color: var(--kp-red); }
.db-btn--sm { padding: 5px 11px; font-size: 12px; }

.db-btn--quiet {
  background: none;
  border: none;
  padding: 3px 0;
  color: var(--kp-text);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .03em;
}

.db-btn--quiet:hover:not(:disabled) { background: none; color: var(--kp-accent); }

.db-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px 18px; }
.db-field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.db-field--wide { grid-column: 1 / -1; }

.db-label { font-size: 12px; font-weight: 600; color: var(--kp-heading); }
.db-label .db-req { color: var(--kp-red); }

.db-input, .db-select, .db-textarea {
  width: 100%;
  padding: 7px 10px;
  font-family: inherit;
  font-size: 13px;
  color: var(--kp-text);
  background: var(--kp-surface);
  border: 1px solid #ccc;
  border-radius: 2px;
  transition: border-color .12s ease;
}

.db-input:focus, .db-select:focus, .db-textarea:focus { outline: none; border-color: var(--kp-accent); }
.db-input[aria-invalid="true"], .db-select[aria-invalid="true"] { border-color: var(--kp-red); }
.db-input:disabled, .db-select:disabled, .db-textarea:disabled { background: #f3f3f3; color: #999; }
.db-textarea { resize: vertical; min-height: 84px; }
.db-help { font-size: 11px; color: #999; }

.db-check { display: flex; align-items: flex-start; gap: 8px; font-size: 13px; cursor: pointer; }
.db-check input { margin-top: 2px; accent-color: var(--kp-accent); width: 15px; height: 15px; }

/* ==========================================================================
   Status, notices
   ========================================================================== */

.db-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border-radius: 3px;
  font-size: 11px;
  letter-spacing: .04em;
  text-transform: uppercase;
  white-space: nowrap;
  background: #f0f0f0;
  color: var(--kp-text);
  font-weight: 600;
}

.db-pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.db-pill[data-status="draft"]     { background: #f0f0f0; color: #888; }
.db-pill[data-status="submitted"], .db-pill[data-status="pushing"], .db-pill[data-status="dmg_draft"] { background: #fdf3e3; color: var(--kp-amber); }
.db-pill[data-status="delivered"] { background: #e8f7f3; color: var(--kp-green); }
.db-pill[data-status="failed"], .db-pill[data-status="rejected"] { background: #fdeaec; color: var(--kp-red); }

.db-notice { padding: 11px 14px; border: 1px solid var(--kp-line); border-left: 3px solid #999; font-size: 13px; margin-bottom: 18px; background: var(--kp-surface); }
.db-notice--error { border-left-color: var(--kp-red); color: var(--kp-red); }
.db-notice--ok { border-left-color: var(--kp-green); color: var(--kp-green); }
.db-notice--warn { border-left-color: var(--kp-amber); color: #9a6a1a; }
.db-notice ul { margin: 6px 0 0; padding-left: 18px; }

.db-empty { text-align: center; padding: 46px 15px; background: var(--kp-surface); border: 1px solid var(--kp-line); color: #999; }
.db-saving { font-size: 12px; color: #9a9a9a; opacity: 0; transition: opacity .2s ease; }
.db-saving.is-on { opacity: 1; }
.db-hidden { display: none !important; }

/* --- Auth pages ----------------------------------------------------------- */

.db-auth { min-height: 100vh; display: grid; place-items: center; padding: 40px 16px; background: var(--kp-chrome); }
.db-auth-card { width: 100%; max-width: 400px; }
.db-auth-brand { display: block; text-align: center; margin-bottom: 22px; }
.db-auth-brand img { height: 76px; width: 76px; border-radius: 50%; }

/* ==========================================================================
   Release form
   ========================================================================== */

.db-track { border: 1px solid var(--kp-line); margin-bottom: 16px; }
.db-track-head { display: flex; align-items: center; gap: 12px; padding: 11px 14px; background: #f7f7f7; border-bottom: 1px solid var(--kp-line); }
.db-track-num { font-size: 13px; color: #999; min-width: 2ch; }
.db-track-name { font-weight: 600; color: var(--kp-heading); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.db-track-actions { display: flex; gap: 12px; }
.db-track-body { padding: 16px 14px; }

.db-drop { display: grid; place-items: center; gap: 6px; padding: 22px 14px; text-align: center; border: 2px dashed #ccc; background: #fafafa; cursor: pointer; transition: border-color .12s ease, background .12s ease; }
.db-drop:hover, .db-drop.is-over { border-color: var(--kp-accent); background: #fff; }
.db-drop-title { font-weight: 600; font-size: 13px; color: var(--kp-heading); }
.db-drop-hint { font-size: 12px; color: #999; }

.db-progress { height: 6px; background: #eee; overflow: hidden; margin-top: 8px; }
.db-progress span { display: block; height: 100%; width: 0; background: var(--kp-accent); transition: width .2s ease; }

.db-file { display: flex; align-items: center; gap: 9px; padding: 9px 12px; border: 1px solid var(--kp-line); background: #fafafa; font-size: 13px; }
.db-file-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.db-file-tick { color: var(--kp-green); font-weight: 700; }

.db-cover-preview { width: 100%; max-width: 200px; aspect-ratio: 1; object-fit: cover; border: 1px solid var(--kp-line); display: block; }

.db-typeahead { position: relative; }
.db-typeahead-list { position: absolute; z-index: 40; top: calc(100% + 2px); left: 0; right: 0; max-height: 260px; overflow-y: auto; background: #fff; border: 1px solid #ccc; box-shadow: 0 2px 6px rgba(0,0,0,.12); }
.db-typeahead-list:empty { display: none; }
.db-typeahead-item { display: block; width: 100%; text-align: left; padding: 7px 11px; font: inherit; font-size: 13px; background: none; border: none; border-bottom: 1px solid #f0f0f0; cursor: pointer; }
.db-typeahead-item:last-child { border-bottom: none; }
.db-typeahead-item:hover { background: var(--kp-accent); color: #fff; }
.db-typeahead-item:hover .db-path, .db-typeahead-item:hover .db-leaf { color: #fff; }
.db-typeahead-item .db-path { color: #999; font-size: 12px; }
.db-typeahead-item .db-leaf { font-weight: 600; color: var(--kp-heading); }
.db-typeahead-tally { padding: 7px 11px; font-size: 11px; color: #999; background: #fafafa; border-top: 1px solid #f0f0f0; }

.db-derived { padding: 7px 11px; border: 1px solid var(--kp-line); background: #f4f4f4; font-size: 13px; color: var(--kp-heading); font-weight: 600; }
.db-chosen { display: flex; align-items: center; gap: 10px; padding: 7px 11px; border: 1px solid #ccc; background: #fafafa; font-size: 13px; }

.db-contrib { display: grid; grid-template-columns: 1fr auto; gap: 8px 14px; align-items: start; padding: 12px 14px; border: 1px solid var(--kp-line); margin-bottom: 9px; background: #fff; }
.db-contrib-name { font-weight: 600; color: var(--kp-heading); }
.db-contrib-legal { font-size: 11px; color: #999; }
.db-roles { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px; }

.db-role { position: relative; display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border: 1px solid #ccc; border-radius: 3px; font-size: 12px; cursor: pointer; user-select: none; transition: background .12s ease, border-color .12s ease; }
.db-role input { position: absolute; opacity: 0; pointer-events: none; }
.db-role:hover { border-color: #999; }
.db-role:has(input:checked) { background: var(--kp-accent); border-color: var(--kp-accent); color: #fff; font-weight: 600; }
.db-role[data-person-only]:has(input:checked)::after { content: ""; width: 5px; height: 5px; border-radius: 50%; background: #fff; }

.db-credit-note { grid-column: 1 / -1; font-size: 12px; color: #8a8a8a; border-left: 2px solid var(--kp-line); padding-left: 9px; margin: 2px 0 0; }
.db-add-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* Optional release credits (art director, cover photo and so on). Dimmed until
   used, so the common case — naming the performing artist — stays uncluttered
   while the rarer credits are still one click away. */
.db-role[data-extra] { opacity: .45; border-style: dashed; }
.db-role[data-extra]:hover { opacity: 1; border-style: solid; }
/* A tenant with no logo gets its name in the rail rather than an empty box. */
.db-rail-wordmark { display:block; padding:0 4px; color:#fff; font-size:15px; font-weight:600;
  line-height:1.25; text-align:center; word-break:break-word; }
