/* ── Messages page: templates, default responses, message builder page ── */
/* ══════════════════════════════════════════════════════════════════════════
   MESSAGES PAGE - Templates, Default Responses, Message Builder
   ══════════════════════════════════════════════════════════════════════════ */

/* ── Template Cards ── */

.tpl-list { display: flex; flex-direction: column; gap: 0.5rem; }
.tpl-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 3rem 1rem; color: var(--text-muted); }

.tpl-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.85rem 1rem;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.tpl-card:hover { border-color: rgba(255,255,255,0.12); background: rgba(255,255,255,0.02); }

.tpl-card-header { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; }
.tpl-card-name { font-weight: 600; font-size: 0.95rem; color: var(--text); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tpl-card-name-editing { background: var(--bg-input); border: 1px solid var(--primary); border-radius: 4px; padding: 0.15rem 0.35rem; outline: none; white-space: nowrap; }
.tpl-card-actions { display: flex; gap: 0.25rem; flex-shrink: 0; }

.tpl-card-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border: none;
  border-radius: var(--radius);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.tpl-card-btn:hover { background: var(--bg-input); color: var(--text); }
.tpl-card-delete:hover { background: rgba(239,68,68,0.15); color: #ef4444; }
.tpl-card-body { margin-top: 0.35rem; }
.tpl-card-preview { font-size: 0.82rem; color: var(--text-muted); line-height: 1.4; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }

/* ── Default Responses ── */
.resp-search { margin-bottom: 0; }
.resp-search .form-input { max-width: 100%; width: 100%; }
.resp-list { display: flex; flex-direction: column; gap: 0; }

.resp-section { margin-top: 1.25rem; }
.resp-section:first-child { margin-top: 0; }
.resp-section-header {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  padding: 0.5rem 0.25rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0.35rem;
}
.resp-section-count {
  font-weight: 400;
  font-size: 0.75rem;
  color: var(--text-muted);
  opacity: 0.7;
  margin-left: 0.5rem;
}

.resp-lock-caption {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  padding: 0.25rem 0.25rem 0.45rem;
  cursor: help;
}

.resp-entry.resp-locked {
  opacity: 0.55;
}
.resp-entry.resp-locked .resp-entry-path,
.resp-entry.resp-locked .resp-entry-desc,
.resp-entry.resp-locked .resp-entry-preview {
  color: var(--text-muted);
}
.resp-entry.resp-locked:hover { border-color: var(--border); }
.resp-entry.resp-locked .resp-edit-btn {
  cursor: not-allowed;
  opacity: 0.6;
}
.resp-locked-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  background: rgba(240, 178, 50, 0.12);
  color: #f0b232;
  white-space: nowrap;
  cursor: help;
}

.resp-entry {
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.15s ease;
  overflow: hidden;
}
.resp-entry:not(:last-child) {
  border-bottom: none;
  border-radius: 0;
}
.resp-entry:first-child {
  border-top-left-radius: var(--radius);
  border-top-right-radius: var(--radius);
}
.resp-entry:last-child {
  border-bottom-left-radius: var(--radius);
  border-bottom-right-radius: var(--radius);
}
.resp-entry:hover { border-color: rgba(255,255,255,0.12); }

.resp-entry-main {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 1rem;
}
.resp-entry-info { flex: 1; min-width: 0; }
.resp-entry-path {
  font-size: 0.85rem;
  color: var(--text);
  margin-bottom: 0.15rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}
.resp-entry-key {
  background: var(--bg-input);
  padding: 0.1rem 0.4rem;
  border-radius: 3px;
  font-size: 0.78rem;
  color: var(--primary);
  font-family: var(--font-mono);
}
.resp-entry-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.4;
}
.resp-entry-preview {
  font-size: 0.78rem;
  color: var(--text-muted);
  opacity: 0.65;
  margin-top: 0.25rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-style: italic;
}
.resp-entry-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.resp-vars {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-top: 0.35rem;
}
.resp-var-tag {
  display: inline-block;
  font-size: 0.72rem;
  padding: 0.1rem 0.45rem;
  background: rgba(88, 101, 242, 0.15);
  color: #7289da;
  border-radius: 3px;
  font-family: var(--font-mono);
  font-weight: 500;
}
.resp-var-more {
  background: rgba(255,255,255,0.06);
  color: var(--text-muted);
  font-family: var(--font);
  font-weight: 400;
}

.resp-customized-badge {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.15rem 0.5rem;
  background: rgba(87, 242, 135, 0.15);
  color: #57f287;
  border-radius: 3px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.resp-preview-vars-section {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}
.resp-detail-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}
.resp-detail-vars {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

/* ── Variable Highlight (rainbow animation) ── */
.resp-var-hl {
  background: linear-gradient(90deg, #ff6b6b, #ffd93d, #6bcb77, #3bf7ff, #ad3bff, #ff6b6b);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: var-highlight-shift 3s linear infinite;
  font-weight: 600;
  padding: 0 1px;
  border-radius: 2px;
}
@keyframes var-highlight-shift {
  to { background-position: 200% center; }
}

/* ── Edit Popup Tabs ── */
.resp-edit-tabs {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 1rem;
}
.resp-edit-tab {
  padding: 0.45rem 1rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
}
.resp-edit-tab:hover { color: var(--text); background: rgba(255,255,255,0.04); }
.resp-edit-tab.active { color: var(--text); background: rgba(255,255,255,0.08); }

/* ── Edit Form ── */
.resp-edit-tpl-section {
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border);
}
.resp-edit-tpl-label {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
}

/* ── Response Mode Toggle ── */
.resp-mode-toggle { display: inline-flex; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; margin-bottom: 1rem; }

/* ── Message Builder Enhancements ── */
.msg-json-viewer { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 0.85rem 1rem; }
.msg-json-viewer .card-header { margin-bottom: 0.5rem; }
.msg-json-toggle { display: inline-flex; align-items: center; gap: 0.35rem; }

/* ── Webhook Row ── */
.msg-webhook-row { animation: slideDown 0.15s ease; }
@keyframes slideDown { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }

/* ── Save as Template Popup ── */
.msg-save-tpl-popup { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 0.85rem 1rem; margin-top: 0.75rem; animation: slideDown 0.15s ease; }
.msg-save-tpl-popup-inner { max-width: 360px; }

/* ── Template modal (wider) ── */
#tplModalOverlay .ev-modal { max-width: 900px; }

/* ── Template editor tabs (Edit / JSON / Preview) ── */
.tpl-editor-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--border, rgba(255,255,255,0.08));
}
.tpl-editor-tab {
  padding: 0.5rem 1rem;
  border: none;
  background: transparent;
  color: var(--text-muted, #888);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
  margin-bottom: -1px;
}
.tpl-editor-tab:hover { color: var(--text, #ddd); }
.tpl-editor-tab.active {
  color: var(--primary, #5865F2);
  border-bottom-color: var(--primary, #5865F2);
}

/* ── Template card inline edit ── */
/* Template card: inline edit wraps tightly around text + pencil */
.tpl-card-title-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  min-width: 0;
  max-width: 100%;
}
.tpl-card-name { flex: 1; min-width: 0; }
.tpl-card-inline-edit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border: none;
  border-radius: 4px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s, background 0.15s, color 0.15s;
  flex-shrink: 0;
}
.tpl-card-title-wrap:hover .tpl-card-inline-edit,
.tpl-card-desc:hover .tpl-card-inline-edit,
.tpl-card-desc-placeholder:hover .tpl-card-inline-edit {
  opacity: 1;
}
.tpl-card-inline-edit:hover { background: var(--bg-input); color: var(--text); }
.tpl-card-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin-top: 0.25rem;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  min-width: 0;
  max-width: 100%;
}
.tpl-card-desc-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; min-width: 0; }
.tpl-card-desc-editing { padding: 0; }
.tpl-card-desc-editing input { width: 100%; }
.tpl-card-desc-placeholder {
  font-size: 0.78rem;
  color: var(--text-muted);
  opacity: 0.5;
  margin-top: 0.2rem;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  cursor: pointer;
}
.tpl-card-desc-placeholder:hover { opacity: 0.8; }

/* ── Message builder: hide output column ── */
.mb-layout-no-output { display: block; }
.mb-layout-no-output .mb-form-col { max-width: 100%; width: 100%; }

/* ── Embed/row label inline editing ── */
.mb-embed-label-editing {
  background: var(--bg-input);
  border: 1px solid var(--primary);
  border-radius: 3px;
  padding: 0.05rem 0.3rem;
  outline: none;
  min-width: 40px;
}

/* ── Packs: Default pack card ── */
.pack-card-default {
  border-left: 3px solid var(--border, rgba(255,255,255,0.08));
  margin-bottom: 0.75rem;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.pack-card-default:hover {
  border-left-color: var(--primary, #5865F2);
}

/* ── Packs: Active pack green side accent ── */
.pack-card-active {
  border-left: 3px solid #57f287;
}
.pack-card-default.pack-card-active {
  border-left-color: #57f287;
}
.pack-card-default.pack-card-active:hover {
  border-left-color: #57f287;
}

/* ── Packs: Active badge right next to title, shifts when rename btn appears ── */
.pack-active-badge {
  font-size: 0.68rem;
  font-weight: 600;
  padding: 0.12rem 0.45rem;
  background: rgba(87, 242, 135, 0.15);
  color: #57f287;
  border-radius: 3px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  flex-shrink: 0;
  order: 0;
}
/* When the rename button appears (on hover), push the badge after it */
.tpl-card-title-wrap:hover .pack-active-badge {
  order: 1;
}
.pack-dirty-badge {
  font-size: 0.68rem;
  font-weight: 600;
  padding: 0.12rem 0.45rem;
  background: rgba(250, 166, 26, 0.15);
  color: #faa61a;
  border-radius: 3px;
  letter-spacing: 0.03em;
  flex-shrink: 0;
}

/* ── Packs: Dirty state popup action buttons ── */
.dirty-actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.dirty-action-btn {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.75rem 1rem;
  background: var(--bg-secondary, rgba(0,0,0,0.2));
  border: 1px solid var(--border, rgba(255,255,255,0.08));
  border-radius: var(--radius, 8px);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  color: var(--text);
}
.dirty-action-btn:hover {
  background: rgba(255,255,255,0.06);
  border-color: var(--text-muted);
}
.dirty-action-title {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.15rem;
}
.dirty-action-desc {
  display: block;
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.3;
}

/* ── Response edit: remove old template section styles (kept for compat) ── */

/* ═══════════════════════════════════════════════════════════════
   Moderation - Punishment Ladder
   ═══════════════════════════════════════════════════════════════ */

.ladder-type-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.85rem 1rem;
  width: 100%;
}
.ladder-step-chip {
  cursor: pointer;
  background: var(--chip-base-bg, rgba(255, 255, 255, 0.04));
  border: 1px solid var(--chip-base-border, var(--border));
  border-left: 3px solid var(--chip-accent, var(--accent));
  border-radius: 8px;
  padding: 0.35rem 0.6rem;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
  transition: background 0.15s, border-color 0.15s;
}
.ladder-step-chip:hover {
  background: var(--chip-hover-bg, rgba(255, 255, 255, 0.08));
  border-color: var(--chip-hover-border, var(--border));
  border-left-color: var(--chip-accent, var(--accent));
}

/* Step rows inside the modal */
.ladder-step-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--border);
}
.ladder-step-row:last-child {
  border-bottom: none;
}
.ladder-step-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
  font-weight: 700;
  flex-shrink: 0;
}
.ladder-step-fields {
  display: flex;
  gap: 0.6rem;
  flex: 1;
  flex-wrap: wrap;
  align-items: center;
}
.ladder-step-field {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.ladder-step-field label {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-weight: 600;
}
.ladder-step-actions {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  flex-shrink: 0;
}
.ladder-step-actions .btn {
  padding: 0.2rem 0.35rem;
  min-width: auto;
  line-height: 1;
}
.modhist-filters {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.modhist-input {
  flex: 1;
  min-width: 200px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  padding: 0.5rem 0.75rem;
  color: var(--text);
  font-size: 0.85rem;
  font-family: inherit;
  outline: none;
}
.modhist-input:focus {
  border-color: rgba(255,255,255,0.25);
}
.modhist-entry {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.85rem 0.5rem;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.modhist-entry:last-child {
  border-bottom: none;
}
.modhist-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  flex-shrink: 0;
  object-fit: cover;
  background: rgba(255,255,255,0.05);
}
.modhist-main {
  flex: 1;
  min-width: 0;
}
.modhist-row1 {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}
.modhist-action {
  font-weight: 700;
  font-size: 0.9rem;
}
.modhist-badge {
  font-size: 0.68rem;
  font-weight: 600;
  padding: 0.1rem 0.45rem;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.1);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  white-space: nowrap;
}
.modhist-row2 {
  margin-top: 0.2rem;
  font-size: 0.85rem;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.modhist-id {
  color: var(--text-muted);
  font-size: 0.75rem;
  margin: 0 0.35rem;
}
.modhist-reason {
  margin-top: 0.2rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.modhist-time {
  flex-shrink: 0;
  text-align: right;
  font-size: 0.75rem;
  color: var(--text-muted);
}
.modhist-rel {
  margin-top: 0.15rem;
  font-size: 0.7rem;
  opacity: 0.8;
}
.modhist-empty {
  padding: 2rem 1rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}
.modhist-pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 1rem;
}

.shops-editor-wrap {
  margin-top: 0.5rem;
}
.se-intro {
  margin-bottom: 1rem;
}
.se-section-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.25rem;
}
.se-section-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}
.se-empty {
  padding: 1.25rem;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 1rem;
}
.se-toolbar {
  margin-top: 1rem;
  display: flex;
  justify-content: flex-end;
}
.se-add-btn {
  background: var(--primary-dim);
  color: var(--primary);
  border: 1px solid rgba(59, 247, 255, 0.3);
  border-radius: var(--radius);
  padding: 0.45rem 0.9rem;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}
.se-add-btn:hover {
  background: rgba(59, 247, 255, 0.25);
}
.se-shop-card {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  margin-bottom: 1rem;
}
.se-shop-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}
.se-shop-title-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 1;
  min-width: 0;
}
.se-shop-icon {
  color: var(--accent-amber);
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}
.se-shop-title-wrap .se-input {
  font-weight: 600;
}
.se-shop-header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}
.se-remove-btn {
  background: rgba(255, 107, 107, 0.12);
  color: var(--danger);
  border: 1px solid rgba(255, 107, 107, 0.25);
  border-radius: 6px;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  flex-shrink: 0;
}
.se-remove-btn:hover {
  background: rgba(255, 107, 107, 0.25);
}
.se-field {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 0;
}
.se-field-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  font-weight: 600;
}
.se-field-desc {
  font-size: 0.72rem;
  color: var(--text-muted);
}
.se-input {
  font-size: 0.85rem;
  padding: 0.4rem 0.6rem;
}
.se-input-num {
  max-width: 130px;
}
.se-item-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.85rem;
  margin-top: 0.75rem;
}
.se-item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.6rem;
}
.se-item-title {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--primary);
}
.se-item-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1rem;
  align-items: flex-start;
}
.se-item-grid .se-field {
  flex: 1 1 160px;
}
.se-reward-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1rem;
  margin-top: 0.6rem;
}
.se-reward-row .se-field {
  flex: 1 1 220px;
}
.se-actions {
  margin-top: 0.85rem;
  border-top: 1px solid var(--border);
  padding-top: 0.75rem;
}
.se-action-row {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.6rem;
  margin-bottom: 0.5rem;
}
.se-action-top {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1rem;
  align-items: flex-start;
}
.se-action-top .se-field {
  flex: 1 1 150px;
}
.se-action-top .se-remove-btn {
  margin-left: auto;
  align-self: flex-end;
}
.se-range-wrap {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.se-range-sep {
  color: var(--text-muted);
  font-size: 0.8rem;
}
.se-items {
  margin-top: 0.5rem;
}
.se-add-bar {
  margin-top: 0.5rem;
}

/* Shops grid layout */
.se-shops-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1rem;
  align-items: start;
}
.se-shops-grid .se-shop-card {
  margin-bottom: 0;
  display: flex;
  flex-direction: column;
}
.se-shop-header {
  flex-wrap: wrap;
}
.se-shop-meta {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
  flex-shrink: 0;
}
.se-shop-chip {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.15rem 0.55rem;
  white-space: nowrap;
}
.se-shop-currency {
  font-size: 0.8rem;
}
.se-shop-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.72rem;
  font-weight: 700;
  border-radius: 999px;
  padding: 0.2rem 0.6rem;
  cursor: pointer;
  transition: var(--transition);
  background: rgba(59, 165, 92, 0.14);
  color: #3ba55d;
  border: 1px solid rgba(59, 165, 92, 0.35);
}
.se-shop-toggle:hover {
  background: rgba(59, 165, 92, 0.24);
}
.se-shop-toggle.closed {
  background: rgba(255, 107, 107, 0.14);
  color: var(--danger);
  border-color: rgba(255, 107, 107, 0.35);
}
.se-shop-toggle.closed:hover {
  background: rgba(255, 107, 107, 0.24);
}
.se-toggle-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}
.se-item-wrap {
  margin-top: 0.6rem;
}
.se-item-row {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.5rem 0.6rem;
}
.se-item-row-main {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  min-width: 0;
}
.se-item-chevron {
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  transition: transform 0.15s ease;
}
.se-item-chevron.open {
  transform: rotate(90deg);
}
.se-item-row-icon {
  color: var(--accent-amber);
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}
.se-item-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.se-item-price {
  display: inline-flex;
  align-items: baseline;
  gap: 0.3rem;
  flex-shrink: 0;
}
.se-price-base {
  text-decoration: line-through;
  color: var(--text-muted);
  font-size: 0.75rem;
}
.se-price-final {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text);
}
.se-discount-badge {
  font-size: 0.68rem;
  font-weight: 700;
  color: #3ba55d;
  background: rgba(59, 165, 92, 0.14);
  border: 1px solid rgba(59, 165, 92, 0.3);
  border-radius: 999px;
  padding: 0.05rem 0.4rem;
  white-space: nowrap;
}
.se-stock-badge {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.1rem 0.5rem;
  white-space: nowrap;
  flex-shrink: 0;
}
.se-stock-badge.out {
  color: var(--danger);
  background: rgba(255, 107, 107, 0.12);
  border-color: rgba(255, 107, 107, 0.3);
}
.se-item-spacer {
  flex: 1;
}
.se-item-summary {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
  padding-left: 1.6rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.se-item-editor {
  border-top: 1px dashed var(--border);
  padding-top: 0.75rem;
}
@media (max-width: 760px) {
  .se-shops-grid {
    grid-template-columns: 1fr;
  }
  .se-item-summary {
    white-space: normal;
  }
}

