:root {
  --ink:        #17191d;
  --muted:      #66727f;
  --line:       #d8dde1;
  --panel:      #ffffff;
  --page:       #f2f4f5;
  --stage:      #101215;
  --stage-2:    #20252b;
  --gold:       #9e2925;
  --gold-soft:  #f3ecd6;
  --shadow:     0 18px 48px rgba(16, 18, 21, 0.13);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(180deg, rgba(16,18,21,.08), rgba(16,18,21,0) 220px), var(--page);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
}

h1, h2, h3, p { margin-top: 0; }

/* ── Header ── */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 26px clamp(18px, 4vw, 48px);
  border-bottom: 4px solid var(--gold);
  background: linear-gradient(135deg, #9e2925, #414141);
  color: #fff;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 18px;
  min-width: 0;
}

.brand-lockup img {
  display: block;
  width: clamp(110px, 16vw, 200px);
  max-height: 68px;
  object-fit: contain;
}

.eyebrow {
  margin: 0 0 5px;
  color: var(--gold);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.tagline { color: rgba(255,255,255,.72); }

h1 {
  margin-bottom: 0;
  font-size: clamp(26px, 4vw, 44px);
  line-height: 1;
}

.public-admin-link {
  flex-shrink: 0;
}

.sales-header-right {
  display: flex;
  align-items: center;
  gap: clamp(24px, 4vw, 56px);
  flex-shrink: 0;
}

.sales-team-label {
  color: #fff;
  font-size: clamp(16px, 2vw, 24px);
  font-weight: 900;
  letter-spacing: .08em;
  text-align: right;
  line-height: 1;
}

.look-builder-bar {
  position: sticky;
  top: 0;
  z-index: 180;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  padding: 12px clamp(18px, 4vw, 48px);
  border-bottom: 1px solid rgba(16,18,21,.12);
  background: rgba(255,255,255,.94);
  box-shadow: 0 8px 24px rgba(16,18,21,.08);
  backdrop-filter: blur(12px);
}

.look-builder-bar[hidden] {
  display: none;
}

.look-builder-bar .eyebrow {
  margin-bottom: 2px;
}

.look-builder-actions,
.look-builder-modal-actions,
.favorites-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.favorites-bar {
  position: sticky;
  top: 0;
  z-index: 170;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  padding: 12px clamp(18px, 4vw, 48px);
  border-bottom: 1px solid rgba(16,18,21,.12);
  background: rgba(255,255,255,.94);
  box-shadow: 0 8px 24px rgba(16,18,21,.08);
  backdrop-filter: blur(12px);
}

.favorites-bar[hidden] {
  display: none;
}

.favorites-bar .eyebrow {
  margin-bottom: 2px;
}

/* ── Intro ── */
.catalog-intro {
  padding: 48px clamp(18px, 4vw, 48px) 24px;
  max-width: 820px;
}

.catalog-intro h2 {
  margin-bottom: 10px;
  font-size: clamp(24px, 3.5vw, 38px);
}

.catalog-intro p {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.65;
}

/* ── Body / categories ── */
.catalog-body {
  padding: 0 clamp(18px, 4vw, 48px) 88px;
}

.catalog-tools {
  position: sticky;
  top: 0;
  z-index: 120;
  display: flex;
  align-items: flex-end;
  gap: 18px;
  padding: 14px clamp(18px, 4vw, 48px);
  border-top: 1px solid rgba(16,18,21,.08);
  border-bottom: 1px solid var(--line);
  background: rgba(242,244,245,.94);
  backdrop-filter: blur(12px);
}

.catalog-tools[hidden] {
  display: none;
}

.search-wrap {
  flex: 0 0 min(340px, 36vw);
}

.search-wrap label {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.search-wrap input {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  box-shadow: 0 1px 4px rgba(16,18,21,.06);
}

.search-wrap input:focus {
  outline: none;
  border-color: var(--gold);
}

.category-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 1px;
}

.category-tabs button {
  flex: 0 0 auto;
  padding: 10px 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(16,18,21,.05);
}

.category-tabs button span {
  margin-left: 6px;
  color: var(--muted);
  font-size: 11px;
}

.category-tabs button.active {
  border-color: var(--gold);
  background: var(--gold);
  color: #fff;
}

.category-tabs button.active span {
  color: rgba(255,255,255,.72);
}

.cat-section {
  margin-bottom: 64px;
}

.cat-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 22px;
  padding-bottom: 14px;
  border-bottom: 2px solid var(--line);
}

.cat-head h3 {
  margin: 0;
  font-size: 26px;
}

.item-count {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

/* ── Grid ── */
.item-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 24px;
}

/* ── Card ── */
.item-card {
  overflow: hidden;
  border: 1px solid rgba(16,18,21,.1);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 8px 24px rgba(16,18,21,.08);
  transition: box-shadow .18s, transform .18s, border-color .18s;
}

.item-card:hover {
  border-color: rgba(158,41,37,.35);
  box-shadow: 0 16px 42px rgba(16,18,21,.16);
  transform: translateY(-4px);
}

.item-card.in-look {
  border-color: rgba(158,41,37,.65);
  box-shadow: 0 10px 30px rgba(158,41,37,.16);
}

.item-card.is-favorite {
  border-color: rgba(158,41,37,.55);
}

.expandable-card {
  cursor: pointer;
}

.expandable-card:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}

.item-photo {
  position: relative;
  width: 100%;
  aspect-ratio: 5 / 4;
  overflow: hidden;
  background: var(--stage);
}

.item-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform .22s;
}

.item-card:hover .item-photo img {
  transform: scale(1.04);
}

/* placeholder shown when no photo is set */
.photo-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  height: 100%;
  background:
    linear-gradient(135deg, rgba(158,41,37,.14), rgba(16,18,21,.02)),
    repeating-linear-gradient(45deg, #f8f9fa 0, #f8f9fa 12px, #eef1f3 12px, #eef1f3 24px);
  color: rgba(23,25,29,.44);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  text-align: center;
}

.photo-placeholder svg {
  color: rgba(158,41,37,.42);
}

.view-pill {
  position: absolute;
  right: 12px;
  bottom: 12px;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(16,18,21,.72);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity .18s, transform .18s;
}

.favorite-toggle {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 3;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255,255,255,.3);
  border-radius: 50%;
  background: rgba(16,18,21,.68);
  color: rgba(255,255,255,.78);
  font-size: 19px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(16,18,21,.18);
}

.favorite-toggle:hover,
.favorite-toggle.active {
  background: var(--gold);
  border-color: var(--gold);
  color: #fff;
}

.item-card:hover .view-pill {
  opacity: 1;
  transform: translateY(0);
}

/* gold accent strip under photo */
.item-info {
  min-height: 86px;
  padding: 15px 16px 17px;
  border-top: 3px solid var(--gold);
}

.item-name {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--ink);
}

/* ── Catalog states ── */
.catalog-loading,
.catalog-error,
.catalog-empty {
  padding: 48px clamp(18px, 4vw, 48px);
  font-size: 15px;
  color: var(--muted);
}
.catalog-error { color: #f87171; }

/* ── Toast notification ── */
.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  padding: 10px 22px;
  background: var(--stage);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  border-radius: 8px;
  box-shadow: 0 8px 28px rgba(16,18,21,.35);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s, transform .2s;
  z-index: 9999;
  white-space: nowrap;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.toast-error { background: #7f1d1d; }

/* ── Responsive ── */
/* shared: description + price on cards */
.item-desc {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.45;
}

.item-price {
  margin: 6px 0 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--gold);
}

.sales-card-actions {
  margin-top: 12px;
}

.sales-look-toggle {
  width: 100%;
  text-align: center;
}

.sales-look-toggle.selected,
#detailLookBtn.selected {
  background: var(--stage);
  color: #fff;
  border-color: var(--stage);
}

.no-price {
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
}

@media (max-width: 600px) {
  .catalog-tools {
    display: block;
  }

  .search-wrap {
    flex-basis: auto;
    margin-bottom: 12px;
  }

  .item-grid {
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 16px;
  }

  .cat-head {
    display: block;
  }

  .item-count {
    display: block;
    margin-top: 6px;
  }

  .item-info {
    min-height: 78px;
  }
}

/* ══════════════════════════════════════
   ADMIN STYLES
══════════════════════════════════════ */

/* ── Admin toolbar ── */
.admin-bar {
  position: sticky;
  top: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px clamp(14px, 3vw, 32px);
  background: var(--stage);
  border-bottom: 2px solid var(--gold);
  gap: 12px;
  flex-wrap: wrap;
}

.admin-badge {
  padding: 3px 10px;
  background: var(--gold);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .12em;
  border-radius: 4px;
  text-transform: uppercase;
}

.admin-bar-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* ── Shared button base ── */
button { font-family: inherit; }

.btn-sm {
  display: inline-block;
  padding: 6px 13px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 6px;
  background: rgba(255,255,255,.08);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background .15s;
  white-space: nowrap;
}
.btn-sm:hover { background: rgba(255,255,255,.18); }
.btn-sm:disabled {
  opacity: .35;
  cursor: not-allowed;
}
.btn-sm:disabled:hover { background: rgba(255,255,255,.08); }

.btn-sm.btn-page {
  border-color: #9aa4af;
  background: #ffffff;
  color: var(--ink);
  box-shadow: 0 1px 3px rgba(16,18,21,.12);
}
.btn-sm.btn-page:hover {
  border-color: var(--stage);
  background: var(--stage);
  color: #fff;
}
.btn-sm.btn-page:disabled:hover {
  border-color: #9aa4af;
  background: #ffffff;
  color: var(--ink);
}

.btn-sm.btn-danger {
  border-color: rgba(220,60,60,.45);
  background: rgba(220,60,60,.12);
  color: #f87171;
}
.btn-sm.btn-danger:hover { background: rgba(220,60,60,.28); }

.btn-primary {
  padding: 8px 22px;
  border: none;
  border-radius: 7px;
  background: var(--gold);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity .15s;
}
.btn-primary:hover { opacity: .85; }

/* ── Lock overlay ── */
.lock-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(160deg, var(--stage) 0%, var(--stage-2) 100%);
  padding: 20px;
}

.lock-box {
  width: 100%;
  max-width: 380px;
  padding: 40px 36px;
  background: rgba(255,255,255,.045);
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 18px;
  text-align: center;
  color: #fff;
}

.lock-logo {
  width: 160px;
  max-height: 58px;
  object-fit: contain;
  margin-bottom: 28px;
}

.lock-box h2 { margin-bottom: 6px; font-size: 22px; }

.lock-subtitle {
  color: rgba(255,255,255,.5);
  font-size: 14px;
  margin-bottom: 24px;
  line-height: 1.5;
}

.lock-field { margin-bottom: 12px; }

.lock-field input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 8px;
  background: rgba(255,255,255,.07);
  color: #fff;
  font-size: 15px;
  font-family: inherit;
  text-align: center;
  box-sizing: border-box;
}
.lock-field input::placeholder { color: rgba(255,255,255,.3); }
.lock-field input:focus { outline: 2px solid var(--gold); outline-offset: 0; }

.lock-btn { width: 100%; padding: 11px; font-size: 15px; }

.lock-error {
  height: 18px;
  margin: 10px 0 0;
  font-size: 13px;
  color: #f87171;
}

.lock-hint {
  margin-top: 28px;
  font-size: 12px;
  color: rgba(255,255,255,.25);
  line-height: 1.5;
}
.lock-hint strong { color: rgba(255,255,255,.45); }

/* ── Admin card overlay ── */
.admin-card-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(16,18,21,.55);
  opacity: 0;
  transition: opacity .18s;
}

.item-card:hover .admin-card-overlay { opacity: 1; }

.admin-edit-btn {
  padding: 8px 20px;
  border: 2px solid #fff;
  border-radius: 7px;
  background: transparent;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: background .15s, border-color .15s, color .15s;
}
.admin-edit-btn:hover {
  background: var(--gold);
  border-color: var(--gold);
  color: #fff;
}

/* ── Category admin controls ── */
.cat-head-left { flex: 1; min-width: 0; }

.cat-head-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.cat-order-controls {
  display: flex;
  gap: 6px;
}

.cat-name[contenteditable] { cursor: text; border-radius: 4px; }
.cat-name[contenteditable]:focus {
  outline: 2px dashed var(--gold);
  outline-offset: 4px;
  padding: 0 4px;
}

.cat-add-row { margin-top: 16px; }

.btn-add-item {
  padding: 9px 18px;
  border: 2px dashed var(--line);
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: border-color .15s, color .15s;
}
.btn-add-item:hover { border-color: var(--gold); color: var(--gold); }

/* ── Modals ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(16,18,21,.7);
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s;
  backdrop-filter: blur(3px);
}
.modal-overlay.open { opacity: 1; pointer-events: all; }

.item-detail-overlay {
  z-index: 520;
}

.item-detail-modal {
  position: relative;
  width: min(98vw, 1320px);
  height: min(96vh, 860px);
  max-height: 96vh;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  background: var(--panel);
  border-radius: 12px;
  box-shadow: 0 24px 64px rgba(16,18,21,.34);
}

.item-detail-photo {
  position: relative;
  min-height: 0;
  height: 100%;
  background: var(--stage);
}

.item-detail-photo img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: contain;
  background: var(--stage);
}

.item-detail-photo:fullscreen {
  width: 100vw;
  height: 100vh;
  background: var(--stage);
}

.item-detail-photo:fullscreen .detail-main-image {
  width: 100vw;
  height: 100vh;
}

.detail-thumbs {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 14px;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 8px;
  border-radius: 8px;
  background: rgba(16,18,21,.72);
}

.detail-thumbs button {
  flex: 0 0 72px;
  width: 72px;
  height: 54px;
  padding: 0;
  overflow: hidden;
  border: 2px solid transparent;
  border-radius: 6px;
  background: var(--stage-2);
  cursor: pointer;
}

.detail-thumbs button.active {
  border-color: var(--gold);
}

.detail-thumbs img {
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: cover;
}

.gallery-nav {
  position: absolute;
  top: 50%;
  z-index: 2;
  width: 44px;
  height: 54px;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 8px;
  background: rgba(16,18,21,.68);
  color: #fff;
  font-size: 42px;
  line-height: 1;
  cursor: pointer;
  transform: translateY(-50%);
}

.gallery-nav:hover {
  background: var(--gold);
  color: #fff;
}

.gallery-prev {
  left: 14px;
}

.gallery-next {
  right: 14px;
}

.gallery-fullscreen {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 2;
  padding: 8px 12px;
  border: 1px solid rgba(255,255,255,.24);
  border-radius: 7px;
  background: rgba(16,18,21,.72);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.gallery-fullscreen:hover {
  background: var(--gold);
  color: #fff;
}

.item-detail-info {
  padding: 32px;
  overflow-y: auto;
  border-left: 3px solid var(--gold);
}

.item-detail-info h3 {
  margin: 0 0 12px;
  font-size: clamp(22px, 3vw, 34px);
  line-height: 1.15;
}

.item-detail-info p {
  line-height: 1.55;
}

.sales-notes-panel {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.sales-share-panel {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.client-favorite-panel {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.client-favorite-panel .btn-primary.selected {
  background: var(--stage);
}

.favorite-print-board {
  display: none;
}

.sales-share-panel .btn-primary {
  margin: 0 8px 8px 0;
}

.sales-share-panel p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.sales-notes-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 7px;
}

.sales-notes-panel label {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.sales-notes-panel select {
  min-width: 140px;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
}

.sales-notes-panel textarea {
  width: 100%;
  min-height: 120px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--page);
  color: var(--ink);
  font-family: inherit;
  font-size: 14px;
  line-height: 1.45;
  resize: vertical;
}

.sales-notes-panel textarea:focus {
  outline: none;
  border-color: var(--gold);
}

.sales-link-field {
  margin-top: 12px;
}

.sales-link-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 7px;
}

.sales-link-row a {
  min-width: 0;
  flex: 1;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--page);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.sales-link-row a.empty {
  color: var(--muted);
  text-decoration: none;
}

.sales-link-row .btn-sm {
  flex: 0 0 auto;
}

.sales-link-row .btn-sm:disabled {
  cursor: not-allowed;
  opacity: .45;
}

.sales-link-field p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.sales-notes-panel .btn-primary {
  margin-top: 10px;
}

.item-detail-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255,255,255,.24);
  border-radius: 50%;
  background: rgba(16,18,21,.72);
  color: #fff;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}

.item-detail-close:hover {
  background: var(--gold);
  color: #fff;
}

.modal {
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 32px;
  background: var(--panel);
  border-radius: 14px;
  box-shadow: 0 24px 64px rgba(16,18,21,.3);
}
.modal h3 { margin: 0 0 22px; font-size: 20px; }

.look-builder-overlay {
  z-index: 540;
}

.look-builder-modal {
  position: relative;
  width: min(94vw, 1040px);
  max-height: 92vh;
  overflow-y: auto;
  padding: 28px;
  border-radius: 12px;
  background: var(--panel);
  box-shadow: 0 24px 64px rgba(16,18,21,.34);
}

.look-dashboard {
  display: grid;
  grid-template-columns: minmax(180px, 240px) minmax(0, 1fr);
  gap: 20px;
  padding-top: 18px;
}

.look-dashboard-sidebar {
  min-width: 0;
}

.look-list {
  display: grid;
  gap: 8px;
}

.look-view-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-bottom: 12px;
}

.look-view-tabs button {
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.look-view-tabs button.active {
  border-color: var(--gold);
  background: var(--gold);
  color: #fff;
}

.archive-search {
  display: grid;
  gap: 6px;
  margin-bottom: 12px;
}

.archive-search[hidden] {
  display: none;
}

.archive-search label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.archive-search input,
.archive-search select {
  width: 100%;
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 13px;
}

.archive-search input:focus,
.archive-search select:focus {
  outline: none;
  border-color: var(--gold);
}

.look-list button {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(16,18,21,.05);
}

.look-list button.active {
  border-color: var(--gold);
  background: rgba(158,41,37,.08);
}

.look-list > button span,
.look-year-items > button span {
  display: block;
  margin-bottom: 3px;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.look-year-items > button span em {
  margin-left: 6px;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.look-list > button small,
.look-year-items > button small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.look-list-empty {
  margin: 0;
  padding: 14px 10px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}


.look-dashboard-main {
  min-width: 0;
}

.look-name-row,
.look-year-row,
.look-notes-row {
  display: grid;
  gap: 6px;
  margin-bottom: 14px;
}

.look-name-row label,
.look-year-row label,
.look-notes-row label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.look-name-row input {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--page);
  color: var(--ink);
  font: inherit;
  font-weight: 800;
}

.look-year-row {
  max-width: 220px;
}

.look-year-row input {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--page);
  color: var(--ink);
  font: inherit;
  font-weight: 800;
}

.look-name-row input:focus,
.look-year-row input:focus {
  outline: none;
  border-color: var(--gold);
}

.look-copy-status {
  min-height: 18px;
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.look-print-mode {
  margin-bottom: 14px;
}

.look-print-mode > label {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.look-print-options {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.look-print-options label {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
}

.client-only {
  display: none !important;
}

.look-notes-row textarea {
  width: 100%;
  min-height: 180px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--page);
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  line-height: 1.5;
  resize: vertical;
}

.look-notes-row textarea:focus {
  outline: none;
  border-color: var(--gold);
}

.look-builder-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 0 48px 18px 0;
  border-bottom: 2px solid var(--line);
}

.look-builder-head h3 {
  margin: 0;
  font-size: clamp(24px, 3vw, 36px);
}

.look-builder-empty {
  padding: 28px 0 18px;
  color: var(--muted);
  font-size: 15px;
}

.look-builder-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 14px;
}

.look-builder-item {
  position: relative;
  display: block;
  min-height: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.look-builder-photo {
  overflow: hidden;
  border-radius: 7px;
  background: var(--stage);
  aspect-ratio: 5 / 4;
}

.look-builder-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.look-builder-info {
  padding-top: 12px;
}

.look-builder-info h4 {
  margin: 0 0 8px;
  font-size: 16px;
  line-height: 1.25;
}

.look-builder-info p:not(.eyebrow) {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.look-builder-info strong {
  display: block;
  margin-bottom: 8px;
  color: var(--gold);
  font-size: 14px;
}

.look-builder-info a {
  display: block;
  margin-bottom: 10px;
  color: var(--ink);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.look-copy-link {
  color: var(--ink);
}

.look-remove {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 30px;
  height: 30px;
  border: 1px solid rgba(220,60,60,.35);
  border-radius: 50%;
  background: transparent;
  color: #f87171;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.look-remove:hover {
  background: rgba(220,60,60,.1);
}

.form-group { margin-bottom: 16px; }

.form-group label {
  display: block;
  margin-bottom: 5px;
  font-size: 11px;
  font-weight: 800;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .08em;
}

.form-group input[type="text"],
.form-group input[type="url"],
.form-group input[type="password"],
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--page);
  color: var(--ink);
  font-size: 14px;
  font-family: inherit;
  transition: border-color .15s;
  box-sizing: border-box;
}
.form-group input:focus,
.form-group textarea:focus { outline: none; border-color: var(--gold); }
.form-group textarea { resize: vertical; }

.image-url-row {
  display: flex;
  gap: 8px;
}

.image-url-row input {
  min-width: 0;
}

.btn-add-url {
  flex-shrink: 0;
  padding: 8px 14px;
  border: none;
  border-radius: 7px;
  background: var(--stage);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.btn-add-url:hover {
  background: var(--gold);
  color: #fff;
}

.form-or {
  margin: 8px 0;
  font-size: 11px;
  font-weight: 700;
  text-align: center;
  color: var(--muted);
  letter-spacing: .06em;
  text-transform: uppercase;
}

.opt { font-size: 11px; font-weight: 400; text-transform: none; letter-spacing: 0; }

.image-preview {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 10px;
  margin-top: 10px;
  padding: 10px;
  border-radius: 8px;
  background: var(--page);
}

.image-preview-tile {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  background: var(--stage);
  aspect-ratio: 4 / 3;
}

.image-preview-frame {
  width: 100%;
  height: 100%;
}

.image-preview-frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.image-remove-btn {
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 3;
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 50%;
  background: rgba(16,18,21,.78);
  color: #fff;
  cursor: pointer;
}

.cover-badge {
  position: absolute;
  left: 6px;
  bottom: 6px;
  z-index: 2;
  padding: 3px 6px;
  border-radius: 4px;
  background: var(--gold);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.make-cover-btn {
  position: absolute;
  left: 6px;
  bottom: 6px;
  z-index: 2;
  padding: 4px 7px;
  border: 0;
  border-radius: 4px;
  background: rgba(255,255,255,.92);
  color: var(--stage);
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
  text-transform: uppercase;
}

.make-cover-btn:hover,
.image-remove-btn:hover {
  background: var(--gold);
  color: #fff;
}

.no-images {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}
.preview-error {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 10px 34px 10px 10px;
  text-align: center;
  font-size: 12px;
  line-height: 1.35;
  color: #f87171;
}

.btn-remove-img {
  margin-top: 8px;
  padding: 5px 12px;
  border: 1px solid rgba(220,60,60,.35);
  border-radius: 6px;
  background: transparent;
  color: #f87171;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}
.btn-remove-img:hover { background: rgba(220,60,60,.1); }

.modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 24px;
  flex-wrap: wrap;
}

.modal-actions button {
  flex: 1;
  min-width: 80px;
  padding: 9px 14px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--page);
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background .15s;
}
.modal-actions button:hover { background: var(--line); }

.btn-modal-danger {
  border-color: rgba(220,60,60,.35) !important;
  color: #f87171 !important;
}
.btn-modal-danger:hover { background: rgba(220,60,60,.1) !important; }

/* ── Settings modal extras ── */
.settings-msg { margin: 6px 0 0; min-height: 18px; font-size: 13px; color: #f87171; }
.settings-msg.success { color: #4ade80; }

.modal-divider { border: none; border-top: 1px solid var(--line); margin: 24px 0; }

.danger-zone {
  padding: 16px;
  border: 1px solid rgba(220,60,60,.25);
  border-radius: 8px;
}
.danger-zone h4 { margin: 0 0 8px; color: #f87171; font-size: 14px; }
.danger-zone p  { margin: 0 0 12px; font-size: 13px; color: var(--muted); }

@media (max-width: 600px) {
  .favorites-bar {
    align-items: flex-start;
  }

  .favorites-actions {
    justify-content: flex-end;
  }

  .look-builder-bar {
    align-items: flex-start;
  }

  .look-builder-actions {
    justify-content: flex-end;
  }

  .item-detail-modal {
    width: min(96vw, 560px);
    height: 96vh;
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, 62vh) minmax(0, 1fr);
    overflow-y: auto;
  }

  .item-detail-photo,
  .item-detail-photo img {
    min-height: 0;
    height: 100%;
  }

  .item-detail-info {
    padding: 22px;
    border-left: 0;
    border-top: 3px solid var(--gold);
  }

  .look-builder-modal {
    padding: 20px;
  }

  .look-dashboard {
    grid-template-columns: 1fr;
  }

  .look-list {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  }

  .look-builder-head {
    display: block;
    padding-right: 40px;
  }

  .look-builder-modal-actions {
    margin-top: 14px;
  }

  .look-builder-item {
    padding: 12px;
  }
}

@media print {
  body.printing-favorites > *:not(#favoritePrintBoard) {
    display: none !important;
  }

  body.printing-favorites,
  body.printing-favorites #favoritePrintBoard {
    display: block !important;
    background: #fff !important;
    color: #111 !important;
  }

  .favorite-print-board {
    padding: 0;
  }

  .favorite-print-head {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 22px;
    padding-bottom: 14px;
    border-bottom: 2px solid #d8dde1;
  }

  .favorite-print-head img {
    width: 150px;
    max-height: 58px;
    object-fit: contain;
  }

  .favorite-print-head h2 {
    margin: 0 0 6px;
    font-size: 30px;
  }

  .favorite-print-head p:last-child {
    margin: 0;
    color: #66727f;
  }

  .favorite-print-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
  }

  .favorite-print-card {
    break-inside: avoid;
    page-break-inside: avoid;
    overflow: hidden;
    border: 1px solid #d8dde1;
    border-radius: 8px;
    background: #fff;
  }

  .favorite-print-photo {
    aspect-ratio: 5 / 4;
    overflow: hidden;
    background: #101215;
  }

  .favorite-print-photo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .favorite-print-card > div:last-child {
    padding: 10px 11px 12px;
  }

  .favorite-print-card p {
    margin: 0 0 4px;
    color: #9e2925;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
  }

  .favorite-print-card h3 {
    margin: 0 0 6px;
    font-size: 15px;
    line-height: 1.25;
  }

  .favorite-print-card span {
    display: block;
    color: #66727f;
    font-size: 11px;
    line-height: 1.35;
  }

  body.printing-look > *:not(#lookBuilderModal) {
    display: none !important;
  }

  body.printing-look,
  body.printing-look #lookBuilderModal {
    display: block !important;
    position: static !important;
    inset: auto !important;
    padding: 0 !important;
    overflow: visible !important;
    background: #fff !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    backdrop-filter: none !important;
  }

  body.printing-look .look-builder-modal {
    width: 100% !important;
    max-height: none !important;
    overflow: visible !important;
    padding: 0 !important;
    box-shadow: none !important;
  }

  body.printing-look .item-detail-close,
  body.printing-look .look-builder-modal-actions,
  body.printing-look .look-dashboard-sidebar,
  body.printing-look .look-copy-status,
  body.printing-look .look-copy-link,
  body.printing-look .look-remove {
    display: none !important;
  }

  body.printing-look .look-dashboard {
    display: block !important;
  }

  body.printing-look .look-name-row input {
    border: 0 !important;
    padding: 0 !important;
    background: #fff !important;
    font-size: 24px !important;
  }

  body.printing-look .look-year-row input {
    border: 0 !important;
    padding: 0 !important;
    background: #fff !important;
  }

  body.printing-look .look-notes-row textarea {
    min-height: 110px !important;
    border: 0 !important;
    padding: 0 !important;
    background: #fff !important;
    resize: none !important;
  }

  body.printing-look .look-builder-item {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  body.printing-client-look .internal-only,
  body.printing-client-look .look-notes-row,
  body.printing-client-look .look-print-mode {
    display: none !important;
  }

  body.printing-client-look .client-only {
    display: block !important;
  }
}
