/* =====================================================================
   Connectid Client Portal — Styles
   Brand system pulled from connectidcrm-website:
   navy #111111 · gradient #FA5E36→#EB3656 · teal #00b4d8 · gold #f0a500
   Fonts: Poppins (UI), Montserrat (display)
   ===================================================================== */

:root {
  --navy:    #111111;
  --navy2:   #1a1a1a;
  --navy3:   #222222;
  --orange:  #FA5E36;
  --red:     #EB3656;
  --brand-gradient: linear-gradient(135deg, #FA5E36, #EB3656);
  --teal:    #00b4d8;
  --gold:    #f0a500;
  --green:   #1ec98b;

  --white:    #ffffff;
  --off-white:#FAF9F8;
  --gray-100: #FAF9F8;
  --gray-200: #F0EFEE;
  --gray-300: #e4e3e1;
  --gray-400: #adb5bd;
  --gray-500: #8a9099;
  --gray-600: #6c757d;
  --gray-800: #343a40;
  --text:     #1a1a1a;

  --radius:   14px;
  --radius-sm:10px;
  --shadow:   0 4px 24px rgba(0,0,0,0.06);
  --shadow-lg:0 12px 40px rgba(0,0,0,0.12);
  --sidebar-w:248px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text);
  background: var(--off-white);
  -webkit-font-smoothing: antialiased;
}

.hidden { display: none !important; }

/* ============================ LOGIN ============================ */
#login-view {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(900px 500px at 80% -10%, rgba(250,94,54,0.18), transparent 60%),
    radial-gradient(700px 500px at 0% 110%, rgba(235,54,86,0.16), transparent 55%),
    var(--navy);
  padding: 24px;
}
.login-card {
  background: var(--navy2);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 20px;
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 410px;
  padding: 42px 38px 34px;
  color: var(--white);
}
.login-card img.logo { height: 38px; margin-bottom: 26px; }
.login-card h1 {
  font-family: 'Montserrat', sans-serif;
  font-size: 22px; font-weight: 800; letter-spacing: -0.4px;
  margin-bottom: 4px;
}
.login-card p.sub { color: var(--gray-400); font-size: 14px; margin-bottom: 26px; }
.field { margin-bottom: 16px; }
.field label {
  display: block; font-size: 12px; font-weight: 600;
  color: var(--gray-400); margin-bottom: 7px; letter-spacing: 0.3px;
}
.field input {
  width: 100%; padding: 13px 15px;
  background: var(--navy3);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-sm);
  color: var(--white); font-size: 14.5px; font-family: inherit;
  transition: border-color .15s;
}
.field input:focus { outline: none; border-color: var(--orange); }
.btn-primary {
  width: 100%; padding: 14px;
  background: var(--brand-gradient);
  color: #fff; font-weight: 700; font-size: 15px;
  border: none; border-radius: var(--radius-sm);
  cursor: pointer; font-family: inherit;
  box-shadow: 0 8px 22px rgba(235,54,86,0.32);
  transition: transform .12s, box-shadow .12s;
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 12px 28px rgba(235,54,86,0.42); }
.login-error {
  background: rgba(235,54,86,0.14);
  border: 1px solid rgba(235,54,86,0.4);
  color: #ff9db0; font-size: 13px;
  padding: 10px 13px; border-radius: 9px; margin-bottom: 16px;
}
.demo-creds {
  margin-top: 24px; padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.07);
  font-size: 12px; color: var(--gray-500); line-height: 1.9;
}
.demo-creds b { color: var(--gray-300); }
.demo-creds .pill {
  display:inline-block; cursor:pointer;
  background: var(--navy3); border:1px solid rgba(255,255,255,0.08);
  padding: 2px 8px; border-radius: 20px; color: var(--gray-300);
  transition: border-color .15s;
}
.demo-creds .pill:hover { border-color: var(--orange); }

/* ============================ APP SHELL ============================ */
#app-view { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-w);
  background: var(--navy);
  color: var(--white);
  padding: 26px 18px;
  display: flex; flex-direction: column;
  position: fixed; top: 0; bottom: 0; left: 0;
}
.sidebar .logo { height: 30px; margin: 4px 8px 30px; }
.nav-section { font-size: 11px; text-transform: uppercase; letter-spacing: 1px;
  color: var(--gray-600); margin: 18px 12px 8px; }
.nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; border-radius: var(--radius-sm);
  color: var(--gray-400); font-size: 14.5px; font-weight: 500;
  cursor: pointer; transition: background .15s, color .15s; margin-bottom: 3px;
}
.nav-item svg { width: 19px; height: 19px; flex-shrink: 0; }
.nav-item:hover { background: var(--navy2); color: var(--white); }
.nav-item.active { background: var(--brand-gradient); color: #fff; box-shadow: 0 6px 18px rgba(235,54,86,0.3); }
.sidebar-footer { margin-top: auto; padding-top: 18px; border-top: 1px solid rgba(255,255,255,0.07); }
.user-chip { display:flex; align-items:center; gap:11px; padding: 6px 8px; }
.user-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--brand-gradient); display:flex; align-items:center;
  justify-content:center; font-weight:700; font-size:14px; color:#fff; flex-shrink:0;
}
.user-chip .meta { overflow:hidden; }
.user-chip .meta .nm { font-size:13.5px; font-weight:600; color:#fff; white-space:nowrap; text-overflow:ellipsis; overflow:hidden; }
.user-chip .meta .rl { font-size:11.5px; color: var(--gray-500); }
.btn-logout {
  width:100%; margin-top:12px; padding:10px; background:transparent;
  border:1px solid rgba(255,255,255,0.12); color: var(--gray-400);
  border-radius: var(--radius-sm); cursor:pointer; font-family:inherit; font-size:13px;
  transition: border-color .15s, color .15s;
}
.btn-logout:hover { border-color: var(--orange); color:#fff; }

/* ============================ MAIN ============================ */
.main {
  margin-left: var(--sidebar-w);
  flex: 1; min-width: 0; padding: 34px 44px 60px;
}
.main-inner { max-width: 1340px; margin: 0 auto; }
.topbar { display:flex; align-items:flex-start; justify-content:space-between; margin-bottom: 28px; flex-wrap: wrap; gap: 16px; }
.topbar h1 { font-family:'Montserrat',sans-serif; font-size:26px; font-weight:800; letter-spacing:-0.6px; }
.topbar .biz-meta { color: var(--gray-600); font-size: 14px; margin-top: 4px; }
.topbar .biz-meta span { margin-right: 14px; }
.updated-badge {
  font-size: 12.5px; color: var(--gray-600);
  background: var(--white); border:1px solid var(--gray-200);
  padding: 8px 14px; border-radius: 30px; box-shadow: var(--shadow);
}
.updated-badge b { color: var(--text); }

/* client switcher (admin) */
.client-switcher { display:flex; gap:8px; margin-bottom: 26px; flex-wrap: wrap; }
.client-switcher .cs-label { font-size:12px; font-weight:600; color:var(--gray-600); align-self:center; margin-right:4px; text-transform:uppercase; letter-spacing:.5px; }
.cs-btn {
  padding: 8px 16px; border-radius: 30px; font-size: 13.5px; font-weight:600;
  border:1px solid var(--gray-200); background:var(--white); color:var(--gray-800);
  cursor:pointer; font-family:inherit; transition: all .15s;
}
.cs-btn:hover { border-color: var(--orange); }
.cs-btn.active { background: var(--navy); color:#fff; border-color: var(--navy); }
.cs-select {
  padding: 9px 38px 9px 16px; border-radius: 30px; font-size: 13.5px; font-weight: 600;
  border: 1px solid var(--gray-300); background: var(--white); color: var(--gray-800);
  font-family: inherit; cursor: pointer; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%238a9099'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 16px center;
  box-shadow: var(--shadow);
}
.cs-select:focus { outline: none; border-color: var(--orange); }

/* live / sample badges */
.badge-live, .badge-sample {
  display: inline-block; vertical-align: middle; margin-left: 10px;
  font-family: 'Poppins', sans-serif; font-size: 11px; font-weight: 700;
  letter-spacing: .8px; padding: 4px 11px; border-radius: 20px;
}
.badge-live   { color: var(--green); background: rgba(30,201,139,0.13); }
.badge-sample { color: #b9780a; background: rgba(240,165,0,0.15); }

/* clickable table rows (agency overview) */
tr.rowlink { cursor: pointer; transition: background .12s; }
tr.rowlink:hover td { background: var(--gray-100); }

/* GMB pending placeholder */
.placeholder-card { display: flex; gap: 18px; align-items: flex-start; }
.placeholder-card .ph-icon {
  font-size: 26px; width: 54px; height: 54px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,180,216,0.10); border-radius: 14px;
}
.placeholder-card h3 { font-size: 15px; font-weight: 700; }
.placeholder-card p { max-width: 640px; line-height: 1.7; }

/* AI traffic KPI — gold accent to tie it to the AI sections */
.card.ai-kpi { border-color: rgba(240,165,0,0.35); background:
  linear-gradient(180deg, rgba(240,165,0,0.06), rgba(255,255,255,0)) , var(--white); }
.card.ai-kpi .kpi-value { color: #b9780a; }

/* ============================ CONTENT STUDIO ============================ */
.badge-ai {
  display: inline-block; vertical-align: middle; margin-left: 10px;
  font-family: 'Poppins', sans-serif; font-size: 11px; font-weight: 700;
  letter-spacing: .8px; padding: 4px 11px; border-radius: 20px;
  color: #fff; background: var(--brand-gradient);
}

.key-card { border-color: var(--gray-300); }
.key-card.ok { border-color: rgba(30,201,139,0.4); background:
  linear-gradient(180deg, rgba(30,201,139,0.05), rgba(255,255,255,0)), var(--white); }
.key-card a { color: var(--red); }
.key-row { display: flex; gap: 10px; }
.key-row input {
  flex: 1; padding: 12px 14px; font-family: inherit; font-size: 14px;
  border: 1px solid var(--gray-300); border-radius: var(--radius-sm); background: var(--gray-100);
}
.key-row input:focus { outline: none; border-color: var(--orange); background: var(--white); }

.btn-inline { width: auto; padding: 12px 22px; white-space: nowrap; }
.btn-mini {
  font-family: inherit; font-size: 12px; font-weight: 600; cursor: pointer;
  padding: 5px 12px; border-radius: 20px; margin-left: 10px;
  border: 1px solid var(--gray-300); background: var(--white); color: var(--gray-600);
}
.btn-mini:hover { border-color: var(--orange); color: var(--text); }

.field-row { display: grid; grid-template-columns: 1fr 1.4fr; gap: 16px; }
.field-lite label { display: block; font-size: 12.5px; font-weight: 600; margin-bottom: 7px; }
.field-lite input[type="text"], .field-lite textarea {
  width: 100%; padding: 11px 13px; font-family: inherit; font-size: 14px;
  border: 1px solid var(--gray-300); border-radius: var(--radius-sm);
  background: var(--gray-100); resize: vertical;
}
.field-lite input[type="text"]:focus, .field-lite textarea:focus {
  outline: none; border-color: var(--orange); background: var(--white);
}

.gen-row { display: flex; align-items: center; gap: 14px; margin-top: 18px; }
.btn-primary:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; transform: none; }

.output-body {
  white-space: pre-wrap; font-size: 14.5px; line-height: 1.75; color: var(--text);
  max-height: 620px; overflow-y: auto; padding: 4px 2px;
}
.gen-note {
  font-size: 13px; line-height: 1.6; padding: 11px 14px; border-radius: var(--radius-sm);
  margin-bottom: 14px; background: rgba(240,165,0,0.12); color: #8a5a06;
}
.gen-note.warn  { background: rgba(240,165,0,0.16); color: #8a5a06; }
.gen-note.error { background: rgba(235,54,86,0.10); color: #b3253f; }

@media (max-width: 900px) { .field-row { grid-template-columns: 1fr; } }

/* ============================ CONTENT PLAN ============================ */
.settings-card { padding: 0; overflow: hidden; }
.settings-card summary {
  padding: 20px 22px; cursor: pointer; display: flex; flex-direction: column; gap: 3px;
  list-style: none;
}
.settings-card summary::-webkit-details-marker { display: none; }
.settings-card summary::before { content: "▸ "; color: var(--gray-500); }
.settings-card[open] summary::before { content: "▾ "; }
.settings-body {
  display: grid; grid-template-columns: 260px 1fr; gap: 28px;
  padding: 4px 22px 24px; border-top: 1px solid var(--gray-200);
}
.settings-col h4 { font-size: 14px; font-weight: 700; margin: 18px 0 4px; }

.check-grid { display: flex; flex-direction: column; gap: 8px; }
.check {
  display: flex; align-items: center; gap: 10px; padding: 10px 13px; cursor: pointer;
  border: 1px solid var(--gray-200); border-radius: var(--radius-sm); font-size: 13.5px;
  background: var(--gray-100); transition: all .12s;
}
.check.on { background: var(--white); border-color: var(--teal); font-weight: 600; }
.check input { accent-color: var(--teal); width: 16px; height: 16px; }
.check i { color: var(--gray-500); font-size: 12px; font-style: normal; }

.svc-list { max-height: 420px; overflow-y: auto; padding-right: 6px; }
.svc-row {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 11px 0; border-bottom: 1px solid var(--gray-100);
}
.svc-name { font-size: 13.5px; font-weight: 600; }
.svc-name .subtle { display: block; font-weight: 400; margin-top: 2px; }
.svc-prio { display: flex; gap: 6px; flex-shrink: 0; }
.prio {
  font-family: inherit; font-size: 11.5px; font-weight: 600; cursor: pointer;
  padding: 6px 11px; border-radius: 20px; white-space: nowrap;
  border: 1px solid var(--gray-200); background: var(--white); color: var(--gray-600);
}
.prio:hover { border-color: var(--gray-400); }
.prio.on.high   { background: rgba(30,201,139,.14); color: #0d8f61; border-color: transparent; }
.prio.on.normal { background: var(--gray-200); color: var(--gray-800); border-color: transparent; }
.prio.on.off    { background: rgba(235,54,86,.10); color: #b3253f; border-color: transparent; }

.plan-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin: 30px 0 16px; }
.month-nav { display: flex; gap: 8px; flex-shrink: 0; }
.btn-mini:disabled { opacity: .4; cursor: not-allowed; }

.week-card { margin-bottom: 16px; padding: 0; }
.week-head {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 16px 22px; border-bottom: 1px solid var(--gray-200); background: var(--gray-100);
  border-radius: var(--radius) var(--radius) 0 0;
}
.week-num {
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .8px;
  color: var(--gray-600); margin-right: 10px;
}
.week-topic { font-size: 15px; }
.week-items { padding: 6px 22px 14px; }

.plan-item { display: flex; align-items: flex-start; gap: 14px; padding: 14px 0;
  border-bottom: 1px solid var(--gray-100); }
.plan-item:last-child { border-bottom: none; }
.pi-icon { font-size: 18px; width: 26px; text-align: center; flex-shrink: 0; margin-top: 1px; }
.pi-body { flex: 1; min-width: 0; }
.pi-title { font-size: 13.5px; font-weight: 600; }
.pi-why { font-size: 12.5px; color: var(--gray-600); margin-top: 3px; line-height: 1.6; }
.pi-metric { font-size: 12px; color: #0d8f61; font-weight: 600; margin-top: 4px; }
.pi-action { flex-shrink: 0; }
.pi-action .btn-mini { margin-left: 0; }

.mode-badge {
  font-size: 10.5px; font-weight: 700; padding: 2px 8px; border-radius: 20px;
  margin-left: 8px; letter-spacing: .3px; vertical-align: middle;
}
.mode-badge.write  { background: rgba(0,180,216,.14); color: #0a8aa8; }
.mode-badge.video  { background: rgba(123,108,246,.15); color: #5b4cd6; }
.mode-badge.supply { background: rgba(240,165,0,.16); color: #8a5a06; }

@media (max-width: 1000px) {
  .settings-body { grid-template-columns: 1fr; }
  .svc-row { flex-direction: column; align-items: flex-start; gap: 8px; }
}

/* long page paths in tables */
td.pagepath { font-weight: 600; font-size: 12.5px; word-break: break-all; }

/* ---------- KPI grid / cards ---------- */
.section-title {
  display:flex; align-items:center; gap:10px;
  font-family:'Montserrat',sans-serif; font-size:18px; font-weight:700;
  margin: 34px 0 16px; letter-spacing:-0.3px;
}
.section-title .dot { width:9px; height:9px; border-radius:50%; background: var(--brand-gradient); }
.section-title.gbp .dot   { background: var(--teal); }
.section-title.ga .dot    { background: var(--green); }
.section-title.gsc .dot   { background: var(--brand-gradient); }
.section-title.seo .dot   { background: var(--brand-gradient); }
.section-title.ai .dot    { background: var(--gold); }

.grid { display:grid; gap:18px; }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.col-2 { grid-column: span 2; }

.card {
  background: var(--white); border:1px solid var(--gray-200);
  border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow);
}
.card.chart-card { padding: 22px 22px 14px; }
.chart-box { position: relative; height: 220px; width: 100%; }

.kpi .kpi-label { font-size:13px; color: var(--gray-600); font-weight:500; margin-bottom:10px; }
.kpi .kpi-value { font-family:'Montserrat',sans-serif; font-size:30px; font-weight:800; letter-spacing:-1px; line-height:1; }
.kpi .kpi-foot { margin-top:11px; display:flex; align-items:center; gap:7px; font-size:12.5px; color:var(--gray-500); }
.delta { display:inline-flex; align-items:center; gap:3px; font-weight:700; font-size:12.5px; padding:2px 8px; border-radius:20px; }
.delta.up   { color: var(--green); background: rgba(30,201,139,0.12); }
.delta.down { color: var(--red);   background: rgba(235,54,86,0.12); }
.delta.up::before  { content:"▲"; font-size:8px; }
.delta.down::before{ content:"▼"; font-size:8px; }

.card-head { display:flex; align-items:center; justify-content:space-between; margin-bottom: 16px; }
.card-head h3 { font-size:15px; font-weight:700; }
.card-head .hint { font-size:12px; color: var(--gray-500); }

/* rating stars */
.rating-big { display:flex; align-items:baseline; gap:10px; }
.rating-big .num { font-family:'Montserrat',sans-serif; font-size:34px; font-weight:800; }
.stars { color: var(--gold); font-size:18px; letter-spacing:2px; }
.stars .empty { color: var(--gray-300); }

/* gauge (AI visibility) */
.gauge-wrap { display:flex; align-items:center; gap:22px; }
.gauge { position: relative; width: 132px; height: 132px; flex-shrink:0; }
.gauge .gnum { position:absolute; inset:0; display:flex; flex-direction:column; align-items:center; justify-content:center; }
.gauge .gnum b { font-family:'Montserrat',sans-serif; font-size:30px; font-weight:800; line-height:1; }
.gauge .gnum span { font-size:11px; color:var(--gray-500); margin-top:3px; }

/* platform bars */
.bar-row { margin-bottom: 15px; }
.bar-row:last-child { margin-bottom:0; }
.bar-row .bl { display:flex; justify-content:space-between; font-size:13px; margin-bottom:6px; }
.bar-row .bl b { font-weight:600; }
.bar-track { height: 9px; background: var(--gray-200); border-radius: 20px; overflow:hidden; }
.bar-fill { height:100%; border-radius:20px; background: var(--brand-gradient); }
.bar-fill.teal { background: var(--teal); }
.bar-fill.gold { background: linear-gradient(90deg, var(--gold), #ffc44d); }

/* tables */
table { width:100%; border-collapse: collapse; font-size: 13.5px; }
thead th { text-align:left; font-size:11.5px; text-transform:uppercase; letter-spacing:.5px;
  color: var(--gray-500); font-weight:600; padding: 0 12px 12px; border-bottom:1px solid var(--gray-200); }
thead th.r, tbody td.r { text-align:right; }
tbody td { padding: 13px 12px; border-bottom:1px solid var(--gray-100); }
tbody tr:last-child td { border-bottom:none; }
tbody td.kwname { font-weight:600; }
.posbadge { display:inline-block; min-width:26px; text-align:center; font-weight:700; font-size:12.5px;
  padding:3px 8px; border-radius:7px; background: var(--gray-100); }
.posbadge.good { background: rgba(30,201,139,0.14); color: var(--green); }
.posbadge.mid  { background: rgba(240,165,0,0.16); color: #b9780a; }
.change-up   { color: var(--green); font-weight:700; }
.change-down { color: var(--red);   font-weight:700; }
.change-flat { color: var(--gray-500); }

/* distribution pills */
.dist-grid { display:grid; grid-template-columns: repeat(4,1fr); gap:12px; }
.dist-cell { text-align:center; padding: 14px 8px; border-radius: var(--radius-sm); background: var(--gray-100); }
.dist-cell .dn { font-family:'Montserrat',sans-serif; font-size:24px; font-weight:800; }
.dist-cell .dl { font-size:11.5px; color: var(--gray-600); margin-top:3px; }
.dist-cell.t3 .dn { color: var(--green); }
.dist-cell.t10 .dn { color: var(--teal); }

/* AI prompt list */
.prompt-row { display:flex; align-items:center; justify-content:space-between; padding: 12px 0; border-bottom:1px solid var(--gray-100); font-size:13.5px; }
.prompt-row:last-child { border-bottom:none; }
.prompt-row .pq { color: var(--gray-800); }
.tag { font-size:11.5px; font-weight:700; padding:3px 10px; border-radius:20px; }
.tag.yes { background: rgba(30,201,139,0.14); color: var(--green); }
.tag.no  { background: var(--gray-200); color: var(--gray-600); }
.tag.rank { background: rgba(0,180,216,0.14); color: #0a8aa8; margin-left:6px; }

.subtle { color: var(--gray-500); font-size:12.5px; }

@media (max-width: 1100px) {
  .grid-4 { grid-template-columns: repeat(2,1fr); }
  .grid-3 { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 760px) {
  .sidebar { display:none; }
  .main { margin-left:0; padding: 22px; }
  .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .col-2 { grid-column: span 1; }
}

/* agency-only tools inside a client-facing view */
.agency-tool { border-color: rgba(250,94,54,.35); background:
  linear-gradient(180deg, rgba(250,94,54,.05), rgba(255,255,255,0)), var(--white);
  margin-bottom: 18px; }
.mode-badge.cluster { background: rgba(0,180,216,.14); color: #0a8aa8; font-family: ui-monospace, monospace; }

/* area chips in the plan setup */
.area-list { display: flex; flex-wrap: wrap; gap: 8px; }
.area-chip {
  font-family: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer;
  padding: 8px 14px; border-radius: 20px; display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid var(--gray-200); background: var(--gray-100); color: var(--gray-500);
  transition: all .12s;
}
.area-chip span { font-weight: 400; font-size: 11.5px; opacity: .75; }
.area-chip.on { background: var(--white); border-color: var(--teal); color: var(--text); }
.area-chip:not(.on) { text-decoration: line-through; }
.area-chip:hover { border-color: var(--gray-400); }

/* add-your-own target input */
.target-add { display: flex; gap: 8px; }
.target-add input {
  flex: 1; padding: 10px 13px; font-family: inherit; font-size: 13.5px;
  border: 1px solid var(--gray-300); border-radius: var(--radius-sm); background: var(--gray-100);
}
.target-add input:focus { outline: none; border-color: var(--orange); background: var(--white); }
.target-add .btn-mini { margin-left: 0; padding: 8px 16px; }
.area-chip.target { border-color: var(--orange); }
.area-chip.target span { opacity: .5; font-weight: 700; }
.mode-badge.done { background: rgba(30,201,139,.14); color: #0d8f61; }

/* business facts panel */
.facts-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; }
.fact-row label { display: block; font-size: 12.5px; font-weight: 600; margin-bottom: 5px; }
.fact-ok { color: #0d8f61; }
.fact-row input {
  width: 100%; padding: 9px 12px; font-family: inherit; font-size: 13px;
  border: 1px solid var(--gray-300); border-radius: var(--radius-sm); background: var(--gray-100);
}
.fact-row input:focus { outline: none; border-color: var(--orange); background: var(--white); }
.fact-row input::placeholder { font-size: 12px; color: var(--gray-400); }
@media (max-width: 900px) { .facts-grid { grid-template-columns: 1fr; } }
.week-dates { font-size: 12px; color: var(--gray-500); margin-right: 10px; }
.pi-warn { font-size: 12.5px; line-height: 1.6; margin-top: 6px; padding: 8px 11px;
  border-radius: var(--radius-sm); background: rgba(240,165,0,.12); color: #8a5a06; }

/* per-platform posting steps under a generated social post */
.chan-step { padding: 12px 0; border-bottom: 1px solid var(--gray-100); }
.chan-step:last-child { border-bottom: none; }
.cs-name { font-size: 13px; font-weight: 700; margin-bottom: 6px; }
.chan-step ol { margin: 0; padding-left: 20px; }
.chan-step li { font-size: 13px; line-height: 1.7; color: var(--gray-800); }
.chan-step code { background: var(--gray-100); padding: 2px 6px; border-radius: 5px;
  font-size: 12px; display: inline-block; margin-top: 3px; }
.pi-image { display: flex; gap: 9px; align-items: baseline;
            font-size: 12.5px; line-height: 1.6; margin-top: 7px; color: var(--gray-600); }
.pi-image-text { flex: 1; min-width: 0; }
.pi-image b { color: var(--text); }
.pi-loc { margin-top: 8px; padding: 9px 11px; background: var(--gray-50, #f7f7f8);
          border: 1px solid var(--border, #e6e6ea); border-radius: 8px; }
.pi-loc label { display: block; font-size: 11.5px; font-weight: 700; letter-spacing: .02em;
                text-transform: uppercase; color: var(--gray-600); margin-bottom: 5px; }
.pi-loc input { width: 100%; max-width: 280px; padding: 7px 10px; font: inherit; font-size: 13px;
                border: 1px solid var(--border, #e6e6ea); border-radius: 6px; background: #fff; }
.pi-loc input:focus { outline: none; border-color: var(--teal, #00b4d8); }
.pi-loc-note { display: block; margin-top: 5px; font-size: 11.5px; line-height: 1.55; color: var(--gray-600); }
.pi-image .shot-tag { flex: 0 0 auto; display: inline-block; padding: 2px 7px; border-radius: 4px;
                      font-size: 10.5px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; }
.pi-image .shot-tag.new { background: #fdeceb; color: #c0392b; }
.pi-image .shot-tag.archive { background: #e8f7fa; color: #0784a0; }
.agency-only { border-top: 1px dashed var(--border, #e6e6ea); padding-top: 14px; margin-top: 4px; }
.agency-only h4::after { content: "ADMIN"; margin-left: 8px; padding: 2px 6px; border-radius: 4px;
                         background: #111; color: #fff; font-size: 9.5px; letter-spacing: .05em; vertical-align: middle; }
.fact-row-wide { grid-column: 1 / -1; }
.craft-suggest { margin-top: 9px; }
.craft-suggest-lead { display: block; font-size: 11.5px; line-height: 1.55;
                      color: var(--gray-600); margin-bottom: 7px; }
.craft-chip { margin: 0 6px 6px 0; padding: 5px 11px; font: inherit; font-size: 12.5px;
              border: 1px solid var(--border, #e6e6ea); border-radius: 999px;
              background: #fff; color: var(--text); cursor: pointer; transition: all .12s; }
.craft-chip:hover { border-color: var(--teal, #00b4d8); }
.craft-chip::before { content: "+ "; opacity: .5; }
.craft-chip.on { background: #eafaf1; border-color: #34c17b; color: #14663c; font-weight: 600; }
.craft-chip.on::before { content: "✓ "; opacity: 1; }
.pi-image .shot-tag.review { background: #fdf3e3; color: #96650a; }
/* ---------- Article Review ---------- */
.article-card > summary { cursor: pointer; padding: 4px 0; }
.rv-meta { display: block; margin-top: 3px; font-size: 12px; }
.rv-badge { display: inline-block; margin-left: 8px; padding: 2px 8px; border-radius: 999px;
            font-size: 10.5px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; }
.rv-badge.pending { background: #fdf3e3; color: #96650a; }
.rv-badge.approved { background: #eafaf1; color: #14663c; }
.rv-badge.changes { background: #fdeceb; color: #c0392b; }
.rv-body { margin-top: 14px; border-top: 1px solid var(--border, #e6e6ea); padding-top: 16px; }
.rv-lead { font-size: 13px; line-height: 1.65; color: var(--gray-600); margin-bottom: 14px; }
.rv-article { max-width: 68ch; font-size: 15px; line-height: 1.75; }
.rv-article p { margin: 0 0 14px; padding: 3px 8px; margin-left: -8px; border-radius: 5px;
                cursor: pointer; transition: background .12s; }
.rv-article p:hover { background: #f5f9fb; }
.rv-article p.picked { background: #e8f7fa; box-shadow: inset 3px 0 0 var(--teal, #00b4d8); }
.rv-article h2 { font-size: 18px; margin: 24px 0 10px; }
.rv-article a { color: var(--teal, #0784a0); }
.rv-notes { margin: 18px 0; padding: 12px 14px; background: var(--gray-50, #f7f7f8);
            border-radius: 8px; }
.rv-notes h4 { margin: 0 0 8px; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.rv-note { display: flex; gap: 10px; align-items: baseline; font-size: 13px; line-height: 1.6;
           padding: 5px 0; border-top: 1px solid var(--border, #e6e6ea); }
.rv-note:first-of-type { border-top: 0; }
.rv-note-para { flex: 0 0 auto; font-weight: 700; font-size: 11px; color: var(--gray-600);
                text-transform: uppercase; letter-spacing: .03em; }
.rv-note span:nth-child(2) { flex: 1; }
.rv-actions { margin-top: 16px; }
.rv-input { width: 100%; max-width: 68ch; padding: 9px 11px; font: inherit; font-size: 13.5px;
            border: 1px solid var(--border, #e6e6ea); border-radius: 8px; resize: vertical; }
.rv-input:focus { outline: none; border-color: var(--teal, #00b4d8); }
.rv-buttons { display: flex; gap: 8px; margin-top: 9px; align-items: center; }
.rv-foot { margin-top: 10px; font-size: 12px; }
.nav-count { margin-left: auto; padding: 1px 7px; border-radius: 999px;
             background: var(--grad-1, #FA5E36); color: #fff; font-size: 11px; font-weight: 700; }
.rv-badge.held { background: #fdf3e3; color: #96650a; }
.rv-held { margin-top: 14px; }
.rv-badge.updated { background: #e8f7fa; color: #0784a0; }
.queue-card h4 { margin: 0 0 4px; }
.queue-table { width: 100%; border-collapse: collapse; margin: 12px 0; font-size: 13.5px; }
.queue-table td { padding: 7px 10px 7px 0; border-top: 1px solid var(--border, #e6e6ea); }
.queue-table tr:first-child td { border-top: 0; }
.rv-resolved { background: #f2faf5; }
.rv-done { flex: 0 0 auto; font-size: 11.5px; font-weight: 700; color: #14663c; }
.revise-bar { margin-top: 16px; padding: 14px 16px; border-top: 1px solid var(--border, #e6e6ea); }
.revise-bar > label { display: block; font-size: 12.5px; line-height: 1.6; color: var(--gray-600); margin-bottom: 8px; }
.revise-row { display: flex; gap: 8px; }
.revise-row input { flex: 1; padding: 9px 11px; font: inherit; font-size: 13.5px;
                    border: 1px solid var(--border, #e6e6ea); border-radius: 8px; }
.revise-row input:focus { outline: none; border-color: var(--teal, #00b4d8); }
.publish-row { display: flex; gap: 12px; align-items: center; margin-top: 14px;
               padding-top: 14px; border-top: 1px dashed var(--border, #e6e6ea); flex-wrap: wrap; }
#publish-note { font-size: 12.5px; line-height: 1.55; flex: 1; min-width: 220px; }
#publish-note.publish-warn { color: #c0392b; }
.plan-control select { padding: 5px 9px; font: inherit; font-size: 13px;
                       border: 1px solid var(--border, #e6e6ea); border-radius: 6px; background: #fff; }
.plan-control tr.saved { background: #eafaf1; transition: background .2s; }
.tier-pill { display: inline-block; padding: 2px 9px; border-radius: 999px;
             font-size: 11px; font-weight: 700; letter-spacing: .02em; }
.tier-pill.full { background: #eafaf1; color: #14663c; }
.tier-pill.calendar { background: #e8f7fa; color: #0784a0; }
.tier-pill.rnr { background: #f2f2f4; color: #55555f; }
.geogrid-card { margin-bottom: 18px; }
.geogrid-frame { width: 100%; height: 620px; border: 1px solid var(--border, #e6e6ea);
                 border-radius: 10px; background: #fff; display: block; }
.geogrid-img { width: 100%; max-width: 720px; height: auto; display: block; margin: 0 auto;
               border: 1px solid var(--border, #e6e6ea); border-radius: 10px; }
.geogrid-note { margin-top: 12px; font-size: 12.5px; line-height: 1.65; }
.gg-stats { margin: 4px 0 16px; }
.gg-stale { margin-top: 12px; }
.gg-editor { margin-top: 16px; padding-top: 14px; border-top: 1px dashed var(--border, #e6e6ea); }
.gg-editor > summary { cursor: pointer; font-size: 12.5px; font-weight: 700; color: var(--gray-600);
                       text-transform: uppercase; letter-spacing: .04em; }
.gg-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
           gap: 10px; margin: 12px 0; }
.gg-f { display: block; font-size: 12px; }
.gg-f span { display: block; color: var(--gray-600); margin-bottom: 4px; }
.gg-f input { width: 100%; padding: 7px 9px; font: inherit; font-size: 13px;
              border: 1px solid var(--border, #e6e6ea); border-radius: 6px; }
.gg-f input:focus { outline: none; border-color: var(--teal, #00b4d8); }
.gg-actions { display: flex; gap: 9px; align-items: center; flex-wrap: wrap; }
.gg-table { width: 100%; border-collapse: collapse; margin: 6px 0 14px; font-size: 14px; }
.gg-table th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .04em;
               color: var(--gray-600); padding: 0 10px 8px 0; font-weight: 700; }
.gg-table th.r, .gg-table td.r { text-align: right; }
.gg-table td { padding: 9px 10px 9px 0; border-top: 1px solid var(--border, #e6e6ea); }
.gg-table td.gg-bad { color: #c0392b; font-weight: 700; }
.gg-maps { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
           gap: 14px; margin: 4px 0 14px; }
.gg-maps figure { margin: 0; }
.gg-maps img { width: 100%; border: 1px solid var(--border, #e6e6ea); border-radius: 8px; display: block; }
.gg-maps figcaption { margin-top: 6px; font-size: 12px; color: var(--gray-600); }
.gg-krows { margin: 12px 0; }
.gg-khead, .gg-krow { display: grid; grid-template-columns: 2fr repeat(5, .8fr) 1.6fr; gap: 6px; }
.gg-khead { font-size: 10.5px; text-transform: uppercase; letter-spacing: .04em;
            color: var(--gray-600); font-weight: 700; margin-bottom: 5px; }
.gg-krow { margin-bottom: 6px; }
.gg-krow input { width: 100%; padding: 6px 8px; font: inherit; font-size: 12.5px;
                 border: 1px solid var(--border, #e6e6ea); border-radius: 6px; }
.gg-krow input:focus { outline: none; border-color: var(--teal, #00b4d8); }
.research-panel { margin-top: 16px; padding: 16px; border: 1px solid var(--border, #e6e6ea);
                  border-radius: 10px; background: var(--gray-50, #f7f7f8); }
.research-panel h4 { margin: 0 0 6px; }
.research-how { margin: 12px 0; }
.research-how > summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--teal, #0784a0); }
.research-how ul { margin: 10px 0 0; padding-left: 20px; font-size: 13px; line-height: 1.7; color: var(--gray-600); }
.research-how li { margin-bottom: 8px; }
.research-how code { background: #fff; padding: 1px 5px; border-radius: 4px; font-size: 12px; }
.rq-row { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 12px;
          padding: 11px; background: #fff; border: 1px solid var(--border, #e6e6ea); border-radius: 8px; }
.rq-row.ok { border-color: #34c17b; background: #f8fdfa; }
.rq-num { flex: 0 0 auto; font-size: 12px; font-weight: 700; color: var(--gray-600);
          min-width: 22px; padding-top: 6px; }
.rq-row.ok .rq-num { color: #14663c; }
.rq-fields { flex: 1; display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.rq-fields textarea, .rq-fields input { width: 100%; padding: 8px 10px; font: inherit;
    font-size: 13px; border: 1px solid var(--border, #e6e6ea); border-radius: 6px; resize: vertical; }
.rq-fields textarea:focus, .rq-fields input:focus { outline: none; border-color: var(--teal, #00b4d8); }
.rq-err { font-size: 12px; color: #c0392b; line-height: 1.5; }
.rq-del { flex: 0 0 auto; border: 0; background: none; font-size: 18px; color: var(--gray-600);
          cursor: pointer; line-height: 1; padding: 4px 6px; }
.rq-status { margin-top: 10px; font-size: 13px; line-height: 1.6; }
.rq-ready { color: #14663c; }
.revise-scope { margin: 8px 0 9px; padding: 8px 11px; background: #fff;
                border: 1px solid var(--border, #e6e6ea); border-radius: 7px; font-size: 12.5px; }
.revise-scope b { display: block; margin-bottom: 3px; }
.revise-scope b.scoped { color: #0784a0; }
.revise-scope .subtle { line-height: 1.55; }
.btn-link { border: 0; background: none; padding: 0; font: inherit; font-size: 12.5px;
            color: var(--teal, #0784a0); text-decoration: underline; cursor: pointer; }
.revise-alt { display: flex; gap: 10px; align-items: center; margin-top: 10px;
              padding-top: 10px; border-top: 1px dashed var(--border, #e6e6ea); flex-wrap: wrap; }
.revise-alt .subtle { font-size: 12px; flex: 1; min-width: 200px; }
#output-body { user-select: text; }
.dh-group { border-top: 1px solid var(--border, #e6e6ea); padding: 11px 0; }
.dh-group:first-of-type { border-top: 0; }
.dh-group > summary { cursor: pointer; }
.dh-meta { display: block; margin-top: 3px; font-size: 12px; color: var(--gray-600); }
.dh-sent { color: #14663c; font-weight: 600; }
.dh-versions { margin: 10px 0 0 14px; padding-left: 14px; border-left: 2px solid var(--border, #e6e6ea); }
.dh-v { padding: 9px 0; border-top: 1px dashed var(--border, #e6e6ea); }
.dh-v:first-child { border-top: 0; }
.dh-v.current { background: #f5f9fb; margin-left: -10px; padding-left: 10px; border-radius: 6px; }
.dh-v-head { display: flex; gap: 9px; align-items: baseline; flex-wrap: wrap; }
.dh-how { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em;
          color: var(--teal, #0784a0); }
.dh-preview { margin: 5px 0 7px; font-size: 12.5px; line-height: 1.6; color: var(--gray-600); }
.dh-acts { display: flex; gap: 7px; }
.dh-foot { margin-top: 14px; font-size: 12px; }
.plan-item.done .pi-title { color: var(--gray-600); }
.pi-done { display: flex; gap: 7px; align-items: baseline; margin-top: 7px; padding: 6px 9px;
           background: #eafaf1; border-radius: 6px; font-size: 12.5px; line-height: 1.6; color: #14663c; }
.pi-tick { flex: 0 0 auto; font-weight: 700; }
.pi-done b { color: #14663c; }
.pi-done .btn-link { color: #0784a0; margin-left: 4px; }
