:root {
  --ink: #0F2A44;
  --ink-2: #2B3F57;
  --muted: #5B6B7F;
  --line: #D5DDE6;
  --bg: #F2F5F8;
  --card: #ffffff;
  --accent: #B8F24A;
  --accent-ink: #0F2A44;
  --accent-strong: #3F6B0E;
  --steel: #1F4C78;
  --ok: #15803d;
  --ok-bg: #ecfdf3;
  --warn: #a16207;
  --warn-bg: #fefce8;
  --err: #b91c1c;
  --err-bg: #fef2f2;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(17,24,39,.06), 0 4px 16px rgba(17,24,39,.05);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font-size: 16px; line-height: 1.5; -webkit-text-size-adjust: 100%; }
a { color: inherit; }
img { max-width: 100%; height: auto; display: block; }

/* top bar */
.topbar { background: var(--ink); color: #fff; position: sticky; top: 0; z-index: 20; }
.topbar .in { max-width: 960px; margin: 0 auto; display: flex; align-items: center; gap: 12px; padding: 10px 16px; }
.brand { font-family: Oswald, ui-sans-serif, system-ui, sans-serif; font-weight: 700; font-size: 19px; text-transform: uppercase; letter-spacing: .02em; text-decoration: none; display: flex; align-items: center; gap: 8px; }
.brand .logo { width: 28px; height: 28px; border-radius: 7px; flex: none; }
.topbar .co { color: #C3CFDC; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; }
.topbar nav { display: flex; gap: 4px; }
.topbar nav a, .topbar nav button { color: #e5e7eb; text-decoration: none; font-size: 14px; padding: 6px 10px; border-radius: 8px; background: none; border: 0; font: inherit; font-size: 14px; cursor: pointer; }
.topbar nav a:hover, .topbar nav button:hover, .topbar nav a.on { background: rgba(255,255,255,.1); color: #fff; }
.menu-toggle { display: none; }
@media (max-width: 640px) {
  .topbar nav { display: none; position: absolute; right: 8px; top: 52px; background: var(--ink); flex-direction: column; padding: 8px; border-radius: 12px; box-shadow: var(--shadow); min-width: 170px; }
  .topbar nav.open { display: flex; }
  .menu-toggle { display: block; background: none; border: 1px solid rgba(255,255,255,.2); color: #fff; border-radius: 8px; padding: 6px 10px; font-size: 14px; }
}

main { max-width: 960px; margin: 0 auto; padding: 16px 16px 96px; }
h1 { font-size: 24px; line-height: 1.2; margin: 8px 0 16px; letter-spacing: -.02em; }
h2 { font-size: 18px; margin: 0 0 12px; }
h3 { font-size: 15px; margin: 0 0 8px; }
p { margin: 0 0 12px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.tiny { font-size: 12px; }

.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; margin-bottom: 16px; }
.card.pad-lg { padding: 20px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 640px) { .grid2 { grid-template-columns: 1fr; } }
.stack > * + * { margin-top: 12px; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--line); background: #fff; color: var(--ink); border-radius: 10px; padding: 10px 14px; font: inherit; font-weight: 600; font-size: 15px; text-decoration: none; cursor: pointer; min-height: 44px; }
.btn:hover { border-color: #cbd5e1; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { filter: brightness(.97); }
.btn.dark { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn.danger { color: var(--err); }
.btn.big { width: 100%; padding: 16px; font-size: 17px; border-radius: 12px; min-height: 56px; }
.btn.sm { padding: 6px 10px; min-height: 34px; font-size: 14px; }
.btn[disabled] { opacity: .55; cursor: wait; }
.linkbtn { background: none; border: 0; padding: 0; font: inherit; color: var(--ink-2); text-decoration: underline; cursor: pointer; }

/* forms */
label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; }
.field { margin-bottom: 14px; }
.hint { font-size: 13px; color: var(--muted); margin-top: 4px; font-weight: 400; }
input[type=text], input[type=email], input[type=password], input[type=url], input[type=tel], textarea, select {
  width: 100%; border: 1px solid #d1d5db; border-radius: 10px; padding: 11px 12px; font: inherit; font-size: 16px; background: #fff; color: var(--ink);
}
textarea { min-height: 96px; resize: vertical; }
input:focus, textarea:focus, select:focus { outline: 2px solid var(--steel); outline-offset: 1px; border-color: var(--steel); }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; margin-bottom: 10px; }
.check input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--accent); flex: none; }
.counter { font-size: 12px; color: var(--muted); text-align: right; margin-top: 2px; }

/* flashes */
.flash { border-radius: 12px; padding: 12px 14px; margin-bottom: 12px; font-size: 15px; }
.flash.ok { background: var(--ok-bg); color: var(--ok); }
.flash.warn { background: var(--warn-bg); color: var(--warn); }
.flash.error { background: var(--err-bg); color: var(--err); }

/* status badges */
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; text-transform: uppercase; letter-spacing: .03em; background: #f3f4f6; color: var(--ink-2); }
.badge.ok { background: var(--ok-bg); color: var(--ok); }
.badge.warn { background: var(--warn-bg); color: var(--warn); }
.badge.err { background: var(--err-bg); color: var(--err); }
.badge.dark { background: var(--ink); color: #fff; }

/* job list */
.jobs { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.job { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; text-decoration: none; display: flex; flex-direction: column; }
.job img { aspect-ratio: 1 / 1; object-fit: cover; width: 100%; background: #e5e7eb; }
.job .b { padding: 10px 12px 12px; }
.job .t { font-weight: 700; font-size: 15px; line-height: 1.3; }
.job .m { color: var(--muted); font-size: 13px; margin-top: 4px; }
.section-title { display: flex; align-items: center; justify-content: space-between; margin: 20px 0 10px; }
.section-title h2 { margin: 0; }
.empty { text-align: center; padding: 28px 16px; color: var(--muted); }

/* stat */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 16px; }
.stat { background: var(--card); border-radius: 12px; padding: 12px; box-shadow: var(--shadow); }
.stat .n { font-size: 24px; font-weight: 800; }
.stat .l { font-size: 12px; color: var(--muted); }

/* upload */
.photo-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.drop { position: relative; border: 2px dashed #cbd5e1; border-radius: 14px; aspect-ratio: 3 / 4; display: grid; place-items: center; text-align: center; color: var(--muted); background: #fff; overflow: hidden; cursor: pointer; }
.drop.has { border-style: solid; border-color: var(--accent-strong); }
.drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.drop img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.drop .lbl { font-weight: 800; color: var(--ink); font-size: 15px; }
.drop .tag { position: absolute; top: 8px; left: 8px; z-index: 2; }
.drop .ic { font-size: 30px; line-height: 1; margin-bottom: 6px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.chip { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 6px 12px; font-size: 14px; cursor: pointer; font: inherit; font-size: 14px; }
.chip:hover { border-color: var(--accent-strong); }
.privacy-note { background: #fff7ed; border: 1px solid #fed7aa; color: #9a3412; border-radius: 12px; padding: 10px 12px; font-size: 14px; margin-bottom: 14px; }
.sticky-cta { position: fixed; left: 0; right: 0; bottom: 0; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: rgba(244,245,247,.94); backdrop-filter: blur(6px); border-top: 1px solid var(--line); z-index: 15; }
.sticky-cta .in { max-width: 960px; margin: 0 auto; display: flex; gap: 10px; }
.sticky-cta .btn { flex: 1; }

/* job review */
.review { display: grid; grid-template-columns: 380px 1fr; gap: 16px; align-items: start; }
@media (max-width: 800px) { .review { grid-template-columns: 1fr; } }
.preview img { border-radius: 12px; }
.ig-preview { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #fff; }
.ig-preview .h { display: flex; align-items: center; gap: 8px; padding: 10px 12px; font-weight: 700; font-size: 14px; }
.ig-preview .av { width: 28px; height: 28px; border-radius: 50%; background: var(--accent); }
.ig-preview .cap { padding: 10px 12px 12px; font-size: 14px; white-space: pre-wrap; }
.ig-preview .cap .tags { color: #1d4ed8; }
.channels { list-style: none; margin: 0; padding: 0; }
.channels li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.channels li:last-child { border-bottom: 0; }
.channels .err-msg { color: var(--err); font-size: 13px; }
.copybox { background: #f9fafb; border: 1px solid var(--line); border-radius: 10px; padding: 10px; font-size: 14px; white-space: pre-wrap; }

/* tables */
table.t { width: 100%; border-collapse: collapse; font-size: 15px; }
table.t th, table.t td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.t th { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.scroll-x { overflow-x: auto; }

/* settings nav */
.subnav { display: flex; gap: 6px; overflow-x: auto; margin-bottom: 16px; padding-bottom: 2px; }
.subnav a { white-space: nowrap; text-decoration: none; padding: 8px 12px; border-radius: 999px; background: #fff; border: 1px solid var(--line); font-size: 14px; font-weight: 600; }
.conn { display: flex; align-items: center; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 10px; }
.conn .ic { width: 36px; height: 36px; border-radius: 9px; display: grid; place-items: center; font-weight: 800; color: #fff; flex: none; }
.conn .grow { flex: 1; min-width: 0; }
pre.code { background: var(--ink); color: #e5e7eb; border-radius: 10px; padding: 12px; font-size: 13px; overflow-x: auto; white-space: pre-wrap; word-break: break-all; }
details summary { cursor: pointer; font-weight: 600; }

/* bare auth pages */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; background: var(--ink); }
.auth .card { width: 100%; max-width: 400px; padding: 24px; }
.auth .brand { color: var(--ink); margin-bottom: 18px; font-size: 20px; }

/* uploading overlay */
.busy { position: fixed; inset: 0; background: rgba(17,24,39,.75); color: #fff; display: none; place-items: center; z-index: 50; text-align: center; padding: 24px; }
.busy.on { display: grid; }
.spinner { width: 44px; height: 44px; border: 4px solid rgba(255,255,255,.25); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.9s linear infinite; margin: 0 auto 14px; }
@keyframes spin { to { transform: rotate(360deg); } }
.progress { width: 220px; height: 6px; background: rgba(255,255,255,.2); border-radius: 99px; overflow: hidden; margin: 12px auto 0; }
.progress i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .2s; }

/* setup checklist */
.setup { border-left: 4px solid var(--accent-strong); }
.progress-line { height: 6px; background: #f3f4f6; border-radius: 99px; overflow: hidden; margin: 10px 0 6px; }
.progress-line i { display: block; height: 100%; background: var(--accent-strong); }
.steps { list-style: none; margin: 0; padding: 0; }
.steps li { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid var(--line); }
.steps li:last-child { border-bottom: 0; }
.steps .tick { width: 24px; height: 24px; border-radius: 50%; border: 2px solid #d1d5db; flex: none; display: grid; place-items: center; font-size: 13px; font-weight: 800; margin-top: 1px; }
.steps li.done .tick { background: var(--ok); border-color: var(--ok); color: #fff; }
.steps li.done strong { color: var(--muted); font-weight: 600; text-decoration: line-through; }
.steps a { text-decoration: none; display: flex; flex-direction: column; flex: 1; }
.steps a strong::after { content: ' →'; color: var(--accent-strong); }

/* settings: one task per card */
.step-card h2 { display: flex; align-items: center; gap: 10px; }
.step-card .num { width: 28px; height: 28px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; font-size: 14px; flex: none; }
.step-card .num.ok { background: var(--ok); }
.choice { display: grid; grid-template-columns: 1fr; gap: 8px; margin: 10px 0; }
.choice button { text-align: left; justify-content: flex-start; font-weight: 600; }
.done-line { display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 12px; background: var(--ok-bg); color: var(--ok); font-weight: 600; margin-bottom: 10px; }
.done-line .grow { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.help { font-size: 14px; color: var(--ink-2); background: #f9fafb; border-radius: 10px; padding: 10px 12px; margin: 8px 0 12px; }
.help ol { margin: 6px 0 0; padding-left: 20px; }

/* Google profile check */
.pcheck { border: 1px solid var(--line); border-radius: 12px; padding: 14px; margin: 12px 0; background: #fbfcfd; }
.pcheck-head { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: baseline; justify-content: space-between; margin-bottom: 8px; }
.pcheck-list { list-style: none; margin: 0 0 12px; padding: 0; }
.pcheck-list li { display: flex; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); }
.pcheck-list li:first-child { border-top: 0; }
.pc-i { flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 13px; margin-top: 1px; }
.pc-ok .pc-i { background: var(--ok-bg); color: var(--ok); }
.pc-warn .pc-i { background: var(--warn-bg); color: var(--warn); }
.pc-bad .pc-i { background: var(--err-bg); color: var(--err); }
.row-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
