/* Sale class list page + create modal */

.sc-list-page { padding: 4px; }
.sclp-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 16px; }
.sclp-title { font-size: 20px; font-weight: 700; margin: 0 0 4px; letter-spacing: -0.01em; }
.sclp-sub { font-size: 12.5px; color: #64748B; margin: 0; max-width: 760px; line-height: 1.5; }

.sclp-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 16px; }

/* Filter bar */
.lf-bar {
  display: flex; gap: 8px; flex-wrap: wrap;
  padding: 10px;
  background: var(--c-card);
  border: 1px solid var(--c-border);
  border-radius: 10px;
  margin-bottom: 12px;
  align-items: center;
}
.lf-search {
  flex: 1; min-width: 200px;
  display: flex; align-items: center; gap: 6px;
  height: 32px; padding: 0 10px;
  background: #F8FAFC;
  border: 1px solid var(--c-border);
  border-radius: 6px;
}
.lf-search:focus-within { background: #fff; border-color: var(--c-primary); box-shadow: 0 0 0 3px rgba(37,99,235,0.1); }
.lf-search input { border: 0; background: transparent; flex: 1; outline: none; font-size: 13px; min-width: 0; }
.lf-select {
  height: 32px; padding: 0 26px 0 10px;
  background: #fff;
  border: 1px solid var(--c-border);
  border-radius: 6px;
  font-size: 12.5px;
  color: var(--c-text-1);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%2394A3B8' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  cursor: pointer;
}
.lf-select:hover { border-color: var(--c-primary); }
.lf-select:focus { outline: none; border-color: var(--c-primary); box-shadow: 0 0 0 3px rgba(37,99,235,0.1); }

/* List table */
.sclp-table {
  background: var(--c-card);
  border: 1px solid var(--c-border);
  border-radius: 10px;
  overflow: hidden;
}
.scr-head, .scr-row {
  display: grid;
  grid-template-columns: minmax(260px, 2.4fr) minmax(160px, 1.4fr) 110px 110px 110px 80px;
  gap: 10px;
  padding: 10px 14px;
  align-items: center;
}
.scr-head {
  background: #F8FAFC;
  border-bottom: 1px solid var(--c-border);
  font-size: 12px;
  font-weight: 600;
  color: #64748B;
}
.scr-row { border-bottom: 1px solid var(--c-border); transition: background 0.12s; }
.scr-row:last-child { border-bottom: 0; }
.scr-row:hover { background: var(--c-row-hover); }
.scr-row.unlisted { opacity: 0.7; background: #FAFBFC; }
.scr-cell { min-width: 0; }
.scr-cell.tags { display: flex; flex-wrap: wrap; gap: 3px; }
.scr-cell.capacity { display: flex; align-items: center; gap: 6px; font-size: 12px; color: #64748B; }
.scr-cell.status { display: flex; align-items: center; gap: 8px; }
.scr-status-label { font-size: 11.5px; color: #64748B; }
.scr-cell.actions { display: flex; gap: 4px; justify-content: flex-end; }
.scr-name { font-size: 13.5px; font-weight: 600; color: var(--c-text-1); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.scr-path-line { display: flex; align-items: center; gap: 6px; margin-bottom: 3px; min-width: 0; }
.scr-level-tag { display: inline-flex; align-items: center; padding: 1px 5px; border-radius: 3px; font-size: 10.5px; font-weight: 600; color: #4338CA; background: #EEF2FF; border: 1px solid #E0E7FF; font-family: 'JetBrains Mono', monospace; flex-shrink: 0; }
.scr-discount { font-size: 11px; color: #C2410C; background: #FFF7ED; padding: 1px 5px; border-radius: 3px; display: inline-block; margin-top: 3px; font-weight: 500; }

.scr-empty { padding: 50px; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.scr-empty-title { font-size: 13.5px; font-weight: 500; color: #475569; margin-top: 6px; }
.scr-empty-sub { font-size: 12px; color: #94A3B8; }

/* Path chips */
.path-chips { display: inline-flex; align-items: center; gap: 4px; flex-wrap: wrap; font-size: 12px; }
.pc-item {
  padding: 1px 7px;
  background: #F1F5F9;
  border-radius: 4px;
  color: #475569;
  white-space: nowrap;
  font-weight: 500;
}
.pc-item:last-child { background: var(--c-primary-50); color: var(--c-primary); }
.pc-sep { color: #CBD5E1; }

/* Modal */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 80;
  background: rgba(15,23,42,0.45);
  animation: fadeIn 0.18s ease;
  backdrop-filter: blur(2px);
}
.modal-wrap {
  position: fixed; inset: 0; z-index: 81;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  pointer-events: none;
}
.modal-shell {
  pointer-events: auto;
  width: 920px; max-width: 100%;
  max-height: calc(100vh - 48px);
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 20px 60px rgba(15,23,42,0.25);
  display: flex; flex-direction: column;
  overflow: hidden;
  animation: modalIn 0.22s ease;
}
@keyframes modalIn { from { opacity: 0; transform: translateY(12px) scale(0.98); } to { opacity: 1; transform: none; } }
.modal-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--c-border);
  display: flex; justify-content: space-between; align-items: flex-start; gap: 12px;
}
.modal-eyebrow { font-size: 11px; color: var(--c-primary); font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 4px; }
.modal-title { font-size: 17px; font-weight: 600; margin: 0; }
.modal-body { flex: 1; overflow-y: auto; padding: 6px 24px 18px; }
.modal-footer {
  padding: 12px 24px;
  border-top: 1px solid var(--c-border);
  background: #FAFBFC;
  display: flex; align-items: center; gap: 10px;
}
.modal-summary { flex: 1; font-size: 12.5px; color: #64748B; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.modal-summary-name { color: var(--c-text-1); font-weight: 600; }
.modal-summary-price { color: var(--c-required); font-family: 'Inter', sans-serif; font-weight: 700; }

/* Step blocks */
.step-block {
  padding: 18px 0;
  border-bottom: 1px solid var(--c-border);
}
.step-block:last-child { border-bottom: 0; padding-bottom: 6px; }
.step-head { display: flex; gap: 12px; margin-bottom: 14px; align-items: flex-start; }
.step-num {
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--c-primary);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700;
  flex-shrink: 0;
}
.step-title { font-size: 14.5px; font-weight: 600; margin-bottom: 2px; }
.step-sub { font-size: 12px; color: #94A3B8; }

/* Picker + preview */
.picker-with-preview {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  align-items: stretch;
}
.node-picker {
  display: flex; flex-direction: column;
  background: #F8FAFC;
  border: 1px solid var(--c-border);
  border-radius: 8px;
  overflow: hidden;
  min-height: 240px;
  max-height: 280px;
}
.np-search {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 10px;
  background: #fff;
  border-bottom: 1px solid var(--c-border);
}
.np-search input { border: 0; background: transparent; flex: 1; outline: none; font-size: 12.5px; min-width: 0; }
.np-list { flex: 1; overflow-y: auto; padding: 4px 6px 6px; }
.np-row {
  display: flex; align-items: center; gap: 4px;
  height: 28px; padding-right: 8px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 12.5px;
  transition: background 0.1s;
}
.np-row:hover:not(.disabled) { background: rgba(37,99,235,0.06); }
.np-row.selected { background: var(--c-primary); color: #fff; }
.np-row.selected .np-icon, .np-row.selected .np-count, .np-row.selected .np-tag-cat, .np-row.selected .np-tag-empty { color: #fff; }
.np-row.selected .np-tag-cat, .np-row.selected .np-tag-empty, .np-row.selected .np-count { background: rgba(255,255,255,0.18); }
.np-row.disabled { color: #CBD5E1; cursor: not-allowed; }
.np-row.disabled .np-icon { color: #CBD5E1; }
.np-chev { width: 14px; height: 14px; display: flex; align-items: center; justify-content: center; background: transparent; border: 0; padding: 0; color: inherit; flex-shrink: 0; }
.np-icon { display: flex; align-items: center; justify-content: center; width: 14px; flex-shrink: 0; }
.np-icon.sales { color: #DB2777; }
.np-icon.cat { color: #2563EB; }
.np-icon.empty { color: #94A3B8; }
.np-label { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.np-count, .np-tag-cat, .np-tag-empty {
  font-size: 10.5px;
  padding: 1px 5px;
  border-radius: 3px;
  font-weight: 500;
  flex-shrink: 0;
}
.np-count { background: #FCE7F3; color: #BE185D; }
.np-tag-cat { background: #EFF6FF; color: #1D4ED8; }
.np-tag-empty { background: #F1F5F9; color: #94A3B8; }
.np-add {
  display: flex; align-items: center; gap: 4px;
  width: 100%;
  padding-right: 8px; height: 26px;
  background: transparent; border: 0;
  font-size: 12px;
  color: var(--c-primary);
  cursor: pointer;
  border-radius: 4px;
  text-align: left;
}
.np-add:hover { background: var(--c-primary-50); }
.np-add.root { margin-top: 4px; padding-left: 8px; height: 30px; border: 1px dashed var(--c-border-strong); justify-content: center; }
.np-add.root:hover { border-color: var(--c-primary); border-style: solid; }
.np-create {
  display: flex; align-items: center; gap: 4px;
  padding-right: 8px; height: 28px;
}
.np-create input {
  flex: 1;
  height: 22px;
  padding: 0 6px;
  font-size: 12.5px;
  border: 1px solid var(--c-primary);
  border-radius: 4px;
  outline: none;
  box-shadow: 0 0 0 2px rgba(37,99,235,0.12);
}

.picker-preview {
  background: linear-gradient(180deg, #F0F9FF, #FAFBFC);
  border: 1px solid var(--c-border);
  border-radius: 8px;
  padding: 14px;
  display: flex; flex-direction: column; gap: 10px;
}
.pp-label { font-size: 11px; font-weight: 600; color: #94A3B8; letter-spacing: 0.04em; text-transform: uppercase; }
.pp-path { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; font-size: 12.5px; }
.pp-node {
  padding: 3px 9px;
  background: #fff;
  border: 1px solid var(--c-border);
  border-radius: 5px;
  color: #475569;
  font-weight: 500;
}
.pp-arrow { color: var(--c-primary); display: inline-flex; }
.pp-leaf {
  padding: 3px 10px;
  background: var(--c-primary);
  color: #fff;
  border-radius: 5px;
  font-weight: 600;
}
.pp-empty { font-size: 12.5px; color: #94A3B8; padding: 14px 0; text-align: center; }
.pp-hint {
  margin-top: auto;
  display: flex; align-items: flex-start; gap: 5px;
  font-size: 11.5px; color: #64748B;
  padding: 8px 10px;
  background: #FFFBEB;
  border: 1px solid #FEF3C7;
  border-radius: 6px;
  line-height: 1.5;
}

/* Form grid */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; }
.form-grid.three { grid-template-columns: repeat(3, 1fr); }

select.ant-input {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%2394A3B8' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 28px;
  cursor: pointer;
}
