@import url("https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700&display=swap");
@import url("./dashboard-shared.css");

:root {
  color-scheme: light;
  --ink: #101b2d;
  --muted: #58595B;
  --soft: #f7fafd;
  --soft-blue: #e0f4ff;
  --blue: #17479E;
  --blue-2: #2458B4;
  --navy: #061325;
  --line: #dce7ef;
  --white: #ffffff;
  --green: #16a06b;
  --amber: #F68A46;
  --red: #ED1C24;
  --rose: #ffe9ec;
  --lemon: #fff8cf;
  --lavender: #f0eeff;
  --shadow: 0 18px 42px rgba(16, 27, 45, 0.08);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--soft);
  color: var(--ink);
  font-family: "Gotham", "Montserrat", "Inter", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

/* Sidebar, brand, nav, support-panel → dashboard-shared.css */

.dashboard {
  min-height: 100vh;
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.topbar h1 {
  margin: 0;
  font-size: clamp(22px, 2.5vw, 28px);
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.topbar span,
.detail-subtitle {
  display: block;
  max-width: 670px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.top-actions {
  display: flex;
  gap: 12px;
}

.primary-button,
.ghost-button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0 18px;
  font-size: 14px;
  font-weight: 600;
}

.primary-button {
  border: 0;
  background: var(--blue);
  color: var(--white);
}

.ghost-button {
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--ink);
}

.campaign-panel {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.content-grid {
  display: grid;
  gap: 16px;
  margin-top: 24px;
}

.campaign-panel {
  padding: 18px;
}

.panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.panel-header h2 {
  margin: 0;
  font-size: 17px;
  line-height: 1.2;
}

.filter-row {
  display: flex;
  gap: 8px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f8fbfd;
}

.filter {
  min-height: 32px;
  border: 0;
  border-radius: 999px;
  padding: 0 14px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.filter.active {
  background: var(--navy);
  color: var(--white);
}

.table-toolbar {
  display: grid;
  grid-template-columns: minmax(320px, 1fr);
  gap: 12px;
  margin-top: 26px;
}

label span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

input,
select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 10px;
  outline: 0;
  padding: 0 14px;
  background: #fafcfe;
  color: var(--ink);
  font-size: 14px;
  font-weight: 500;
}

.campaign-list {
  display: grid;
  gap: 12px;
  margin-top: 24px;
}

.campaign-row {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--white);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all 0.2s ease;
}

.campaign-row:hover {
  box-shadow: var(--shadow);
  border-color: var(--blue);
}

.campaign-row[hidden],
.empty-state[hidden] {
  display: none;
}

.campaign-tile-top {
  display: flex;
  padding: 24px;
  gap: 24px;
}

.campaign-tile-thumb {
  width: 160px;
  height: 160px;
  border-radius: 8px;
  background-size: cover;
  background-position: center;
  flex-shrink: 0;
  background-color: #f0f0f0;
}

.campaign-tile-info {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.campaign-tile-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
}

.campaign-id-tag {
  background: #f4f5f7;
  color: #333;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.campaign-tile-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
}

.status-pill {
  padding: 6px 18px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  text-transform: capitalize;
}

.status-pill.indraft { background: #e6f6ec; color: #16a06b; }
.status-pill.live { background: #e0f4ff; color: #17479E; }
.status-pill.review { background: #fff4d7; color: #F68A46; }
.status-pill.completed { background: #f0eeff; color: #2458B4; }

.action-btn {
  padding: 8px 24px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  border: none;
  cursor: pointer;
  transition: opacity 0.2s;
}
.action-btn:hover { opacity: 0.8; }

.edit-btn { background: #000; color: #fff; }
.pause-btn, .details-btn { background: transparent; border: 1px solid var(--line); color: var(--ink); }

.campaign-tile-title {
  margin: 0 0 16px 0;
  font-size: 22px;
  font-weight: 800;
  color: var(--ink);
}

.campaign-tile-details {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.campaign-tile-details li {
  font-size: 13px;
  color: var(--muted);
}

.campaign-tile-details strong {
  color: var(--ink);
  font-weight: 800;
}

.campaign-tile-bottom {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: #fafbfc;
  padding: 20px 24px;
}

.stat-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.stat-label {
  font-size: 13px;
  color: var(--muted);
  font-weight: 700;
}

.stat-val {
  font-size: 16px;
  color: var(--ink);
  font-weight: 800;
}

/* Responsive adjustment for tiles */
@media (max-width: 768px) {
  .campaign-tile-top {
    flex-direction: column;
  }
  .campaign-tile-bottom {
    grid-template-columns: 1fr 1fr;
    gap: 20px;
  }
}

.pay-button {
  background: var(--blue);
  color: var(--white);
}

.edit-button,
.details-button {
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--ink);
}

.details-button {
  color: var(--blue);
}

.empty-state {
  margin: 24px 0 0;
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff 0%, #f4f9ff 100%);
  color: var(--muted);
  text-align: center;
  box-shadow: var(--shadow);
}

.empty-state strong,
.empty-state span {
  display: block;
}

.empty-state strong {
  color: var(--ink);
  font-size: 20px;
  line-height: 1.2;
}

.empty-state span {
  margin-top: 8px;
  font-size: 14px;
}

.empty-state a {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  margin-top: 18px;
  border-radius: 999px;
  padding: 0 18px;
  background: var(--blue);
  color: var(--white);
  font-size: 13px;
  font-weight: 700;
}

@media (max-width: 768px) {
  .panel-header { flex-direction: column; }

  .top-actions,
  .filter-row {
    width: 100%;
    overflow-x: auto;
  }

  .table-toolbar,
  .content-grid {
    grid-template-columns: 1fr;
  }

  .campaign-row {
    grid-template-columns: 120px 1fr;
  }

  .video-thumb {
    width: 120px;
    height: 68px;
  }

  .video-thumb span {
    left: 50px;
    top: 22px;
  }

  .campaign-stat,
  .campaign-actions {
    grid-column: 2;
    justify-self: start;
  }

  .campaign-actions {
    width: min(220px, 100%);
  }
}

/* --- Campaign List Tabs --- */
.campaign-tabs {
  display: flex;
  gap: 12px;
  border-bottom: 2px solid var(--border);
  margin-bottom: 20px;
  padding: 0 4px;
}

.camp-tab {
  border: 0;
  background: transparent;
  padding: 12px 18px;
  font-size: 14px;
  font-weight: 700;
  color: var(--muted);
  cursor: pointer;
  position: relative;
  transition: all 0.2s ease;
}

.camp-tab::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background: transparent;
  transition: all 0.2s ease;
}

.camp-tab:hover {
  color: var(--ink);
}

.camp-tab.active {
  color: var(--blue);
}

.camp-tab.active::after {
  background: var(--blue);
}

