/* My Marketing (marketing.html) — on top of admin.css and workplace.css */
.adm-field textarea, .adm-field select, .mk-row textarea, .mk-row input, .mk-slide-edit input, #accessEmail{
  border:1px solid var(--line); border-radius:9px; padding:8px 10px; font:inherit; font-weight:500; font-size:0.9rem;
  color:var(--ink); width:100%; min-width:0; background:var(--white); resize:vertical;
}
.mk-grid{ display:grid; grid-template-columns:repeat(3, minmax(0, 1fr)); gap:14px 18px; align-items:end; }
.mk-grid .adm-check{ margin-top:0; padding-bottom:9px; }
.mk-span2{ grid-column:span 2; }
.mk-span3{ grid-column:1 / -1; }
.mk-wide{ margin-top:14px; }
.mk-two{ display:grid; grid-template-columns:minmax(0, 1.3fr) minmax(0, 1fr); gap:18px; margin-bottom:18px; }
.mk-two .adm-card{ margin:0; }
.mk-grow{ flex:1; }
.mk-actions{ display:flex; flex-wrap:wrap; gap:8px; align-items:center; margin-top:10px; }
.mk-actions .adm-check{ margin:0 6px 0 0; }
.mk-danger{ color:var(--red) !important; }
.mk-warn{ margin:0 0 10px; }
.mk-label{ font-size:0.8rem; font-weight:600; color:var(--muted); margin:14px 0 6px; }

.mk-mini-list{ display:flex; flex-direction:column; gap:12px; }
.mk-mini{ display:grid; grid-template-columns:64px minmax(0, 1fr); gap:12px; align-items:center; }
.mk-mini-hook{ font-weight:600; color:var(--ink); margin:2px 0; }
.mk-when{ font-size:0.8rem; color:var(--muted); font-weight:600; }
.mk-facts{ display:grid; grid-template-columns:auto minmax(0, 1fr); gap:8px 14px; margin:0; font-size:0.9rem; }
.mk-facts dt{ color:var(--muted); font-weight:600; }
.mk-facts dd{ margin:0; color:var(--ink); }
.mk-schedule, .mk-log{ list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:8px; font-size:0.88rem; }
.mk-schedule li{ display:grid; grid-template-columns:150px minmax(0, 1fr) auto; gap:12px; }
.mk-log li{ line-height:1.45; color:var(--ink); }
.mk-log li.err b{ color:var(--red); }
#modalLog .mk-log{ max-height:60vh; overflow:auto; }

.mk-thumb{ position:relative; width:100%; aspect-ratio:4 / 5; border-radius:12px; overflow:hidden; background:var(--mint-50); border:1px solid var(--line); }
.mk-thumb.small{ width:64px; }
.mk-thumb img{ width:100%; height:100%; object-fit:cover; display:block; }
.mk-thumb.empty{ display:flex; align-items:center; justify-content:center; color:var(--muted); font-size:0.75rem; font-weight:600; }
.mk-count{ position:absolute; right:6px; top:6px; background:rgba(0,0,0,.6); color:#fff; font-size:0.7rem; border-radius:20px; padding:2px 7px; }
.mk-posts{ display:flex; flex-direction:column; gap:16px; margin-top:16px; }
.mk-post{ display:grid; grid-template-columns:200px minmax(0, 1fr); gap:18px; padding:16px; border:1px solid var(--line); border-radius:16px; }
.mk-post-media{ display:flex; flex-direction:column; gap:6px; }
.mk-strip{ display:flex; gap:4px; flex-wrap:wrap; }
.mk-strip img{ width:34px; height:42px; object-fit:cover; border-radius:5px; border:1px solid var(--line); }
.mk-tags{ display:flex; gap:6px; flex-wrap:wrap; margin:4px 0 8px; }
.mk-tags .adm-tag{ margin:0; }
.mk-caption{ margin:0 0 6px; color:var(--ink); line-height:1.5; }
.mk-hash{ margin:0 0 6px; color:var(--primary); font-size:0.85rem; }
.mk-slides{ margin:6px 0; padding-left:20px; font-size:0.86rem; color:var(--ink); }
.mk-note{ margin:6px 0; font-size:0.84rem; color:#9b2c22; background:#fde8e6; border-radius:8px; padding:6px 10px; overflow-wrap:anywhere; }
.mk-metrics{ font-size:0.84rem; color:var(--forest); font-weight:600; }

.mk-rows{ display:flex; flex-direction:column; gap:8px; }
.mk-row{ display:grid; grid-template-columns:220px minmax(0, 1fr) auto; gap:8px; align-items:start; }
.mk-slide-edit{ display:grid; grid-template-columns:1fr 1.3fr 1.3fr; gap:6px; margin-bottom:6px; }

.mk-cards{ display:grid; grid-template-columns:repeat(auto-fill, minmax(280px, 1fr)); gap:12px; }
.mk-card{ border:1px solid var(--line); border-radius:14px; padding:14px; font-size:0.88rem; color:var(--ink); }
.mk-card.off{ opacity:.55; }
.mk-card p{ margin:6px 0; line-height:1.45; }
.mk-card-head{ display:flex; justify-content:space-between; gap:10px; align-items:flex-start; }
.mk-card-head .adm-tag{ margin:0; flex-shrink:0; }
.mk-src{ font-size:0.8rem; }
.mk-details{ margin-top:12px; }
.mk-details summary{ cursor:pointer; font-weight:600; color:var(--forest); font-size:0.88rem; }
.mk-details > .mk-cards{ margin-top:12px; }

.mk-ads{ display:flex; flex-direction:column; gap:14px; margin-top:6px; }
.mk-ad{ border:1px solid var(--line); border-radius:16px; padding:16px; font-size:0.88rem; color:var(--ink); }
.mk-ad p{ margin:6px 0; }
.mk-ad-preview{ border-left:3px solid var(--primary); padding:6px 12px; margin:8px 0; }
.mk-ad-h{ color:#1a0dab; font-size:1rem; font-weight:600; }
.mk-pills{ list-style:none; padding:0; margin:10px 0; display:flex; flex-wrap:wrap; gap:6px; }
.mk-pills li{ background:var(--mint-50); border:1px solid var(--line); border-radius:20px; padding:3px 10px; }
.mk-pills small{ color:var(--muted); }
.mk-plain{ margin:6px 0; padding-left:18px; }
.mk-ad-imgs{ display:flex; gap:10px; margin-top:10px; flex-wrap:wrap; }
.mk-ad-imgs img{ height:110px; border-radius:10px; border:1px solid var(--line); display:block; }
.mk-modal{ max-width:760px; }
.mk-publish{ align-items:flex-start; margin:4px 0 6px; font-weight:500; }
.mk-publish input{ margin-top:4px; }

html:not([data-theme="light"]) .mk-ad-h{ color:#8ab4f8; }
html:not([data-theme="light"]) .adm-field textarea, html:not([data-theme="light"]) .adm-field select,
html:not([data-theme="light"]) .mk-row textarea, html:not([data-theme="light"]) .mk-row input,
html:not([data-theme="light"]) .mk-slide-edit input, html:not([data-theme="light"]) #accessEmail{ background:rgba(255,255,255,0.05); }
html:not([data-theme="light"]) .mk-note{ background:rgba(231,38,8,0.12); color:#ffb4a8; }
html:not([data-theme="light"]) .mk-thumb, html:not([data-theme="light"]) .mk-pills li{ background:rgba(255,255,255,0.04); }

@media (max-width: 900px){
  .mk-grid{ grid-template-columns:repeat(2, minmax(0, 1fr)); }
  .mk-two{ grid-template-columns:1fr; }
}
@media (max-width: 640px){
  .mk-grid{ grid-template-columns:1fr; }
  .mk-span2{ grid-column:auto; }
  .mk-post{ grid-template-columns:1fr; }
  .mk-post .mk-thumb{ max-width:240px; }
  .mk-row{ grid-template-columns:1fr auto; }
  .mk-row textarea{ grid-column:1 / -1; grid-row:2; }
  .mk-slide-edit{ grid-template-columns:1fr; }
  .mk-schedule li{ grid-template-columns:1fr; gap:2px; }
}
#setForm > .adm-card, #paneSettings > .adm-card{ margin-bottom:18px; }
#setForm .adm-save-row{ margin-bottom:18px; }

/* Meta Ads (v120) */
.ma-goals{ display:grid; grid-template-columns:repeat(3, minmax(0, 1fr)); gap:12px; }
.ma-goal{ text-align:left; border:1px solid var(--line); border-radius:16px; padding:16px; background:transparent; cursor:pointer; display:flex; flex-direction:column; gap:6px; color:var(--ink); font:inherit; }
.ma-goal:hover{ border-color:var(--primary); box-shadow:var(--shadow-tight); }
.ma-goal b{ font-family:var(--font-head); color:var(--forest); }
.ma-goal small{ color:var(--muted); line-height:1.4; }
.ma-ic{ width:34px; height:34px; border-radius:10px; display:flex; align-items:center; justify-content:center; background:var(--mint-100); color:var(--primary-dark); font-size:1.1rem; }
.ma-layout{ display:grid; grid-template-columns:minmax(0, 1fr) 320px; gap:22px; align-items:start; }
.ma-step{ border-top:1px solid var(--line); padding:14px 0; }
.ma-step:first-child{ border-top:0; padding-top:0; }
.ma-step-h{ font-weight:700; color:var(--forest); margin-bottom:10px; display:flex; gap:10px; align-items:center; flex-wrap:wrap; }
.ma-step-h .adm-muted{ font-weight:500; font-size:0.82rem; }
.ma-pics{ display:flex; gap:10px; flex-wrap:wrap; }
.ma-pic{ position:relative; width:96px; height:96px; border-radius:12px; overflow:hidden; border:1px solid var(--line); }
.ma-pic img{ width:100%; height:100%; object-fit:cover; display:block; }
.ma-pic button{ position:absolute; top:4px; right:4px; border:0; border-radius:50%; width:22px; height:22px; background:rgba(0,0,0,.6); color:#fff; cursor:pointer; font-size:0.7rem; }
.ma-upload{ cursor:pointer; }
.ma-picker{ margin-top:12px; }
.ma-pick-grid{ display:grid; grid-template-columns:repeat(auto-fill, minmax(78px, 1fr)); gap:6px; max-height:260px; overflow:auto; }
.ma-pick-grid button{ padding:0; border:1px solid var(--line); border-radius:8px; overflow:hidden; cursor:pointer; aspect-ratio:4 / 5; background:none; }
.ma-pick-grid img{ width:100%; height:100%; object-fit:cover; display:block; }
.ma-sg{ margin-bottom:8px; }
.ma-chip{ display:block; width:100%; text-align:left; border:1px solid var(--line); border-radius:10px; padding:8px 10px; margin:4px 0; background:transparent; color:var(--ink); font:inherit; font-size:0.86rem; cursor:pointer; }
.ma-chip:hover{ border-color:var(--primary); }
.ma-count{ font-weight:500; color:var(--muted); }
.ma-count.over{ color:var(--red); }
.ma-side{ position:sticky; top:90px; display:flex; flex-direction:column; gap:12px; }
.ma-preview{ border:1px solid var(--line); border-radius:14px; overflow:hidden; font-size:0.84rem; color:var(--ink); }
.ma-pv-head{ display:flex; align-items:center; gap:8px; padding:8px 10px; }
.ma-pv-head small{ color:var(--muted); margin-left:auto; }
.ma-pv-av{ width:24px; height:24px; border-radius:50%; background:linear-gradient(135deg, #f58529, #dd2a7b, #8134af); }
.ma-pv-img{ position:relative; aspect-ratio:1 / 1; background:var(--mint-50); display:flex; align-items:center; justify-content:center; color:var(--muted); }
.ma-pv-img img{ width:100%; height:100%; object-fit:cover; display:block; }
.ma-pv-cta{ display:flex; justify-content:space-between; align-items:center; gap:8px; padding:8px 10px; border-bottom:1px solid var(--line); }
.ma-pv-cta span{ display:flex; flex-direction:column; font-weight:600; }
.ma-pv-cta small{ color:var(--muted); font-weight:500; }
.ma-pv-cta b{ background:var(--mint-100); color:var(--primary-dark); border-radius:8px; padding:5px 10px; white-space:nowrap; font-size:0.8rem; }
.ma-pv-text{ padding:8px 10px; margin:0; line-height:1.45; }
.ma-need ul{ list-style:none; padding:0; margin:8px 0 0; font-size:0.86rem; display:flex; flex-direction:column; gap:6px; }
.ma-need li span{ display:inline-block; width:16px; color:var(--muted); }
.ma-need li.ok span{ color:var(--primary); font-weight:700; }
.ma-small{ font-size:0.78rem; margin:0; }
.ma-row{ display:grid; grid-template-columns:72px minmax(0, 1fr); gap:14px; }
.ma-row-img{ width:72px; height:72px; border-radius:10px; object-fit:cover; background:var(--mint-50); border:1px solid var(--line); }
.ma-locked .ma-form{ opacity:.85; }
html:not([data-theme="light"]) .ma-pv-img, html:not([data-theme="light"]) .ma-row-img{ background:rgba(255,255,255,0.04); }
@media (max-width: 900px){
  .ma-layout{ grid-template-columns:1fr; }
  .ma-side{ position:static; }
  .ma-goals{ grid-template-columns:1fr; }
}

/* Google Ads launch (v121) */
.ga-logo{ display:flex; gap:8px; align-items:center; }
.ga-logo img{ width:38px; height:38px; border-radius:8px; border:1px solid var(--line); object-fit:cover; background:#fff; }
.ga-logo input{ font-size:0.8rem; }
.ga-pv-search{ padding:12px 14px; font-family:Arial, sans-serif; background:#fff; color:#202124; }
.ga-pv-search small{ color:#202124; }
.ga-pv-url{ font-size:0.8rem; color:#4d5156; margin:2px 0 4px; word-break:break-all; }
.ga-pv-h{ color:#1a0dab; font-size:1.05rem; line-height:1.3; }
.ga-pv-search p{ margin:4px 0 0; color:#4d5156; font-size:0.84rem; line-height:1.4; }
.ga-pv-yt{ display:flex; gap:8px; align-items:center; padding:8px 10px; }
.ga-pv-yt img{ width:30px; height:30px; border-radius:50%; object-fit:cover; background:#fff; }
.ga-pv-yt div{ display:flex; flex-direction:column; }
.ga-pv-yt small{ color:var(--muted); }
.ga-play{ position:absolute; left:50%; top:50%; transform:translate(-50%, -50%); background:rgba(255,0,0,.9); color:#fff; border-radius:12px; padding:6px 14px; font-size:1.1rem; }
.ga-script{ white-space:pre-wrap; background:var(--mint-50); border-radius:10px; padding:10px; font-size:0.86rem; }
.ga-row-g{ display:flex; align-items:center; justify-content:center; font-weight:800; font-size:1.6rem; color:#4285f4; }
.ma-sg .mk-label .tool-btn{ margin-left:8px; padding:2px 10px; font-size:0.78rem; }
html:not([data-theme="light"]) .ga-script{ background:rgba(255,255,255,0.04); }

/* ---------- Meta Ads: boost a post (v134) ---------- */
.ma-chosen-card{ display:flex; gap:12px; align-items:center; padding:10px; border:1px solid var(--line); border-radius:14px; margin-bottom:10px; }
.ma-chosen-card img{ width:72px; height:72px; object-fit:cover; border-radius:10px; flex:0 0 auto; }
.ma-chosen-card b{ display:block; font-size:0.95rem; color:var(--ink); }
.ma-chosen-card small{ display:block; margin-top:4px; color:var(--muted); font-size:0.8rem; line-height:1.45; }
.ma-chosen-card a{ color:var(--primary-dark); text-decoration:underline; }
.ma-posts{ margin-top:10px; }
.ma-post-grid{ display:grid; grid-template-columns:repeat(auto-fill, minmax(140px, 1fr)); gap:10px; margin-top:8px; }
.ma-post{ display:flex; flex-direction:column; gap:6px; text-align:left; padding:8px; border:1px solid var(--line); border-radius:14px;
  background:transparent; color:var(--ink); font:inherit; cursor:pointer; }
.ma-post.on, .ma-post:hover{ border-color:var(--primary); box-shadow:0 0 0 2px rgba(46,155,85,0.25); }
.ma-post-img{ position:relative; display:block; aspect-ratio:4 / 5; border-radius:10px; overflow:hidden; background:var(--mint-50); }
.ma-post-img img{ width:100%; height:100%; object-fit:cover; }
.ma-post-t{ font-size:0.82rem; font-weight:600; line-height:1.35; display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical; overflow:hidden; }
.ma-post small{ font-size:0.74rem; color:var(--muted); }
.ma-plan{ margin:8px 0 14px; padding:14px 16px; border-radius:14px; border:1px solid rgba(46,155,85,0.35); background:rgba(46,155,85,0.08); }
.ma-plan-list, .ma-plan-why{ margin:6px 0 10px; padding-left:18px; font-size:0.88rem; line-height:1.5; }
.ma-plan-list b{ display:inline-block; min-width:64px; }
.ma-plan-why{ color:var(--muted); }
.ma-plan-done{ margin:4px 0 8px; font-weight:600; color:#2E9B55; }
html:not([data-theme="light"]) .ma-plan-done{ color:#7BE3A4; }
@keyframes maFilled{ 0%{ box-shadow:0 0 0 3px rgba(46,155,85,0.55); } 100%{ box-shadow:0 0 0 0 rgba(46,155,85,0); } }
.ma-filled{ animation:maFilled 2.2s ease-out; }

/* ---------- your mobile apps (v139) ---------- */
.ma-apps-box{ margin:6px 0 4px; padding:14px; border:1px solid var(--line); border-radius:14px; }
.ma-apps{ display:flex; flex-direction:column; gap:10px; margin:10px 0; }
.ma-app-row{ display:grid; grid-template-columns:1fr 1fr 1.6fr 1.6fr auto; gap:8px; align-items:end; padding:10px; border-radius:12px; background:var(--mint-50); border:1px solid var(--line); }
.ma-app-row .adm-field{ margin:0; }
@media (max-width: 860px){ .ma-app-row{ grid-template-columns:1fr 1fr; } .ma-app-row .ap-rm{ grid-column:1 / -1; justify-self:start; } }
#maSetupForm .ma-apps-box, #maSetupForm > p.mk-wide{ grid-column:1 / -1; }

/* "Where to show it" picker (v143, assets/js/geo-pick.js): a dropdown with tick boxes */
.geo-field > span{ display:block; }
.geo-pick{ position:relative; }
.geo-btn{ display:flex; align-items:center; gap:8px; width:100%; min-height:38px; border:1px solid var(--line); border-radius:9px; padding:8px 10px;
  font:inherit; font-weight:500; font-size:0.9rem; color:var(--ink); background:var(--white); text-align:left; cursor:pointer; }
.geo-btn:disabled{ opacity:0.6; cursor:default; }
.geo-pick.open .geo-btn{ border-color:var(--primary); }
.geo-sum{ flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.geo-car{ color:var(--muted); font-size:0.8rem; }
.geo-panel{ position:absolute; z-index:40; left:0; top:calc(100% + 6px); width:max(100%, min(340px, calc(100vw - 32px))); max-width:calc(100vw - 32px);
  background:var(--white); border:1px solid var(--line); border-radius:12px; box-shadow:0 14px 40px rgba(0,0,0,0.22); padding:10px; color:var(--ink); }
.geo-q{ width:100%; border:1px solid var(--line); border-radius:9px; padding:8px 10px; font:inherit; font-size:0.9rem; color:var(--ink); background:var(--white); }
.geo-list{ max-height:300px; overflow-y:auto; margin:8px 0; overscroll-behavior:contain; }
.geo-h{ margin:10px 4px 4px; font-size:0.72rem; font-weight:700; letter-spacing:0.04em; text-transform:uppercase; color:var(--muted); }
.geo-row{ display:flex; align-items:center; gap:10px; padding:7px 6px; border-radius:8px; font-size:0.9rem; font-weight:500; color:var(--ink); cursor:pointer; }
.geo-row:hover{ background:rgba(46,155,85,0.08); }
.geo-row input{ width:18px; height:18px; flex:0 0 auto; accent-color:var(--primary); margin:0; }
.geo-row span{ flex:1; min-width:0; }
.geo-row small{ color:var(--muted); font-size:0.75rem; font-weight:500; white-space:nowrap; }
.geo-world{ font-weight:700; }
.geo-none{ padding:8px 6px; }
.geo-foot{ display:flex; justify-content:space-between; gap:8px; padding-top:8px; border-top:1px solid var(--line); }
/* solid, like the site's menus, so the form never shows through */
.geo-panel, html:not([data-theme="light"]) .geo-panel{ background:#181D1B; border-color:rgba(255,255,255,0.12); }
html:not([data-theme="light"]) .geo-q{ background:rgba(255,255,255,0.06); }
html[data-theme="light"] .geo-panel{ background:#FFFFFF; border-color:rgba(30,50,40,0.12); }
html[data-theme="light"] .geo-q{ background:#FFFFFF; }
.adm-card.geo-lift{ position:relative; z-index:60; }
/* Google's reason and the fix under a campaign (v144) */
.ga-help{ margin:8px 0; padding:10px 12px; border-radius:10px; font-size:0.84rem; line-height:1.5; color:var(--ink);
  background:rgba(214,160,40,0.12); border:1px solid rgba(214,160,40,0.4); overflow-wrap:anywhere; }
.ga-help.bad{ background:rgba(200,60,50,0.1); border-color:rgba(200,60,50,0.4); }
.ga-help a{ color:var(--primary-dark); text-decoration:underline; font-weight:600; }
html:not([data-theme="light"]) .ga-help a{ color:#8fe0ae; }
