/**
 * GoTooi — Creator Hub / 創作者登記
 */

.creator-hub-page .app-content {
  padding-top: 0.5rem;
  min-width: 0;
}

.creator-hub {
  display: flex;
  flex-direction: column;
  gap: clamp(1.5rem, 3vw, 2rem);
  max-width: 880px;
  margin-inline: auto;
}

/* ===== Hero ===== */
.ch-hero {
  position: relative;
  padding: clamp(2rem, 5vw, 2.75rem) clamp(1.25rem, 4vw, 2.25rem);
  border-radius: var(--card-radius);
  background: linear-gradient(135deg, #e0f7f4 0%, #eef8ff 48%, #f5f3ff 100%);
  border: 1px solid rgb(91 127 255 / 12%);
  overflow: hidden;
}

[data-theme='dark'] .ch-hero {
  background: linear-gradient(135deg, rgb(91 127 255 / 18%) 0%, rgb(15 23 42 / 55%) 55%, rgb(124 58 237 / 12%) 100%);
  border-color: rgb(45 212 191 / 15%);
}

.ch-hero-visual {
  position: absolute;
  inset: 0;
  background:
    url('/public/img/logo.png') no-repeat right -24px bottom -36px / 160px,
    radial-gradient(circle at 85% 25%, rgb(91 127 255 / 14%), transparent 52%);
  opacity: 0.32;
  pointer-events: none;
}

.ch-hero-inner {
  position: relative;
  z-index: 1;
  max-width: 560px;
}

.ch-hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0 0 0.75rem;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-pill);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--color-teal-dark);
  background: rgb(255 255 255 / 78%);
}

[data-theme='dark'] .ch-hero-eyebrow {
  color: #9bb4ff;
  background: rgb(26 34 66 / 75%);
}

.ch-hero h1 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.55rem, 4.5vw, 2.15rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.ch-hero-lead {
  margin: 0;
  color: var(--color-text-muted);
  font-size: clamp(0.95rem, 2.5vw, 1.05rem);
  line-height: 1.65;
}

.ch-hero--author .ch-hero-inner { max-width: 100%; }

.ch-hero-greeting {
  margin: 0 0 0.35rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-teal-dark);
}

[data-theme='dark'] .ch-hero-greeting { color: #9bb4ff; }

/* ===== Section headings ===== */
.ch-section-head {
  margin: 0 0 1rem;
}

.ch-section-head h2 {
  margin: 0 0 0.25rem;
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.ch-section-head p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

/* ===== Benefits grid ===== */
.ch-benefits-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}

.ch-benefit-card {
  display: flex;
  gap: 0.85rem;
  padding: 1.15rem 1.2rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--card-radius);
  box-shadow: var(--shadow-sm);
  transition: border-color 0.2s var(--ease-out), box-shadow 0.2s var(--ease-out);
}

.ch-benefit-card:hover {
  border-color: rgb(91 127 255 / 25%);
  box-shadow: var(--shadow);
}

.ch-benefit-icon {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 12px;
  background: var(--color-teal-muted);
  color: var(--color-teal-dark);
}

[data-theme='dark'] .ch-benefit-icon {
  background: rgb(91 127 255 / 18%);
  color: #9bb4ff;
}

.ch-benefit-card h3 {
  margin: 0 0 0.2rem;
  font-size: 0.95rem;
  font-weight: 700;
}

.ch-benefit-card p {
  margin: 0;
  font-size: 0.82rem;
  color: var(--color-text-muted);
  line-height: 1.5;
}

/* ===== Steps ===== */
.ch-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
  counter-reset: ch-step;
}

.ch-step {
  position: relative;
  padding: 1.15rem 1.1rem 1.15rem 1.2rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--card-radius);
  box-shadow: var(--shadow-sm);
}

.ch-step::before {
  counter-increment: ch-step;
  content: counter(ch-step);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.65rem;
  height: 1.65rem;
  margin-bottom: 0.65rem;
  border-radius: 50%;
  font-size: 0.78rem;
  font-weight: 700;
  color: #fff;
  background: var(--color-primary);
}

.ch-step h3 {
  margin: 0 0 0.25rem;
  font-size: 0.92rem;
  font-weight: 700;
}

.ch-step p {
  margin: 0;
  font-size: 0.82rem;
  color: var(--color-text-muted);
  line-height: 1.5;
}

/* ===== Status banners ===== */
.ch-status {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1rem 1.15rem;
  border-radius: var(--card-radius);
  font-size: 0.9rem;
  line-height: 1.55;
}

.ch-status-icon {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 10px;
}

.ch-status-body strong {
  display: block;
  margin-bottom: 0.15rem;
  font-weight: 700;
}

.ch-status--pending {
  background: var(--color-accent-light);
  border: 1px solid rgb(255 145 77 / 28%);
  color: #9a3412;
}

.ch-status--pending .ch-status-icon {
  background: rgb(255 145 77 / 18%);
  color: var(--color-accent);
}

[data-theme='dark'] .ch-status--pending {
  background: rgb(234 88 12 / 12%);
  border-color: rgb(234 88 12 / 25%);
  color: #fdba74;
}

.ch-status--rejected {
  background: #fee2e2;
  border: 1px solid #fecaca;
  color: #991b1b;
}

.ch-status--rejected .ch-status-icon {
  background: rgb(220 38 38 / 12%);
  color: #dc2626;
}

[data-theme='dark'] .ch-status--rejected {
  background: rgb(127 29 29 / 25%);
  border-color: rgb(127 29 29 / 45%);
  color: #fca5a5;
}

/* ===== Cards (form, prefs, resources) ===== */
.ch-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--card-radius);
  box-shadow: var(--shadow-sm);
  padding: clamp(1.2rem, 3vw, 1.5rem);
}

.ch-card-title {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.ch-card-lead {
  margin: 0 0 1.15rem;
  font-size: 0.88rem;
  color: var(--color-text-muted);
  line-height: 1.55;
}

.ch-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 0.25rem;
}

/* ===== Quick actions (author) ===== */
.ch-actions-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
}

.ch-action-card {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  padding: 1.25rem 1.15rem;
  border-radius: var(--card-radius);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s var(--ease-out), box-shadow 0.2s var(--ease-out), border-color 0.2s;
}

.ch-action-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  border-color: rgb(91 127 255 / 22%);
  text-decoration: none;
  color: inherit;
}

.ch-action-card--primary {
  border: none;
  background: linear-gradient(135deg, #5b7fff 0%, #4a6ae6 100%);
  color: #fff;
  box-shadow: 0 8px 28px rgb(91 127 255 / 28%);
}

.ch-action-card--primary:hover {
  border: none;
  color: #fff;
  box-shadow: 0 12px 36px rgb(91 127 255 / 35%);
}

.ch-action-icon {
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 12px;
  background: var(--color-teal-muted);
  color: var(--color-teal-dark);
}

.ch-action-card--primary .ch-action-icon {
  background: rgb(255 255 255 / 20%);
  color: #fff;
}

[data-theme='dark'] .ch-action-icon {
  background: rgb(91 127 255 / 18%);
  color: #9bb4ff;
}

.ch-action-card h3 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
}

.ch-action-card p {
  margin: 0;
  font-size: 0.8rem;
  opacity: 0.82;
  line-height: 1.45;
}

.ch-action-card:not(.ch-action-card--primary) p {
  color: var(--color-text-muted);
  opacity: 1;
}

/* ===== Resources ===== */
.ch-resources-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}

.ch-resource-link {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 1rem 1.1rem;
  border-radius: var(--card-radius);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s, background 0.2s;
}

.ch-resource-link:hover {
  border-color: rgb(91 127 255 / 25%);
  background: var(--color-teal-muted);
  text-decoration: none;
  color: inherit;
}

[data-theme='dark'] .ch-resource-link:hover {
  background: rgb(91 127 255 / 10%);
}

.ch-resource-icon {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 10px;
  background: var(--color-teal-muted);
  color: var(--color-teal-dark);
}

[data-theme='dark'] .ch-resource-icon {
  background: rgb(91 127 255 / 18%);
  color: #9bb4ff;
}

.ch-resource-text strong {
  display: block;
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 0.1rem;
}

.ch-resource-text span {
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .creator-hub-page .app-content {
    padding-left: max(var(--gutter), env(safe-area-inset-left));
    padding-right: max(var(--gutter), env(safe-area-inset-right));
    padding-bottom: calc(1.5rem + env(safe-area-inset-bottom));
    overflow-x: clip;
  }

  .creator-hub {
    min-width: 0;
    gap: 1.25rem;
  }

  .ch-benefits-grid,
  .ch-steps,
  .ch-actions-grid,
  .ch-resources-grid {
    grid-template-columns: 1fr;
  }

  .ch-hero {
    padding: 1.5rem 1rem;
    border-radius: var(--radius);
  }

  .ch-hero-visual {
    background-position: right -36px bottom -32px;
    background-size: 110px;
    opacity: 0.2;
  }

  .ch-status {
    flex-direction: row;
    flex-wrap: wrap;
    min-width: 0;
  }

  .ch-status-body {
    flex: 1;
    min-width: 0;
  }

  .ch-card {
    min-width: 0;
  }

  .ch-card .form-control,
  .ch-card textarea,
  .ch-card select {
    min-width: 0;
    max-width: 100%;
  }

  .ch-card-actions {
    flex-direction: column;
  }

  .ch-card-actions .btn {
    width: 100%;
    justify-content: center;
    min-height: 44px;
  }

  .ch-action-card,
  .ch-benefit-card,
  .ch-resource-link {
    min-width: 0;
  }

  .ch-resource-text {
    min-width: 0;
  }
}

@media (max-width: 480px) {
  .ch-hero {
    padding: 1.25rem 0.9rem;
  }

  .ch-hero h1 {
    font-size: 1.4rem;
  }

  .ch-hero-lead {
    font-size: 0.9rem;
  }

  .ch-hero-eyebrow {
    font-size: 0.68rem;
    padding: 0.3rem 0.7rem;
  }

  .ch-hero-visual {
    opacity: 0.12;
    background-size: 72px;
    background-position: right -28px bottom -24px;
  }

  .ch-benefit-card,
  .ch-step,
  .ch-action-card {
    padding: 1rem;
  }

  .ch-section-head h2 {
    font-size: 1rem;
  }
}

@media (min-width: 769px) and (max-width: 900px) {
  .ch-benefits-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
