/* ============================================================
   GEO & SEO Tracker — Public / Client CSS
   Palette identitedigital.fr : bleu marine + orange accent
   ============================================================ */

:root {
  --gst-navy:      #0d1b2a;
  --gst-navy-2:    #1a2e45;
  --gst-navy-3:    #243b55;
  --gst-orange:    #e8651a;
  --gst-orange-h:  #f5741f;
  --gst-blue:      #1e6fa8;
  --gst-blue-l:    #e8f2fb;
  --gst-green:     #22c55e;
  --gst-green-l:   #dcfce7;
  --gst-yellow:    #f59e0b;
  --gst-yellow-l:  #fef3c7;
  --gst-purple:    #8b5cf6;
  --gst-purple-l:  #ede9fe;
  --gst-red:       #ef4444;
  --gst-red-l:     #fee2e2;
  --gst-gray:      #64748b;
  --gst-gray-l:    #f1f5f9;
  --gst-border:    #e2e8f0;
  --gst-text:      #0f172a;
  --gst-text-mute: #64748b;
  --gst-white:     #ffffff;
  --gst-radius:    10px;
  --gst-shadow:    0 2px 12px rgba(13,27,42,.08);
  --gst-shadow-md: 0 4px 24px rgba(13,27,42,.12);
  --gst-font:      'Segoe UI', system-ui, -apple-system, sans-serif;
}

/* ── Reset ────────────────────────────────────────────────── */
.gst-client-wrap *,
.gst-client-wrap *::before,
.gst-client-wrap *::after { box-sizing: border-box; }

.gst-client-wrap {
  font-family: var(--gst-font);
  color: var(--gst-text);
  max-width: 100%;
  padding: 0 0 40px;
  line-height: 1.5;
}

/* ── Hero / welcome banner ───────────────────────────────── */
.gst-client-hero {
  background: linear-gradient(135deg, var(--gst-navy) 0%, var(--gst-navy-3) 100%);
  border-radius: var(--gst-radius);
  padding: 28px 32px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.gst-client-hero-content {
  display: flex;
  align-items: center;
  gap: 16px;
}

.gst-client-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--gst-orange);
  color: #fff;
  font-size: 22px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.gst-client-hero h2 {
  color: #fff;
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0 0 4px;
}

.gst-client-hero p {
  color: rgba(255,255,255,.7);
  margin: 0;
  font-size: .9rem;
}

.gst-client-stats-mini {
  display: flex;
  gap: 16px;
}

.gst-mini-stat {
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 8px;
  padding: 10px 20px;
  text-align: center;
  min-width: 80px;
}
.gst-mini-stat strong {
  display: block;
  font-size: 1.5rem;
  font-weight: 800;
  color: #fff;
  line-height: 1;
}
.gst-mini-stat span {
  font-size: .78rem;
  color: rgba(255,255,255,.65);
  margin-top: 4px;
  display: block;
}
.gst-mini-stat--green strong { color: #4ade80; }

/* ── Sections ────────────────────────────────────────────── */
.gst-client-section {
  margin-bottom: 28px;
}

.gst-client-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.gst-client-section-header h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--gst-navy);
  margin: 0;
}

/* ── Filter tabs ─────────────────────────────────────────── */
.gst-filter-tabs {
  display: flex;
  gap: 4px;
  background: var(--gst-gray-l);
  border-radius: 8px;
  padding: 3px;
}

.gst-tab {
  background: none;
  border: none;
  padding: 5px 14px;
  border-radius: 6px;
  font-size: .82rem;
  font-weight: 600;
  color: var(--gst-gray);
  cursor: pointer;
  transition: all .18s;
}
.gst-tab.active,
.gst-tab:hover {
  background: #fff;
  color: var(--gst-navy);
  box-shadow: var(--gst-shadow);
}
.gst-tab.active { color: var(--gst-orange); }

/* ── Campaign accordion cards ────────────────────────────── */
.gst-campaign-card {
  background: #fff;
  border: 1px solid var(--gst-border);
  border-radius: var(--gst-radius);
  margin-bottom: 10px;
  overflow: hidden;
  transition: box-shadow .2s;
}
.gst-campaign-card:hover { box-shadow: var(--gst-shadow-md); }

.gst-campaign-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  cursor: pointer;
  gap: 12px;
  user-select: none;
}

.gst-campaign-card-info {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  flex: 1;
  min-width: 0;
}

.gst-campaign-card-title h4 {
  font-size: .95rem;
  font-weight: 700;
  color: var(--gst-navy);
  margin: 0 0 3px;
}

.gst-campaign-meta {
  font-size: .8rem;
  color: var(--gst-text-mute);
  margin: 0;
}
.gst-campaign-meta a { color: var(--gst-blue); text-decoration: none; }
.gst-campaign-meta a:hover { text-decoration: underline; }

.gst-campaign-card-right {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}

.gst-chevron {
  font-size: 1.3rem;
  color: var(--gst-gray);
  transition: transform .25s;
  line-height: 1;
}
.gst-campaign-card.open .gst-chevron { transform: rotate(90deg); }

/* Progress mini */
.gst-progress-mini {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  min-width: 90px;
}
.gst-progress-bar-mini {
  width: 90px;
  height: 6px;
  background: var(--gst-border);
  border-radius: 99px;
  overflow: hidden;
}
.gst-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gst-orange), var(--gst-orange-h));
  border-radius: 99px;
  transition: width .4s ease;
}
.gst-progress-label {
  font-size: .72rem;
  color: var(--gst-gray);
}

/* Card body (publications) */
.gst-campaign-card-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height .35s ease;
}
.gst-campaign-card.open .gst-campaign-card-body {
  max-height: 600px;
  overflow-y: auto;
}

.gst-pubs-empty {
  padding: 20px 24px;
  color: var(--gst-text-mute);
  font-size: .88rem;
  border-top: 1px solid var(--gst-border);
}

/* ── Publications table ──────────────────────────────────── */
.gst-pubs-table-wrap {
  border-top: 1px solid var(--gst-border);
  overflow-x: auto;
}

.gst-pubs-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .85rem;
}

.gst-pubs-table th {
  background: var(--gst-gray-l);
  color: var(--gst-gray);
  font-weight: 600;
  text-align: left;
  padding: 9px 14px;
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.gst-pubs-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--gst-border);
  vertical-align: middle;
}

.gst-pubs-table tr:last-child td { border-bottom: none; }
.gst-pubs-table tr:hover td { background: var(--gst-gray-l); }

.gst-pub-name { font-weight: 600; color: var(--gst-navy); }
.gst-pub-date { font-size: .75rem; color: var(--gst-text-mute); margin-top: 2px; }

.gst-keyword-chip {
  background: var(--gst-blue-l);
  color: var(--gst-blue);
  padding: 2px 8px;
  border-radius: 99px;
  font-size: .78rem;
  font-weight: 600;
}

.gst-da-score {
  background: var(--gst-navy);
  color: #fff;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: .78rem;
  font-weight: 700;
}

.gst-view-btn {
  display: inline-block;
  padding: 4px 12px;
  background: var(--gst-orange);
  color: #fff !important;
  border-radius: 6px;
  font-size: .78rem;
  font-weight: 600;
  text-decoration: none !important;
  transition: background .15s;
}
.gst-view-btn:hover { background: var(--gst-orange-h); }

/* ── Orders list ─────────────────────────────────────────── */
.gst-orders-list {
  background: #fff;
  border: 1px solid var(--gst-border);
  border-radius: var(--gst-radius);
  overflow: hidden;
}

.gst-order-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid var(--gst-border);
  gap: 12px;
  flex-wrap: wrap;
}
.gst-order-row:last-child { border-bottom: none; }
.gst-order-row:hover { background: var(--gst-gray-l); }

.gst-order-info { display: flex; flex-direction: column; }
.gst-order-num  { font-weight: 700; font-size: .9rem; color: var(--gst-navy); }
.gst-order-date { font-size: .78rem; color: var(--gst-text-mute); }

.gst-order-right {
  display: flex;
  align-items: center;
  gap: 10px;
}
.gst-order-total { font-weight: 700; color: var(--gst-navy); }

/* ── Status badges ───────────────────────────────────────── */
.gst-status {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 99px;
  font-size: .75rem;
  font-weight: 700;
  white-space: nowrap;
}
.gst-status--green  { background: var(--gst-green-l);  color: #15803d; }
.gst-status--orange { background: var(--gst-yellow-l); color: #92400e; }
.gst-status--blue   { background: var(--gst-blue-l);   color: #1e40af; }
.gst-status--purple { background: var(--gst-purple-l); color: #6d28d9; }
.gst-status--gray   { background: var(--gst-gray-l);   color: var(--gst-gray); }
.gst-status--red    { background: var(--gst-red-l);    color: #b91c1c; }
.gst-status--processing { background: var(--gst-blue-l);  color: #1e40af; }
.gst-status--completed  { background: var(--gst-green-l); color: #15803d; }
.gst-status--on-hold    { background: var(--gst-yellow-l);color: #92400e; }

/* ── Type badges ─────────────────────────────────────────── */
.gst-type-badge {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 5px;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .05em;
  text-transform: uppercase;
  flex-shrink: 0;
}
.gst-type-seo     { background: var(--gst-navy);   color: #fff; }
.gst-type-geo     { background: var(--gst-orange);  color: #fff; }
.gst-type-geo_seo { background: linear-gradient(90deg,var(--gst-navy),var(--gst-orange)); color: #fff; }

/* ── Buttons ─────────────────────────────────────────────── */
.gst-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 20px;
  border: none;
  border-radius: 8px;
  font-size: .88rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: all .18s;
  line-height: 1;
}
.gst-btn-primary  { background: var(--gst-orange); color: #fff; }
.gst-btn-primary:hover { background: var(--gst-orange-h); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(232,101,26,.35); color:#fff; }
.gst-btn-ghost    { background: transparent; color: var(--gst-gray); border: 1px solid var(--gst-border); }
.gst-btn-ghost:hover { background: var(--gst-gray-l); color: var(--gst-navy); }
.gst-btn-sm       { padding: 6px 14px; font-size: .8rem; }
.gst-btn-xs       { padding: 3px 9px;  font-size: .75rem; }
.gst-btn-danger   { background: var(--gst-red); color: #fff; }
.gst-btn-danger:hover { background: #dc2626; color:#fff; }

/* ── Misc ────────────────────────────────────────────────── */
.gst-muted  { color: var(--gst-text-mute); font-size:.85rem; }
.gst-alert  {
  background: var(--gst-blue-l);
  border-left: 4px solid var(--gst-blue);
  padding: 14px 18px;
  border-radius: 6px;
  font-size: .9rem;
  color: var(--gst-navy);
}
.gst-alert a { color: var(--gst-orange); }

.gst-client-empty {
  background: #fff;
  border: 1px solid var(--gst-border);
  border-radius: var(--gst-radius);
  padding: 52px 32px;
  text-align: center;
}
.gst-client-empty .gst-empty-icon { font-size: 3rem; margin-bottom: 12px; }
.gst-client-empty h3 { color: var(--gst-navy); margin: 0 0 8px; font-size: 1.1rem; }
.gst-client-empty p  { color: var(--gst-text-mute); margin: 0 0 20px; }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 640px) {
  .gst-client-hero { padding: 20px; flex-direction: column; align-items: flex-start; }
  .gst-client-stats-mini { width: 100%; justify-content: space-between; }
  .gst-campaign-card-right { gap: 8px; }
  .gst-progress-mini { display: none; }
  .gst-pubs-table th:nth-child(5),
  .gst-pubs-table td:nth-child(5) { display: none; }
}
