/* ==========================================================================
   ISLAMI COMICS - PROMOTIONS ROOM STYLESHEET
   Matching Mockup Image 9 Pixel-Perfect Design
   ========================================================================== */

.promotions-page-body {
  background-color: #f5f8f6;
}

.promotions-main-stage {
  padding-bottom: 40px;
}

/* Header Top CTA Button */
.btn-create-promotion-cta {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #064e3b;
  color: #ffffff;
  border: none;
  border-radius: 8px;
  padding: 9px 16px;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(6, 78, 59, 0.2);
  transition: all 0.2s;
}

.btn-create-promotion-cta:hover {
  background: #04382a;
  transform: translateY(-1px);
}

/* ==========================================================================
   1. TOP 5 METRIC SUMMARY CARDS (5-GRID)
   ========================================================================== */
.promotions-metrics-grid-5 {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 22px;
}

.card-growth-sub {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 700;
  margin-top: 4px;
}

.card-growth-sub.growth-up {
  color: #10b981;
}

/* ==========================================================================
   2. MAIN 2-COLUMN LAYOUT
   ========================================================================== */
.promotions-layout-2col {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 20px;
  align-items: start;
}

.promotions-table-card {
  background: #ffffff;
  border: 1px solid var(--card-border);
  border-radius: 14px;
  box-shadow: var(--card-shadow);
  overflow: hidden;
  min-width: 0;
}

.promotions-right-col {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-width: 0;
}

/* Toolbar & Tabs Row (Modern Sleek Grid Sebaris) */
.table-toolbar-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  border-bottom: 1px solid var(--card-border);
  gap: 12px;
  flex-wrap: nowrap;
}

.table-filter-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  overflow-x: auto;
  white-space: nowrap;
  flex: 1;
  min-width: 0;
  scrollbar-width: none;
}

.table-filter-tabs::-webkit-scrollbar {
  display: none;
}

.filter-tab-btn {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 8px 10px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-sub);
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s;
  flex-shrink: 0;
}

.filter-tab-btn:hover {
  color: var(--text-main);
}

.filter-tab-btn.active {
  color: var(--emerald-dark);
  border-bottom-color: var(--emerald);
  font-weight: 800;
}

/* Toolbar Right: Date Picker & Filter */
.promotions-toolbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.btn-date-range-picker {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: #ffffff;
  border: 1px solid var(--card-border);
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-main);
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
  transition: all 0.2s;
  white-space: nowrap;
  flex-shrink: 0;
}

.btn-date-range-picker:hover {
  border-color: var(--emerald);
  background: #f8faf9;
}

.btn-toolbar-filter {
  background: #ffffff;
  border: 1px solid var(--card-border);
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-main);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.2s;
  white-space: nowrap;
  flex-shrink: 0;
}

.btn-toolbar-filter:hover {
  background: #f8faf9;
  border-color: var(--emerald);
}

/* ==========================================================================
   3. PROMOTIONS DATA TABLE
   ========================================================================== */
.promotions-data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  min-width: 980px;
}

.promotions-data-table thead tr {
  background: #fbfdfc;
  border-bottom: 1px solid var(--card-border);
}

.promotions-data-table th {
  padding: 12px 12px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: #64748b;
  text-transform: uppercase;
  white-space: nowrap;
}

.promotions-data-table tbody tr.promo-row {
  border-bottom: 1px solid #f1f5f3;
  transition: background 0.15s ease;
}

.promotions-data-table tbody tr.promo-row:hover {
  background: #f9fbf9;
}

.promotions-data-table td {
  padding: 13px 12px;
  vertical-align: middle;
  font-size: 12px;
}

/* Promo Title Cell */
.promo-cell-group {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 200px;
}

.promo-badge-box {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-weight: 900;
  flex-shrink: 0;
  line-height: 1.1;
  text-align: center;
}

.promo-badge-box.mini {
  width: 38px;
  height: 38px;
  border-radius: 6px;
}

.badge-discount {
  font-size: 11px;
  font-weight: 900;
}

.badge-type {
  font-size: 9px;
  font-weight: 700;
  opacity: 0.9;
}

.badge-green { background: #10b981; }
.badge-purple { background: #8b5cf6; }
.badge-amber { background: #f59e0b; }
.badge-teal { background: #0d9488; }
.badge-pink { background: #ec4899; }
.badge-gray { background: #64748b; }

.promo-meta {
  min-width: 0;
}

.promo-title {
  font-size: 12.5px;
  font-weight: 800;
  color: var(--text-main);
  white-space: nowrap;
}

.promo-desc {
  font-size: 10.5px;
  color: var(--text-muted);
  white-space: nowrap;
  margin-bottom: 2px;
}

.promo-status-pill {
  display: inline-block;
  font-size: 9px;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: 3px;
}

.pill-active { background: #f0fdf4; color: #10b981; }
.pill-scheduled { background: #eff6ff; color: #2563eb; }
.pill-completed { background: #f0fdf4; color: #047857; }
.pill-expired { background: #f1f5f9; color: #64748b; }

/* Type Cell */
.type-cell-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  white-space: nowrap;
}

.tag-discount { background: #f0fdf4; color: #059669; }
.tag-bogo { background: #faf5ff; color: #7c3aed; }
.tag-free { background: #eff6ff; color: #0284c7; }

/* Target Comic */
.target-comic-group {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 170px;
}

.target-thumb {
  width: 28px;
  height: 38px;
  border-radius: 4px;
  object-fit: cover;
  flex-shrink: 0;
}

.target-text {
  min-width: 0;
}

.target-title {
  font-size: 12px;
  font-weight: 800;
  color: var(--text-main);
  white-space: nowrap;
}

.target-scope {
  font-size: 10px;
  color: var(--text-muted);
  white-space: nowrap;
}

/* Period */
.period-dates {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
}

.time-sub {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
}

.period-divider {
  font-size: 10px;
  color: var(--text-muted);
}

/* Discount Offer */
.offer-title {
  font-size: 12px;
  font-weight: 800;
  color: var(--text-main);
  white-space: nowrap;
}

.offer-scope {
  font-size: 10.5px;
  color: var(--text-muted);
  white-space: nowrap;
}

/* Status Chips */
.status-badge-chip {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 10.5px;
  font-weight: 800;
  white-space: nowrap;
}

.chip-active { background: #f0fdf4; color: #10b981; }
.chip-scheduled { background: #eff6ff; color: #2563eb; }
.chip-completed { background: #f0fdf4; color: #047857; }
.chip-expired { background: #f1f5f9; color: #64748b; }

.status-time-left {
  font-size: 9.5px;
  color: var(--text-muted);
  margin-top: 2px;
  white-space: nowrap;
}

/* Performance */
.perf-row {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: var(--text-sub);
  white-space: nowrap;
}

.perf-row strong {
  color: var(--text-main);
  font-weight: 800;
}

/* Actions */
.action-btn-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-mini-action {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  background: #ffffff;
  border: 1px solid var(--card-border);
  color: var(--text-sub);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-mini-action:hover {
  border-color: var(--emerald);
  color: var(--emerald-dark);
  background: #f8faf9;
}

/* ==========================================================================
   4. RIGHT COLUMN: 3 CARDS
   ========================================================================== */

/* Card 1: Promotion Summary */
.promo-summary-card {
  background: #ffffff;
  border: 1px solid var(--card-border);
  border-radius: 14px;
  padding: 18px 20px;
  box-shadow: var(--card-shadow);
}

.summary-card-header {
  margin-bottom: 12px;
}

.summary-title {
  font-size: 13.5px;
  font-weight: 800;
  color: var(--text-main);
}

.summary-legend-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 12px;
}

.summary-legend-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
}

.dot-legend {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
}

.dot-total { background: #64748b; }
.dot-active { background: #10b981; }
.dot-scheduled { background: #2563eb; }
.dot-completed { background: #8b5cf6; }
.dot-expired { background: #94a3b8; }

.summary-divider {
  height: 1px;
  background: #f1f5f3;
  margin: 10px 0;
}

.summary-sales-row {
  margin-bottom: 14px;
}

.sales-label {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 2px;
}

.sales-val {
  font-size: 17px;
  font-weight: 900;
  color: var(--text-main);
  letter-spacing: -0.3px;
  margin-bottom: 2px;
}

.sales-growth {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 10.5px;
  font-weight: 700;
}

.sales-growth.growth-up {
  color: #10b981;
}

.btn-view-detailed-analytics {
  width: 100%;
  background: #ffffff;
  border: 1px solid var(--card-border);
  color: var(--text-main);
  border-radius: 8px;
  padding: 8px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s;
}

.btn-view-detailed-analytics:hover {
  background: #f8faf9;
  border-color: #cbd5e1;
}

/* Card 2: Top Performing Promotions */
.top-promos-card {
  background: #ffffff;
  border: 1px solid var(--card-border);
  border-radius: 14px;
  padding: 18px 20px;
  box-shadow: var(--card-shadow);
}

.top-promos-header {
  margin-bottom: 12px;
}

.top-promos-title {
  font-size: 13.5px;
  font-weight: 800;
  color: var(--text-main);
}

.top-promos-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 12px;
}

.top-promo-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.top-rank-num {
  font-weight: 900;
  font-size: 12px;
  color: #64748b;
  width: 14px;
}

.top-promo-meta {
  flex: 1;
  min-width: 0;
}

.top-promo-name {
  font-size: 12px;
  font-weight: 800;
  color: var(--text-main);
  white-space: nowrap;
}

.top-promo-sub {
  font-size: 10px;
  color: var(--text-muted);
  white-space: nowrap;
}

.top-promo-right {
  text-align: right;
  flex-shrink: 0;
}

.top-promo-right strong {
  display: block;
  font-size: 11.5px;
  font-weight: 800;
  color: var(--text-main);
}

.cr-badge {
  font-size: 9.5px;
  color: var(--text-muted);
}

/* Card 3: Promotion Tips Card */
.promo-tips-card {
  background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
  border: 1px solid #bbf7d0;
  border-radius: 14px;
  padding: 18px 20px;
  position: relative;
  overflow: hidden;
}

.tips-card-title {
  font-size: 13px;
  font-weight: 800;
  color: #047857;
  margin-bottom: 10px;
}

.tips-checklist {
  list-style: none;
  padding: 0;
  margin: 0 0 12px 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: relative;
  z-index: 2;
}

.tips-checklist li {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  font-size: 11px;
  color: #065f46;
  line-height: 1.35;
}

.tips-learn-more-link {
  font-size: 11.5px;
  font-weight: 800;
  color: #047857;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  position: relative;
  z-index: 2;
}

.tips-learn-more-link:hover {
  text-decoration: underline;
}

.floating-megaphone-circle {
  position: absolute;
  right: 14px;
  bottom: 12px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #a7f3d0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #047857;
  font-size: 18px;
  opacity: 0.6;
}

/* ==========================================================================
   5. RESPONSIVE BREAKPOINTS
   ========================================================================== */
@media (max-width: 1200px) {
  .promotions-layout-2col {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1050px) {
  .promotions-metrics-grid-5 {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .promotions-metrics-grid-5 {
    grid-template-columns: repeat(2, 1fr);
  }

  .table-toolbar-row {
    flex-direction: column;
    align-items: stretch;
  }

  .promotions-toolbar-right {
    justify-content: space-between;
  }
}

@media (max-width: 540px) {
  .promotions-metrics-grid-5 {
    grid-template-columns: 1fr;
  }
}
