/* AtDawn Campaigns — onboarding landing page styles.
 *
 * Designed to read cleanly in screen-record demos: clear hierarchy, generous
 * spacing, no animation, palette stays simple. AdC-leaning brand colors but
 * not slavishly so -- this is creator-facing UX, not an internal AdC tool.
 */

:root {
  --text: #1a1a1a;
  --muted: #555;
  --rule: #e5e5e5;
  --bg: #fafafa;
  --card-bg: #ffffff;
  --accent: #2CA01C;          /* green, AdC-aligned -- primary CTA only */
  --accent-hover: #228014;
  /* Connected-state palette: softer, less saturated so a row of "done"
     cards on the landing page doesn't visually shout. Matches the AdC
     green hue but pulls saturation way down. */
  --connected-rail: #8ec087;
  --connected-bg:   #f3f8f1;
  --connected-border: #d3e3ce;
  --connected-pill-bg: #e6efe2;
  --connected-pill-fg: #3f6e36;
  --error-bg: #fff5f5;
  --error-border: #f5c2c2;
  --disabled: #c8c8c8;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.55;
  font-size: 16px;
}

.container {
  max-width: 760px;
  margin: 0 auto;
  padding: 56px 24px 80px;
}

/* ---------- Header ---------- */

.page-header {
  margin-bottom: 40px;
}

.page-header h1 {
  font-size: 30px;
  margin: 0 0 6px;
  letter-spacing: -0.01em;
}

.subtitle {
  color: var(--muted);
  margin: 0;
  font-size: 16px;
}

/* ---------- Platform cards (index) ---------- */

.platforms {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}

.platform-card {
  background: var(--card-bg);
  border: 1px solid var(--rule);
  border-radius: 10px;
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
}

.platform-card__head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.platform-card__head h2 {
  font-size: 18px;
  margin: 0;
  font-weight: 600;
}

.platform-card--disabled {
  background: #f7f7f7;
  border-style: dashed;
}

.platform-card--disabled h2 {
  color: var(--muted);
}

/* Connected state -- muted green rail + check pill in the header.
   Designed to read as "done" at a glance on a screen-record without the
   page feeling like a row of glowing "go" buttons. */
.platform-card--connected {
  background: var(--connected-bg);
  border-color: var(--connected-border);
  border-left: 4px solid var(--connected-rail);
  padding-left: 17px; /* keep the icon aligned despite the wider left border */
}

.status-pill {
  font-size: 12px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 999px;
  margin-left: auto;
  white-space: nowrap;
}

.status-pill--connected {
  background: var(--connected-pill-bg);
  color: var(--connected-pill-fg);
}

.connected-as {
  margin: 0;
  font-size: 15px;
  color: var(--text);
}

.platform-icon {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  flex: 0 0 28px;
  background: var(--rule);
}

.platform-icon--tiktok    { background: #010101; }
.platform-icon--instagram { background: linear-gradient(135deg, #f58529, #dd2a7b, #8134af); }
.platform-icon--youtube   { background: #ff0000; }
.platform-icon--twitch    { background: #9146ff; }

.hint {
  color: var(--muted);
  font-size: 13px;
  margin: 0;
}

.hint code {
  background: #f0f0f0;
  padding: 2px 5px;
  border-radius: 3px;
  font-size: 12px;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-block;
  padding: 10px 18px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  border: 0;
  cursor: pointer;
  text-align: center;
}

.btn--primary {
  background: var(--accent);
  color: #fff;
}

.btn--primary:hover {
  background: var(--accent-hover);
}

.btn--secondary {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
}

.btn--secondary:hover {
  background: #e6f4e1;
}

.btn--disabled {
  background: var(--disabled);
  color: #6a6a6a;
  cursor: not-allowed;
}

/* The post-OAuth "Connected" state. Disabled button (you can't re-click it
   on a connected card -- use the global Reset link instead), muted green to
   show the action succeeded without looking like a live CTA. */
.btn--done {
  background: var(--connected-pill-bg);
  color: var(--connected-pill-fg);
  border: 1px solid var(--connected-border);
  cursor: default;
  font-weight: 600;
}

.btn--done:hover {
  background: var(--connected-pill-bg);
}

/* Quiet "link" button used for the Reset action -- looks like a text link,
   not a CTA, because resetting is destructive and should be deliberate. */
.btn--link {
  background: transparent;
  color: var(--muted);
  font-weight: 500;
  text-decoration: underline;
  padding: 6px 0;
  font-size: 13px;
}

.btn--link:hover {
  color: var(--text);
}

.reset-row {
  margin: 8px 0 32px;
  text-align: center;
}

/* ---------- Flash banner (post-callback feedback) ---------- */

.flash {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 24px;
  font-size: 14px;
  font-weight: 500;
}

.flash--success {
  background: var(--connected-pill-bg);
  color: var(--connected-pill-fg);
  border: 1px solid var(--connected-border);
}

.flash--info {
  background: #eef4fb;
  color: #1f3c6d;
  border: 1px solid #c1d4e3;
}

.flash-icon {
  font-size: 18px;
  line-height: 1;
}

/* ---------- Callback profile card ---------- */

.profile-card {
  background: var(--card-bg);
  border: 1px solid var(--rule);
  border-radius: 10px;
  padding: 28px;
  display: flex;
  gap: 20px;
  align-items: flex-start;
  margin-bottom: 24px;
}

.profile-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--rule);
  flex: 0 0 72px;
}

.profile-body {
  flex: 1 1 auto;
  min-width: 0;
}

.profile-body h2 {
  font-size: 22px;
  margin: 0 0 16px;
  letter-spacing: -0.005em;
}

.metrics {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px 24px;
}

.metric {
  margin: 0;
}

.metric dt {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin-bottom: 2px;
}

.metric dd {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
}

/* ---------- Error card ---------- */

.error-card {
  background: var(--error-bg);
  border: 1px solid var(--error-border);
  border-radius: 10px;
  padding: 20px 24px;
  margin-bottom: 24px;
  color: #5d2020;
}

.error-card p {
  margin: 0;
}

/* ---------- Actions row + footer ---------- */

.actions {
  margin-bottom: 32px;
}

.page-footer {
  border-top: 1px solid var(--rule);
  padding-top: 24px;
  color: var(--muted);
  font-size: 13px;
}

.page-footer a {
  color: var(--accent);
  text-decoration: none;
}

.page-footer a:hover {
  text-decoration: underline;
}

@media (max-width: 520px) {
  .container { padding: 32px 16px 64px; }
  .page-header h1 { font-size: 24px; }
  .profile-card { flex-direction: column; align-items: center; text-align: center; }
}
