/* Seller Studio — universal frontend styles.
 * Loaded on every showbuilder-template mode (list, overview, landing,
 * events, assets, editor). Includes modals, topbar, list table, status
 * pills, copy-progress overlay.
 */
    /* ====================================================================
       Vanilla modal (replaces Bootstrap modal)
       ==================================================================== */
    .modal-overlay {
      position: fixed;
      inset: 0;
      background: rgba(0,0,0,0.5);
      display: none;
      align-items: center;
      justify-content: center;
      z-index: 1000;
      padding: 1rem;
    }
    .modal-overlay.open { display: flex; }
    .modal-dialog {
      background: #fff;
      border-radius: 0.5rem;
      width: 100%;
      max-width: 900px;
      max-height: 92vh;
      display: flex;
      flex-direction: column;
      box-shadow: 0 12px 30px rgba(0,0,0,0.18);
      overflow: hidden;            /* prevent dialog itself from scrolling */
    }
    .modal-dialog.modal-fit-content { max-width: max-content; }

    .modal-header {
      display: flex;
      align-items: center;
      padding: 0.6rem 0.9rem;
      border-bottom: 1px solid #e5e7eb;
      flex: 0 0 auto;
    }
    .modal-title { font-size: 0.95rem; font-weight: 600; margin: 0; }
    .modal-close {
      margin-left: auto;
      background: transparent;
      border: 0;
      font-size: 1.4rem;
      line-height: 1;
      cursor: pointer;
      color: #6b7280;
      padding: 0;
    }
    .modal-close:hover { color: #111827; }

    .modal-body {
      padding: 0.9rem;
      flex: 1 1 auto;
      min-height: 0;            /* allow flex child to shrink so no scrollbar */
      display: flex;
      align-items: center;
      justify-content: center;
      overflow: hidden;
    }
    .modal-footer {
      display: flex;
      align-items: center;
      gap: 0.4rem;
      padding: 0.6rem 0.9rem;
      border-top: 1px solid #e5e7eb;
      flex: 0 0 auto;
    }
    .modal-footer .me-auto { margin-right: auto; }

    /* Media inside modals scales to fit the body (no scroll). */
    #previewImage,
    #previewVideo {
      display: block;
      max-width: 100%;
      max-height: 100%;
      margin: 0 auto;
      object-fit: contain;
    }

    /* The crop modal's body needs a concrete height so Cropper has a sized
     * container to fit into. Without this, Cropper measures the natural image
     * dimensions and the dialog overflows the viewport.
     *
     *   modal-dialog max-height: 92vh
     * - header/footer/padding ≈ 130px
     * → the body fills the rest.
     */
    #cropModal .modal-body,
    #mediaPreviewModal .modal-body { height: calc(92vh - 130px); padding: 0.5rem; }
    /* Preview modal: image/video must stay within the body's height — without
     * a real height on the parent, `max-height: 100%` resolves to 0 and the
     * media gets clipped or upscaled inconsistently. */
    #mediaPreviewModal #previewImage,
    #mediaPreviewModal #previewVideo {
      width: auto;
      height: auto;
      max-width: 100%;
      max-height: 100%;
      object-fit: contain;
    }
    .crop-stage {
      width: 100%;
      height: 100%;
      display: block;          /* Cropper needs block, not flex */
      overflow: hidden;
    }
    /* Cropper.js will replace the img with .cropper-container. Constrain it. */
    #cropImage {
      display: block;
      max-width: 100%;
      max-height: 100%;
    }
    .cropper-container {
      max-height: 100%;
    }

    /* Confirm-delete inline popover */
    .confirm-delete {
      position: absolute;
      top: 28px;
      right: 0;
      background: #fff;
      border: 1px solid #d1d5db;
      border-radius: 0.375rem;
      padding: 0.5rem 0.6rem;
      font-size: 0.8rem;
      z-index: 999;
      display: none;
      white-space: nowrap;
      box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    }
    .confirm-delete .btn-sm { height: 24px; padding: 0 0.5rem; font-size: 0.72rem; }

    /* SortableJS visual states */
    .sortable-ghost  { opacity: 0.4; }
    .sortable-chosen { box-shadow: 0 4px 12px rgba(0,0,0,0.1); }
    .sortable-drag   { cursor: grabbing; }

    /* Select2 compact override */
    .select2-container--default .select2-selection--single {
      height: 30px;
      line-height: 30px;
      border-color: #d1d5db;
    }
    .select2-container--default .select2-selection--single .select2-selection__rendered {
      line-height: 30px;
      font-size: 0.85rem;
      display: flex;
      align-items: center;
      gap: 0.4rem;
      padding-left: 0.5rem;
    }
    .select2-container--default .select2-selection--single .select2-selection__arrow { height: 30px; }
    /* Search-results dropdown: a touch of breathing room per row */
    .select2-results__option { padding: 4px 8px; }

    /* Product option rendering — used in both dropdown rows and the collapsed selection */
    .prod-row {
      display: flex;
      align-items: center;
      gap: 0.5rem;
      min-width: 0;
      width: 100%;
    }
    .prod-thumb {
      width: 22px;
      height: 22px;
      border-radius: 0.25rem;
      object-fit: cover;
      background: #f3f4f6;
      flex: 0 0 22px;
    }
    .prod-thumb--blank {
      display: inline-block;
      border: 1px dashed #d1d5db;
    }
    .prod-label {
      display: inline-flex;
      align-items: baseline;
      gap: 0.4rem;
      min-width: 0;
      flex: 1 1 auto;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
    .prod-price {
      color: #6b7280;
      font-size: 0.8em;
      flex: 0 0 auto;
    }

    /* The product picker row: dropdown stretches, refresh button sits to the right */
    .product-row {
      display: flex;
      align-items: center;
      gap: 0.4rem;
      min-width: 0;
    }
    .product-row .select2-container { flex: 1 1 auto; min-width: 0; }
    .refresh-products { flex: 0 0 auto; }
    .refresh-products.is-refreshing i { animation: spin 0.6s linear infinite; }
    @keyframes spin { to { transform: rotate(360deg); } }

/* ====================================================================
   Producer top bar (frontend chrome)
   ==================================================================== */
.sb-topbar {
  display: flex;
  align-items: center;
  height: 44px;
  background: #111827;
  color: #e5e7eb;
  padding: 0 1rem;
  font-size: 13px;
  border-bottom: 1px solid #1f2937;
  position: sticky;
  top: 0;
  z-index: 100;
}

.sb-topbar a, .sb-topbar button {
  color: inherit;
  text-decoration: none;
}

.sb-topbar-left { flex: 0 0 auto; }
.sb-topbar-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.15rem;
}

.sb-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 700;
  color: #fbbf24;
  letter-spacing: 0.02em;
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
}
.sb-logo:hover { background: rgba(255,255,255,0.04); }

.sb-creator-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 999px;
  padding: 0.2rem 0.7rem;
  font-size: 0.75rem;
  color: #d1d5db;
  margin-right: 0.4rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.sb-creator-pill i { color: #fbbf24; font-size: 0.85rem; }

.sb-nav-item {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.4rem 0.7rem;
  background: transparent;
  border: 0;
  cursor: pointer;
  font-size: 0.85rem;
  border-radius: 0.25rem;
  white-space: nowrap;
}
.sb-nav-item:hover { background: rgba(255,255,255,0.06); }
.sb-nav-item i.fa-chevron-down { font-size: 0.65rem; opacity: 0.7; margin-left: 0.1rem; }

.sb-menu { position: relative; }
.sb-menu-list {
  list-style: none;
  margin: 0;
  padding: 0.3rem 0;
  position: absolute;
  top: 100%;
  /* Topbar dropdowns live in a right-aligned flex container; anchoring to
     the right edge of the parent button keeps them inside the viewport. */
  right: 0;
  min-width: 180px;
  max-height: 60vh;
  overflow-y: auto;
  overflow-x: hidden;
  background: #1f2937;
  border: 1px solid #374151;
  border-radius: 0.4rem;
  box-shadow: 0 10px 30px rgba(0,0,0,0.4);
  display: none;
  z-index: 200;
  /* Themed thin scrollbar so it doesn't look like a Windows OS chunk. */
  scrollbar-width: thin;
  scrollbar-color: #4b5563 transparent;
}
.sb-menu-list::-webkit-scrollbar { width: 8px; }
.sb-menu-list::-webkit-scrollbar-track { background: transparent; }
.sb-menu-list::-webkit-scrollbar-thumb {
  background: #4b5563;
  border-radius: 4px;
}
.sb-menu-list::-webkit-scrollbar-thumb:hover { background: #6b7280; }

/* Creators menu uses a panel wrapper so the search input lives OUTSIDE the
 * scrolling list — scrollbar can't overlap an element it doesn't contain. */
.sb-menu-panel {
  position: absolute;
  top: 100%;
  right: 0;
  min-width: 260px;
  background: #1f2937;
  border: 1px solid #374151;
  border-radius: 0.4rem;
  box-shadow: 0 10px 30px rgba(0,0,0,0.4);
  display: none;
  z-index: 200;
  overflow: hidden;       /* clip the scrolling list to the panel's rounded corners */
}
.sb-menu-panel .sb-menu-list {
  position: static;       /* override the absolute positioning from .sb-menu-list */
  right: auto;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
  max-height: 50vh;
  display: block;         /* visible whenever the panel is */
}
.sb-menu-search {
  background: #1f2937;
  padding: 0.4rem 0.5rem;
  border-bottom: 1px solid #374151;
}
.sb-menu-search input {
  width: 100%;
  box-sizing: border-box;
  background: #111827;
  border: 1px solid #374151;
  color: #e5e7eb;
  padding: 0.3rem 0.5rem;
  border-radius: 0.25rem;
  font-size: 0.8rem;
}
.sb-menu-search input::placeholder { color: #6b7280; }
.sb-menu-list li.sb-no-match { display: none; }
.sb-menu.open .sb-menu-list,
.sb-menu-hover:hover .sb-menu-list { display: block; }
.sb-menu.open .sb-menu-panel,
.sb-menu-hover:hover .sb-menu-panel { display: block; }
/* Bridge gap so moving the mouse from button to dropdown doesn't close it */
.sb-menu-hover .sb-menu-list,
.sb-menu-hover .sb-menu-panel { padding-top: 0.25rem; }
.sb-menu-hover .sb-menu-list::before,
.sb-menu-hover .sb-menu-panel::before {
  content: ''; position: absolute; top: -8px; left: 0; right: 0; height: 8px;
}
#sbMenuUser .sb-menu-toggle .sb-user-icon {
  width: 18px;
  height: 18px;
  margin-right: 0.4rem;
  vertical-align: middle;
  border-radius: 50%;
  display: inline-block;
}

/* Events page (TikTok Live Manager via Make). Self-contained styles — this
 * mode loads neither editor.css nor Font Awesome, so tabs/buttons are text. */
.sb-events-page { padding: 1rem 1.25rem; }
.sb-events-header { display: flex; align-items: center; gap: 1rem; margin: 0 0 .75rem; }
.sb-events-title { font-size: 1.25rem; font-weight: 600; margin: 0; }
.sb-events-status { color: #6b7280; font-size: .85rem; margin-bottom: .75rem; }
.sb-events-tabs {
  display: inline-flex;
  border: 1px solid #d1d5db;
  border-radius: .375rem;
  overflow: hidden;
}
.sb-events-tab {
  border: 0;
  background: #fff;
  color: #6b7280;
  font-size: .8rem;
  font-weight: 600;
  padding: .35rem .9rem;
  cursor: pointer;
}
.sb-events-tab + .sb-events-tab { border-left: 1px solid #d1d5db; }
.sb-events-tab:hover { background: #f3f4f6; }
.sb-events-tab.is-active { background: #2563eb; color: #fff; }
.sb-event-delete {
  border: 1px solid #fca5a5;
  background: #fff;
  color: #dc2626;
  border-radius: .25rem;
  font-size: .75rem;
  padding: .2rem .6rem;
  cursor: pointer;
  white-space: nowrap;
}
.sb-event-delete:hover { background: #fef2f2; }
.sb-event-delete:disabled { opacity: .6; cursor: default; }
.sb-events-new {
  margin-left: auto;
  border: 1px solid #2563eb;
  background: #2563eb;
  color: #fff;
  border-radius: .375rem;
  font-size: .8rem;
  font-weight: 600;
  padding: .35rem .8rem;
  cursor: pointer;
}
.sb-events-new:hover { background: #1d4ed8; border-color: #1d4ed8; }

/* New-event modal form */
.sb-event-create-dialog { width: 100%; max-width: 520px; }
.sb-event-form {
  display: block;
  text-align: left;
  padding: 1rem;
  overflow: visible;
}
.sb-event-field {
  display: block;
  font-size: .75rem;
  font-weight: 600;
  color: #6b7280;
  margin-bottom: .7rem;
}
.sb-event-field input,
.sb-event-field textarea,
.sb-event-field select {
  display: block;
  width: 100%;
  box-sizing: border-box;
  margin-top: .25rem;
  padding: .4rem .5rem;
  border: 1px solid #d1d5db;
  border-radius: .375rem;
  font: inherit;
  font-weight: 400;
  color: #1f2937;
  background: #fff;
}
.sb-event-field input:focus,
.sb-event-field textarea:focus,
.sb-event-field select:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .15);
}
.sb-event-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: .6rem;
}
.sb-event-form-error {
  min-height: 1.2em;
  font-size: .8rem;
  color: #dc2626;
}

/* Base small-button styles for modal footers on pages that don't load
 * editor.css (list / assets / events). Values match editor.css's .btn-sm
 * family exactly, so the editor (which loads core.css THEN editor.css) is
 * unaffected. */
.btn-sm {
  height: 30px;
  padding: 0 0.7rem;
  border-radius: 0.375rem;
  border: 1px solid #d1d5db;
  background: #fff;
  color: #1f2937;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  font-size: 0.8rem;
  white-space: nowrap;
}
.btn-sm:hover { background: #f8f9fa; border-color: #9ca3af; }
.btn-primary { background: #2563eb; border-color: #2563eb; color: #fff; }
.btn-primary:hover { background: #1d4ed8; border-color: #1d4ed8; }
.btn-danger { background: #dc2626; border-color: #dc2626; color: #fff; }
.btn-danger:hover { background: #b91c1c; border-color: #b91c1c; }

/* Landing page (brand root) */
.sb-landing-page { padding: 1rem 1.25rem; }
.sb-landing-title { font-size: 1.25rem; font-weight: 600; margin: 0 0 .75rem; }
.sb-landing-status { color: #6b7280; font-size: .85rem; margin-bottom: .75rem; }
.sb-creator-pill { text-decoration: none; cursor: pointer; }
.sb-creator-pill:hover { opacity: 0.85; }

/* Copy-progress overlay: striped progress bar + status message */
.sb-copy-progress-body { display: block !important; text-align: left; padding: 1rem; }
.sb-copy-progress-body .sb-copy-msg { margin: 0 0 .75rem; color: #111827; }
.sb-progress {
  background: #e5e7eb;
  border-radius: 999px;
  height: 10px;
  overflow: hidden;
}
.sb-progress-bar {
  height: 100%;
  width: 0;
  transition: width 0.25s ease;
  border-radius: 999px;
  background-color: #2563eb;
  /* Striped layer over the solid blue. (Was a `background:` shorthand whose
     gradient got overridden by this background-image — the bar rendered as
     faint stripes on transparent. background-color paints under the image.) */
  background-size: 24px 24px;
  background-image: linear-gradient(
    45deg,
    rgba(255,255,255,.18) 25%, transparent 25%,
    transparent 50%, rgba(255,255,255,.18) 50%,
    rgba(255,255,255,.18) 75%, transparent 75%, transparent
  );
  animation: sb-progress-stripes 1s linear infinite;
}
@keyframes sb-progress-stripes {
  from { background-position: 0 0; }
  to   { background-position: 24px 0; }
}

/* Copy-to-brand modal: dialog gets a real width and stacks children naturally
 * (overrides the default .modal-body { flex; align-items: center } which would
 * squash the inner column). */
.sb-copy-creator-dialog { width: 100%; max-width: 460px; }
.sb-copy-creator-body {
  display: block;
  text-align: left;
  padding: 1rem;
}
.sb-copy-creator-body > p { margin: 0 0 0.75rem; }
.sb-copy-creator-body > input[type="text"] {
  width: 100%;
  box-sizing: border-box;
  margin-bottom: 0.5rem;
}
.sb-copy-creator-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 280px;
  overflow-y: auto;
  overflow-x: hidden;
  border: 1px solid #e5e7eb;
  border-radius: 0.25rem;
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 transparent;
}
.sb-copy-creator-list::-webkit-scrollbar { width: 8px; }
.sb-copy-creator-list::-webkit-scrollbar-track { background: transparent; }
.sb-copy-creator-list::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}
.sb-copy-creator-list::-webkit-scrollbar-thumb:hover { background: #9ca3af; }
.sb-copy-creator-item {
  padding: 0.4rem 0.65rem;
  font-size: 0.85rem;
  cursor: pointer;
  border-bottom: 1px solid #f3f4f6;
}
.sb-copy-creator-item:last-child { border-bottom: 0; }
.sb-copy-creator-item:hover { background: #f3f4f6; }
.sb-copy-creator-item.is-selected { background: #dbeafe; color: #1d4ed8; font-weight: 600; }
.sb-copy-creator-item.sb-no-match { display: none; }

.sb-menu-list li { margin: 0; }
.sb-menu-list a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.8rem;
  font-size: 0.85rem;
  color: #e5e7eb;
}
.sb-menu-list a:hover { background: rgba(255,255,255,0.06); color: #fff; }
.sb-menu-list a i { width: 14px; text-align: center; color: #9ca3af; }

/* On the editor, the sticky main toolbar now sits BELOW the topbar */
.top-bar { top: 44px !important; }

.dropzone.uploading::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.3);
  background-image: linear-gradient(135deg, transparent 25%, rgba(255,255,255,0.15) 25%, rgba(255,255,255,0.15) 50%, transparent 50%, transparent 75%, rgba(255,255,255,0.15) 75%);
  background-size: 14px 14px;
  animation: dz-stripes 0.8s linear infinite;
  pointer-events: none;
  z-index: 3;
}
@keyframes dz-stripes { to { background-position: 14px 14px; } }

/* ====================================================================
   List view
   ==================================================================== */
.sb-list-page { padding: 1rem 1.25rem; }

.sb-list-header {
  display: flex;
  align-items: center;
  margin: 0 0 1rem;
}
.sb-list-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0;
  color: #111827;
}
.sb-list-actions { margin-left: auto; }

.sb-list-empty {
  background: #fff;
  border: 1px dashed #d1d5db;
  border-radius: 0.5rem;
  padding: 2.5rem 1.5rem;
  text-align: center;
  color: #6b7280;
}
.sb-list-empty p { margin: 0.25rem 0; }
.sb-list-empty a { color: #2563eb; }

.sb-list-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  overflow: hidden;
}
.sb-list-table thead th {
  background: #f9fafb;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 600;
  color: #6b7280;
  padding: 0.6rem 0.75rem;
  text-align: left;
  border-bottom: 1px solid #e5e7eb;
  white-space: nowrap;
}
.sb-list-table tbody td {
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid #f3f4f6;
  vertical-align: middle;
  font-size: 0.85rem;
}
.sb-list-table tbody tr:last-child td { border-bottom: 0; }
.sb-list-table tbody tr:hover { background: #f9fafb; }
.sb-list-table tr.is-active td { background: #f0fdf4; }
.sb-list-table tr.is-active:hover td { background: #ecfdf5; }
.sb-list-table tr.is-locked td { background: #fffbeb; }

.sb-list-table .col-num { text-align: center; width: 80px; color: #6b7280; }
.sb-list-table .col-modified { width: 180px; }
.sb-list-table .col-actions { width: auto; text-align: right; white-space: nowrap; }

/* Toolbar above the table */
.sb-list-toolbar {
  display: flex;
  gap: 0.5rem;
  margin: 0 0 0.75rem;
}

/* Sortable column indicators */
.sb-list-table th.sb-sortable {
  cursor: pointer;
  user-select: none;
  position: relative;
}
.sb-list-table th.sb-sortable .sb-sort-ind::before {
  content: '';
  display: inline-block;
  margin-left: 0.35rem;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 4px solid #d1d5db;
  vertical-align: middle;
  opacity: 0.6;
}
.sb-list-table th.sb-sortable.sb-sort-asc .sb-sort-ind::before {
  border-top: 0;
  border-bottom: 4px solid #2563eb;
  opacity: 1;
}
.sb-list-table th.sb-sortable.sb-sort-desc .sb-sort-ind::before {
  border-top: 4px solid #2563eb;
  opacity: 1;
}
.sb-list-table th.sb-sortable:hover { background: #f3f4f6; }

.sb-list-link {
  font-weight: 600;
  color: #111827;
  text-decoration: none;
}
.sb-list-link:hover { color: #2563eb; }

.sb-lock-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  color: #b45309;
  background: #fef3c7;
  border: 1px solid #fde68a;
  border-radius: 0.25rem;
  padding: 0.1rem 0.45rem;
  margin-left: 0.5rem;
}

.sb-list-table td.col-modified { text-align: left; }
.sb-modified-date { display: block; color: #111827; font-size: 0.7rem; text-align: left; }
.sb-modified-by   { display: block; color: #9ca3af; font-size: 0.7rem; text-align: left; }

/* Action row: flex container with uniform gap so every button is evenly
 * spaced regardless of which row buttons are present. */
.sb-list-table td.col-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 6px;
}
.sb-row-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  box-sizing: border-box;
  border-radius: 0.25rem;
  border: 1px solid #d1d5db;
  background: #fff;
  cursor: pointer;
  color: #6b7280;
  margin: 0;                /* spacing handled by .col-actions gap */
  text-decoration: none;
  font-size: 0.8rem;
  line-height: 1;
}
.sb-row-btn i { line-height: 1; }
.sb-row-btn:hover { background: #f3f4f6; color: #111827; }
.sb-row-btn-danger:hover { background: #fef2f2; color: #dc2626; border-color: #fecaca; }

/* Status pill matches the action button geometry: same height, same gap,
 * fits flush at the end of the action row. */
.sb-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 28px;
  box-sizing: border-box;
  padding: 0 0.6rem;
  margin: 0;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  border-radius: 0.25rem;
  border: 1px solid;
  white-space: nowrap;
  line-height: 1;
}
.sb-status-active   { background: #dcfce7; border-color: #86efac; color: #166534; cursor: default; }
.sb-status-inactive { background: #fff;    border-color: #d1d5db; color: #6b7280; cursor: pointer; }
.sb-status-inactive:hover { background: #f9fafb; border-color: #9ca3af; color: #374151; }

/* ====================================================================
   Assets view
   ==================================================================== */
.sb-assets-page { padding: 1rem 1.25rem; }
.sb-assets-header {
  display: flex;
  align-items: center;
  margin: 0 0 1rem;
}
.sb-assets-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0;
  color: #111827;
}

.sb-asset-dropzone {
  border: 2px dashed #d1d5db;
  border-radius: 0.5rem;
  padding: 1.5rem;
  text-align: center;
  color: #9ca3af;
  background: #fbfbfc;
  margin-bottom: 1rem;
  cursor: pointer;
  transition: border-color 0.12s, background 0.12s;
}
.sb-asset-dropzone.dragover { border-color: #2563eb; background: #e7f1ff; color: #2563eb; }
.sb-asset-dropzone i { font-size: 1.6rem; display: block; margin-bottom: 0.4rem; }

.sb-asset-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.6rem;
}
.sb-asset-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 0.375rem;
  overflow: hidden;
  position: relative;
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s;
}
.sb-asset-card:hover { border-color: #93c5fd; }
.sb-asset-card.is-open { border-color: #2563eb; box-shadow: 0 4px 14px -8px rgba(37,99,235,.4); }
.sb-asset-thumb {
  width: 100%;
  aspect-ratio: 1;
  background: #f1f5f9;
}
.sb-asset-thumb img,
.sb-asset-thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.sb-asset-meta {
  font-size: 0.75rem;
  padding: 0.4rem 0.5rem;
  color: #111827;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  border-top: 1px solid #f1f5f9;
}
.sb-asset-detail {
  padding: 0.5rem 0.6rem 0.6rem;
  border-top: 1px solid #f1f5f9;
  background: #f9fafb;
}
.sb-asset-field {
  display: block;
  font-size: 0.7rem;
  color: #6b7280;
  margin-bottom: 0.4rem;
}
.sb-asset-field span { display: block; margin-bottom: 0.15rem; }
.sb-asset-field input,
.sb-asset-field textarea {
  width: 100%;
  font-size: 0.75rem;
}
.sb-asset-detail-status {
  font-size: 0.7rem;
  color: #6b7280;
  min-height: 1em;
}
