/* ============================================================
   ANOR Ads Analytics — Theme (pastel pink + rose-gold)
   ============================================================ */

:root {
  --bg-grad-1: #fdf3f7;
  --bg-grad-2: #f7e6ec;
  --bg-grad-3: #f4dfe8;

  --rose: #b76e79;           /* rose-gold primary */
  --rose-dark: #9c5b66;
  --rose-soft: #f3d6dd;
  --pink: #f4a7bb;
  --pink-soft: #fbe3ea;
  --gold: #c9a24b;
  --gold-soft: #f3e7cf;

  --text: #3a2b30;
  --muted: #92777f;
  --white: #ffffff;

  --green: #2f9e6e;
  --red: #e5484d;
  --orange: #ef8a2e;
  --amber: #e3a008;
  --purple: #9d6bb5;

  --glass-bg: rgba(255, 255, 255, 0.62);
  --glass-border: rgba(255, 255, 255, 0.8);
  --shadow: 0 12px 40px rgba(183, 110, 121, 0.14);
  --radius: 18px;
}

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

body {
  font-family: 'Inter', system-ui, sans-serif;
  color: var(--text);
  background: linear-gradient(135deg, var(--bg-grad-1) 0%, var(--bg-grad-2) 45%, var(--bg-grad-3) 100%);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

.hidden { display: none !important; }

h1, h2, h3, h4 { font-family: 'Outfit', sans-serif; }

code {
  background: rgba(183, 110, 121, 0.12);
  color: var(--rose-dark);
  padding: 1px 6px;
  border-radius: 6px;
  font-size: 0.85em;
}

/* ---------- Glass ---------- */
.glass {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-weight: 600;
  font-size: 14px;
  padding: 11px 18px;
  border-radius: 12px;
  transition: all 0.18s ease;
  color: var(--text);
}
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn-sm { padding: 8px 14px; font-size: 13px; }

.btn-primary {
  background: linear-gradient(135deg, var(--rose) 0%, var(--pink) 100%);
  color: #fff;
  box-shadow: 0 6px 18px rgba(183, 110, 121, 0.35);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 9px 24px rgba(183, 110, 121, 0.45); }

.btn-secondary {
  background: var(--white);
  border: 1px solid rgba(183, 110, 121, 0.28);
  color: var(--rose-dark);
}
.btn-secondary:hover { background: var(--rose-soft); }

.btn-danger {
  background: linear-gradient(135deg, #d6454a 0%, #e5484d 100%);
  color: #fff;
  box-shadow: 0 6px 18px rgba(229, 72, 77, 0.3);
}
.btn-danger:hover { transform: translateY(-1px); }

.btn-ai {
  background: linear-gradient(135deg, #8b5cf6 0%, var(--rose) 100%);
  color: #fff;
  box-shadow: 0 6px 18px rgba(139, 92, 246, 0.28);
}
.btn-ai:hover {
  transform: translateY(-1px);
  box-shadow: 0 9px 24px rgba(139, 92, 246, 0.4);
}

/* ============================================================
   LOGIN
   ============================================================ */
.login-screen {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  overflow: hidden;
}
.login-bg-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.55;
  animation: float 14s ease-in-out infinite;
}
.orb-1 { width: 420px; height: 420px; background: var(--pink); top: -120px; left: -80px; }
.orb-2 { width: 380px; height: 380px; background: var(--gold); bottom: -140px; right: -60px; animation-delay: -5s; }
.orb-3 { width: 280px; height: 280px; background: var(--rose); top: 40%; right: 22%; animation-delay: -9s; }
@keyframes float {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-24px) scale(1.05); }
}

.login-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 460px;
  padding: 44px 40px;
  text-align: center;
}
.login-brand { margin-bottom: 28px; }
.login-logo {
  width: 64px; height: 64px;
  margin: 0 auto 16px;
  border-radius: 20px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--rose) 0%, var(--pink) 100%);
  color: #fff;
  box-shadow: 0 10px 26px rgba(183, 110, 121, 0.4);
}
.login-logo i { width: 30px; height: 30px; }
.login-brand h1 { font-size: 30px; font-weight: 800; letter-spacing: -0.5px; }
.login-brand h1 span { background: linear-gradient(135deg, var(--rose), var(--pink)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.login-brand p { color: var(--muted); margin-top: 10px; font-size: 14.5px; line-height: 1.6; }

.login-features { text-align: left; margin-bottom: 26px; display: flex; flex-direction: column; gap: 12px; }
.login-feature-item {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 14px;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 12px;
  font-size: 13.5px;
  color: var(--text);
}
.login-feature-item i { width: 18px; height: 18px; color: var(--rose); flex-shrink: 0; }

.btn-fb-login {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  width: 100%;
  padding: 13px;
  background: #fff;
  border: 1px solid #dfe3e8;
  border-radius: 12px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  color: #1877F2;
  cursor: pointer;
  transition: all 0.18s ease;
}
.btn-fb-login:hover { background: #f0f5ff; border-color: #bcd0f7; }

.login-error {
  margin-top: 16px;
  padding: 12px;
  background: rgba(229, 72, 77, 0.12);
  color: var(--red);
  border-radius: 10px;
  font-size: 13.5px;
}
.login-note { margin-top: 18px; font-size: 12px; color: var(--muted); line-height: 1.5; }

/* ============================================================
   APP LAYOUT
   ============================================================ */
.app-container { max-width: 1280px; margin: 0 auto; padding: 20px 24px 60px; }

.main-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  margin-bottom: 22px;
}
.logo { display: flex; align-items: center; gap: 12px; }
.logo-icon {
  width: 42px; height: 42px;
  border-radius: 13px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--rose), var(--pink));
  color: #fff;
}
.logo-icon i { width: 22px; height: 22px; }
.logo h1 { font-size: 21px; font-weight: 800; }
.logo h1 span { background: linear-gradient(135deg, var(--rose), var(--pink)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }

.header-controls { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.header-select select {
  min-width: 190px;
}
.select-wrapper select {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid rgba(183, 110, 121, 0.25);
  border-radius: 11px;
  background: #fff;
  font-family: inherit;
  font-size: 13.5px;
  color: var(--text);
  cursor: pointer;
  outline: none;
}
.select-wrapper select:focus { border-color: var(--rose); }

.user-profile-widget { display: flex; align-items: center; gap: 10px; padding-left: 8px; }
.user-avatar { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; border: 2px solid var(--rose-soft); }
.user-name { font-size: 13.5px; font-weight: 600; }
.btn-logout {
  border: none; background: transparent; cursor: pointer;
  color: var(--muted); padding: 6px;
  border-radius: 8px;
}
.btn-logout:hover { background: var(--rose-soft); color: var(--rose-dark); }
.btn-logout i { width: 18px; height: 18px; }

/* ---------- Summary ---------- */
.summary-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 14px;
  margin-bottom: 20px;
}
.stat-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
}
.stat-icon {
  width: 42px; height: 42px;
  border-radius: 12px;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.stat-icon i { width: 20px; height: 20px; }
.stat-icon.rose { background: var(--rose-soft); color: var(--rose-dark); }
.stat-icon.pink { background: var(--pink-soft); color: #d1627f; }
.stat-icon.gold { background: var(--gold-soft); color: var(--gold); }
.stat-icon.green { background: #d9f0e4; color: var(--green); }
.stat-icon.amber { background: #fbe9d2; color: var(--orange); }
.stat-icon.purple { background: #ece0f3; color: var(--purple); }
.stat-body { display: flex; flex-direction: column; min-width: 0; }
.stat-label { font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.stat-value { font-size: 18px; font-weight: 700; font-family: 'Outfit', sans-serif; }

/* ---------- Insight banner ---------- */
.insight-banner {
  padding: 13px 18px;
  margin-bottom: 16px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid var(--glass-border);
  font-size: 13.5px;
  color: var(--text);
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.banner-bad { color: var(--red); font-weight: 600; background: rgba(229,72,77,0.1); padding: 2px 8px; border-radius: 8px; }
.banner-good { color: var(--green); font-weight: 600; background: rgba(47,158,110,0.12); padding: 2px 8px; border-radius: 8px; }

/* ---------- Filter bar ---------- */
.filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 16px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.filter-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  border: 1px solid rgba(183, 110, 121, 0.22);
  background: #fff;
  color: var(--muted);
  padding: 7px 13px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s ease;
}
.chip span { opacity: 0.7; font-weight: 500; }
.chip:hover { border-color: var(--rose); color: var(--rose-dark); }
.chip.active { background: linear-gradient(135deg, var(--rose), var(--pink)); color: #fff; border-color: transparent; }
.chip.active span { opacity: 1; }

.filter-search { display: flex; align-items: center; gap: 8px; background: #fff; border-radius: 11px; padding: 8px 12px; border: 1px solid rgba(183,110,121,0.22); }
.filter-search i { width: 16px; height: 16px; color: var(--muted); }
.filter-search input { border: none; outline: none; font-family: inherit; font-size: 13.5px; width: 180px; background: transparent; color: var(--text); }

/* ---------- Table ---------- */
.table-card { padding: 8px 8px 16px; overflow: hidden; }
.loading-indicator { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 60px 0; color: var(--muted); }
.spinner {
  width: 34px; height: 34px;
  border: 3px solid var(--rose-soft);
  border-top-color: var(--rose);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.table-scroll { overflow-x: auto; }
.ads-table { width: 100%; border-collapse: collapse; min-width: 980px; }
.ads-table thead th {
  text-align: left;
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--muted);
  font-weight: 600;
  padding: 14px 12px;
  border-bottom: 1px solid rgba(183, 110, 121, 0.14);
  white-space: nowrap;
}
.ads-table tbody td {
  padding: 13px 12px;
  border-bottom: 1px solid rgba(183, 110, 121, 0.08);
  font-size: 13.5px;
  vertical-align: middle;
}
.ad-row { cursor: pointer; transition: background 0.14s ease; }
.ad-row:hover { background: rgba(251, 227, 234, 0.5); }

.td-name { max-width: 240px; }
.ad-name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ad-campaign { font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.td-num { white-space: nowrap; font-variant-numeric: tabular-nums; }

.status-badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 600; white-space: nowrap; }
.st-active { background: #d9f0e4; color: var(--green); }
.st-paused { background: #eee9ec; color: var(--muted); }
.st-unknown { background: #fbe9d2; color: var(--orange); }

.verdict-badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 700; white-space: nowrap; }
.v-stopped { background: rgba(229,72,77,0.14); color: var(--red); }
.v-wasteful { background: rgba(239,138,46,0.15); color: #d2691e; }
.v-fatigued { background: rgba(227,160,8,0.16); color: #b07d06; }
.v-weak { background: rgba(201,162,75,0.18); color: #9a7a2a; }
.v-winner { background: rgba(47,158,110,0.15); color: var(--green); }
.v-healthy { background: rgba(47,158,110,0.1); color: #3a8f66; }

.health-cell { display: flex; flex-direction: column; gap: 5px; align-items: flex-start; }
.health-bar { width: 90px; height: 6px; background: #efe3e7; border-radius: 999px; overflow: hidden; }
.health-fill { height: 100%; border-radius: 999px; transition: width 0.4s ease; }
.health-fill.v-stopped { background: var(--red); }
.health-fill.v-wasteful { background: var(--orange); }
.health-fill.v-fatigued { background: var(--amber); }
.health-fill.v-weak { background: var(--gold); }
.health-fill.v-winner, .health-fill.v-healthy { background: var(--green); }

.btn-row-open {
  border: none; background: transparent; cursor: pointer;
  color: var(--muted); padding: 6px; border-radius: 8px;
}
.btn-row-open:hover { background: var(--rose-soft); color: var(--rose-dark); }
.btn-row-open i { width: 18px; height: 18px; }

.empty-state { text-align: center; padding: 60px 20px; color: var(--muted); }
.empty-state i { width: 42px; height: 42px; margin-bottom: 12px; opacity: 0.5; }
.empty-state p { font-size: 14px; }

/* ============================================================
   MODAL
   ============================================================ */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(58, 43, 48, 0.4);
  display: flex; align-items: center; justify-content: center;
  z-index: 100;
  padding: 24px;
  backdrop-filter: blur(4px);
}
.modal {
  width: 100%;
  max-width: 680px;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--glass-border);
}
.modal-header {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 14px;
  padding: 22px 24px 16px;
  border-bottom: 1px solid rgba(183, 110, 121, 0.12);
}
.modal-header h2 { font-size: 18px; font-weight: 700; }
.detail-sub { color: var(--muted); font-size: 12.5px; margin-top: 4px; }
.btn-close { border: none; background: transparent; cursor: pointer; color: var(--muted); padding: 6px; border-radius: 8px; }
.btn-close:hover { background: var(--rose-soft); color: var(--rose-dark); }
.btn-close i { width: 20px; height: 20px; }

.modal-body { padding: 20px 24px; overflow-y: auto; }

.detail-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 22px;
}
.detail-metric {
  background: var(--pink-soft);
  border-radius: 12px;
  padding: 12px 14px;
  display: flex; flex-direction: column; gap: 4px;
}
.detail-metric span { font-size: 11.5px; color: var(--muted); }
.detail-metric strong { font-size: 15px; font-family: 'Outfit', sans-serif; }

.detail-section { margin-bottom: 20px; }
.detail-section h4 { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; margin-bottom: 10px; color: var(--rose-dark); }
.detail-section h4 i { width: 16px; height: 16px; }

.detail-list { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.detail-list li { padding: 10px 14px; border-radius: 11px; font-size: 13.5px; line-height: 1.55; }
.li-issue { background: rgba(229,72,77,0.08); color: #b03a3f; border-left: 3px solid var(--red); }
.li-rec { background: rgba(47,158,110,0.09); color: #256a4b; border-left: 3px solid var(--green); }
.li-ok { background: rgba(47,158,110,0.09); color: #256a4b; }

.sparkline { width: 100%; height: 130px; }
.spark-area { fill: rgba(244, 167, 187, 0.22); }
.spark-line { fill: none; stroke: var(--rose); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.spark-label { font-size: 9px; fill: var(--muted); }
.no-spark { color: var(--muted); font-size: 13px; padding: 10px 0; }

.modal-footer {
  display: flex; align-items: center; gap: 10px;
  padding: 16px 24px;
  border-top: 1px solid rgba(183, 110, 121, 0.12);
  flex-wrap: wrap;
}
.detail-no-action { color: var(--muted); font-size: 13px; }

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  bottom: 26px;
  left: 50%;
  transform: translateX(-50%);
  padding: 13px 22px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  z-index: 200;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
  animation: toast-in 0.25s ease;
}
.toast.success { background: linear-gradient(135deg, #2f9e6e, #43b27f); }
.toast.error { background: linear-gradient(135deg, #d6454a, #e5484d); }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 10px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1100px) {
  .summary-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 720px) {
  .summary-grid { grid-template-columns: repeat(2, 1fr); }
  .detail-grid { grid-template-columns: repeat(2, 1fr); }
  .main-header { flex-direction: column; align-items: stretch; }
  .header-controls { justify-content: flex-start; }
  .ai-header { flex-direction: column; align-items: flex-start; }
  .ai-controls { width: 100%; justify-content: flex-start; }
}

/* ============================================================
   AUTH GATE STYLES (ADMIN PASSWORD)
   ============================================================ */
.auth-gate-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 10px;
}

.password-input-group {
  position: relative;
  display: flex;
  align-items: center;
}

.admin-pass-input {
  width: 100%;
  padding: 14px 46px 14px 18px;
  background: rgba(255, 255, 255, 0.85);
  border: 1.5px solid var(--glass-border);
  border-radius: 14px;
  font-size: 15px;
  font-family: inherit;
  color: var(--text);
  outline: none;
  transition: all 0.2s ease;
  box-shadow: 0 4px 14px rgba(183, 110, 121, 0.08);
}

.admin-pass-input:focus {
  border-color: var(--rose);
  background: #fff;
  box-shadow: 0 0 0 3.5px rgba(183, 110, 121, 0.2);
}

.btn-toggle-pass {
  position: absolute;
  right: 12px;
  background: transparent;
  border: none;
  color: var(--muted);
  cursor: pointer;
  padding: 6px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-toggle-pass:hover {
  color: var(--rose-dark);
  background: var(--rose-soft);
}

.btn-toggle-pass i {
  width: 18px;
  height: 18px;
}

.auth-gate-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.remember-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
  cursor: pointer;
  user-select: none;
}

.remember-label input[type="checkbox"] {
  accent-color: var(--rose);
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.lock-icon-pulse {
  background: linear-gradient(135deg, var(--rose-dark), var(--rose)) !important;
  color: #fff !important;
  box-shadow: 0 6px 20px rgba(183, 110, 121, 0.35);
}

/* ============================================================
   AI ASSISTANT STYLES
   ============================================================ */
.ai-section {
  margin-top: 24px;
  padding: 24px 28px;
  position: relative;
}

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

.ai-title-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
}

.ai-badge {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--rose) 0%, var(--pink) 100%);
  color: #fff;
  box-shadow: 0 4px 14px rgba(183, 110, 121, 0.3);
}

.ai-badge i {
  width: 22px;
  height: 22px;
}

.ai-subtitle {
  color: var(--muted);
  font-size: 13.5px;
  margin-top: 2px;
}

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

.ai-count-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  color: var(--muted);
  font-weight: 500;
}

.ai-count-select {
  padding: 8px 12px;
  background: #fff;
  border: 1px solid rgba(183, 110, 121, 0.25);
  border-radius: 10px;
  font-family: inherit;
  font-size: 13px;
  color: var(--text);
  outline: none;
  cursor: pointer;
}

.ai-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 36px 16px;
  gap: 12px;
  color: var(--rose-dark);
  font-weight: 500;
  font-size: 14px;
}

.ai-error {
  margin-top: 18px;
  padding: 14px 18px;
  border-radius: 12px;
  background: rgba(229, 72, 77, 0.08);
  border-left: 4px solid var(--red);
  color: #b03a3f;
  font-size: 14px;
  line-height: 1.5;
}

.ai-result-container {
  margin-top: 20px;
  animation: fadeIn 0.3s ease;
}

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

.ai-analysis-card {
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(183, 110, 121, 0.2);
  border-radius: 14px;
  padding: 22px 24px;
}

.ai-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(183, 110, 121, 0.12);
}

.ai-badge-model {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--rose-dark);
  background: var(--pink-soft);
  padding: 4px 10px;
  border-radius: 8px;
}

.ai-badge-model i {
  width: 15px;
  height: 15px;
}

.ai-meta-tag {
  font-size: 12px;
  color: var(--muted);
}

.ai-analysis-body {
  font-size: 14.5px;
  line-height: 1.75;
  color: var(--text);
}

.ai-md-heading {
  margin-top: 14px;
  margin-bottom: 6px;
  color: var(--rose-dark);
  font-weight: 700;
}

.ai-ads-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 18px;
}

.ai-ad-card {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(183, 110, 121, 0.2);
  border-radius: 14px;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 16px rgba(183, 110, 121, 0.06);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.ai-ad-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(183, 110, 121, 0.12);
}

.ai-ad-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(183, 110, 121, 0.1);
}

.ai-ad-index {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  color: var(--rose-dark);
}

.ai-ad-index i {
  width: 15px;
  height: 15px;
}

.ai-ad-content {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}

.ai-ad-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ai-ad-label {
  font-size: 11.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--muted);
}

.ai-ad-headline {
  font-size: 15px;
  color: var(--text);
  line-height: 1.4;
}

.ai-ad-primary-text {
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--text);
}

.ai-ad-desc {
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.4;
}

.ai-ad-footer {
  margin-top: auto;
  padding-top: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px dashed rgba(183, 110, 121, 0.15);
}

.ai-cta-pill {
  background: var(--rose-soft);
  color: var(--rose-dark);
  font-size: 12px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 20px;
}

/* ============================================================
   BOOST POST SECTION
   ============================================================ */
.boost-section {
  margin-top: 24px;
  padding: 24px 28px;
}

.boost-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
}

.boost-title-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
}

.boost-badge {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--rose) 0%, var(--pink) 100%);
  color: #fff;
  box-shadow: 0 6px 16px rgba(183, 110, 121, 0.3);
}

.boost-badge i {
  width: 22px;
  height: 22px;
}

.boost-subtitle {
  color: var(--muted);
  font-size: 13.5px;
  margin-top: 2px;
}

.boost-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.boost-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.boost-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.boost-field label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 6px;
}

.boost-field label i {
  width: 14px;
  height: 14px;
  color: var(--rose);
}

.boost-input {
  width: 100%;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(183, 110, 121, 0.25);
  border-radius: 10px;
  font-family: inherit;
  font-size: 13.5px;
  color: var(--text);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.boost-input:focus {
  border-color: var(--rose);
  box-shadow: 0 0 0 3px rgba(183, 110, 121, 0.15);
}

.boost-field-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.boost-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.boost-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 36px 16px;
  gap: 12px;
  color: var(--rose-dark);
  font-weight: 500;
  font-size: 14px;
}

.boost-error {
  margin-top: 18px;
  padding: 14px 18px;
  border-radius: 12px;
  background: rgba(229, 72, 77, 0.08);
  border-left: 4px solid var(--red);
  color: #b03a3f;
  font-size: 14px;
  line-height: 1.5;
}

.boost-result-container {
  margin-top: 20px;
  animation: fadeIn 0.3s ease;
}

.boost-result-card {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(183, 110, 121, 0.25);
  border-radius: 14px;
  padding: 22px 24px;
  box-shadow: 0 8px 24px rgba(183, 110, 121, 0.1);
}

.boost-result-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(183, 110, 121, 0.12);
}

.boost-result-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: #2f9e6e;
  background: rgba(47, 158, 110, 0.12);
  padding: 4px 12px;
  border-radius: 8px;
}

.boost-result-badge i {
  width: 15px;
  height: 15px;
}

.boost-result-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.boost-result-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
}

.boost-result-item span {
  color: var(--muted);
  font-size: 11.5px;
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.4px;
}

.boost-result-item code {
  font-size: 12.5px;
  word-break: break-all;
}

.boost-result-footer {
  display: flex;
  justify-content: flex-end;
  padding-top: 14px;
  border-top: 1px dashed rgba(183, 110, 121, 0.15);
}

