/* MODULE: Competitive Intelligence | FILE: styles.css */

/* ── Page layout ───────────────────────────────────────────────── */
.ci-page {
  padding: 2rem;
  max-width: 1280px;
  margin: 0 auto;
  color: #e2e4ec;
}
.ci-page__title {
  font-size: 1.6rem;
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 0.25rem;
}
.ci-page__subtitle {
  font-size: 0.85rem;
  color: #8b8fa3;
  margin: 0 0 1.5rem;
}

/* ── Tabs ──────────────────────────────────────────────────────── */
.ci-page__tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid #2a2f4e;
  padding-bottom: 0.75rem;
  flex-wrap: wrap;
  align-items: center;
}
.ci-page__tab {
  padding: 0.45rem 1rem;
  border: 1px solid #2a2f4e;
  border-radius: 6px;
  background: transparent;
  color: #8b8fa3;
  font-size: 0.82rem;
  cursor: pointer;
  transition: all 0.15s;
}
.ci-page__tab:hover { color: #e2e4ec; border-color: #3b4170; }
.ci-page__tab--active {
  background: #635bff;
  color: #ffffff;
  border-color: #635bff;
}

/* ── Stats row ─────────────────────────────────────────────────── */
.ci-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.ci-stats__card {
  background: #1e2338;
  border: 1px solid #2a2f4e;
  border-radius: 10px;
  padding: 1rem 1.25rem;
}
.ci-stats__label {
  font-size: 0.72rem;
  color: #8b8fa3;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.25rem;
}
.ci-stats__value {
  font-size: 1.5rem;
  font-weight: 700;
  color: #ffffff;
}

/* ── Track form ────────────────────────────────────────────────── */
.ci-track-form {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  align-items: flex-end;
}
.ci-track-form__input {
  flex: 1;
  min-width: 180px;
  padding: 0.55rem 0.75rem;
  background: #1e2338;
  border: 1px solid #2a2f4e;
  border-radius: 6px;
  color: #e2e4ec;
  font-size: 0.85rem;
}
.ci-track-form__input::placeholder { color: #555a72; }
.ci-track-form__btn {
  padding: 0.55rem 1.25rem;
  background: #635bff;
  color: #ffffff;
  border: none;
  border-radius: 6px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background 0.15s;
}
.ci-track-form__btn:hover { background: #5248e0; }
.ci-track-form__btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ── Ad grid ───────────────────────────────────────────────────── */
.ci-ad-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.ci-ad-card {
  background: #1e2338;
  border: 1px solid #2a2f4e;
  border-radius: 10px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.ci-ad-card__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.ci-ad-card__page {
  font-size: 0.82rem;
  font-weight: 600;
  color: #e2e4ec;
}
.ci-ad-card__status {
  font-size: 0.7rem;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  font-weight: 600;
}
.ci-ad-card__status--active { background: rgba(34,197,94,0.15); color: #22c55e; }
.ci-ad-card__status--ended  { background: rgba(239,68,68,0.15); color: #ef4444; }
.ci-ad-card__body {
  font-size: 0.82rem;
  color: #8b8fa3;
  line-height: 1.45;
  max-height: 4.4rem;
  overflow: hidden;
}
.ci-ad-card__title {
  font-size: 0.78rem;
  color: #b0b4c8;
  font-weight: 600;
}
.ci-ad-card__meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  color: #6b7080;
}
.ci-ad-card__themes {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.ci-ad-card__theme-tag {
  font-size: 0.68rem;
  padding: 0.1rem 0.45rem;
  background: rgba(99,91,255,0.15);
  color: #a5a0ff;
  border-radius: 3px;
}
.ci-ad-card__link {
  font-size: 0.78rem;
  color: #635bff;
  text-decoration: none;
}
.ci-ad-card__link:hover { text-decoration: underline; }

/* ── Pagination ────────────────────────────────────────────────── */
.ci-pagination {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  margin-bottom: 1.5rem;
}
.ci-pagination__btn {
  padding: 0.4rem 0.9rem;
  background: #1e2338;
  border: 1px solid #2a2f4e;
  border-radius: 6px;
  color: #8b8fa3;
  font-size: 0.8rem;
  cursor: pointer;
}
.ci-pagination__btn:disabled { opacity: 0.4; cursor: not-allowed; }
.ci-pagination__info {
  font-size: 0.8rem;
  color: #6b7080;
  align-self: center;
}

/* ── Theme cloud ───────────────────────────────────────────────── */
.ci-theme-cloud {
  background: #1e2338;
  border: 1px solid #2a2f4e;
  border-radius: 10px;
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}
.ci-theme-cloud__title {
  font-size: 0.9rem;
  font-weight: 600;
  color: #e2e4ec;
  margin: 0 0 1rem;
}
.ci-theme-cloud__canvas {
  width: 100%;
  height: 300px;
}
.ci-theme-cloud__canvas canvas {
  width: 100%;
  height: 100%;
  display: block;
}

/* ── Activity timeline ─────────────────────────────────────────── */
.ci-timeline {
  background: #1e2338;
  border: 1px solid #2a2f4e;
  border-radius: 10px;
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}
.ci-timeline__title {
  font-size: 0.9rem;
  font-weight: 600;
  color: #e2e4ec;
  margin: 0 0 1rem;
}
.ci-timeline__canvas {
  width: 100%;
  height: 320px;
}
.ci-timeline__canvas canvas {
  width: 100%;
  height: 100%;
  display: block;
}

/* ── Benchmark table ───────────────────────────────────────────── */
.ci-bench-wrap {
  background: #1e2338;
  border: 1px solid #2a2f4e;
  border-radius: 10px;
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}
.ci-bench-wrap__title {
  font-size: 0.9rem;
  font-weight: 600;
  color: #e2e4ec;
  margin: 0 0 1rem;
}
.ci-bench {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}
.ci-bench th {
  text-align: left;
  color: #8b8fa3;
  font-weight: 600;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid #2a2f4e;
}
.ci-bench td {
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid #1a1f36;
  color: #e2e4ec;
}
.ci-bench__better  { color: #22c55e; }
.ci-bench__worse   { color: #ef4444; }
.ci-bench__neutral { color: #f59e0b; }

/* ── Shared ────────────────────────────────────────────────────── */
.ci-loading { color: #8b8fa3; font-size: 0.85rem; text-align: center; padding: 2rem; }
.ci-error   { color: #ef4444; font-size: 0.85rem; background: rgba(239,68,68,0.08); padding: 0.75rem 1rem; border-radius: 8px; margin-bottom: 1rem; }
.ci-empty   { color: #6b7080; font-size: 0.85rem; text-align: center; padding: 3rem; }
