@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: #f5f6f8;
  color: #1a1d26;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ─── Header / Nav ─── */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #fff;
  border-bottom: 1px solid #e5e7ec;
  padding: 0.85rem 2.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.header h1 {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #1a1d26;
}

.header h1 span {
  color: #e63946;
}

.header-nav {
  display: flex;
  gap: 1.75rem;
}

.header-nav a {
  color: #8b8fa3;
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 600;
  transition: color 0.2s;
}

.header-nav a:hover,
.header-nav a.active {
  color: #1a1d26;
}

/* ─── Main layout ─── */
.main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

.main.wide {
  max-width: 100%;
  padding: 2rem 3rem;
}

/* Sticky top bar on Ad performance by episode: page title + platform tabs stay visible when scrolling or switching tabs */
.episode-refresh-all-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  margin-top: 0.75rem;
}

.episode-refresh-all-status {
  font-size: 0.8rem;
  color: #6b7280;
  min-height: 1rem;
}

.episode-top-bar {
  position: sticky;
  top: 3.25rem; /* stick below the sticky header (header height ~3.25rem) */
  z-index: 99;
  background: #f5f6f8;
  margin: -2rem -3rem 0;
  padding: 1.25rem 3rem 0.5rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid #e5e7ec;
}

.episode-top-bar .page-header {
  margin-bottom: 0.5rem;
}

.episode-top-bar .platform-tabs {
  margin-top: 0;
  margin-bottom: 0;
}

/* ─── Platform tabs under Budget sheet ─── */
.platform-tabs {
  margin-top: 1.25rem;
  margin-bottom: 1.25rem;
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.3rem;
  background: #f5f6f8;
  border-radius: 999px;
}

.platform-tab {
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
  color: #6b7085;
  border: 1px solid transparent;
  cursor: pointer;
}

.platform-tab:hover {
  background: #fff;
  border-color: #d0d3dc;
  color: #1a1d26;
}

.platform-tab.platform-tab-active {
  background: #1a1d26;
  color: #fff;
  border-color: #1a1d26;
}

.platform-tab.platform-tab-disabled {
  opacity: 0.6;
  cursor: default;
}

/* ─── Campaign sub-tabs (Google Ads) ─── */
.campaign-tabs-wrap {
  margin-bottom: 1.25rem;
}
.campaign-tabs-wrap .campaign-tabs-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: #6b7085;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.5rem;
}
.campaign-tabs {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding: 0.25rem;
  background: #fff;
  border: 1px solid #e5e7ec;
  border-radius: 8px;
}
.campaign-tab {
  padding: 0.4rem 0.85rem;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: none;
  color: #3d4156;
  border: 1px solid transparent;
  cursor: pointer;
  background: transparent;
}
.campaign-tab:hover {
  background: #f5f6f8;
  color: #1a1d26;
}
.campaign-tab.campaign-tab-active {
  background: #e63946;
  color: #fff;
  border-color: #e63946;
}
.campaign-copy {
  margin-top: 0.5rem;
  font-size: 0.85rem;
  color: #6b7085;
}

/* ─── Hero section (home page) ─── */
.hero {
  text-align: center;
  padding: 4rem 2rem;
  border-bottom: 1px solid #e5e7ec;
  margin-bottom: 2rem;
}

.hero h2 {
  font-size: 2.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #1a1d26;
  margin-bottom: 1rem;
}

.hero h2 span {
  color: #e63946;
}

.hero p {
  font-size: 1rem;
  color: #6b7085;
  max-width: 600px;
  margin: 0 auto 2rem;
  line-height: 1.7;
}

/* ─── Cards ─── */
.card {
  background: #fff;
  border: 1px solid #e5e7ec;
  border-radius: 12px;
  padding: 1.75rem;
  margin-bottom: 1.25rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.card:hover {
  border-color: #d0d3dc;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.card h2 {
  font-size: 1rem;
  font-weight: 700;
  color: #1a1d26;
  margin-bottom: 0.75rem;
}

.card p {
  color: #6b7085;
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 1rem;
}

/* ─── Google Ads connection (compact) ─── */
.google-ads-connect-section {
  padding: 1rem 1.25rem;
  margin-bottom: 0.75rem;
}

.google-ads-connect-section h3 {
  font-size: 0.9rem;
  margin-bottom: 0.4rem;
}

.google-ads-connect-section p {
  font-size: 0.8rem;
  margin-bottom: 0.4rem;
}

.google-ads-account-select-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.75rem;
  align-items: center;
  margin: 0.4rem 0 0.6rem;
}

.google-ads-account-select-wrap label {
  font-size: 0.8rem;
  font-weight: 600;
  color: #6b7085;
}

.google-ads-account-select-wrap select {
  padding: 0.35rem 0.75rem;
  border-radius: 8px;
  border: 1px solid #d0d3dc;
  font-size: 0.8rem;
}

.google-ads-sync-wrap {
  margin-top: 0.25rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
}

.google-ads-sync-wrap #last-sync-label {
  font-size: 0.78rem;
}

/* ─── Google Ads budget card (tighter like Meta) ─── */
.google-ads-dashboard-section {
  padding: 1.25rem 1.5rem;
}

.google-ads-dashboard-section h3 {
  margin-bottom: 0.35rem;
}

.google-ads-dashboard-section .card-desc {
  margin-bottom: 0.6rem;
}

/* ─── Buttons ─── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 1.3rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.82rem;
  cursor: pointer;
  border: none;
  transition: all 0.15s;
  gap: 0.35rem;
}

.btn-primary {
  background: #e63946;
  color: #fff;
}

.btn-primary:hover {
  background: #d32f3c;
  box-shadow: 0 2px 8px rgba(230, 57, 70, 0.2);
}

.btn-secondary {
  background: #fff;
  color: #3d4156;
  border: 1px solid #d0d3dc;
}

.btn-secondary:hover {
  background: #f5f6f8;
  border-color: #b8bcc8;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ─── Links ─── */
.link {
  color: #e63946;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  transition: color 0.2s;
}

.link:hover {
  color: #c5303c;
  text-decoration: underline;
}

/* ─── Dashboard links (home) ─── */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.25rem;
  margin-top: 1rem;
}

.dashboard-card {
  background: #fff;
  border: 1px solid #e5e7ec;
  border-radius: 12px;
  padding: 2rem;
  text-decoration: none;
  transition: all 0.25s;
  display: block;
}

.dashboard-card:hover {
  border-color: #e63946;
  box-shadow: 0 4px 16px rgba(230, 57, 70, 0.06);
}

.dashboard-card .icon {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.dashboard-card h3 {
  font-size: 1rem;
  font-weight: 700;
  color: #1a1d26;
  margin-bottom: 0.5rem;
}

.dashboard-card p {
  color: #6b7085;
  font-size: 0.85rem;
  line-height: 1.6;
}

/* ─── Status badges ─── */
.hidden {
  display: none !important;
}

.error {
  color: #e63946;
  font-size: 0.85rem;
  margin-top: 0.5rem;
}

.success {
  color: #16a34a;
}

.msg {
  padding: 1rem 1.25rem;
  border-radius: 10px;
  margin-bottom: 1rem;
  font-size: 0.88rem;
  line-height: 1.5;
}

.msg.info {
  background: #eef2ff;
  color: #4f5fad;
  border: 1px solid #d4dcf5;
}

.msg.info a {
  color: #e63946;
  font-weight: 600;
}

.msg.error {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
}

/* ─── Select accounts ─── */
.accounts-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem;
}

.accounts-list li {
  padding: 0.85rem 0;
  border-bottom: 1px solid #e5e7ec;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.accounts-list li:last-child {
  border-bottom: none;
}

.accounts-list input[type="checkbox"] {
  accent-color: #e63946;
  width: 18px;
  height: 18px;
}

.accounts-list label {
  flex: 1;
  cursor: pointer;
  font-size: 0.9rem;
  color: #3d4156;
}

.accounts-list code {
  font-size: 0.75rem;
  color: #6b7085;
  background: #f0f1f4;
  padding: 0.2rem 0.5rem;
  border-radius: 5px;
}

/* ─── Controls bar ─── */
.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: #fff;
  border: 1px solid #e5e7ec;
  border-radius: 12px;
}

.controls label {
  font-size: 0.75rem;
  font-weight: 600;
  color: #6b7085;
}

.controls select {
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  border: 1px solid #d0d3dc;
  background: #fff;
  color: #1a1d26;
  font-size: 0.85rem;
  font-family: 'Inter', sans-serif;
}

.controls select:focus {
  outline: none;
  border-color: #e63946;
}

/* ─── Header account selects (Meta + Google) ─── */
.account-select {
  margin-left: 0.35rem;
  padding: 0.25rem 0.6rem;
  border-radius: 8px;
  border: 1px solid #d0d3dc;
  background: #fff;
  color: #1a1d26;
  font-size: 0.82rem;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

.account-select:focus {
  outline: none;
  border-color: #e63946;
}

/* ─── Tables ─── */
.table-wrap {
  overflow-x: auto;
  margin-top: 1rem;
  border: 1px solid #e5e7ec;
  border-radius: 12px;
  background: #fff;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

th {
  padding: 0.85rem 1rem;
  text-align: left;
  background: #fafbfc;
  font-weight: 600;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #6b7085;
  border-bottom: 1px solid #e5e7ec;
  position: sticky;
  top: 0;
  white-space: nowrap;
}

td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #f0f1f4;
  color: #3d4156;
  white-space: nowrap;
}

tr:hover td {
  background: #fafbfc;
}

/* ─── Creatives grid ─── */
.creatives-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}

.creative-card {
  background: #fff;
  border: 1px solid #e5e7ec;
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.25s;
}

.creative-card:hover {
  border-color: #d0d3dc;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.creative-card .thumb {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  background: #f0f1f4;
}

.creative-card .body {
  padding: 1rem;
}

.creative-card .title {
  font-weight: 700;
  font-size: 0.85rem;
  color: #1a1d26;
  margin-bottom: 0.25rem;
}

.creative-card .copy {
  font-size: 0.8rem;
  color: #6b7085;
  margin-bottom: 0.5rem;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.creative-card .link {
  font-size: 0.75rem;
  word-break: break-all;
  color: #e63946;
}

/* ─── Connected info ─── */
#connected-info p {
  color: #16a34a;
  font-size: 0.9rem;
}

#connected-info .link {
  margin-top: 0.5rem;
  display: inline-block;
}

/* ─── Back link ─── */
.back-link {
  margin-top: 2rem;
}

/* ─── Page title & header ─── */
.page-title {
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: #1a1d26;
  margin-bottom: 0.5rem;
}

.page-subtitle {
  color: #6b7085;
  font-size: 0.9rem;
  margin-bottom: 2rem;
  line-height: 1.6;
}

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.page-meta {
  color: #6b7085;
  font-size: 0.88rem;
  margin: 0.2rem 0 0;
}

.page-meta strong {
  color: #1a1d26;
  font-weight: 600;
}

.page-actions {
  display: flex;
  gap: 0.6rem;
  align-items: center;
}

.accent {
  color: #e63946;
}

/* ─── Platforms section ─── */
.platforms-section {
  margin-top: 3rem;
}

.section-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #8b8fa3;
  margin-bottom: 1rem;
}

.platform-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.platform-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1rem;
  background: #fff;
  border: 1px solid #e5e7ec;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #3d4156;
}

.platform-badge.active {
  border-color: #16a34a;
  color: #1a1d26;
}

.platform-badge.active .platform-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #16a34a;
}

.platform-badge.coming-soon {
  color: #8b8fa3;
}

.platform-badge-link {
  text-decoration: none;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.platform-badge-link:hover {
  border-color: #16a34a;
  box-shadow: 0 2px 8px rgba(22, 163, 74, 0.08);
}

.badge-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #8b8fa3;
  background: #f0f1f4;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
}

/* ─── Google Ads account & sync ─── */
.google-ads-account-select-wrap,
.google-ads-sync-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1rem 0;
  flex-wrap: wrap;
}

.google-ads-account-select-wrap label,
.google-ads-sync-wrap label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #3d4156;
}

.google-ads-account-select-wrap select {
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  border: 1px solid #d0d3dc;
  background: #fff;
  font-size: 0.85rem;
  min-width: 260px;
}

#google-ads-selected-account {
  margin: 0.5rem 0;
}

#last-sync-label {
  font-size: 0.85rem;
  color: #6b7085;
}

/* ═══════════════════════════════════════════
   Multi-filter bar
   ═══════════════════════════════════════════ */
.filter-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.6rem 1rem;
  background: #fff;
  border: 1px solid #e5e7ec;
  border-radius: 10px;
  margin-bottom: 0.6rem;
  min-height: 44px;
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: #f0f1f4;
  border: 1px solid #d0d3dc;
  border-radius: 6px;
  padding: 0.3rem 0.6rem;
  font-size: 0.8rem;
  color: #3d4156;
  white-space: nowrap;
  animation: chipIn 0.15s ease-out;
}

@keyframes chipIn {
  from { opacity: 0; transform: scale(0.95); }
  to   { opacity: 1; transform: scale(1); }
}

.filter-chip-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.filter-chip-dot.dot-active {
  background: #16a34a;
}

.filter-chip-dot.dot-paused {
  background: #8b8fa3;
}

.filter-chip-text {
  font-weight: 500;
}

.filter-chip-close {
  cursor: pointer;
  color: #8b8fa3;
  font-size: 1.05rem;
  line-height: 1;
  margin-left: 0.1rem;
  transition: color 0.15s;
}

.filter-chip-close:hover {
  color: #e63946;
}

.filter-add-wrap {
  position: relative;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.report-control-inline {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.report-control-inline label {
  font-size: 0.8rem;
  font-weight: 600;
  color: #6b7085;
  white-space: nowrap;
}

.report-control-inline select {
  padding: 0.4rem 0.6rem;
  border-radius: 8px;
  border: 1px solid #d0d3dc;
  background: #fff;
  font-size: 0.82rem;
  min-width: 180px;
  max-width: 320px;
  font-family: 'Inter', sans-serif;
}

.report-control-inline select:focus {
  outline: none;
  border-color: #e63946;
}

.filter-add-btn {
  background: none;
  border: none;
  color: #8b8fa3;
  font-size: 0.82rem;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  padding: 0.35rem 0.6rem;
  border-radius: 6px;
  transition: color 0.15s, background 0.15s;
  white-space: nowrap;
}

.filter-add-btn:hover {
  color: #3d4156;
  background: #f0f1f4;
}

.filter-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 240px;
  background: #fff;
  border: 1px solid #e5e7ec;
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
  z-index: 100;
  overflow: hidden;
}

.filter-dropdown.open {
  display: block;
  animation: dropIn 0.12s ease-out;
}

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

.filter-dropdown-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #6b7085;
  border-bottom: 1px solid #f0f1f4;
}

.filter-back-btn {
  cursor: pointer;
  color: #8b8fa3;
  font-size: 1rem;
  transition: color 0.15s;
}

.filter-back-btn:hover {
  color: #e63946;
}

.filter-dropdown-item {
  padding: 0.7rem 1rem;
  font-size: 0.85rem;
  color: #3d4156;
  cursor: pointer;
  transition: background 0.1s;
}

.filter-dropdown-item:hover {
  background: #f5f6f8;
}

.filter-dropdown-item.disabled {
  color: #b0b4c3;
  cursor: default;
}

.filter-dropdown-item.disabled:hover {
  background: transparent;
}

.filter-dropdown-item.selectable {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.filter-option-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #b0b4c3;
  flex-shrink: 0;
}

.filter-option-dot.dot-active {
  background: #16a34a;
}

.filter-option-dot.dot-paused {
  background: #8b8fa3;
}

.filter-input-wrap {
  padding: 0.75rem 1rem;
  display: flex;
  gap: 0.5rem;
}

.filter-text-input {
  flex: 1;
  padding: 0.45rem 0.7rem;
  background: #fff;
  border: 1px solid #d0d3dc;
  border-radius: 8px;
  color: #1a1d26;
  font-size: 0.85rem;
  font-family: 'Inter', sans-serif;
  outline: none;
  transition: border-color 0.15s;
}

.filter-text-input:focus {
  border-color: #e63946;
  box-shadow: 0 0 0 3px rgba(230, 57, 70, 0.08);
}

.filter-apply-btn {
  padding: 0.45rem 0.85rem;
  background: #e63946;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: background 0.15s;
}

.filter-apply-btn:hover {
  background: #d32f3c;
}

/* ─── Google reporting: objective tabs (mirror budget pills) ─── */
.report-objective-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.75rem 0 0.5rem;
}

.objective-tab {
  border: none;
  border-radius: 999px;
  padding: 0.4rem 0.9rem;
  font-size: 0.8rem;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  background: #f5f6f8;
  color: #3d4156;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, box-shadow 0.15s;
}

.objective-tab:hover {
  background: #e9ebf2;
}

.objective-tab-active {
  background: #111827;
  color: #fff;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.25);
}

/* ═══════════════════════════════════════════
   Date range filter bar
   ═══════════════════════════════════════════ */
.date-filter-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.6rem;
  padding: 0.6rem 1rem;
  background: #fff;
  border: 1px solid #e5e7ec;
  border-radius: 10px;
  margin-bottom: 1.25rem;
}

.date-filter-bar label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #6b7085;
}

.date-filter-bar input[type="date"] {
  padding: 0.4rem 0.65rem;
  background: #fff;
  border: 1px solid #d0d3dc;
  border-radius: 8px;
  color: #1a1d26;
  font-size: 0.82rem;
  font-family: 'Inter', sans-serif;
  outline: none;
  transition: border-color 0.15s;
}

.date-filter-bar input[type="date"]:focus {
  border-color: #e63946;
  box-shadow: 0 0 0 3px rgba(230, 57, 70, 0.08);
}

.date-sep {
  color: #8b8fa3;
  font-size: 0.82rem;
}

.btn-sm {
  padding: 0.4rem 0.85rem;
  border: none;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: all 0.15s;
  background: #e63946;
  color: #fff;
}

.btn-sm:hover {
  background: #d32f3c;
}

.btn-sm:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-sm-secondary {
  background: #fff;
  color: #6b7085;
  border: 1px solid #d0d3dc;
}

.btn-sm-secondary:hover {
  color: #3d4156;
  border-color: #b8bcc8;
  background: #f5f6f8;
}

.btn-sm-accent {
  background: #fff;
  color: #e63946;
  border: 1px solid #e6394640;
}

.btn-sm-accent:hover {
  background: #e63946;
  color: #fff;
  border-color: #e63946;
}

.date-filter-spacer {
  flex: 1;
}

.date-active-badge {
  display: inline-block;
  font-size: 0.6rem;
  background: #f0f1f4;
  border: 1px solid #d0d3dc;
  border-radius: 4px;
  padding: 0.15rem 0.4rem;
  color: #6b7085;
  margin-left: 0.3rem;
  vertical-align: middle;
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
}

/* ═══════════════════════════════════════════
   Campaign table
   ═══════════════════════════════════════════ */
.campaign-block {
  background: #fff;
  border: 1px solid #e5e7ec;
  border-radius: 12px;
  margin-bottom: 0.5rem;
  overflow: hidden;
  transition: box-shadow 0.15s;
}

.campaign-block:hover {
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.04);
}

.campaign-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  cursor: pointer;
  transition: background 0.15s;
  gap: 1rem;
}

.campaign-header:hover {
  background: #fafbfc;
}

.campaign-header .toggle {
  color: #8b8fa3;
  font-size: 0.75rem;
  transition: transform 0.2s;
  flex-shrink: 0;
}

.campaign-header .toggle.open {
  transform: rotate(90deg);
}

.campaign-name {
  font-weight: 600;
  font-size: 0.92rem;
  color: #1a1d26;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.campaign-stats {
  display: flex;
  gap: 1.5rem;
  flex-shrink: 0;
}

.stat {
  text-align: right;
}

.stat-label {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #8b8fa3;
  display: block;
}

.stat-value {
  font-size: 0.92rem;
  font-weight: 700;
  color: #1a1d26;
}

.stat-value.positive {
  color: #16a34a;
}

.stat-value.negative {
  color: #dc2626;
}

.stat-value.neutral {
  color: #d97706;
}

.campaign-cycles {
  border-top: 1px solid #e5e7ec;
  display: none;
  background: #fafbfc;
}

.campaign-cycles.open {
  display: block;
}

.cycle-table {
  width: 100%;
  border-collapse: collapse;
}

.cycle-table th {
  background: #f5f6f8;
  border-bottom: 1px solid #e5e7ec;
  font-size: 0.7rem;
  padding: 0.7rem 1rem;
  color: #6b7085;
}

.cycle-table td {
  border-bottom: 1px solid #eef0f3;
  padding: 0.7rem 1rem;
  color: #3d4156;
}

.cycle-table tr:last-child td {
  border-bottom: none;
}

.cycle-table tr:hover td {
  background: #f0f1f4;
}

.add-cycle-row {
  padding: 0.85rem 1.25rem;
  border-top: 1px solid #e5e7ec;
}

.add-cycle-row button {
  background: none;
  border: 1px dashed #d0d3dc;
  color: #8b8fa3;
  padding: 0.45rem 0.9rem;
  border-radius: 8px;
  font-size: 0.82rem;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  transition: all 0.2s;
}

.add-cycle-row button:hover {
  border-color: #e63946;
  color: #e63946;
}

/* Inline editable fields */
.editable {
  background: transparent;
  border: 1px solid transparent;
  color: #3d4156;
  font-size: 0.82rem;
  font-family: 'Inter', sans-serif;
  padding: 0.35rem 0.55rem;
  border-radius: 6px;
  width: 110px;
  text-align: right;
  transition: border-color 0.2s, background 0.2s;
}

.editable:hover {
  border-color: #d0d3dc;
  background: #fff;
}

.editable:focus {
  outline: none;
  border-color: #e63946;
  background: #fff;
  color: #1a1d26;
  box-shadow: 0 0 0 3px rgba(230, 57, 70, 0.08);
}

.editable.date-input {
  width: 135px;
  text-align: left;
}

/* ─── Campaign table header row ─── */
.campaign-table-header {
  display: grid;
  grid-template-columns: 36px 1fr 90px 140px 140px 140px;
  gap: 0.5rem;
  padding: 0.75rem calc(1.5rem + 1px);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #8b8fa3;
  border-bottom: 1px solid #e5e7ec;
  margin-bottom: 0.4rem;
}

.campaign-table-header .col-budget,
.campaign-table-header .col-spend,
.campaign-table-header .col-remaining {
  text-align: right;
}

.campaign-row {
  display: grid;
  grid-template-columns: 36px 1fr 90px 140px 140px 140px;
  gap: 0.5rem;
  align-items: center;
  padding: 0.95rem 1.5rem;
  cursor: pointer;
  transition: background 0.15s;
}

.campaign-row:hover {
  background: #fafbfc;
}

.campaign-row .col-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
}

.campaign-row .col-toggle .toggle {
  color: #8b8fa3;
  font-size: 0.7rem;
  transition: transform 0.2s;
}

.campaign-row .col-toggle .toggle.open {
  transform: rotate(90deg);
}

.campaign-row .col-name {
  font-weight: 600;
  font-size: 0.88rem;
  color: #1a1d26;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.campaign-row .col-status {
  font-size: 0.78rem;
}

.campaign-row .col-budget,
.campaign-row .col-spend,
.campaign-row .col-remaining {
  text-align: right;
  font-size: 0.88rem;
  font-weight: 600;
  color: #3d4156;
}

.status-active {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: #16a34a;
  font-weight: 600;
  font-size: 0.75rem;
}

.status-active::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #16a34a;
}

.status-paused {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: #8b8fa3;
  font-weight: 600;
  font-size: 0.75rem;
}

.status-paused::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #b0b4c3;
}

@media (max-width: 900px) {
  .campaign-table-header,
  .campaign-row,
  .campaign-table-grand-total {
    grid-template-columns: 30px 1fr 75px 110px 110px 110px;
    font-size: 0.78rem;
  }
}

/* ─── Grand total row ─── */
.campaign-table-grand-total {
  display: grid;
  grid-template-columns: 36px 1fr 90px 140px 140px 140px;
  gap: 0.5rem;
  padding: 0.85rem calc(1.5rem + 1px);
  background: #f5f6f8;
  border: 1px solid #e5e7ec;
  border-radius: 10px;
  margin-bottom: 0.6rem;
  font-weight: 700;
  font-size: 0.88rem;
  color: #1a1d26;
}

.campaign-table-grand-total .col-name {
  font-weight: 700;
  color: #6b7085;
  font-size: 0.82rem;
  display: flex;
  align-items: center;
}

.campaign-table-grand-total .col-budget,
.campaign-table-grand-total .col-spend,
.campaign-table-grand-total .col-remaining {
  text-align: right;
  font-size: 0.92rem;
  font-weight: 700;
}

/* ─── Sort arrows ─── */
.sortable {
  cursor: pointer;
  user-select: none;
  transition: color 0.15s;
}

.sortable:hover {
  color: #1a1d26;
}

.sort-arrow {
  margin-left: 0.25rem;
  font-size: 0.6rem;
  vertical-align: middle;
}

.sort-arrow.sort-inactive {
  color: #c5c8d4;
}

.sort-arrow.sort-active {
  color: #e63946;
}

/* ─── Currency input wrapper ─── */
.currency-input-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0;
  position: relative;
}

.currency-prefix {
  font-size: 0.78rem;
  font-weight: 600;
  color: #8b8fa3;
  margin-right: 2px;
  flex-shrink: 0;
}

.editable-currency {
  width: 95px;
}

/* ─── No campaigns message ─── */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: #8b8fa3;
}

.empty-state h3 {
  color: #6b7085;
  margin-bottom: 0.5rem;
  font-size: 1.05rem;
  font-weight: 600;
}

.empty-state p {
  font-size: 0.88rem;
}

/* ═══════════════════════════════════════════
   Reporting page
   ═══════════════════════════════════════════ */

.report-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: flex-end;
  padding: 1rem;
  background: #fff;
  border: 1px solid #e5e7ec;
  border-radius: 12px;
  margin-bottom: 0.75rem;
}

.report-control-group {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.report-control-group label {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #6b7085;
}

.report-control-group select,
.report-control-group input[type="date"],
.report-control-group input[type="text"] {
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  border: 1px solid #d0d3dc;
  background: #fff;
  color: #1a1d26;
  font-size: 0.85rem;
  font-family: 'Inter', sans-serif;
  outline: none;
  transition: border-color 0.15s;
}

.report-control-group select:focus,
.report-control-group input[type="date"]:focus,
.report-control-group input[type="text"]:focus {
  border-color: #e63946;
  box-shadow: 0 0 0 3px rgba(230, 57, 70, 0.08);
}

.report-control-group select {
  min-width: 280px;
  max-width: 450px;
}

.report-control-group input[type="text"] {
  min-width: 160px;
}

.report-control-hint {
  font-size: 0.8rem;
  color: #6b7085;
  margin: -0.35rem 0 0.75rem 0;
  padding: 0 0.25rem;
  line-height: 1.5;
}

.report-control-hint code {
  background: #f0f1f4;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  font-size: 0.78rem;
}

.report-campaigns-included {
  font-size: 0.8rem;
  color: #3d4156;
  margin-bottom: 0.5rem;
  padding: 0.5rem 0;
}

.report-raw-note {
  font-size: 0.78rem;
  color: #6b7085;
  margin-bottom: 0.6rem;
  line-height: 1.5;
}

.report-control-actions {
  justify-content: flex-end;
  margin-left: auto;
}

/* Report tabs */
.report-tabs {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: 0.75rem;
  border-bottom: 1px solid #e5e7ec;
  padding: 0 0.5rem;
}

.report-tab {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 0.65rem 1rem;
  font-size: 0.82rem;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  color: #8b8fa3;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}

.report-tab:hover {
  color: #3d4156;
}

.report-tab.active {
  color: #e63946;
  border-bottom-color: #e63946;
}

.report-tab-spacer {
  flex: 1;
}

.report-tab-content {
  display: none;
}

.report-tab-content.active {
  display: block;
}

.btn-export {
  font-size: 0.78rem;
  padding: 0.4rem 0.85rem;
  margin-left: 0.5rem;
}

/* Report table */
.report-table-wrap {
  overflow-x: auto;
  background: #fff;
  border: 1px solid #e5e7ec;
  border-radius: 12px;
  max-height: 75vh;
  overflow-y: auto;
}

.report-row-count {
  padding: 0.6rem 1rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: #6b7085;
  border-bottom: 1px solid #e5e7ec;
  background: #fafbfc;
  position: sticky;
  top: 0;
  z-index: 2;
}

.report-table {
  width: max-content;
  min-width: 100%;
  border-collapse: collapse;
  font-size: 0.78rem;
}

.report-table th {
  position: sticky;
  top: 30px;
  z-index: 1;
  padding: 0.7rem 0.85rem;
  background: #f5f6f8;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #6b7085;
  font-weight: 600;
  border-bottom: 1px solid #e5e7ec;
  white-space: nowrap;
  text-align: left;
}

.report-table th.num {
  text-align: right;
}

.report-table td {
  padding: 0.55rem 0.85rem;
  border-bottom: 1px solid #f0f1f4;
  color: #3d4156;
  white-space: nowrap;
  max-width: 320px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.report-table td.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.report-table tbody tr:hover td {
  background: #fafbfc;
}

.report-table .report-totals-row td {
  position: sticky;
  top: 58px;
  z-index: 1;
  background: #f5f6f8;
  font-weight: 700;
}

.report-placeholder {
  padding: 3rem 2rem;
  text-align: center;
  color: #8b8fa3;
  font-size: 0.88rem;
}

.msg.success {
  background: #f0fdf4;
  color: #16a34a;
  border: 1px solid #bbf7d0;
}

.msg.warning {
  background: #fffbeb;
  color: #b45309;
  border: 1px solid #fde68a;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.episode-data-callout {
  margin: 0.75rem 0 0;
  padding: 0.65rem 0.85rem;
  font-size: 0.82rem;
  color: #4b5563;
  background: #eef2ff;
  border: 1px solid #c7d2fe;
  border-radius: 8px;
  line-height: 1.45;
}

.episode-notes-panel {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid #e5e7ec;
}

.episode-notes-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: #1a1d26;
  margin-bottom: 0.35rem;
}

.episode-notes-hint {
  font-size: 0.8rem;
  color: #6b7280;
  margin-bottom: 0.6rem;
  line-height: 1.4;
}

.episode-notes-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 0.5rem;
}

.episode-notes-textarea {
  width: 100%;
  max-width: 100%;
  min-height: 6rem;
  padding: 0.65rem 0.75rem;
  font-family: inherit;
  font-size: 0.85rem;
  line-height: 1.45;
  color: #1a1d26;
  background: #fff;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  resize: vertical;
}

.episode-notes-textarea:focus {
  outline: none;
  border-color: #6366f1;
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}

.episode-notes-status {
  margin-top: 0.4rem;
  font-size: 0.75rem;
  color: #6b7280;
  min-height: 1rem;
}

/* ─── Bulk uploads (Reddit CSV) ─── */
.bulk-region-list ul {
  list-style: none;
  margin: 0.75rem 0 0;
  padding: 0;
}

.bulk-region-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.5rem 1rem;
}

.bulk-region-link {
  display: inline-block;
  font-weight: 600;
  color: #e63946;
  text-decoration: none;
}

.bulk-region-link:hover {
  text-decoration: underline;
}

.bulk-region-soon {
  color: #9ca3af;
  font-size: 0.9rem;
}

.bulk-region-ready {
  color: #22c55e;
  font-size: 0.9rem;
  font-weight: 500;
}

/* All-regions hub: primary generator link */
.bulk-region-primary {
  grid-column: 1 / -1;
}

.bulk-region-link-primary {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.75rem 1rem;
  background: rgba(230, 57, 70, 0.06);
  border: 1px solid rgba(230, 57, 70, 0.25);
  border-radius: 8px;
  width: fit-content;
}

.bulk-region-link-primary:hover {
  background: rgba(230, 57, 70, 0.12);
}

.bulk-region-link-desc {
  font-size: 0.82rem;
  font-weight: 400;
  color: #9ca3af;
}

/* Unified page: region cards */
.bulk-regions-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.bulk-select-all-label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.88rem;
  color: #9ca3af;
  cursor: pointer;
  user-select: none;
}

.bulk-region-shared-badge {
  font-size: 0.75rem;
  font-weight: 400;
  background: rgba(34, 197, 94, 0.12);
  color: #22c55e;
  border: 1px solid rgba(34, 197, 94, 0.3);
  border-radius: 4px;
  padding: 0.1rem 0.45rem;
  margin-left: 0.5rem;
  vertical-align: middle;
}

.bulk-region-card {
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 0.75rem;
  background: rgba(255,255,255,0.02);
}

.bulk-region-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 1rem;
  background: rgba(255,255,255,0.04);
  cursor: default;
}

.bulk-region-card-title {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.bulk-region-card-title h4 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: #f9fafb;
}

.bulk-region-abbr {
  color: #9ca3af;
  font-weight: 400;
}

/* ID manifest verification (all-regions page) */
.bulk-id-badge {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 0.12rem 0.4rem;
  border-radius: 4px;
  line-height: 1.2;
  margin-left: 0.15rem;
  flex-shrink: 0;
  cursor: help;
}

.bulk-id-badge-unknown {
  background: rgba(107, 114, 128, 0.25);
  color: #9ca3af;
}

.bulk-id-badge-ok {
  background: rgba(34, 197, 94, 0.2);
  color: #22c55e;
  border: 1px solid rgba(34, 197, 94, 0.35);
}

.bulk-id-badge-bad {
  background: rgba(239, 68, 68, 0.18);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.45);
}

.bulk-id-badge-warn {
  background: rgba(234, 179, 8, 0.15);
  color: #facc15;
  border: 1px solid rgba(234, 179, 8, 0.35);
}

.bulk-id-verify-banner {
  font-size: 0.88rem;
  padding: 0.65rem 0.85rem;
  border-radius: 8px;
  margin-bottom: 0.75rem;
  line-height: 1.35;
}

.bulk-id-verify-banner-ok {
  background: rgba(34, 197, 94, 0.1);
  color: #86efac;
  border: 1px solid rgba(34, 197, 94, 0.25);
}

.bulk-id-verify-banner-bad {
  background: rgba(239, 68, 68, 0.1);
  color: #fecaca;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.bulk-id-verify-banner-warn {
  background: rgba(234, 179, 8, 0.08);
  color: #fde047;
  border: 1px solid rgba(234, 179, 8, 0.25);
}

.bulk-region-card-controls {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.bulk-region-load-status {
  font-size: 0.8rem;
  color: #9ca3af;
}

.bulk-region-load-ok {
  color: #22c55e;
}

.bulk-region-load-err {
  color: #ef4444;
}

.bulk-region-card-body {
  padding: 1rem;
}

.bulk-region-collapse-btn {
  background: none;
  border: none;
  color: #9ca3af;
  cursor: pointer;
  font-size: 0.8rem;
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  line-height: 1;
}

.bulk-region-collapse-btn:hover {
  color: #f9fafb;
  background: rgba(255,255,255,0.08);
}

.btn-sm {
  font-size: 0.8rem;
  padding: 0.3rem 0.75rem;
}

.bulk-region-status {
  font-size: 0.82rem;
  padding: 0.4rem 0.6rem;
  border-radius: 6px;
  margin-bottom: 0.75rem;
}

.bulk-region-status-ok {
  background: rgba(34, 197, 94, 0.1);
  color: #22c55e;
}

.bulk-region-status-error {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
}

.bulk-region-check {
  accent-color: #e63946;
  width: 1rem;
  height: 1rem;
  cursor: pointer;
}

.bulk-ca-section {
  margin-bottom: 1.25rem;
}

.bulk-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem 1.25rem;
  margin-top: 0.75rem;
}

.bulk-form-grid-small {
  max-width: 420px;
}

.bulk-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: #4b5563;
}

.bulk-field input {
  font-family: inherit;
  font-size: 0.88rem;
  padding: 0.5rem 0.65rem;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: #fff;
}

.bulk-field input:focus {
  outline: none;
  border-color: #6366f1;
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}

.bulk-creative-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.bulk-creative-toolbar h3 {
  margin: 0;
}

.bulk-creative-table-wrap {
  overflow-x: auto;
  margin-top: 0.75rem;
  border: 1px solid #e5e7ec;
  border-radius: 10px;
  background: #fff;
}

.bulk-creative-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.78rem;
}

.bulk-creative-table th,
.bulk-creative-table td {
  border-bottom: 1px solid #e5e7ec;
  padding: 0.5rem 0.6rem;
  vertical-align: top;
}

.bulk-creative-table th {
  text-align: left;
  background: #f9fafb;
  font-weight: 600;
  color: #374151;
  white-space: nowrap;
}

.bulk-th-hint {
  font-weight: 500;
  color: #9ca3af;
  font-size: 0.72rem;
}

.bulk-creative-num {
  width: 2rem;
  color: #6b7280;
  font-weight: 600;
}

.bulk-input,
.bulk-textarea {
  width: 100%;
  min-width: 8rem;
  font-family: inherit;
  font-size: 0.8rem;
  padding: 0.45rem 0.5rem;
  border: 1px solid #d1d5db;
  border-radius: 6px;
}

.bulk-textarea {
  min-height: 5rem;
  resize: vertical;
  line-height: 1.4;
}

.bulk-ca-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
}

.bulk-download-hint {
  font-size: 0.82rem;
  color: #6b7280;
}

.bulk-clear-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.78rem;
  color: #9ca3af;
  text-decoration: underline;
  padding: 0;
  margin-left: auto;
}

.bulk-clear-btn:hover {
  color: #e63946;
}

.bulk-override-wrap {
  margin-top: 0.35rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.bulk-override-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.72rem;
  color: #9ca3af;
  text-align: left;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.bulk-override-btn:hover {
  color: #6366f1;
}

.bulk-override-btn-active {
  color: #e63946;
}

.bulk-override-input {
  font-size: 0.75rem;
  padding: 0.35rem 0.45rem;
}

/* ─── Responsive ─── */
@media (max-width: 768px) {
  .header {
    flex-direction: column;
    gap: 0.75rem;
    padding: 1rem;
  }

  .hero h2 {
    font-size: 1.75rem;
  }

  .main {
    padding: 1.5rem;
  }

  .main.wide {
    padding: 1.5rem;
  }

  .controls {
    flex-direction: column;
    align-items: stretch;
  }

  .date-filter-bar {
    flex-direction: column;
    align-items: stretch;
  }
}
