/* VDR Scope Pro - Promotions & Discounts Enterprise Stylesheet */
.promotion-banner {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin: 0 0 16px;
  padding: 14px 18px;
  border: 1px solid #99f6e4;
  border-left: 5px solid #0f766e;
  border-radius: 16px;
  background: #f0fdfa;
  color: #134e4a;
}
.promotion-banner span { flex: 1; }
.promotion-banner small { color: #57534e; }

/* Segmented Tab Navigation & Pane Visibility */
#paneOffers[hidden],
#paneReports[hidden],
#paneForm[hidden],
[hidden] {
  display: none !important;
}

.promo-tabs {
  display: flex;
  gap: 8px;
  border-bottom: 2px solid #e2e8f0;
  margin: 18px 0 22px;
  padding-bottom: 0;
  overflow-x: auto;
}
.promo-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  font-size: 0.95rem;
  font-weight: 600;
  color: #64748b;
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  border-radius: 8px 8px 0 0;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.18s ease;
}
.promo-tab-btn:hover {
  color: #0f766e;
  background: rgba(15, 118, 110, 0.05);
}
.promo-tab-btn.active {
  color: #0f766e;
  border-bottom-color: #0f766e;
  background: rgba(15, 118, 110, 0.08);
}
.promo-tab-badge {
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.75rem;
  background: #e2e8f0;
  color: #334155;
  font-weight: 700;
}
.promo-tab-btn.active .promo-tab-badge {
  background: #0f766e;
  color: #ffffff;
}

/* Toolbar & Status Filters */
.promo-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 18px;
}
.promo-search-box {
  display: flex;
  align-items: center;
  position: relative;
  min-width: 240px;
  flex: 1;
  max-width: 380px;
}
.promo-search-box input {
  width: 100%;
  padding: 8px 14px 8px 34px;
  border-radius: 10px;
  border: 1px solid #cbd5e1;
  font-size: 0.9rem;
  background: #ffffff;
}
.promo-search-box .search-icon {
  position: absolute;
  left: 10px;
  color: #94a3b8;
  pointer-events: none;
  font-size: 0.9rem;
}
.promo-filter-group {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.filter-chip {
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #475569;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}
.filter-chip:hover {
  border-color: #0f766e;
  color: #0f766e;
}
.filter-chip.active {
  background: #0f766e;
  color: #ffffff;
  border-color: #0f766e;
}

/* Summary Cards */
.promotion-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin: 16px 0 22px;
}
.promotion-summary article {
  display: grid;
  gap: 4px;
  padding: 16px 20px;
  border: 1px solid #f1e4cf;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}
.promotion-summary b {
  font-size: 1.75rem;
  color: #0f766e;
}
.promotion-summary span {
  font-size: 0.85rem;
  color: #64748b;
  font-weight: 600;
}

/* Promotions List & Cards */
.promotion-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 18px;
  margin-top: 10px;
}
.promotion-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid #e2e8f0;
  border-top: 4px solid #14b8a6;
  border-radius: 16px;
  padding: 20px;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.promotion-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(0,0,0,0.06);
}
.promotion-card-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 10px;
}
.promotion-card-head h2 {
  margin: 6px 0 4px;
  font-size: 1.15rem;
  font-weight: 700;
  color: #0f172a;
}
.promo-code-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  border-radius: 6px;
  background: #fff4e8;
  color: #9a3412;
  font-family: ui-monospace, monospace;
  font-weight: 700;
  font-size: 0.88rem;
  border: 1px solid #fed7aa;
}
.promo-val-badge {
  padding: 4px 10px;
  border-radius: 8px;
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
  font-weight: 700;
  font-size: 0.95rem;
  white-space: nowrap;
}
.promotion-card p {
  color: #475569;
  font-size: 0.9rem;
  line-height: 1.45;
  margin: 4px 0 12px;
  flex: 1;
}
.promotion-card ul {
  list-style: none;
  padding: 0;
  margin: 0 0 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.85rem;
  color: #64748b;
  border-top: 1px solid #f1f5f9;
  padding-top: 12px;
}
.promotion-card .actions {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: auto;
}

/* Status Badges */
.promotion-status-active { background: #dcfce7; color: #166534; padding: 2px 8px; border-radius: 6px; font-weight: 700; font-size: 0.75rem; }
.promotion-status-draft { background: #fef9c3; color: #713f12; padding: 2px 8px; border-radius: 6px; font-weight: 700; font-size: 0.75rem; }
.promotion-status-paused { background: #ffedd5; color: #9a3412; padding: 2px 8px; border-radius: 6px; font-weight: 700; font-size: 0.75rem; }
.promotion-status-ended { background: #e7e5e4; color: #44403c; padding: 2px 8px; border-radius: 6px; font-weight: 700; font-size: 0.75rem; }

/* Creation / Edit Form */
.promotion-form {
  display: grid !important;
  gap: 20px;
  margin: 16px 0;
}
.promotion-form[hidden] { display: none !important; }
.promotion-form-heading {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}
.promotion-form fieldset {
  padding: 0;
  border: 1px solid #f1e4cf;
  border-radius: 18px;
  background: #fffdf8;
  overflow: hidden;
}
.promotion-form legend {
  display: flex;
  gap: 10px;
  align-items: center;
  width: 100%;
  padding: 14px 18px;
  background: #fff4e8;
  border-bottom: 1px solid #f1e4cf;
}
.promotion-form legend span {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #0f766e;
  color: #fff;
  font-weight: 800;
  font-size: 0.85rem;
}
.promotion-form legend small {
  margin-left: auto;
  color: #57534e;
}
.promotion-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 18px;
}
.promotion-grid .wide { grid-column: 1 / -1; }
.promotion-form-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  padding-top: 8px;
}
.promotion-form-actions small { color: #57534e; }
.promotion-form select[multiple] { min-height: 104px; }

/* Form Live Preview */
.promo-live-preview {
  padding: 14px 18px;
  border-radius: 14px;
  background: #f0fdf4;
  border: 1px solid #86efac;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.promo-live-preview span { font-size: 0.9rem; color: #166534; }
.promo-live-preview strong { color: #047857; font-size: 1.1rem; }

/* Performance & Report Styles */
.promotion-report-card { margin: 16px 0; }
.date-presets {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.preset-btn {
  padding: 5px 12px;
  font-size: 0.82rem;
  font-weight: 600;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: #475569;
  cursor: pointer;
  transition: all 0.15s ease;
}
.preset-btn:hover {
  background: #e2e8f0;
  color: #0f766e;
}
.preset-btn.active {
  background: #0f766e;
  color: #ffffff;
  border-color: #0f766e;
}
.promotion-report-filters {
  display: grid;
  grid-template-columns: repeat(5, minmax(120px, 1fr)) auto;
  gap: 0.8rem;
  align-items: end;
}
.promotion-report-filters label { display: grid; gap: 0.35rem; font-size: 0.85rem; font-weight: 600; }
.promotion-report-metrics {
  display: grid;
  grid-template-columns: repeat(5, minmax(120px, 1fr));
  gap: 0.75rem;
  margin: 1rem 0;
}
.promotion-report-metrics article {
  padding: 1rem;
  border: 1px solid var(--line, #e2e8f0);
  border-radius: 16px;
  background: var(--surface-2, #f8fafc);
}
.promotion-report-metrics span { display: block; font-size: 0.85rem; color: var(--muted, #64748b); font-weight: 600; }
.promotion-report-metrics b {
  display: block;
  font-size: 1.35rem;
  color: var(--primary-dark, #0f766e);
  margin-top: 0.3rem;
}
.promotion-report-grid { display: grid; gap: 1.2rem; }
.promotion-report-grid td small { display: block; color: var(--muted, #64748b); margin-top: 0.2rem; }
.promotion-report-grid table { min-width: 760px; }

@media(max-width: 900px) {
  .promotion-report-filters, .promotion-report-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media(max-width: 800px) {
  .promotion-summary, .promotion-grid { grid-template-columns: 1fr; }
  .promotion-grid .wide { grid-column: auto; }
  .promotion-card-head, .promotion-form-heading { flex-direction: column; }
  .promotion-form legend { align-items: flex-start; flex-wrap: wrap; }
  .promotion-form legend small { width: 100%; margin-left: 38px; }
  .promo-toolbar { flex-direction: column; align-items: stretch; }
  .promo-search-box { max-width: 100%; }
}
@media(max-width: 560px) {
  .promotion-report-filters, .promotion-report-metrics { grid-template-columns: 1fr; }
}
