*, *::before, *::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  max-width: 100vw;
  overflow-x: hidden;
}

:root {
  --bg-0: #fbf7f2;
  --bg-1: #f7eee4;
  --panel-0: #fffdfb;
  --panel-1: #fff7ef;
  --line: #d9c7b8;
  --line-soft: #e6d5c7;
  --text-0: #2b2320;
  --text-1: #423530;
  --text-2: #6c5a52;
  --ok: #6fb39b;
  --warn: #c9a275;
  --danger: #b87973;
  --danger-bg: #f3d7d4;
  --accent-0: #e6caa6;
  --accent-1: #c9a275;
  --radius-sm: 14px;
  --radius-md: 18px;
  --radius-lg: 26px;
  --shadow-0: 0 12px 28px rgba(40, 28, 18, 0.16);
  --ease: 160ms cubic-bezier(0.22, 0.82, 0.34, 1);
}

body {
  background:
    radial-gradient(circle at 92% 0%, rgba(28, 130, 89, 0.2), transparent 45%),
    radial-gradient(circle at 0 0, rgba(162, 116, 34, 0.24), transparent 40%),
    linear-gradient(180deg, var(--bg-0), var(--bg-1) 56%, var(--bg-1) 100%);
  color: var(--text-0);
  font-family: "Sora", system-ui, -apple-system, sans-serif;
}

.hidden {
  display: none !important;
}

.login-screen {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 18px;
}

.login-card {
  width: min(520px, 100%);
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--panel-0);
  box-shadow: var(--shadow-0);
  padding: 22px;
}

.kicker {
  margin: 0;
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-2);
  font-weight: 700;
}

.login-card h1 {
  margin: 8px 0 10px;
  font-family: "Playfair Display", "Times New Roman", serif;
  font-size: clamp(1.7rem, 3.4vw, 2.2rem);
}

.login-copy {
  margin: 0 0 14px;
  color: var(--text-1);
}

.login-form {
  display: grid;
  gap: 10px;
}

label {
  display: grid;
  gap: 6px;
  color: var(--text-1);
  font-size: 0.86rem;
}

input,
select,
textarea {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: var(--panel-0);
  color: var(--text-0);
  font-family: inherit;
  font-size: 0.95rem;
  padding: 10px 14px;
}

textarea {
  resize: vertical;
  min-height: 84px;
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  border-color: var(--accent-0);
  outline: none;
}

.admin-shell {
  max-width: 100%;
  width: 100%;
  margin: 0 auto;
  padding: 18px 14px 36px;
  display: grid;
  gap: 14px;
  overflow-x: hidden;
}

.app-shell {
  overflow-x: hidden;
}

.admin-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  align-items: start;
  gap: 14px;
}

.admin-layout > * {
  min-width: 0;
}

.admin-sidebar {
  position: sticky;
  top: 12px;
  align-self: start;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--panel-0);
  padding: 12px;
  box-shadow: var(--shadow-0);
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
}

.sidebar-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-soft);
  color: var(--text-0);
  text-decoration: none;
  background: var(--panel-1);
  font-weight: 700;
  font-size: 0.9rem;
  white-space: nowrap;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: border-color var(--ease), background var(--ease), transform var(--ease);
}

.sidebar-link:hover {
  border-color: rgba(248, 212, 138, 0.55);
  background: var(--panel-1);
  transform: translateY(-1px);
}

.main-content {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.admin-head {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--panel-0);
  box-shadow: var(--shadow-0);
  padding: 16px;
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
  flex-wrap: wrap;
}

.head-copy h1 {
  margin: 6px 0 8px;
  font-family: "Playfair Display", "Times New Roman", serif;
  font-size: clamp(1.5rem, 2.6vw, 2.15rem);
}

.head-copy p {
  margin: 0;
  color: var(--text-1);
  max-width: 760px;
}

.head-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.session-pill {
  min-height: 38px;
  border: 1px solid rgba(102, 178, 145, 0.55);
  background: rgba(111, 179, 155, 0.18);
  color: var(--text-0);
  border-radius: 999px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  font-size: 0.8rem;
  font-weight: 700;
}

.panel {
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-md);
  background: var(--panel-0);
  padding: 14px;
}

.quick-setup {
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  background: var(--panel-1);
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.quick-copy h2 {
  margin: 0 0 5px;
  font-size: 1.08rem;
}

.quick-copy p {
  margin: 0;
  color: var(--text-1);
  font-size: 0.87rem;
}

.quick-setup-main {
  margin-bottom: 10px;
}

.quick-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.pilot-note {
  margin: 10px 0;
  padding: 12px 14px;
  border: 1px solid rgba(87, 148, 255, 0.3);
  border-radius: 12px;
  background: rgba(201, 164, 116, 0.12);
}

.pilot-note h3 {
  margin: 0 0 6px;
  font-size: 0.98rem;
}

.pilot-note p {
  margin: 0;
  color: var(--text-1);
  font-size: 0.86rem;
  line-height: 1.45;
}

.faq-admin-panel {
  display: grid;
  gap: 12px;
}

.faq-editor-list {
  display: grid;
  gap: 10px;
}

.faq-editor-item {
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: var(--panel-1);
  padding: 12px;
  display: grid;
  gap: 10px;
}

.faq-editor-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.faq-editor-actions {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
}

.faq-editor-head strong {
  font-size: 0.94rem;
}

.faq-editor-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
  gap: 10px;
}

.faq-preview-shell {
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  background: var(--panel-1);
  padding: 14px;
  display: grid;
  gap: 12px;
}

.faq-preview-list {
  display: grid;
  gap: 10px;
}

.faq-preview-item {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: var(--panel-0);
  padding: 12px;
}

.faq-preview-index {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid var(--line-soft);
  background: var(--panel-1);
  color: var(--text-0);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
}

.faq-preview-item strong {
  display: block;
  margin: 0 0 4px;
}

.faq-preview-item p {
  margin: 0;
  color: var(--text-2);
  line-height: 1.5;
}

.stats-grid {
  margin: 10px 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.stats-grid article {
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: var(--panel-1);
  padding: 10px;
}

.stats-grid p {
  margin: 0;
  color: var(--text-2);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
}

.stats-grid h3 {
  margin: 6px 0 0;
  font-family: "Playfair Display", "Times New Roman", serif;
  font-size: 1.45rem;
}

.sync-panel {
  margin: 10px 0;
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.toolbar {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.toolbar-inline {
  margin-top: 8px;
}

.filters-admin {
  margin-top: 12px;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: var(--panel-1);
  padding: 10px;
}

.admin-inline-note {
  margin: 6px 0 12px;
  color: var(--text-2);
  font-size: 0.84rem;
}

.admin-inline-note.compact {
  margin: 0;
}

.filters-admin h3 {
  margin: 0;
  font-size: 0.98rem;
}

.inventory-search-shell {
  display: grid;
  gap: 12px;
  padding: 12px;
  background: var(--panel-0);
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  margin-bottom: 12px;
}

.inventory-search-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.inventory-search-head h3 {
  margin: 0 0 4px;
  font-size: 1rem;
}

.inventory-search-head p {
  margin: 0;
  color: var(--text-2);
  font-size: 0.84rem;
  max-width: 740px;
}

.inventory-search-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.inventory-quick-views {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.inventory-quick-view {
  min-height: 40px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--line-soft);
  background: var(--panel-1);
  color: var(--text-1);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font: inherit;
  font-size: 0.84rem;
  font-weight: 700;
  transition: border-color var(--ease), background var(--ease), transform var(--ease);
}

.inventory-quick-view span {
  min-width: 28px;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--panel-1);
  color: var(--text-1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.74rem;
}

.inventory-quick-view:hover {
  border-color: rgba(248, 218, 148, 0.55);
  transform: translateY(-1px);
}

.inventory-quick-view.is-active {
  border-color: rgba(248, 218, 148, 0.65);
  background: rgba(248, 218, 148, 0.1);
  color: var(--text-0);
}

.inventory-task-summary {
  margin: -2px 0 0;
  color: var(--text-2);
  font-size: 0.83rem;
}

.inventory-search-grid {
  display: grid;
  gap: 8px;
}

.inventory-search-grid-primary {
  grid-template-columns: minmax(0, 2fr) repeat(3, minmax(180px, 1fr));
  align-items: end;
}

.inventory-search-grid-advanced {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.admin-search-bar { display:flex; gap:10px; align-items:center; flex-wrap:wrap; padding:12px; background:var(--panel-0); border:1px solid var(--line-soft); border-radius:12px; margin-bottom:12px; }
.search-input-wrap { flex:1; min-width:200px; position:relative; display:flex; align-items:center; }
#admin-search { width:100%; background:var(--panel-0); border:1px solid var(--line-soft); border-radius:8px; color:var(--text-0); padding:9px 32px; font-size:14px; }
#admin-search:focus { border-color:var(--accent-0); outline:none; }
.search-icon { position:absolute; left:10px; color:var(--text-2); }
.clear-btn { position:absolute; right:8px; background:none; border:none; color:var(--text-2); cursor:pointer; font-size:1rem; }
.search-meta {
  color:var(--text-1);
  font-size:12px;
  white-space:nowrap;
  min-height: 38px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--line-soft);
  background: var(--panel-1);
  display: inline-flex;
  align-items: center;
  font-weight: 700;
}
.admin-search-shortcut { white-space: nowrap; }
.admin-pagination { display:flex; gap:4px; justify-content:center; padding:16px; flex-wrap:wrap; }
.page-btn { min-width:44px; height:44px; background:var(--panel-0); border:1px solid var(--line-soft); border-radius:8px; color:var(--text-0); cursor:pointer; font-size:13px; font-weight:600; }
.page-btn.active { background:var(--accent-0); color:#07090f; border-color:var(--accent-0); }
.page-btn:hover:not(.active) { border-color:var(--accent-0); color:var(--accent-0); }
@media(max-width:599px) { .admin-search-bar { flex-direction:column; align-items:stretch; } .search-input-wrap, .admin-search-shortcut { width:100%; min-width:0; } }

.filters-grid {
  margin-top: 8px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.filters-grid-primary {
  grid-template-columns: minmax(0, 2fr) repeat(3, minmax(180px, 1fr));
  align-items: end;
}

.filters-grid-advanced {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.filter-span-2 {
  grid-column: span 2;
}

.inventory-filters-panel {
  margin-top: 12px;
}

.filters-feedback-row {
  margin-top: 12px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.active-filter-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 34px;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--line-soft);
  background: var(--panel-1);
  color: var(--text-1);
  font-size: 0.8rem;
  font-weight: 700;
}

.filter-chip.is-neutral {
  color: var(--text-2);
  border-style: dashed;
}

.advanced-tools {
  margin-top: 10px;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  padding: 8px 10px;
  background: var(--panel-1);
}

.advanced-tools summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--text-1);
}

.advanced-grid {
  margin-top: 10px;
}

.table-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 8px;
}

.table-head h2 {
  margin: 0;
}

.table-head p {
  margin: 0;
  color: var(--text-1);
  font-size: 0.83rem;
  max-width: 560px;
}

.table-panel {
  padding: 12px;
}

.table-wrap,
.table-wrapper {
  max-height: 60vh;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: auto;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  -webkit-overflow-scrolling: touch;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 0;
}

thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--panel-1);
  color: var(--text-2);
  text-align: left;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 1px solid var(--line-soft);
  padding: 8px 6px;
  white-space: normal;
  word-break: break-word;
}

tbody td {
  border-bottom: 1px solid var(--line-soft);
  padding: 6px 4px;
  vertical-align: top;
  overflow: hidden;
  text-overflow: ellipsis;
  word-break: break-word;
}

tbody tr:hover td {
  background: rgba(201, 164, 116, 0.12);
}

.cell-input,
.cell-select {
  min-height: 38px;
  border-radius: 9px;
  border: 1px solid var(--line-soft);
  background: var(--panel-1);
  color: var(--text-0);
  font-size: 0.85rem;
  padding: 7px 9px;
}

.cell-input.price,
.cell-input.stock {
  text-align: right;
}

.cell-textarea {
  min-height: 56px;
  border-radius: 9px;
  border: 1px solid var(--line-soft);
  background: var(--panel-1);
  color: var(--text-0);
  font-size: 0.82rem;
  padding: 7px 9px;
}

.cell-bool {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  color: var(--text-1);
}

.row-actions {
  display: grid;
  gap: 6px;
  min-width: 132px;
}

.row-action-btn {
  min-height: 44px;
  border-radius: 8px;
  border: 1px solid var(--line-soft);
  background: var(--panel-1);
  color: var(--text-0);
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
}

.row-action-btn.sell {
  border-color: rgba(253, 206, 122, 0.45);
  background: rgba(201, 164, 116, 0.18);
  color: var(--text-0);
}

.row-action-btn.bad {
  border-color: rgba(244, 129, 129, 0.5);
  background: var(--danger-bg);
  color: var(--text-0);
}

.status-chip {
  min-height: 26px;
  border-radius: 999px;
  border: 1px solid var(--line-soft);
  background: var(--panel-1);
  color: var(--text-0);
  padding: 0 9px;
  display: inline-flex;
  align-items: center;
  font-size: 0.73rem;
  font-weight: 700;
}

.status-chip.available {
  border-color: rgba(91, 218, 142, 0.44);
  color: var(--text-0);
}

.status-chip.sold {
  border-color: rgba(246, 128, 128, 0.45);
  color: var(--text-0);
}

.status-chip.reserved {
  border-color: rgba(244, 196, 95, 0.5);
  color: var(--text-0);
}

.status-chip.hidden {
  border-color: rgba(153, 173, 205, 0.36);
  color: var(--text-1);
}

.status-chip-btn {
  min-height: 34px;
  border-radius: 999px;
  border: 1px solid var(--line-soft);
  background: var(--panel-1);
  color: var(--text-0);
  padding: 6px 14px;
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
  text-transform: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  min-width: 136px;
}

.status-chip-btn.status-disponible {
  border-color: rgba(91, 218, 142, 0.44);
  color: var(--text-0);
  background: rgba(111, 179, 155, 0.16);
}

.status-chip-btn.status-agotado {
  border-color: rgba(239, 111, 122, 0.5);
  color: var(--text-0);
  background: rgba(184, 121, 115, 0.16);
}

.status-chip-btn.status-preventa {
  border-color: rgba(244, 196, 95, 0.5);
  color: var(--text-0);
  background: rgba(201, 164, 116, 0.16);
}

.status-chip-btn.status-bajo_pedido,
.status-chip-btn.status-bajo-pedido {
  border-color: rgba(96, 164, 255, 0.5);
  color: var(--text-1);
  background: rgba(150, 170, 210, 0.16);
}

.status-dropdown {
  position: absolute;
  top: 120%;
  right: 0;
  z-index: 20;
  background: var(--panel-0);
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  padding: 6px;
  display: grid;
  gap: 6px;
  min-width: 160px;
  box-shadow: var(--shadow-0);
}

.status-dropdown button {
  width: 100%;
  border: 1px solid var(--line-soft);
  background: var(--panel-1);
  color: var(--text-0);
  border-radius: 8px;
  padding: 8px;
  cursor: pointer;
  font-weight: 700;
}

.status-dropdown button:hover {
  border-color: var(--accent-0);
  color: var(--accent-0);
}

.notes h2 {
  margin: 0 0 8px;
}

.notes p {
  margin: 0;
  color: var(--text-1);
  line-height: 1.45;
}

.notes-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.notes-grid {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.note-card {
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  background: var(--panel-1);
  padding: 14px;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.note-step {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid rgba(248, 212, 138, 0.45);
  background: rgba(248, 212, 138, 0.12);
  color: var(--text-0);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
}

.note-card strong {
  display: block;
  margin-bottom: 4px;
}

.note-card p {
  font-size: 0.84rem;
}

.csv-structure {
  margin-top: 14px;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: var(--panel-1);
  padding: 12px 14px;
}

.csv-structure summary {
  cursor: pointer;
  font-weight: 800;
}

.csv-structure p + p {
  margin-top: 10px;
}

.btn {
  min-height: 44px;
  border: 1px solid #c9a275;
  border-radius: 8px;
  background: #c9a275;
  color: #ffffff;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  cursor: pointer;
  transition: transform var(--ease), border-color var(--ease), filter var(--ease), background var(--ease);
}

.btn:hover {
  transform: translateY(-1px);
  border-color: var(--accent-1);
}

.btn.ghost {
  background: transparent;
  color: var(--text-0);
  border-color: var(--line-soft);
}

.btn.danger {
  background: transparent;
  color: #b87973;
  border-color: #b87973;
}

.btn.accent {
  border-color: #c9a275;
  background: #c9a275;
  color: #ffffff;
}

.status {
  margin: 10px 0 0;
  min-height: 22px;
  color: var(--text-1);
  font-size: 0.84rem;
}

.sheet-modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 14px;
  background: rgba(47, 35, 26, 0.08);
  backdrop-filter: blur(2px);
}

.sheet-modal.open {
  display: flex;
}

.sheet-modal-card {
  width: min(860px, 100%);
  border: 1px solid var(--line-soft);
  border-radius: 16px;
  background: var(--panel-1);
  box-shadow: var(--shadow-0);
  padding: 14px;
  max-height: calc(100dvh - 30px);
  overflow: auto;
}

.sheet-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.sheet-modal-head h3 {
  margin: 0;
}

.sheet-modal-copy {
  margin: 8px 0 12px;
  color: var(--text-1);
}

.sheet-modal-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.sheet-modal-actions {
  margin-top: 12px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.sheet-modal-status {
  margin: 10px 0 0;
  min-height: 20px;
  color: var(--text-1);
}

.sheet-modal-status.error {
  color: #ffb0b0;
}

.sheet-modal-status.ok {
  color: #b4f5d3;
}

.sheet-oauth {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.sheet-oauth p {
  margin: 0 0 8px;
  color: var(--text-1);
  font-size: 0.84rem;
}

.sheet-oauth-config {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 8px;
}

.sheet-oauth-hint {
  margin: 8px 0 10px;
  color: var(--text-2);
  font-size: 0.76rem;
}

.wizard-card {
  width: min(920px, 100%);
}

.wizard-steps {
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.wiz-step {
  min-height: 38px;
  border-radius: 10px;
  border: 1px solid var(--line-soft);
  background: var(--panel-1);
  color: #eaf0fc;
  font-size: 0.83rem;
  font-weight: 700;
  cursor: pointer;
}

.wiz-step.active {
  border-color: transparent;
  background: linear-gradient(120deg, var(--accent-0), var(--accent-1));
  color: var(--text-0);
}

.wizard-view {
  margin-top: 10px;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: var(--panel-1);
  padding: 12px;
  display: grid;
  gap: 10px;
}

.wizard-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.wizard-note {
  margin: 0;
  color: var(--text-1);
  font-size: 0.84rem;
}

.wizard-review {
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: var(--panel-1);
  padding: 10px;
  color: var(--text-2);
  font-size: 0.85rem;
  line-height: 1.45;
}

.wizard-actions {
  justify-content: space-between;
}

@media (max-width: 1200px) {
  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .field-grid {
    grid-template-columns: 1fr;
  }

  .filters-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .filters-grid-primary,
  .inventory-search-grid-primary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .filter-span-2 {
    grid-column: span 2;
  }
}

@media (max-width: 900px) {
  .admin-shell {
    padding: 12px 10px 30px;
  }

  .head-actions {
    width: 100%;
  }

  .head-actions .btn,
  .head-actions .session-pill {
    flex: 1 1 calc(50% - 4px);
    justify-content: center;
  }

  .quick-actions {
    width: 100%;
  }

  .quick-actions .btn {
    flex: 1 1 calc(50% - 4px);
  }

  .filters-grid,
  .inventory-search-grid,
  .inventory-search-grid-primary,
  .inventory-search-grid-advanced,
  .filters-grid-primary,
  .filters-grid-advanced {
    grid-template-columns: 1fr;
  }

  .filter-span-2 {
    grid-column: span 1;
  }

  .filters-feedback-row {
    flex-direction: column;
  }

  .inventory-search-actions {
    width: 100%;
  }

  .inventory-search-actions .btn,
  .inventory-search-actions .search-meta {
    flex: 1 1 calc(50% - 4px);
    justify-content: center;
  }

  .sheet-modal-grid,
  .wizard-row {
    grid-template-columns: 1fr;
  }

  .faq-editor-grid {
    grid-template-columns: 1fr;
  }

  .sheet-oauth-config {
    grid-template-columns: 1fr;
  }

  .wizard-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .scraper-live-banner {
    grid-template-columns: 1fr;
  }

  .scraper-live-meta {
    grid-template-columns: 1fr;
  }

  .scraper-review-meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .image-review-stage {
    grid-template-columns: 44px minmax(0, 1fr) 44px;
  }
}

@media (max-width: 768px) {
  .admin-shell {
    padding: 0 0 26px;
  }

  .admin-layout {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .admin-sidebar {
    position: sticky;
    top: 0;
    z-index: 8;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    box-shadow: none;
  }

  .sidebar-nav {
    flex-direction: row;
    gap: 8px;
    overflow-x: auto;
    padding: 0 4px 6px;
    margin: 6px -4px 0;
    scrollbar-width: thin;
  }

  .sidebar-link {
    flex: 0 0 auto;
  }

  .main-content {
    padding: 12px;
  }
}

@media (max-width: 600px) {
  .login-screen {
    padding: 10px;
  }

  .login-card {
    padding: 16px;
    border-radius: 16px;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .quick-actions .btn,
  .head-actions .btn,
  .head-actions .session-pill {
    flex: 1 1 100%;
  }

  .toolbar .btn {
    flex: 1 1 100%;
  }

  .table-wrap {
    max-height: 56vh;
  }

  .sheet-modal {
    padding: 8px;
  }

  .sheet-modal-card {
    max-height: calc(100dvh - 14px);
    padding: 10px;
    width: 100vw !important;
    max-width: 100vw !important;
    min-height: 100vh;
    border-radius: 0;
    margin: 0;
  }

  .product-modal-card {
    width: 100vw !important;
    max-width: 100vw !important;
    min-height: 100vh;
    border-radius: 0;
    margin: 0;
  }

  .form-grid {
    grid-template-columns: 1fr !important;
  }

  .form-actions,
  .sheet-modal-actions {
    flex-direction: column;
  }

  .btn {
    width: 100%;
    min-height: 44px;
  }

  .product-table .col-variant,
  .product-table .col-date {
    display: none;
  }

  /* Columna de nombre más compacta */
  .cell-name {
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .scraper-review-actions .btn,
  .image-review-head-actions .btn {
    width: auto;
    flex: 1 1 calc(50% - 4px);
  }

  .scraper-review-meta {
    grid-template-columns: 1fr;
  }

  .image-review-card {
    width: 100vw !important;
    max-width: 100vw !important;
    min-height: 100vh;
    border-radius: 0;
  }

  .image-review-stage {
    grid-template-columns: 1fr;
  }

  .image-review-nav {
    width: 100%;
  }

  .image-review-canvas {
    min-height: 40vh;
  }
}

/* Product Table Styles */
.product-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  table-layout: fixed;
}

.product-table thead th {
  background: var(--panel-0);
  color: var(--text-2);
  font-size: 11px;
  text-transform: uppercase;
  padding: 10px 8px;
  border-bottom: 1px solid var(--line-soft);
  position: sticky;
  top: 0;
  z-index: 10;
  white-space: normal;
}

.product-table tbody tr {
  border-bottom: 1px solid var(--line-soft);
  transition: background var(--ease);
}

.product-table tbody tr:hover {
  background: var(--panel-0);
}

.product-table td {
  padding: 10px 8px;
  border-bottom: 1px solid var(--panel-0);
  vertical-align: middle;
}

.product-table .col-image {
  width: 86px;
}

.product-table .col-name {
  width: 320px;
}

.product-table .col-brand {
  width: 132px;
}

.product-table .col-variant {
  width: 118px;
}

.product-table .col-price {
  text-align: right;
  width: 144px;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.product-table .col-category {
  width: 126px;
}

.product-table .col-date {
  color: var(--text-2);
  font-size: 0.85rem;
  width: 112px;
  white-space: nowrap;
}

.product-table .col-stock {
  width: 154px;
  text-align: center;
}

.product-table .col-actions {
  width: 328px;
}

.product-table code {
  background: rgba(201, 164, 116, 0.08);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.85em;
  font-family: monospace;
}

.product-table .badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 0.8em;
  background: rgba(201, 164, 116, 0.12);
  color: var(--text-1);
}

.product-table .badge.success {
  background: rgba(111, 179, 155, 0.2);
  color: var(--ok);
}

.product-table .badge.warning {
  background: rgba(201, 164, 116, 0.2);
  color: var(--warn);
}

.actions-cell {
  display: grid;
  grid-template-columns: repeat(3, minmax(88px, 1fr));
  gap: 8px;
  align-items: center;
  justify-content: flex-start;
}

.actions-cell .btn {
  width: 100%;
  justify-content: center;
}
.product-thumb {
  width: 72px;
  height: 72px;
  object-fit: cover;
  object-position: center;
  border-radius: 10px;
  border: 1px solid var(--line-soft);
  background: var(--panel-1);
}

.btn-icon {
  background: none;
  border: none;
  padding: 6px 10px;
  font-size: 1.2em;
  cursor: pointer;
  opacity: 0.7;
  transition: all var(--ease);
}

.btn-icon:hover {
  opacity: 1;
  transform: scale(1.1);
}

.btn.small {
  min-height: 36px;
  min-width: 84px;
  padding: 8px 10px;
  font-size: 0.82rem;
  white-space: nowrap;
  width: auto;
  flex: 0 0 auto;
}

.btn.is-disabled {
  opacity: 0.55;
  pointer-events: none;
}

.action-stack {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: flex-start;
  flex-wrap: nowrap;
}

.row-menu {
  position: relative;
}

.row-menu summary {
  list-style: none;
}

.row-menu summary::-webkit-details-marker {
  display: none;
}

.row-menu-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 20;
  min-width: 196px;
  padding: 8px;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: var(--panel-1);
  box-shadow: var(--shadow-0);
  display: grid;
  gap: 8px;
}

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-2);
}

.empty-state h3 {
  margin: 0 0 10px;
  color: var(--text-1);
}

.product-cards-container {
  display: grid;
  gap: 12px;
  padding: 12px;
}

.product-card-admin {
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  background: var(--panel-1);
  padding: 12px;
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 12px;
}

.admin-thumb {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--line-soft);
  background: var(--panel-1);
}

.card-info {
  min-width: 0;
}

.card-name {
  margin: 0;
  font-weight: 800;
  line-height: 1.2;
}

.card-brand,
.card-price,
.card-sku {
  margin: 4px 0 0;
}

.card-brand {
  color: var(--text-1);
}

.card-task {
  margin: 6px 0 0;
  font-size: 0.82rem;
  font-weight: 700;
}

.card-task-ok {
  color: var(--text-1);
}

.card-task-info {
  color: var(--text-1);
}

.card-task-warn {
  color: #ffe2a7;
}

.card-task-muted {
  color: var(--text-2);
}

.card-status {
  grid-column: 1 / -1;
}

.card-actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* Product Form Styles */
.product-form {
  display: grid;
  gap: 16px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}

.form-checkboxes {
  display: flex;
  gap: 20px;
  padding: 10px 0;
}

.form-checkboxes label {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-direction: row;
}

.form-checkboxes input[type="checkbox"] {
  width: auto;
  min-height: auto;
  margin: 0;
}

.image-upload-section {
  padding: 16px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-soft);
}

.image-upload-section h4 {
  margin: 0 0 12px;
  font-size: 0.9rem;
  color: var(--text-1);
}

.image-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
  align-items: flex-start;
}

.image-preview-wrap {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: stretch;
}

.image-preview-item {
  padding: 0;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: var(--panel-1);
  cursor: pointer;
  overflow: hidden;
  transition: border-color var(--ease), transform var(--ease);
}

.image-preview-item:hover {
  border-color: rgba(248, 218, 148, 0.55);
  transform: translateY(-1px);
}

.image-preview-item.is-pending {
  border-style: dashed;
}

.image-preview img {
  width: 100px;
  height: 100px;
  object-fit: cover;
  object-position: center;
  display: block;
  border-radius: 12px;
  background: var(--panel-1);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
}

.image-preview-actions {
  position: absolute;
  top: 6px;
  right: 6px;
  display: flex;
  gap: 6px;
  opacity: 0.92;
  transform: translateY(0);
  transition: opacity var(--ease);
}

.image-action-btn {
  min-height: 28px;
  min-width: 28px;
  border-radius: 999px;
  border: 1px solid var(--line-soft);
  background: var(--panel-1);
  color: #dce9fb;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
}

.image-action-btn.ghost {
  background: var(--panel-1);
}

.image-action-btn.danger {
  border-color: rgba(239, 111, 122, 0.6);
  color: #f9a5ad;
}

.image-action-btn.primary {
  border-color: rgba(245, 158, 11, 0.6);
  color: #fcd34d;
}

.image-action-btn:hover {
  border-color: #648dca;
}

.image-preview-wrap:hover .image-preview-actions,
.image-preview-actions:focus-within {
  opacity: 1;
}

@media (hover: none) {
  .image-preview-actions {
    opacity: 1;
  }
}

.image-review-actions {
  display: flex;
  gap: 8px;
  margin: 12px 0 4px;
  flex-wrap: wrap;
}

.product-modal-card {
  max-width: 800px;
  max-height: 90vh;
  overflow-y: auto;
}

.form-help {
  margin: -6px 0 0;
  color: var(--text-2);
  font-size: 0.82rem;
  line-height: 1.4;
}

.field-help {
  display: block;
  margin-top: 6px;
  color: var(--text-2);
  font-size: 0.78rem;
}

.scraper-review-panel {
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  background: var(--panel-0);
  padding: 14px;
  display: grid;
  gap: 12px;
}

.scraper-review-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  flex-wrap: wrap;
}

.scraper-review-head h4 {
  margin: 4px 0 0;
}

.scraper-review-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.scraper-review-meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.scraper-review-meta article {
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: var(--panel-1);
  padding: 10px;
  display: grid;
  gap: 4px;
}

.scraper-review-meta span {
  color: var(--text-2);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 700;
}

.scraper-review-meta strong {
  color: var(--text-0);
  word-break: break-word;
}

.image-review-modal {
  z-index: 120;
}

.image-review-card {
  width: min(1100px, 100%);
  display: grid;
  gap: 14px;
}

.image-review-head-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.image-review-counter {
  min-height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--line-soft);
  background: var(--panel-1);
  color: var(--text-1);
  display: inline-flex;
  align-items: center;
  font-weight: 700;
  font-size: 0.84rem;
}

.image-review-stage {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) 56px;
  gap: 12px;
  align-items: center;
}

.image-review-canvas {
  border: 1px solid var(--line-soft);
  border-radius: 18px;
  background: var(--panel-0);
  padding: 12px;
  min-height: 62vh;
  display: grid;
  place-items: center;
}

.image-review-canvas img {
  max-width: 100%;
  max-height: calc(62vh - 24px);
  object-fit: contain;
  border-radius: 12px;
}

.image-review-nav {
  min-height: 56px;
  border-radius: 12px;
  border: 1px solid var(--line-soft);
  background: var(--panel-1);
  color: var(--text-0);
  font: inherit;
  font-size: 1.2rem;
  font-weight: 800;
  cursor: pointer;
}

.image-review-nav:disabled {
  opacity: 0.45;
  cursor: default;
}

.image-review-thumbs {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.image-review-thumb {
  flex: 0 0 auto;
  width: 92px;
  height: 92px;
  padding: 0;
  border-radius: 12px;
  border: 1px solid var(--line-soft);
  background: var(--panel-1);
  overflow: hidden;
  cursor: pointer;
}

.image-review-thumb.is-active {
  border-color: rgba(248, 218, 148, 0.7);
  box-shadow: 0 0 0 2px rgba(248, 218, 148, 0.14);
}

.image-review-thumb.is-primary {
  border-color: rgba(245, 158, 11, 0.7);
  box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.14);
}

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

label.required::after {
  content: " *";
  color: var(--danger);
}

.pill {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 0.75rem;
  border: 1px solid var(--line-soft);
  background: var(--panel-0);
  color: #c9d7f1;
}

.pill.pill-new {
  border-color: rgba(248, 218, 148, 0.6);
  color: var(--accent-0);
}

.pill.pill-hq {
  border-color: rgba(39, 221, 127, 0.6);
  color: #6fb39b;
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.cell-meta {
  color: var(--text-1);
  font-size: 0.83rem;
  line-height: 1.35;
}

.cell-task {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--line-soft);
  font-size: 0.76rem;
  font-weight: 700;
  line-height: 1.2;
}

.cell-task-ok {
  color: var(--text-0);
  border-color: rgba(74, 222, 128, 0.45);
  background: rgba(74, 222, 128, 0.1);
}

.cell-task-info {
  color: var(--text-1);
  border-color: rgba(96, 164, 255, 0.45);
  background: rgba(150, 170, 210, 0.16);
}

.cell-task-warn {
  color: #ffe2a7;
  border-color: rgba(244, 196, 95, 0.42);
  background: rgba(244, 196, 95, 0.1);
}

.cell-task-muted {
  color: var(--text-2);
  border-color: rgba(148, 167, 197, 0.28);
  background: rgba(201, 164, 116, 0.12);
}

.cell-stock {
  display: grid;
  justify-items: center;
  gap: 6px;
}

.cell-stock-note {
  color: var(--text-2);
  font-size: 0.76rem;
  font-weight: 700;
  text-align: center;
}

.cell-name strong {
  display: block;
  font-size: 0.98rem;
  line-height: 1.22;
  white-space: normal;
}

.cell-name {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.cell-sku {
  color: var(--text-2);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.cell-variant {
  display: grid;
  gap: 4px;
  color: var(--text-1);
  line-height: 1.2;
}

.cell-variant span:last-child {
  color: var(--text-2);
  font-size: 0.86rem;
}

.card-sku {
  margin: 4px 0 0;
  color: var(--text-2);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.pill-reference-admin {
  border-color: rgba(96, 164, 255, 0.45);
  color: var(--text-1);
  background: rgba(150, 170, 210, 0.16);
}

.pill-scraped-admin {
  border-color: rgba(74, 222, 128, 0.45);
  color: var(--text-1);
  background: rgba(111, 179, 155, 0.16);
}

.pill-storefront-ok {
  border-color: rgba(56, 189, 248, 0.45);
  color: var(--text-1);
  background: rgba(150, 170, 210, 0.16);
}

.pill-storefront-off {
  border-color: rgba(244, 196, 95, 0.45);
  color: var(--text-0);
  background: rgba(201, 164, 116, 0.16);
}

.pill-publication {
  background: rgba(201, 164, 116, 0.16);
  border-color: rgba(148, 167, 197, 0.32);
  color: var(--text-1);
}

.pill-publication.pill-draft {
  border-color: rgba(244, 196, 95, 0.45);
  color: var(--text-0);
  background: rgba(201, 164, 116, 0.16);
}

.pill-publication.pill-hidden {
  border-color: rgba(148, 167, 197, 0.35);
  color: var(--text-1);
  background: rgba(201, 164, 116, 0.12);
}

.pill-publication.pill-review_required {
  border-color: rgba(244, 196, 95, 0.45);
  color: var(--text-0);
  background: rgba(201, 164, 116, 0.16);
}

.pill-publication.pill-publish_ready {
  border-color: rgba(96, 164, 255, 0.45);
  color: var(--text-1);
  background: rgba(150, 170, 210, 0.16);
}

.pill-publication.pill-reserved {
  border-color: rgba(56, 189, 248, 0.45);
  color: var(--text-1);
  background: rgba(150, 170, 210, 0.2);
}

.pill-publication.pill-sold {
  border-color: rgba(74, 222, 128, 0.45);
  color: var(--text-1);
  background: rgba(74, 222, 128, 0.14);
}

.pill-publication.pill-archived {
  border-color: rgba(148, 167, 197, 0.35);
  color: var(--text-1);
  background: rgba(201, 164, 116, 0.12);
}

.form-help {
  margin: -4px 0 0;
  color: var(--text-2);
  font-size: 0.82rem;
  line-height: 1.45;
}

/* Status Messages */
.status {
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  margin: 12px 0;
  min-height: 20px;
}

.status.error {
  background: var(--danger-bg);
  color: var(--danger);
  border: 1px solid rgba(248, 113, 113, 0.3);
}

.status.success {
  background: rgba(74, 222, 128, 0.1);
  color: var(--ok);
  border: 1px solid rgba(74, 222, 128, 0.3);
}

/* Danger button style */
.btn.danger {
  background: transparent;
  color: #b87973;
  border-color: #b87973;
}

.btn.danger:hover {
  background: rgba(239, 111, 122, 0.1);
  border-color: #b87973;
}

.table-loading {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border: 1px solid var(--line-soft);
  background: var(--panel-0);
  border-radius: 10px;
  margin-bottom: 10px;
}

.table-loading .spinner {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid var(--line-soft);
  border-top-color: var(--accent-0);
  animation: spin 0.9s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.toast {
  pointer-events: none;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 200ms ease, transform 200ms ease;
  padding: 12px 14px;
  border-radius: 10px;
  color: var(--text-0);
  font-weight: 700;
  margin: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

.toast.visible {
  opacity: 1;
  transform: translateY(0);
}

.toast.success {
  background: #6fb39b;
}

.toast.error {
  background: #b87973;
}

#toast-container {
  position: fixed;
  right: 18px;
  top: 18px;
  z-index: 120;
  display: grid;
  gap: 8px;
}

/* === MOBILE FIRST ENHANCEMENTS === */

/* Para móviles < 768px: layout más compacto */
@media (max-width: 768px) {
  .admin-shell {
    padding: 12px 8px 30px;
  }

  .admin-head {
    flex-direction: column;
    padding: 12px;
  }

  .head-copy h1 {
    font-size: 1.5rem;
  }

  .head-copy p {
    font-size: 0.88rem;
  }

  .head-actions {
    width: 100%;
    flex-direction: column;
  }

  .head-actions .btn,
  .head-actions .session-pill {
    width: 100%;
    justify-content: center;
  }

  .panel {
    padding: 12px;
  }

  .quick-setup {
    flex-direction: column;
    align-items: stretch;
  }

  .quick-actions {
    width: 100%;
  }

  .quick-actions .btn {
    flex: 1 1 100%;
    min-height: 44px;
  }

  .filters-grid {
    grid-template-columns: 1fr;
  }

  .table-panel {
    padding: 10px;
  }

  .table-head {
    flex-direction: column;
    gap: 8px;
  }

  .wizard-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Para móviles muy pequeños < 480px */
@media (max-width: 480px) {
  .admin-shell {
    padding: 10px 6px 24px;
  }

  .admin-head,
  .panel {
    padding: 10px;
  }

  .head-copy h1 {
    font-size: 1.3rem;
  }

  .stats-grid {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .stats-grid article {
    padding: 8px;
  }

  .quick-actions .btn {
    font-size: 0.88rem;
    padding: 10px 12px;
  }

  .table-wrap {
    border-radius: 10px;
  }

  .product-table {
    font-size: 0.82rem;
  }

  .product-table thead th {
    font-size: 0.7rem;
    padding: 6px 4px;
  }

  .product-table tbody td {
    padding: 5px 3px;
  }

  .wizard-steps {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .wiz-step {
    min-height: 36px;
    font-size: 0.8rem;
  }
}

/* Para móviles ultra pequeños < 320px - prevenir scroll horizontal */
@media (max-width: 320px) {
  .admin-shell {
    padding: 8px 4px 20px;
  }

  .admin-head,
  .panel {
    padding: 8px;
  }

  .head-copy h1 {
    font-size: 1.1rem;
    word-break: break-word;
  }

  .search-meta {
    font-size: 10px;
  }

  .page-btn {
    min-width: 44px;
    height: 44px;
    font-size: 11px;
  }

  .product-table {
    font-size: 0.75rem;
  }

  .product-table thead th,
  .product-table tbody td {
    padding: 4px 2px;
  }
}

/* ── SCRAPER PANEL ─────────────────────────────── */
.scraper-config-grid,
.scraper-automation-grid {
  display: grid;
  gap: 1rem;
  margin: 1rem 0;
}

.scraper-runtime-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.scraper-live-banner {
  margin-top: 12px;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  background: var(--panel-0);
  padding: 14px;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 1fr);
  gap: 12px;
  align-items: start;
}

.scraper-live-copy h3 {
  margin: 6px 0;
  font-size: 1.08rem;
}

.scraper-live-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.scraper-live-meta-item {
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: rgba(247, 238, 228, 0.9);
  padding: 10px;
}

.scraper-live-meta-item span {
  display: block;
  color: var(--text-2);
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
}

.scraper-live-meta-item strong {
  display: block;
  margin-top: 4px;
  font-size: 0.94rem;
  color: var(--text-0);
  word-break: break-word;
}

.scraper-live-banner.is-pending,
.scraper-live-banner.is-running,
.scraper-live-banner.is-unknown {
  border-color: rgba(244, 196, 95, 0.45);
  background: var(--panel-1);
}

.scraper-live-banner.is-succeeded,
.scraper-live-banner.is-dry_run {
  border-color: rgba(91, 218, 142, 0.45);
  background: var(--panel-1);
}

.scraper-live-banner.is-failed,
.scraper-live-banner.is-image_pull_backoff {
  border-color: rgba(248, 113, 113, 0.45);
  background: #f3d7d4;
}

.scraper-runtime-cards article,
.scraper-config-block {
  background: var(--panel-1);
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--line-soft);
}

.scraper-runtime-cards p {
  margin: 0;
  color: var(--text-2);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
}

.scraper-runtime-cards h4 {
  margin: 8px 0 6px;
  font-size: 1rem;
}

.scraper-runtime-cards span {
  color: var(--text-1);
  font-size: 0.83rem;
}

.scraper-label {
  display: block;
  font-weight: 700;
  margin-bottom: 0.75rem;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-2);
}

.scraper-brand-grid,
.scraper-type-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.scraper-brand-grid label,
.scraper-type-grid label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  cursor: pointer;
  padding: 0.35rem 0.55rem;
  border-radius: 999px;
  border: 1px solid var(--line-soft);
  background: var(--panel-1);
}

.scraper-brand-grid label:hover,
.scraper-type-grid label:hover {
  border-color: var(--accent-0);
}

.scraper-config-inputs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.scraper-toggle {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  cursor: pointer;
  font-size: 0.9rem;
  min-height: 44px;
}

.scraper-toggle input {
  width: auto;
  min-height: auto;
  margin: 0;
}

.scraper-jobs-section {
  margin-top: 1.5rem;
}

.scraper-jobs-list {
  overflow-x: auto;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
}

.scraper-jobs-list table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.scraper-jobs-list th {
  text-align: left;
  padding: 0.65rem 0.75rem;
  background: var(--panel-1);
  font-weight: 700;
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-2);
}

.scraper-jobs-list td {
  padding: 0.65rem 0.75rem;
  border-bottom: 1px solid var(--line-soft);
  vertical-align: top;
}

.job-status-badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
}

.job-status-badge.running {
  background: #fef3c7;
  color: #92400e;
}

.job-status-badge.succeeded,
.job-status-badge.completed {
  background: #d1fae5;
  color: #065f46;
}

.job-status-badge.failed {
  background: #fee2e2;
  color: #991b1b;
}

.job-status-badge.dry_run,
.job-status-badge.unknown {
  background: #eef2ff;
  color: #334155;
}

.scraper-jobs-list tr.running {
  animation: pulse-row 2s infinite;
}

@media (max-width: 900px) {
  .scraper-runtime-cards,
  .scraper-config-inputs {
    grid-template-columns: 1fr;
  }
}
@keyframes pulse-row { 0%,100% { opacity:1 } 50% { opacity:0.7 } }

/* === OVERRIDES 2026-03-28: merchant-first inventory + scraper UX === */

.product-table .col-image {
  width: 92px;
}

.product-table .col-name {
  width: 34%;
}

.product-table .col-price {
  width: 156px;
  text-align: left;
}

.product-table .col-stock {
  width: 156px;
}

.product-table .col-origin {
  width: 172px;
}

.product-table .col-date {
  width: 108px;
}

.product-table .col-actions {
  width: 272px;
  min-width: 272px;
}

.product-table td,
.product-table thead th {
  padding: 12px 10px;
}

.product-table thead th {
  font-size: 0.73rem;
}

.product-table tbody td {
  overflow: visible;
}

.cell-meta,
.cell-price,
.cell-origin {
  display: grid;
  gap: 4px;
}

.cell-meta {
  color: var(--text-2);
  font-size: 0.82rem;
  line-height: 1.4;
}

.cell-price strong,
.cell-origin strong {
  font-size: 0.96rem;
  color: var(--text-0);
}

.cell-price span,
.cell-origin span {
  color: var(--text-2);
  font-size: 0.79rem;
  line-height: 1.35;
}

.actions-cell {
  display: block;
}

.action-stack {
  display: flex;
  align-items: center;
  justify-content: start;
  gap: 6px;
  flex-wrap: wrap;
  min-width: 0;
}

.action-stack .btn,
.action-stack .storefront-action,
.action-stack .row-menu {
  flex: 0 0 auto;
}

.action-stack .edit-btn {
  min-width: 86px;
}

.action-stack .storefront-action {
  min-width: 94px;
  white-space: nowrap;
  justify-content: center;
}

.action-stack .row-menu > summary {
  min-width: 64px;
}

.row-menu {
  position: relative;
}

.row-menu summary {
  list-style: none;
}

.row-menu summary::-webkit-details-marker {
  display: none;
}

.row-menu[open] > summary {
  border-color: rgba(244, 212, 138, 0.55);
}

@media (max-width: 1200px) {
  .action-stack {
    flex-wrap: wrap;
    row-gap: 8px;
  }

  .action-stack .storefront-action {
    min-width: 96px;
  }
}

.row-menu-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 212px;
  display: grid;
  gap: 6px;
  padding: 8px;
  border-radius: 12px;
  border: 1px solid var(--line-soft);
  background: var(--panel-0);
  box-shadow: var(--shadow-0);
  z-index: 24;
}

.row-menu-panel .btn {
  width: 100%;
  justify-content: center;
}

.image-health-badge {
  display: none;
}

.image-health-badge.visible {
  display: inline-flex;
}

.image-preview img.is-pending {
  border-style: dashed;
  border-color: rgba(244, 212, 138, 0.65);
  opacity: 0.92;
}

.inventory-search-shell {
  gap: 14px;
  padding: 14px;
}

.inventory-search-head {
  align-items: end;
}

.inventory-search-actions .btn {
  min-width: 148px;
}

.inventory-search-grid-primary {
  grid-template-columns: minmax(0, 1.45fr) repeat(3, minmax(180px, 1fr));
}

.inventory-search-grid-advanced {
  padding-top: 10px;
}

.filters-feedback-row {
  align-items: center;
}

.scraper-config-grid,
.scraper-automation-grid {
  gap: 12px;
}

.scraper-guided-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 12px 0;
}

.scraper-active-summary {
  margin-top: 2px;
  padding: 12px 14px;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: var(--panel-0);
  color: var(--text-1);
  font-size: 0.9rem;
  line-height: 1.45;
}

.scraper-active-summary strong {
  color: var(--text-0);
}

.scraper-active-summary span {
  color: var(--text-2);
}

.scraper-last-run-summary {
  margin-top: 10px;
  padding: 12px 14px;
  border: 1px solid rgba(87, 148, 255, 0.28);
  border-radius: 12px;
  background: rgba(201, 164, 116, 0.22);
  color: var(--text-1);
  font-size: 0.88rem;
  line-height: 1.5;
}

.scraper-last-run-summary strong {
  color: var(--text-0);
}

.scraper-last-run-summary span {
  display: block;
  margin-top: 6px;
  color: var(--text-2);
}

.scraper-picker {
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  background: var(--panel-1);
  padding: 10px 12px;
}

.scraper-picker summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
}

.scraper-picker summary::-webkit-details-marker {
  display: none;
}

.scraper-picker summary strong {
  display: block;
  margin-top: 2px;
  font-size: 1rem;
}

.scraper-kicker {
  display: inline-block;
  color: var(--text-2);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-weight: 800;
}

.scraper-picker-summary {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--line-soft);
  background: var(--panel-0);
  color: var(--text-0);
  font-size: 0.82rem;
  font-weight: 800;
  text-align: right;
}

.scraper-brand-grid,
.scraper-type-grid {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.scraper-brand-grid label,
.scraper-type-grid label {
  min-height: 40px;
  padding: 0 12px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.86rem;
}

.scraper-config-inputs {
  align-items: end;
}

.scraper-config-inputs-tight {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.scraper-volume-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 10px;
}

.scraper-volume-btn {
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--line-soft);
  background: var(--panel-0);
  color: var(--text-0);
  font-family: inherit;
  font-size: 0.84rem;
  font-weight: 800;
  cursor: pointer;
  transition: border-color var(--ease), background var(--ease), color var(--ease), transform var(--ease);
}

.scraper-volume-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(244, 212, 138, 0.5);
}

.scraper-volume-btn.is-active {
  border-color: rgba(244, 212, 138, 0.65);
  background: rgba(201, 164, 116, 0.2);
  color: var(--text-0);
}

.scraper-advanced-panel {
  margin-top: 12px;
}

.scraper-live-banner {
  gap: 14px;
}

.scraper-live-copy .kicker {
  color: var(--text-2);
}

.scraper-job-list {
  display: grid;
  gap: 10px;
}

.scraper-jobs-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

.scraper-range {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-2);
  font-size: 0.85rem;
}

.scraper-range select {
  min-width: 160px;
}

.scraper-jobs-pagination {
  margin-top: 14px;
}

.scraper-jobs-list {
  overflow: visible;
  border: 0;
  background: transparent;
}

.scraper-job-card {
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  background: var(--panel-1);
  overflow: hidden;
}

.scraper-job-card > summary {
  list-style: none;
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(190px, 1fr) minmax(132px, auto);
  gap: 12px;
  align-items: center;
  padding: 14px;
  cursor: pointer;
}

.scraper-job-card > summary::-webkit-details-marker {
  display: none;
}

.scraper-job-card[open] > summary {
  border-bottom: 1px solid var(--line-soft);
}

.scraper-job-main,
.scraper-job-results,
.scraper-job-time {
  min-width: 0;
}

.scraper-job-topline {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.scraper-job-topline strong {
  font-size: 0.94rem;
  word-break: break-word;
}

.scraper-job-mode {
  color: var(--text-2);
  font-size: 0.78rem;
  font-weight: 700;
}

.scraper-job-subline {
  margin-top: 4px;
  color: var(--text-2);
  font-size: 0.8rem;
  line-height: 1.4;
}

.scraper-job-results {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.scraper-job-results span {
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid var(--line-soft);
  background: var(--panel-0);
  color: var(--text-1);
  display: inline-flex;
  align-items: center;
  font-size: 0.76rem;
  font-weight: 700;
}

.scraper-job-time {
  display: grid;
  justify-items: end;
  gap: 3px;
}

.scraper-job-time strong {
  font-size: 0.9rem;
}

.scraper-job-time span {
  color: var(--text-2);
  font-size: 0.77rem;
  text-align: right;
}

.scraper-job-expand {
  color: var(--text-1);
  font-size: 0.75rem;
  font-style: normal;
  text-decoration: underline;
}

.scraper-job-detail {
  padding: 12px 14px 14px;
  display: grid;
  gap: 12px;
}

.scraper-job-detail-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.scraper-job-detail-grid article {
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: var(--panel-0);
  padding: 10px;
}

.scraper-job-detail-grid span {
  display: block;
  color: var(--text-2);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 800;
}

.scraper-job-detail-grid strong {
  display: block;
  margin-top: 4px;
  word-break: break-word;
  font-size: 0.88rem;
}

.scraper-job-detail-copy {
  margin: 0;
  color: var(--text-1);
  font-size: 0.84rem;
  line-height: 1.45;
}

.card-publication {
  margin: 4px 0 0;
  color: var(--text-2);
  font-size: 0.78rem;
}

.cell-storefront {
  color: var(--text-3);
  font-size: 0.78rem;
}

.cell-storefront.is-visible,
.card-storefront-flag.is-visible {
  color: #86efac;
}

.cell-storefront.is-hidden,
.card-storefront-flag.is-hidden {
  color: #f9a5ad;
}

@media (max-width: 1200px) {
  .inventory-search-grid-primary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .filter-span-2 {
    grid-column: 1 / -1;
  }

  .product-table .col-name {
    width: 30%;
  }

  .scraper-guided-grid {
    grid-template-columns: 1fr;
  }

  .notes-grid {
    grid-template-columns: 1fr;
  }

  .scraper-job-card > summary {
    grid-template-columns: 1fr;
  }

  .scraper-job-time {
    justify-items: start;
  }
}

@media (max-width: 900px) {
  .main-content {
    padding-bottom: 28px;
  }

  .inventory-search-actions,
  .filters-feedback-row,
  .table-head {
    width: 100%;
  }

  .inventory-search-actions {
    justify-content: space-between;
    flex-direction: column;
    align-items: stretch;
  }

  .inventory-search-actions .btn,
  .inventory-search-actions .search-meta {
    width: 100%;
  }

  .inventory-quick-views {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: thin;
  }

  .inventory-quick-view {
    flex: 0 0 auto;
  }

  .inventory-search-grid-primary,
  .inventory-search-grid-advanced,
  .scraper-guided-grid,
  .scraper-config-grid,
  .scraper-automation-grid,
  .scraper-config-inputs,
  .scraper-config-inputs-tight {
    grid-template-columns: 1fr !important;
  }

  .notes-head,
  .table-head,
  .quick-setup,
  .faq-editor-head,
  .sheet-modal-head {
    flex-direction: column;
    align-items: stretch;
  }

  .table-head .toolbar-inline,
  .notes-head .toolbar-inline,
  .quick-actions,
  .faq-editor-actions {
    width: 100%;
  }

  .table-head .toolbar-inline .btn,
  .notes-head .toolbar-inline .btn,
  .quick-actions .btn,
  .faq-editor-actions .btn {
    width: 100%;
  }

  .scraper-job-detail-grid {
    grid-template-columns: 1fr;
  }

  .scraper-picker summary {
    align-items: flex-start;
    flex-direction: column;
  }

  .scraper-picker-summary {
    text-align: left;
  }

  .sheet-modal-card,
  .product-modal-card,
  .image-review-card {
    width: 100%;
    max-width: 100%;
  }

  .form-checkboxes {
    flex-wrap: wrap;
    gap: 10px;
  }

  .card-actions {
    flex-direction: column;
  }

  .card-actions .btn,
  .card-actions .row-menu {
    width: 100%;
  }

  .card-actions .row-menu summary {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 720px) {
  .inventory-search-shell {
    padding: 12px 10px;
  }

  .search-meta {
    text-align: left;
  }

  .scraper-job-card > summary {
    padding: 12px;
  }

  .scraper-job-results {
    gap: 6px;
  }

  .scraper-job-results span {
    min-height: 28px;
    font-size: 0.72rem;
  }

  .notes-grid {
    grid-template-columns: 1fr;
  }

  .note-card {
    grid-template-columns: 36px minmax(0, 1fr);
    padding: 12px;
  }

  .note-step {
    width: 36px;
    height: 36px;
  }
}



