/* ==========================================================================
   HOME NEWS - ADVERTISEMENTS CSS
   ========================================================================== */

.ad-slot-wrapper {
  margin: 28px 0;
  text-align: center;
}
.ad-slot-box {
  background-color: var(--bg-light);
  border: 1px dashed #cbd5e1;
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
  text-decoration: none;
  transition: border-color var(--transition-speed), background-color var(--transition-speed);
}
.ad-slot-box:hover {
  border-color: #94a3b8;
  background-color: #e2e8f0;
}
.ad-tag-label {
  position: absolute;
  top: 4px;
  right: 6px;
  font-size: 0.65rem;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}
.ad-inner-content {
  padding: 16px;
  text-align: center;
}
.ad-brand-title {
  font-size: 1rem;
  font-weight: 800;
  color: var(--dark-black);
  margin-bottom: 4px;
}
.ad-subtitle {
  font-size: 0.8rem;
  color: #4b5563;
  margin-bottom: 8px;
}
.ad-cta-button {
  display: inline-block;
  background-color: var(--primary-red);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: var(--radius-sm);
}

/* Specific Sizes based on Industry Standards */
/* Leaderboard (728x90 or 970x90) */
.ad-leaderboard {
  max-width: 970px;
  width: 100%;
  min-height: 90px;
}

/* Medium Rectangle (300x250) for Sidebar */
.ad-medium-rectangle {
  width: 100%;
  max-width: 336px;
  min-height: 250px;
}

/* Half Page / Large Skyscraper (300x600) */
.ad-half-page {
  width: 100%;
  max-width: 300px;
  min-height: 500px;
}

/* In-Article Responsive Banner */
.ad-in-article {
  width: 100%;
  min-height: 120px;
  margin: 32px 0;
  background: #f8fafc;
}

/* ==========================================================================
   ADMIN ADVERTISEMENT MANAGEMENT MODULE STYLES
   ========================================================================== */

/* Top Navigation Segmented Tabs */
.ad-tabs-wrapper {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 24px;
  background: #e2e8f0;
  padding: 6px;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.ad-tab-btn {
  background: transparent;
  border: none;
  padding: 10px 18px;
  font-family: var(--font-body, 'Inter', sans-serif);
  font-size: 0.88rem;
  font-weight: 700;
  color: #475569;
  cursor: pointer;
  border-radius: 6px;
  transition: all 0.18s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  user-select: none;
  box-shadow: none;
}

.ad-tab-btn:hover {
  background: rgba(255, 255, 255, 0.7);
  color: #0f172a;
}

.ad-tab-btn.active {
  background: var(--primary-red, #D71920);
  color: #ffffff;
  box-shadow: 0 2px 4px rgba(215, 25, 32, 0.25);
}

.ad-tab-btn .tab-count-pill {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 12px;
  background: #cbd5e1;
  color: #1e293b;
  transition: all 0.18s ease;
}

.ad-tab-btn.active .tab-count-pill {
  background: rgba(255, 255, 255, 0.25);
  color: #ffffff;
}

.ad-tab-pane {
  display: none;
  animation: fadeInPane 0.2s ease-out;
}

.ad-tab-pane.active {
  display: block;
}

@keyframes fadeInPane {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* 6-Column Statistics Grid: Desktop, Tablet & Mobile Breakpoints */
.stats-grid-6col {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card.compact {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 18px 20px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 104px;
  box-sizing: border-box;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.stat-card.compact:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.08);
}

.stat-card.compact .stat-info {
  display: flex;
  flex-direction: column;
}

.stat-card.compact .stat-info h5 {
  font-family: var(--font-body, 'Inter', sans-serif);
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
  margin: 0 0 6px 0;
  font-weight: 700;
}

.stat-card.compact .stat-number {
  font-size: 1.6rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.1;
  margin: 0;
}

.stat-card.compact .stat-icon {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stat-trend-subtext {
  font-size: 0.72rem;
  font-weight: 600;
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Advertisement Performance Section & Chart Box */
.performance-section-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.performance-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 16px;
}

.performance-title-box h3 {
  font-size: 1.2rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 4px 0;
}

.performance-title-box p {
  font-size: 0.84rem;
  color: #64748b;
  margin: 0;
}

.performance-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.date-range-select-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
}

.performance-summary-pills {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 20px;
  padding: 14px 20px;
  background: #f8fafc;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
  flex-wrap: wrap;
}

.summary-metric-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.86rem;
  color: #334155;
}

.metric-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

.metric-dot.impressions { background: #2563eb; }
.metric-dot.clicks { background: #16a34a; }
.metric-dot.ctr { background: var(--primary-red, #D71920); }

.summary-metric-item strong {
  color: #0f172a;
}

/* Outer Chart Layout with Y-Axis */
.chart-outer-layout {
  display: flex;
  gap: 10px;
  width: 100%;
}

.chart-y-axis-labels {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  font-size: 0.72rem;
  color: #94a3b8;
  height: 230px;
  padding-bottom: 24px;
  text-align: right;
  min-width: 36px;
  user-select: none;
}

.chart-visual-wrapper {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.chart-visual-container {
  width: 100%;
  height: 230px;
  position: relative;
  border-bottom: 1px solid #cbd5e1;
  border-left: 1px solid #cbd5e1;
  display: flex;
  align-items: flex-end;
  padding: 0 10px;
  box-sizing: border-box;
  background: #fafafa;
}

.chart-svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.chart-axis-labels {
  display: flex;
  justify-content: space-between;
  padding: 8px 10px 0 10px;
  font-size: 0.74rem;
  color: #64748b;
  font-weight: 500;
}

.chart-tooltip {
  position: absolute;
  background: #0f172a;
  color: #ffffff;
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 0.75rem;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s ease, transform 0.15s ease;
  z-index: 20;
  white-space: nowrap;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.2);
}

/* Redesigned 3-Row Search & Filter Panel */
.ad-filter-grid-v2 {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.filter-row-search {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
}

.filter-row-search label,
.filter-row-fields .filter-item label {
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #475569;
}

.search-input-box {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.search-input-box .search-icon {
  position: absolute;
  left: 14px;
  color: #94a3b8;
  font-size: 0.95rem;
  pointer-events: none;
}

.search-input-box .form-control {
  width: 100%;
  height: 44px;
  padding: 0 14px 0 40px;
  font-size: 0.9rem;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  color: #0f172a;
}

.filter-row-fields {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.filter-row-fields .form-control,
.filter-row-fields .form-select {
  height: 44px;
  padding: 0 12px;
  font-size: 0.88rem;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  color: #0f172a;
  background-color: #ffffff;
}

.filter-row-actions {
  display: flex;
  gap: 10px;
}

/* Campaigns Catalog Table Styles */
.ad-catalog-table {
  width: 100%;
  border-collapse: collapse;
}

.ad-catalog-table th {
  background: #f8fafc;
  color: #334155;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 12px 14px;
  border-bottom: 1px solid #cbd5e1;
}

.ad-catalog-table td {
  padding: 12px 14px;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
}

.ad-catalog-table tr:hover td {
  background-color: #f8fafc;
}

.ad-thumbnail-box {
  width: 80px;
  height: 50px;
  border-radius: 4px;
  overflow: hidden;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  cursor: pointer;
  margin: 0 auto;
}

.ad-thumbnail-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.ad-name-cell {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.ad-name-cell a {
  font-weight: 700;
  color: #0f172a;
  text-decoration: none;
  font-size: 0.9rem;
  line-height: 1.35;
}

.ad-name-cell a:hover {
  color: var(--primary-red, #D71920);
}

.ad-campaign-sub {
  font-size: 0.74rem;
  color: #64748b;
}

.placement-badge {
  display: inline-block;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: #334155;
  font-size: 0.74rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 4px;
  white-space: nowrap;
}

.type-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.76rem;
  font-weight: 600;
  color: #475569;
  white-space: nowrap;
}

/* Status Badges */
.status-pill {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.status-pill.active { background: #dcfce7; color: #15803d; }
.status-pill.scheduled { background: #dbeafe; color: #1d4ed8; }
.status-pill.paused { background: #ffedd5; color: #c2410c; }
.status-pill.expired { background: #f1f5f9; color: #64748b; }
.status-pill.draft { background: #e2e8f0; color: #334155; }
.status-pill.rejected { background: #fee2e2; color: #b91c1c; }

/* Available Ad Placements Professional Cards */
.placements-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 24px;
}

.placement-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 22px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.placement-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 12px -2px rgba(0, 0, 0, 0.08);
}

.placement-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 12px;
}

.placement-card-header h4 {
  font-size: 1.05rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 4px 0;
}

.placement-card-header p {
  font-size: 0.8rem;
  color: #64748b;
  margin: 0;
  line-height: 1.4;
}

.placement-dimension-box {
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 6px;
  padding: 12px;
  text-align: center;
  margin: 14px 0;
}

.placement-dimension-box .dim-val {
  font-size: 1.15rem;
  font-weight: 800;
  color: #0f172a;
  font-family: monospace;
}

.placement-dimension-box .dim-lbl {
  font-size: 0.72rem;
  color: #64748b;
  text-transform: uppercase;
  margin-top: 3px;
  font-weight: 600;
}

.placement-stats-row {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-top: 1px solid #f1f5f9;
  border-bottom: 1px solid #f1f5f9;
  font-size: 0.82rem;
  margin-bottom: 18px;
}

.placement-stats-row span {
  color: #64748b;
}

.placement-stats-row strong {
  color: #0f172a;
}

/* Status Badges */
.status-pill {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.status-pill.active {
  background: #dcfce7;
  color: #15803d;
}

.status-pill.scheduled {
  background: #dbeafe;
  color: #1d4ed8;
}

.status-pill.paused {
  background: #ffedd5;
  color: #c2410c;
}

.status-pill.expired {
  background: #f1f5f9;
  color: #64748b;
}

.status-pill.draft {
  background: #e2e8f0;
  color: #334155;
}

.status-pill.rejected {
  background: #fee2e2;
  color: #b91c1c;
}

/* Bulk Action Toolbar */
.bulk-action-toolbar {
  display: none;
  align-items: center;
  justify-content: space-between;
  background: #1e293b;
  color: #ffffff;
  padding: 12px 20px;
  border-radius: 6px;
  margin-bottom: 16px;
  animation: slideDown 0.15s ease-out;
}

.bulk-action-toolbar.show {
  display: flex;
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

.bulk-info-text {
  font-size: 0.88rem;
  font-weight: 600;
}

.bulk-buttons-group {
  display: flex;
  gap: 10px;
}

.btn-bulk {
  padding: 6px 14px;
  font-size: 0.82rem;
  font-weight: 600;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  transition: opacity 0.15s ease;
}

.btn-bulk:hover {
  opacity: 0.9;
}

.btn-bulk-publish { background: #16a34a; color: #ffffff; }
.btn-bulk-pause { background: #ea580c; color: #ffffff; }
.btn-bulk-delete { background: #dc2626; color: #ffffff; }

/* Action Dropdown Menu for Advertisements */
.action-dropdown-wrapper {
  position: relative;
  display: inline-block;
}

.action-trigger-btn {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  color: #334155;
  padding: 6px 12px;
  border-radius: 6px;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
  user-select: none;
  white-space: nowrap;
}

.action-trigger-btn:hover,
.action-trigger-btn[aria-expanded="true"] {
  background: #ffffff;
  color: #0f172a;
  border-color: #94a3b8;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.action-dropdown-menu {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  width: 210px;
  min-width: 210px;
  max-width: 220px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.14), 0 8px 10px -6px rgba(15, 23, 42, 0.08);
  padding: 6px 0;
  z-index: 999;
  display: none;
  animation: dropdownPop 0.16s cubic-bezier(0.16, 1, 0.3, 1);
  transform-origin: top right;
}

.action-dropdown-menu.show {
  display: block;
}

.action-dropdown-menu.drop-up {
  top: auto;
  bottom: calc(100% + 4px);
  transform-origin: bottom right;
}

.action-dropdown-menu.align-left {
  right: auto;
  left: 0;
  transform-origin: top left;
}

@keyframes dropdownPop {
  from { opacity: 0; transform: scale(0.96) translateY(-4px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.action-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 40px;
  padding: 0 16px;
  font-size: 0.84rem;
  font-weight: 500;
  color: #1e293b;
  text-align: left;
  background: none;
  border: none;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.15s ease, color 0.15s ease;
  box-sizing: border-box;
}

.action-menu-item:hover,
.action-menu-item:focus {
  background-color: #f8fafc;
  color: var(--primary-red, #D71920);
  outline: none;
}

.action-menu-item.danger {
  color: #dc2626;
  font-weight: 600;
}

.action-menu-item.danger:hover {
  background-color: #fef2f2;
  color: #b91c1c;
}

.action-menu-item .menu-item-icon {
  font-size: 1rem;
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}

.action-menu-divider {
  height: 1px;
  background: #e2e8f0;
  margin: 6px 0;
}

/* ======================== MODAL SYSTEM ======================== */

.modal-backdrop {
  position: fixed;
  inset: 0;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 2500;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
  opacity: 0;
  transition: opacity 0.2s ease-in-out;
}

.modal-backdrop.show {
  display: flex !important;
  opacity: 1;
}

/* Close button - Minimum 36px touch target, clean SVG/CSS icon */
.modal-close-btn {
  background: transparent;
  border: 1px solid transparent;
  width: 36px;
  height: 36px;
  min-width: 36px;
  min-height: 36px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  cursor: pointer;
  padding: 0;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
  flex-shrink: 0;
}

.modal-close-btn:hover {
  background-color: #f1f5f9;
  color: #0f172a;
}

.modal-close-btn:focus-visible {
  outline: 2px solid var(--primary-red, #D71920);
  outline-offset: 2px;
}

/* 1. Professional Advertisement Live Preview Modal */
.preview-modal-dialog {
  max-width: 850px;
  width: 100%;
  background: #ffffff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
  display: flex;
  flex-direction: column;
  max-height: 90vh;
  box-sizing: border-box;
  animation: modalScaleUp 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.preview-modal-header {
  padding: 18px 24px;
  background: #ffffff;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.preview-modal-body {
  padding: 24px;
  overflow-y: auto;
  background: #f8fafc;
  flex: 1;
  box-sizing: border-box;
}

.preview-modal-footer {
  padding: 14px 24px;
  background: #ffffff;
  border-top: 1px solid #e2e8f0;
  display: flex;
  justify-content: flex-end;
  flex-shrink: 0;
}

.preview-device-toggle {
  display: inline-flex;
  background: #e2e8f0;
  border-radius: 6px;
  padding: 3px;
}

.device-btn {
  background: none;
  border: none;
  padding: 6px 14px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #475569;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}

.device-btn.active {
  background: #ffffff;
  color: #0f172a;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.preview-render-stage {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 240px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 24px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  transition: max-width 0.25s ease;
  width: 100%;
  box-sizing: border-box;
}

.preview-render-stage.mobile-mode {
  max-width: 380px;
  margin: 0 auto;
  padding: 16px;
}

.preview-ad-banner {
  width: 100%;
  max-width: 728px;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.08);
}

.preview-banner-img-wrap {
  width: 100%;
  background: #0f172a;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  min-height: 120px;
  max-height: 320px;
}

.preview-ad-banner img {
  width: 100%;
  height: 100%;
  max-height: 320px;
  object-fit: cover;
  display: block;
}

.preview-ad-content {
  padding: 16px 20px;
  background: #ffffff;
}

.preview-ad-badge {
  display: inline-block;
  background: #f1f5f9;
  color: #64748b;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 3px;
  margin-bottom: 6px;
  letter-spacing: 0.03em;
}

.preview-ad-headline {
  font-size: 1.15rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 6px 0;
  line-height: 1.35;
}

.preview-ad-desc {
  font-size: 0.85rem;
  color: #475569;
  line-height: 1.45;
  margin: 0 0 14px 0;
}

.preview-ad-cta-btn {
  display: inline-block;
  background: var(--primary-red, #D71920);
  color: #ffffff;
  padding: 8px 20px;
  border-radius: 4px;
  font-size: 0.85rem;
  font-weight: 700;
  text-decoration: none;
  transition: background-color 0.15s ease;
}

.preview-ad-cta-btn:hover {
  background: #b91c1c;
  color: #ffffff;
}

.preview-metadata-card {
  margin-top: 20px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 16px 18px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  font-size: 0.82rem;
}

.preview-metadata-card div span {
  display: block;
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  margin-bottom: 3px;
}

.preview-metadata-card div strong {
  color: #0f172a;
  font-size: 0.84rem;
}

/* 2. Delete Confirmation Modal Dialog */
.delete-modal-dialog {
  max-width: 480px;
  width: 100%;
  background: #ffffff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
  display: flex;
  flex-direction: column;
  animation: modalScaleUp 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
}

.delete-modal-header {
  background: #fef2f2;
  border-bottom: 1px solid #fecaca;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.delete-modal-body {
  padding: 22px 24px;
  background: #ffffff;
}

.delete-info-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 12px 14px;
  font-size: 0.85rem;
  margin-bottom: 16px;
}

.delete-warning-callout {
  background: #fef2f2;
  border: 1px solid #fca5a5;
  padding: 12px 14px;
  border-radius: 6px;
  color: #991b1b;
  font-size: 0.82rem;
  line-height: 1.45;
}

.delete-modal-footer {
  padding: 14px 24px;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-shrink: 0;
}

.btn-danger-action {
  background: #dc2626 !important;
  border-color: #dc2626 !important;
  color: #ffffff !important;
  font-weight: 600;
  padding: 8px 18px;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.btn-danger-action:hover {
  background: #b91c1c !important;
  border-color: #b91c1c !important;
}

@keyframes modalScaleUp {
  from {
    opacity: 0;
    transform: scale(0.96);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Placements Grid Cards */
.placements-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 24px;
}

.placement-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.placement-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 12px;
}

.placement-card-header h4 {
  font-size: 1rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 4px 0;
}

.placement-card-header p {
  font-size: 0.78rem;
  color: #64748b;
  margin: 0;
}

.placement-dimension-box {
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 6px;
  padding: 12px;
  text-align: center;
  margin-bottom: 14px;
}

.placement-dimension-box .dim-val {
  font-size: 1.1rem;
  font-weight: 700;
  color: #0f172a;
  font-family: monospace;
}

.placement-dimension-box .dim-lbl {
  font-size: 0.72rem;
  color: #64748b;
  text-transform: uppercase;
  margin-top: 2px;
}

.placement-stats-row {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-top: 1px solid #f1f5f9;
  border-bottom: 1px solid #f1f5f9;
  font-size: 0.8rem;
  margin-bottom: 16px;
}

.placement-stats-row span {
  color: #64748b;
}

.placement-stats-row strong {
  color: #0f172a;
}

/* Two Column Layout for Create Advertisement Page */
.ad-create-layout {
  display: grid;
  grid-template-columns: minmax(0, 2.2fr) minmax(300px, 0.95fr);
  gap: 24px;
  align-items: start;
}

.form-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.form-card-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 16px 0;
  border-bottom: 1px solid #f1f5f9;
  padding-bottom: 10px;
}

.placement-select-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.placement-select-item {
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 12px;
  background: #f8fafc;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.placement-select-item:hover {
  background: #ffffff;
  border-color: #94a3b8;
}

.placement-select-item input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--primary-red, #D71920);
  margin-top: 2px;
}

.placement-select-item .item-details strong {
  display: block;
  font-size: 0.84rem;
  color: #0f172a;
}

.placement-select-item .item-details span {
  display: block;
  font-size: 0.72rem;
  color: #64748b;
  margin-top: 2px;
}

/* Toast Notifications Container */
.admin-toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 9999;
  pointer-events: none;
}

.admin-toast {
  pointer-events: auto;
  background: #1e293b;
  color: #ffffff;
  padding: 12px 18px;
  border-radius: 6px;
  font-size: 0.86rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.2);
  transition: opacity 0.2s ease, transform 0.2s ease;
  border-left: 4px solid var(--primary-red, #D71920);
}

.admin-toast.success { border-left-color: #16a34a; }
.admin-toast.warning { border-left-color: #ea580c; }
.admin-toast.danger { border-left-color: #dc2626; }

/* Responsive Media Queries */
@media screen and (max-width: 1440px) {
  .stats-grid-6col {
    grid-template-columns: repeat(6, 1fr);
  }
}

@media screen and (max-width: 1280px) {
  .stats-grid-6col {
    grid-template-columns: repeat(3, 1fr);
  }
  .placements-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .filter-row-fields {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media screen and (max-width: 992px) {
  .ad-create-layout {
    grid-template-columns: 1fr;
  }
  .placements-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media screen and (max-width: 768px) {
  .stats-grid-6col {
    grid-template-columns: repeat(2, 1fr);
  }
  .placements-grid {
    grid-template-columns: 1fr;
  }
  .filter-row-fields {
    grid-template-columns: 1fr;
  }
  .placement-select-grid {
    grid-template-columns: 1fr;
  }
  .preview-metadata-card {
    grid-template-columns: 1fr 1fr;
  }
  .performance-summary-pills {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  .chart-legend-box {
    margin-left: 0 !important;
  }
  .preview-modal-dialog {
    max-height: 94vh;
    border-radius: 8px;
  }
  .preview-modal-header,
  .preview-modal-body,
  .preview-modal-footer,
  .delete-modal-header,
  .delete-modal-body,
  .delete-modal-footer {
    padding-left: 16px;
    padding-right: 16px;
  }
}

@media screen and (max-width: 480px) {
  .stats-grid-6col {
    grid-template-columns: 1fr;
  }
  .ad-tabs-wrapper {
    flex-wrap: nowrap;
    overflow-x: auto;
  }
  .modal-backdrop {
    padding: 10px;
  }
  .preview-metadata-card {
    grid-template-columns: 1fr;
  }
  .delete-modal-footer,
  .preview-modal-footer {
    flex-direction: column-reverse;
  }
  .delete-modal-footer .btn,
  .preview-modal-footer .btn {
    width: 100%;
    text-align: center;
    justify-content: center;
  }
}

