/* SAVAAR — Catálogo dashboard
   Estilo: limpio, simple, tipo Rolex / marca grande
   Optimizado para WhatsApp + Instagram Stories
*/
:root {
  --bg: #ECEAD8;
  --bg-card: #ffffff;
  --bg-elevated: #ffffff;
  --line: #e5e5e5;
  --line-strong: #d4d4d4;
  --ink: #0a0a0a;
  --ink-2: #404040;
  --ink-3: #737373;
  --ink-4: #a3a3a3;
  --green: #16a34a;
  --amber: #d97706;
  --red: #dc2626;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
  --shadow: 0 1px 3px rgba(0,0,0,0.06), 0 4px 12px rgba(0,0,0,0.04);
  --shadow-lg: 0 10px 30px rgba(0,0,0,0.08), 0 4px 8px rgba(0,0,0,0.04);
  --font: -apple-system, BlinkMacSystemFont, "Helvetica Neue", "Inter", system-ui, sans-serif;
  --radius: 4px;
  --radius-lg: 8px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
}
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, select, textarea { font-family: inherit; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

/* === HEADER === */
.header {
  background: white;
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 50;
}
.header-inner {
  max-width: 1600px; margin: 0 auto;
  padding: 16px 32px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 32px;
}
.logo-img { height: 28px; width: auto; display: block; }
.header-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  padding-left: 32px;
  border-left: 1px solid var(--line);
  min-width: 0;
}
.stat {
  display: flex; flex-direction: column;
  padding: 0 20px;
  border-right: 1px solid var(--line);
  min-width: 0;
}
.stat:last-child { border-right: none; }
.stat-num {
  font-size: 18px; font-weight: 600; color: var(--ink);
  letter-spacing: -0.01em; line-height: 1.1;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.stat-label {
  font-size: 10px; color: var(--ink-3);
  text-transform: uppercase; letter-spacing: 0.08em;
  margin-top: 4px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.header-actions { display: flex; gap: 8px; align-items: center; flex-shrink: 0; }
.btn {
  height: 36px; padding: 0 14px;
  border-radius: var(--radius);
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 500;
  letter-spacing: 0;
  transition: all 0.15s;
  white-space: nowrap;
}
.btn-primary { background: var(--ink); color: white; }
.btn-primary:hover { background: #262626; }
.btn-ghost { color: var(--ink-2); border: 1px solid var(--line-strong); background: white; }
.btn-ghost:hover { background: var(--bg); border-color: var(--ink-4); }
.btn-icon { width: 36px; padding: 0; justify-content: center; }
.btn-sm { height: 30px; padding: 0 10px; font-size: 12px; }

/* === SECTION TABS === */
.section-tabs-wrap {
  background: white;
  border-bottom: 1px solid var(--line);
  position: sticky; top: 61px; z-index: 49;
}
.section-tabs {
  max-width: 1600px; margin: 0 auto;
  padding: 0 32px;
  display: flex;
  gap: 0;
}
.section-tabs .tab {
  padding: 14px 24px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-3);
  border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
  margin-bottom: -1px;
  white-space: nowrap;
  letter-spacing: 0.01em;
}
.section-tabs .tab:hover { color: var(--ink); }
.section-tabs .tab.active {
  color: var(--ink);
  border-bottom-color: var(--ink);
  font-weight: 600;
}

/* === FILTER BAR === */
.toolbar {
  background: white;
  border-bottom: 1px solid var(--line);
  padding: 14px 32px;
  position: sticky; top: 110px; z-index: 48;
}
.toolbar-inner {
  max-width: 1600px; margin: 0 auto;
  display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap;
}
.modal-sm {
  max-width: 360px;
  padding: 24px;
  border-radius: 12px;
  background: white;
}
.filter-group { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.filter-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-3);
  font-weight: 500;
}
.filter-clear {
  align-self: flex-end;
  margin-left: 4px;
}
.search {
  position: relative;
  flex: 1; max-width: 360px; min-width: 200px;
}
.search input {
  width: 100%; height: 36px;
  padding: 0 12px 0 36px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  font-size: 13px;
  background: white;
  outline: none;
  transition: border 0.15s;
}
.search input:focus { border-color: var(--ink); }
.search-icon { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--ink-4); pointer-events: none; }
.select {
  height: 36px; padding: 0 30px 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  font-size: 13px;
  background: white url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6' fill='none' stroke='%23737373' stroke-width='1.5'%3E%3Cpath d='M1 1l4 4 4-4'/%3E%3C/svg%3E") no-repeat right 12px center;
  appearance: none;
  cursor: pointer;
  outline: none;
  color: var(--ink-2);
}
.select:focus { border-color: var(--ink); }
.toolbar-divider { width: 1px; height: 20px; background: var(--line); }
.view-toggle { display: flex; border: 1px solid var(--line-strong); border-radius: var(--radius); overflow: hidden; }
.view-toggle button { width: 34px; height: 34px; display: grid; place-items: center; color: var(--ink-3); }
.view-toggle button.active { background: var(--ink); color: white; }
.toolbar-result {
  font-size: 12px; color: var(--ink-3);
  margin-left: auto;
}

/* === MAIN === */
.main { max-width: 1600px; margin: 0 auto; padding: 24px 32px 80px; }

/* === GRID === */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: all 0.15s;
  position: relative;
  display: flex; flex-direction: column;
}
.card:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}
.card-img-wrap {
  position: relative;
  aspect-ratio: 1;
  background: #f5f5f5;
  overflow: hidden;
}
.card-img-wrap > img:not(.card-watermark) { width: 100%; height: 100%; object-fit: cover; }
.card-watermark {
  position: absolute;
  bottom: 10px;
  left: 10px;
  height: 14px;
  width: auto;
  opacity: 0.55;
  pointer-events: none;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.4));
  z-index: 2;
}
.card-img-empty {
  width: 100%; height: 100%;
  display: grid; place-items: center;
  color: var(--ink-4);
  background: linear-gradient(135deg, #fafafa 25%, #f0f0f0 25%, #f0f0f0 50%, #fafafa 50%, #fafafa 75%, #f0f0f0 75%, #f0f0f0);
  background-size: 12px 12px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.status-pill {
  position: absolute;
  top: 10px; left: 10px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 4px 8px;
  border-radius: 999px;
  background: white;
  color: var(--ink);
  display: inline-flex; align-items: center; gap: 5px;
  box-shadow: var(--shadow-sm);
}
.status-pill .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green); }
.status-pill.reservado .dot { background: var(--amber); }
.status-pill.vendido .dot { background: var(--red); }
.status-pill.vendido { background: var(--ink); color: white; }

.card-watermark {
  position: absolute;
  bottom: 10px; right: 10px;
  height: 14px;
  width: auto;
  opacity: 0.85;
  filter: drop-shadow(0 1px 3px rgba(0,0,0,0.4));
  pointer-events: none;
}

.card-photo-count {
  position: absolute;
  bottom: 10px; right: 10px;
  background: rgba(0,0,0,0.75);
  color: white;
  font-size: 10px;
  font-weight: 500;
  padding: 3px 8px;
  border-radius: 999px;
  letter-spacing: 0.02em;
  z-index: 2;
}
.card-nav {
  position: absolute;
  top: 50%; transform: translateY(-50%);
  width: 30px; height: 30px;
  border-radius: 50%;
  background: rgba(255,255,255,0.95);
  color: var(--ink);
  font-size: 20px;
  line-height: 1;
  display: grid; place-items: center;
  box-shadow: var(--shadow-sm);
  opacity: 0;
  transition: opacity 0.15s, background 0.15s, transform 0.15s;
  z-index: 2;
  cursor: pointer;
  padding: 0;
}
.card-nav.prev { left: 8px; padding-right: 2px; }
.card-nav.next { right: 8px; padding-left: 2px; }
.card:hover .card-nav { opacity: 1; }
.card-nav:hover { background: white; transform: translateY(-50%) scale(1.08); }
.card-counter {
  position: absolute;
  bottom: 10px; left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: white;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  letter-spacing: 0.04em;
  z-index: 2;
}

.gallery-nav {
  position: absolute;
  top: 50%; transform: translateY(-50%);
  width: 44px; height: 44px;
  border-radius: 50%;
  background: rgba(255,255,255,0.95);
  color: var(--ink);
  font-size: 28px;
  line-height: 1;
  display: grid; place-items: center;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: background 0.15s, transform 0.15s;
  z-index: 3;
  padding: 0;
}
.gallery-nav.prev { left: 16px; padding-right: 3px; }
.gallery-nav.next { right: 16px; padding-left: 3px; }
.gallery-nav:hover { background: white; transform: translateY(-50%) scale(1.05); }
.gallery-counter {
  position: absolute;
  top: 16px; left: 16px;
  background: rgba(0,0,0,0.65);
  color: white;
  font-size: 12px;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 999px;
  z-index: 3;
  letter-spacing: 0.02em;
}

.detail-thumbs {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 5px;
  padding: 5px 7px;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 999px;
  z-index: 3;
  max-width: calc(100% - 120px);
  overflow-x: auto;
  scrollbar-width: none;
}
.detail-thumbs::-webkit-scrollbar { display: none; }
.detail-thumb {
  width: 38px; height: 38px;
  flex-shrink: 0;
  border-radius: 6px;
  overflow: hidden;
  border: 1.5px solid transparent;
  background: white;
  padding: 1px;
  cursor: pointer;
  transition: border-color 0.15s, opacity 0.15s, transform 0.15s;
  opacity: 0.7;
}
.detail-thumb img { width: 100%; height: 100%; object-fit: contain; display: block; }
.detail-thumb.active {
  border-color: white;
  opacity: 1;
  transform: scale(1.1);
}
.detail-thumb:hover { opacity: 1; }

.editor-thumbs {
  display: flex;
  gap: 10px;
  padding: 12px 24px;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}
.editor-thumb {
  width: 80px; height: 80px;
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  background: white;
  border: 1px solid var(--line);
}
.editor-thumb img { width: 100%; height: 100%; object-fit: cover; }
.editor-thumb-cover {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: var(--ink);
  color: white;
  font-size: 9px;
  font-weight: 600;
  padding: 3px 0;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.editor-thumb-remove {
  position: absolute;
  top: 4px; right: 4px;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: rgba(0,0,0,0.7);
  color: white;
  font-size: 16px;
  line-height: 1;
  display: grid; place-items: center;
  cursor: pointer;
  font-weight: 400;
}
.editor-thumb-remove:hover { background: var(--red); }
.editor-thumb-action {
  position: absolute;
  top: 4px; left: 4px;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: rgba(0,0,0,0.7);
  color: white;
  font-size: 12px;
  display: grid; place-items: center;
  cursor: pointer;
}
.editor-thumb-action:hover { background: var(--amber); }

.card-edit-handle {
  position: absolute;
  top: 8px; right: 8px;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: white;
  display: grid; place-items: center;
  color: var(--ink-2);
  box-shadow: var(--shadow-sm);
  opacity: 0;
  transition: opacity 0.15s;
}
.card:hover .card-edit-handle { opacity: 1; }
.card-edit-handle:hover { background: var(--ink); color: white; }

.card-body { padding: 14px 14px 12px; flex: 1; display: flex; flex-direction: column; }
.card-brand {
  font-size: 10px; font-weight: 600;
  color: var(--ink-3);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 6px;
}
.card-model {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.3;
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.6em;
}
.card-meta {
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: 11px; color: var(--ink-3);
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.card-ref { font-family: ui-monospace, SF Mono, Menlo, monospace; font-size: 10px; }
.card-price-row {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 10px;
}
.card-price {
  font-size: 16px; font-weight: 600;
  color: var(--ink); letter-spacing: -0.01em;
}
.card-price-usd { font-size: 10px; color: var(--ink-3); margin-left: 3px; font-weight: 400; }
.card-actions { display: flex; gap: 6px; }
.wa-btn {
  flex: 1;
  height: 30px;
  background: #1ea34a;
  color: white;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  transition: background 0.15s, transform 0.15s;
}
.wa-btn:hover { background: #178a3e; transform: translateY(-1px); }
.detail-actions .wa-btn,
.share-options .wa-btn {
  letter-spacing: 0.06em;
}
.share-btn {
  width: 34px; height: 34px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  display: grid; place-items: center;
  color: var(--ink-2);
  transition: all 0.15s;
}
.share-btn:hover { background: var(--ink); color: white; border-color: var(--ink); }

/* List view */
.list {
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.list-row {
  display: grid;
  grid-template-columns: 60px 1.4fr 1fr 100px 100px 110px 130px 60px;
  gap: 16px;
  align-items: center;
  padding: 10px 16px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  transition: background 0.1s;
  font-size: 13px;
}
.list-row:hover { background: var(--bg); }
.list-row:last-child { border-bottom: none; }
.list-head {
  background: var(--bg);
  font-size: 10px;
  font-weight: 600;
  color: var(--ink-3);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  cursor: default;
  padding: 12px 16px;
}
.list-head:hover { background: var(--bg); }
.list-row img { width: 50px; height: 50px; object-fit: cover; border-radius: var(--radius); background: #f5f5f5; }
.list-cell-brand { color: var(--ink-3); font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; }
.list-cell-model { font-weight: 500; }
.list-cell-ref { font-family: ui-monospace, monospace; font-size: 11px; color: var(--ink-3); }
.list-cell-price { font-weight: 600; }
.list-actions { display: flex; gap: 4px; }

/* === DETAIL DRAWER === */
.detail-bg {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(10,10,10,0.4);
  animation: fadeIn 0.2s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.detail-panel {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: min(720px, 100vw);
  background: white;
  z-index: 101;
  overflow-y: auto;
  animation: slideIn 0.25s cubic-bezier(.2,.8,.2,1);
  display: flex; flex-direction: column;
}
@keyframes slideIn { from { transform: translateX(100%); } to { transform: translateX(0); } }
.detail-header {
  position: sticky; top: 0;
  background: white;
  border-bottom: 1px solid var(--line);
  padding: 14px 24px;
  display: flex; align-items: center; gap: 12px;
  z-index: 5;
}
.detail-header h2 { font-size: 13px; font-weight: 600; color: var(--ink-2); flex: 1; }
.detail-img-wrap {
  background: #f5f5f5;
  aspect-ratio: 1;
  position: relative;
}
.detail-img-wrap img { width: 100%; height: 100%; object-fit: contain; background: white; }
.detail-img-upload {
  position: absolute;
  bottom: 16px; right: 16px;
  background: white;
  padding: 8px 14px;
  border-radius: var(--radius);
  font-size: 12px;
  font-weight: 500;
  color: var(--ink);
  box-shadow: var(--shadow);
  display: inline-flex; align-items: center; gap: 6px;
  cursor: pointer;
}
.detail-img-upload:hover { background: var(--ink); color: white; }
.detail-body { padding: 28px 32px 40px; }
.detail-brand { font-size: 11px; font-weight: 600; color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 8px; }
.detail-model {
  font-size: 24px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.2;
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}
.detail-ref { font-family: ui-monospace, monospace; font-size: 12px; color: var(--ink-3); margin-bottom: 24px; }
.detail-price-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin-bottom: 24px;
}
.detail-price { font-size: 32px; font-weight: 700; color: var(--ink); letter-spacing: -0.02em; }
.detail-price-usd { font-size: 12px; color: var(--ink-3); margin-left: 6px; font-weight: 500; }
.detail-status-select {
  display: flex; gap: 6px;
}
.status-chip {
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border: 1px solid var(--line-strong);
  color: var(--ink-3);
  background: white;
  cursor: pointer;
}
.status-chip.active { background: var(--ink); color: white; border-color: var(--ink); }
.status-chip.active.reservado { background: var(--amber); border-color: var(--amber); }
.status-chip.active.vendido { background: var(--red); border-color: var(--red); }

.detail-specs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  margin-bottom: 32px;
  border-top: 1px solid var(--line);
}
.spec {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.spec:nth-child(odd) { padding-right: 16px; }
.spec:nth-child(even) { padding-left: 16px; border-left: 1px solid var(--line); }
.spec-key { font-size: 10px; font-weight: 600; color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 4px; }
.spec-val { font-size: 14px; color: var(--ink); font-weight: 500; }

.detail-actions {
  position: sticky;
  bottom: 0;
  background: white;
  border-top: 1px solid var(--line);
  padding: 16px 32px;
  display: flex; gap: 10px;
  margin-top: auto;
}
.detail-actions .wa-btn { height: 44px; font-size: 14px; }
.detail-actions .btn { height: 44px; }

/* Inline edit field */
.editable {
  cursor: text;
  border-radius: 3px;
  padding: 2px 4px;
  margin: -2px -4px;
  transition: background 0.1s;
}
.editable:hover { background: rgba(0,0,0,0.04); }
.editable:focus { outline: 2px solid var(--ink); background: white; }

.edit-row {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.edit-row label { font-size: 11px; font-weight: 600; color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.06em; }
.edit-row input, .edit-row select {
  width: 100%; height: 34px; padding: 0 10px;
  border: 1px solid var(--line-strong); border-radius: var(--radius);
  font-size: 13px; outline: none; background: white;
  color: var(--ink);
}
.edit-row input:focus, .edit-row select:focus { border-color: var(--ink); }

.danger-zone {
  margin-top: 28px;
  padding: 16px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: var(--radius);
  display: flex; justify-content: space-between; align-items: center;
}
.danger-zone .label { font-size: 12px; color: #991b1b; font-weight: 500; }
.btn-danger { background: #dc2626; color: white; height: 32px; padding: 0 14px; border-radius: var(--radius); font-size: 12px; font-weight: 500; }
.btn-danger:hover { background: #b91c1c; }

/* Add new */
.fab {
  position: fixed;
  bottom: 24px; right: 24px;
  width: 56px; height: 56px;
  background: var(--ink);
  color: white;
  border-radius: 50%;
  display: grid; place-items: center;
  box-shadow: var(--shadow-lg);
  z-index: 40;
  transition: transform 0.15s;
}
.fab:hover { transform: scale(1.05); background: #262626; }

/* Modal share */
.modal-bg {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(10,10,10,0.5);
  display: grid; place-items: center;
  padding: 20px;
  animation: fadeIn 0.15s ease;
}
.modal {
  background: white;
  border-radius: var(--radius-lg);
  max-width: 460px; width: 100%;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.modal-head {
  padding: 20px 24px 12px;
}
.modal-head h3 { font-size: 18px; font-weight: 600; color: var(--ink); }
.modal-head p { font-size: 13px; color: var(--ink-3); margin-top: 4px; }
.modal-body { padding: 4px 24px 20px; }
.modal-foot { padding: 16px 24px; background: var(--bg); border-top: 1px solid var(--line); display: flex; gap: 10px; justify-content: flex-end; }
.share-link {
  background: var(--bg);
  border: 1px solid var(--line);
  padding: 10px 12px;
  font-family: ui-monospace, monospace;
  font-size: 11px;
  color: var(--ink-2);
  border-radius: var(--radius);
  word-break: break-all;
  margin-bottom: 12px;
}
.share-options { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.share-option {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  text-align: center;
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-2);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.share-option:hover { background: var(--bg); border-color: var(--ink-4); color: var(--ink); }

/* Empty state */
.empty {
  text-align: center;
  padding: 80px 20px;
  color: var(--ink-3);
}
.empty h3 { font-size: 18px; color: var(--ink); margin-bottom: 8px; }

/* Story card export sheet */
.story-export {
  width: 1080px;
  height: 1920px;
  background: white;
  position: relative;
  overflow: hidden;
}

/* Tablet */
@media (max-width: 1180px) {
  .header-inner { grid-template-columns: auto 1fr; row-gap: 12px; padding: 14px 20px; gap: 16px; }
  .header-stats { grid-column: 1 / -1; padding-left: 0; border-left: none; border-top: 1px solid var(--line); padding-top: 12px; }
  .header-actions { grid-column: 2; justify-self: end; }
  .toolbar { top: 0; position: static; padding: 12px 20px; }
  .section-tabs-wrap { position: static; top: 0; }
  .section-tabs { padding: 0 20px; }
}

/* Mobile */
@media (max-width: 720px) {
  .header-inner { padding: 14px 16px; gap: 12px; }
  .header-stats { grid-template-columns: repeat(2, 1fr); gap: 12px 0; }
  .stat { padding: 0 12px; }
  .stat:nth-child(2n) { border-right: none; }
  .header-actions .btn span { display: none; }
  .toolbar { padding: 10px 12px; }
  .section-tabs { padding: 0 12px; }
  .section-tabs .tab { padding: 12px 16px; font-size: 13px; }
  .toolbar-inner { gap: 8px; }
  .main { padding: 14px 12px 100px; }
  .grid { gap: 10px; grid-template-columns: repeat(2, 1fr); }
  .card-body { padding: 10px; }
  .card-model { font-size: 12px; min-height: auto; }
  .card-price { font-size: 14px; }
  .card-nav { opacity: 1; width: 26px; height: 26px; font-size: 16px; background: rgba(255,255,255,0.85); }
  .card-nav.prev { left: 6px; }
  .card-nav.next { right: 6px; }
  .card-counter { bottom: 8px; font-size: 10px; padding: 3px 8px; }
  .detail-panel { width: 100% !important; max-width: 100% !important; }
  .detail-body { padding: 20px 20px 30px; }
  .detail-actions { padding: 12px 16px; }
  .gallery-nav { width: 36px; height: 36px; font-size: 22px; }
  .gallery-nav.prev { left: 10px; }
  .gallery-nav.next { right: 10px; }
  .gallery-counter { top: 12px; left: 12px; font-size: 11px; padding: 3px 8px; }
  .detail-thumbs { bottom: 10px; gap: 4px; padding: 4px 6px; max-width: calc(100% - 32px); }
  .detail-thumb { width: 32px; height: 32px; border-radius: 5px; }
  .detail-img-upload { bottom: auto; top: 12px; right: 12px; padding: 6px 10px; font-size: 11px; }
  .list-row { grid-template-columns: 50px 1fr 100px 60px; }
  .list-row > :nth-child(3), .list-row > :nth-child(5), .list-row > :nth-child(6) { display: none; }
  .toolbar-result { display: none; }
}

/* Print → PDF */
@media print {
  @page { size: A4; margin: 12mm; }
  .header-actions, .toolbar, .fab, .detail-overlay, .card-actions { display: none !important; }
  body, .header { background: white !important; }
  .header { position: static; border: none; }
  .grid { grid-template-columns: repeat(3, 1fr) !important; gap: 10px !important; page-break-inside: auto; }
  .card { break-inside: avoid; box-shadow: none !important; border: 1px solid #ddd !important; }
}
