/* Dharra Labs app styles (Sprout-style layout).
   Brand: Green #008F72, Gold #F5B400, White #FFFFFF; Charcoal #34313C is used for text only. */
@font-face {
  font-family: "Inter";
  src: url("/fonts/inter.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
:root {
  --green: #008F72;
  --green-dark: #00735C;
  --green-ink: #005A48;
  --green-soft: #E6F4F0;
  --gold: #F5B400;
  --gold-soft: #FFF6DB;
  --gold-line: #F5D987;
  --gold-ink: #7A5600;
  --text: #34313C;
  --muted: #6B6873;
  --white: #FFFFFF;
  --bg: #F6F5F2;
  --line: #E7E4DD;
  --line-soft: #EFEDE8;
  --chip: #EFEDE8;
  --danger: #B42318;
  --danger-soft: #FDECEA;
  --ig: #C13584;
  --fb: #1877F2;
  --radius: 14px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: var(--font); font-size: 14px; line-height: 1.5; color: var(--text); background: var(--bg); }
a { color: var(--green-dark); text-decoration: none; }
a:hover { color: var(--green-ink); }
h1, h2, h3 { margin: 0; line-height: 1.25; color: var(--text); }
h1 { font-size: 24px; font-weight: 700; }
h2 { font-size: 17px; font-weight: 700; }
p { margin: 0; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.sr-only { position: absolute; left: -9999px; }
svg.i { width: 18px; height: 18px; flex: 0 0 18px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- forms + buttons ---------- */
.field { display: grid; gap: 6px; margin-bottom: 16px; }
.field label { font-weight: 600; font-size: 14px; }
.field .hint { font-size: 12px; color: var(--muted); }
input[type=text], input[type=email], input[type=password], input[type=search], select, textarea {
  width: 100%; height: 42px; padding: 0 12px; font: inherit; color: var(--text);
  background: var(--white); border: 1px solid var(--line); border-radius: 10px; outline: none;
}
textarea { height: auto; padding: 12px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(0, 143, 114, .15); }
input[readonly] { background: var(--bg); color: var(--muted); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 42px; padding: 0 16px;
  font: inherit; font-weight: 700; border-radius: 10px; border: 1px solid transparent; cursor: pointer; white-space: nowrap;
  background: var(--green); color: var(--white);
}
.btn:hover { background: var(--green-dark); color: var(--white); }
.btn-block { width: 100%; }
.btn-ghost { background: var(--white); color: var(--text); border-color: var(--line); font-weight: 600; }
.btn-ghost:hover { background: var(--bg); color: var(--text); }
.btn-gold { background: var(--gold); color: var(--text); }
.btn-gold:hover { background: #E0A500; color: var(--text); }
.btn-danger { background: var(--white); color: var(--danger); border-color: #F1C4BF; font-weight: 600; }
.btn-danger:hover { background: var(--danger-soft); color: var(--danger); }
.btn-sm { height: 34px; padding: 0 12px; font-size: 13px; }
.linkbtn { background: none; border: 0; padding: 0; font: inherit; color: var(--green-dark); font-weight: 600; cursor: pointer; }
.linkbtn:hover { color: var(--green-ink); }
.inline-form { display: inline; margin: 0; }

/* ---------- alerts + badges ---------- */
.alert { padding: 12px 14px; border-radius: 10px; margin-bottom: 16px; font-size: 14px; border: 1px solid transparent; }
.alert-success { background: var(--green-soft); border-color: #BFE3DA; color: var(--green-ink); }
.alert-error { background: var(--danger-soft); border-color: #F1C4BF; color: var(--danger); }
.alert-info { background: var(--gold-soft); border-color: var(--gold-line); color: var(--gold-ink); }
.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--chip); color: var(--text); white-space: nowrap; }
.badge-gold { background: var(--gold); }
.badge-green { background: var(--green-soft); }
.badge-amber { background: var(--gold-soft); }
.badge-red { background: var(--danger-soft); color: var(--danger); }

/* Google button (Google sign-in branding) */
.btn-google { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; height: 44px; border: 1px solid #DADCE0; border-radius: 10px; background: var(--white); color: var(--text); font-weight: 600; }
.btn-google:hover { background: #F8F9FA; color: var(--text); }
.or { display: flex; align-items: center; gap: 12px; margin: 18px 0; color: var(--muted); font-size: 13px; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* ---------- auth pages: centered card ---------- */
.auth-body { border-top: 4px solid var(--gold); min-height: 100vh; }
.auth-wrap { min-height: calc(100vh - 4px); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px 16px; }
.auth-logo { margin-bottom: 22px; }
.auth-card { width: 100%; max-width: 420px; background: var(--white); border: 1px solid var(--line); border-radius: 16px; padding: 32px 28px; }
.auth-card h1 { margin-bottom: 6px; }
.auth-card .sub { color: var(--muted); margin-bottom: 24px; }
.auth-foot { margin-top: 18px; text-align: center; font-size: 14px; color: var(--muted); }
.auth-copy { margin-top: 22px; font-size: 13px; color: var(--muted); }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 12px; }

/* ---------- brand ---------- */
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; color: var(--text); }
.brand:hover { color: var(--text); }
.brand-mark { width: 34px; height: 34px; border-radius: 9px; background: var(--green); color: var(--white); display: grid; place-items: center; font-size: 14px; font-weight: 800; }
.brand b { color: var(--green-dark); font-weight: 700; }

/* ---------- app shell ---------- */
.layout { display: flex; flex-wrap: wrap; min-height: 100vh; }
.sidebar { flex: 1 1 232px; max-width: 100%; background: var(--green); color: var(--white); padding: 20px 14px; display: flex; flex-direction: column; gap: 4px; }
.sidebar .brand { color: var(--white); padding: 4px 8px 18px; }
.sidebar .brand-mark { background: var(--gold); color: var(--text); }
.sidebar .brand b { color: var(--gold); }
.sb-create { display: flex; align-items: center; justify-content: center; gap: 8px; height: 44px; border-radius: 10px; background: var(--gold); color: var(--text); font-weight: 700; margin-bottom: 14px; }
.sb-create:hover { background: #E0A500; color: var(--text); }
.sb-create.active { background: var(--white); color: var(--green-dark); }
.sb-nav { display: flex; flex-direction: column; gap: 2px; }
.sb-nav a, .sb-foot a, .sb-foot button {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; border-radius: 9px; color: var(--white); font: inherit; font-weight: 600;
  background: none; border: 0; cursor: pointer; text-align: left; white-space: nowrap;
}
.sb-nav a:hover, .sb-foot a:hover, .sb-foot button:hover { background: rgba(255, 255, 255, .12); color: var(--white); }
.sb-nav a.active { background: rgba(255, 255, 255, .2); }
.sb-nav .count { margin-left: auto; background: var(--gold); color: var(--text); font-size: 12px; font-weight: 700; padding: 1px 8px; border-radius: 999px; }
.sb-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: rgba(255, 255, 255, .75); padding: 16px 12px 6px; }
.sb-spacer { flex: 1; }
.sb-foot { border-top: 1px solid rgba(255, 255, 255, .22); padding-top: 12px; display: grid; gap: 2px; }
.sb-foot form { margin: 0; }
.sb-user { display: flex; align-items: center; gap: 10px; padding: 6px 12px 10px; }
.sb-user .av { width: 34px; height: 34px; border-radius: 50%; background: var(--white); color: var(--green-dark); display: grid; place-items: center; font-weight: 700; flex: 0 0 34px; }
.sb-user .nm { font-weight: 600; line-height: 1.25; }
.sb-user .rl { font-size: 12px; opacity: .85; }

.content { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; }
.topbar { background: var(--white); border-bottom: 1px solid var(--line); padding: 12px 28px; display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.ws-pick { display: flex; align-items: center; gap: 10px; height: 42px; padding: 0 6px 0 8px; border: 1px solid var(--line); border-radius: 10px; background: var(--white); }
.ws-pick .ws-mark { width: 26px; height: 26px; border-radius: 6px; background: var(--gold); color: var(--text); display: grid; place-items: center; font-size: 11px; font-weight: 800; flex: 0 0 26px; }
.ws-pick select { border: 0; height: 38px; padding: 0 6px; font-weight: 600; background: transparent; max-width: 240px; box-shadow: none; }
.top-search { flex: 1 1 240px; display: flex; align-items: center; gap: 8px; height: 42px; padding: 0 14px; background: var(--bg); border-radius: 10px; color: var(--muted); }
.top-search input { border: 0; background: transparent; height: 40px; padding: 0; box-shadow: none; }
.top-search input:focus { box-shadow: none; }
.icon-btn { width: 42px; height: 42px; border-radius: 10px; border: 1px solid var(--line); background: var(--white); display: grid; place-items: center; color: var(--text); }
.main { padding: 28px; display: flex; flex-direction: column; gap: 20px; width: 100%; }
.page-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 12px; }
.page-head p { color: var(--muted); margin-top: 4px; }
.page-actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- content blocks ---------- */
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; min-width: 0; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 12px; }
.grid-kpi { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px; }
.kpi { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; display: flex; flex-direction: column; gap: 4px; }
.kpi .t { color: var(--muted); font-weight: 500; }
.kpi .n { font-size: 28px; font-weight: 700; letter-spacing: -.5px; }
.kpi .c { font-size: 13px; font-weight: 600; color: var(--muted); }
.row2 { display: flex; flex-wrap: wrap; gap: 16px; }
.row2 > .wide { flex: 2 1 520px; }
.row2 > .narrow { flex: 1 1 300px; }
.grid-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 12px; }
.profile-chip { display: flex; align-items: center; gap: 10px; background: var(--white); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; }
.profile-chip.add { border-style: dashed; border-color: #B9B5AC; font-weight: 600; }
.net { width: 30px; height: 30px; border-radius: 8px; color: var(--white); display: grid; place-items: center; font-weight: 800; flex: 0 0 30px; }
.net.ig { background: var(--ig); }
.net.fb { background: var(--fb); }
.net.yt { background: var(--chip); color: var(--muted); }
.net.lg { width: 46px; height: 46px; border-radius: 12px; flex-basis: 46px; font-size: 22px; }
.notice { display: flex; gap: 10px; padding: 12px; border-radius: 10px; }
.notice.amber { background: var(--gold-soft); }
.notice.green { background: var(--green-soft); }
.notice.grey { background: var(--bg); }
.notice b { display: block; }
.empty { text-align: center; padding: 48px 20px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.empty .ico { width: 56px; height: 56px; border-radius: 16px; background: var(--green-soft); color: var(--green-dark); display: grid; place-items: center; }
.empty .ico svg.i { width: 26px; height: 26px; flex-basis: 26px; }
.empty p { color: var(--muted); max-width: 460px; }
.list-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; padding: 14px 0; border-top: 1px solid var(--line-soft); }
.list-row:first-child { border-top: 0; }
.list-row .grow { flex: 1 1 240px; min-width: 0; }
.person b { display: block; }
.person span { font-size: 13px; color: var(--muted); }
.av-round { width: 40px; height: 40px; border-radius: 50%; background: var(--green-soft); color: var(--green-dark); display: grid; place-items: center; font-weight: 700; flex: 0 0 40px; }
.connect-card { text-align: left; display: flex; gap: 14px; align-items: center; padding: 18px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--white); font: inherit; color: var(--text); }
.connect-card.soon { border-style: dashed; background: #FAFAF8; }
.connect-card b { display: block; }
.tabs { display: flex; flex-wrap: wrap; gap: 4px; border-bottom: 1px solid var(--line); }
.tabs a { height: 42px; display: inline-flex; align-items: center; padding: 0 16px; font-weight: 700; color: var(--text); border-bottom: 3px solid transparent; margin-bottom: -1px; }
.tabs a.active { border-bottom-color: var(--gold); }
.form-row { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.form-row .field { margin-bottom: 0; flex: 1 1 220px; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; padding: 10px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 12px 8px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
td .actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
td select { height: 34px; width: auto; font-size: 13px; }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.toolbar input[type=search] { max-width: 320px; }
.pager { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 14px; color: var(--muted); }
.pager .btn { height: 32px; padding: 0 10px; font-size: 13px; }
.pager .disabled { opacity: .45; pointer-events: none; }

/* ---------- phone ---------- */
@media (max-width: 900px) {
  .sidebar { padding: 12px; }
  .sidebar .brand { padding: 0 4px 10px; }
  .sb-create { margin-bottom: 8px; }
  .sb-nav { flex-direction: row; overflow-x: auto; scrollbar-width: none; }
  .sb-nav::-webkit-scrollbar { display: none; }
  .sb-label, .sb-spacer, .sb-foot { display: none; }
  .sb-nav a { width: auto; }
  .topbar { padding: 10px 16px; }
  .main { padding: 20px 16px; }
}
@media (max-width: 600px) {
  .auth-card { padding: 24px 18px; }
  .top-search { order: 3; flex-basis: 100%; }
}

/* Sidebar legal links (small, under Log out) */
.sb-foot .sb-legal { padding: 8px 12px 0; font-size: 12px; color: rgba(255, 255, 255, .75); white-space: normal; }
.sb-foot .sb-legal a { display: inline; width: auto; padding: 0; border-radius: 0; font-weight: 500; color: rgba(255, 255, 255, .85); }
.sb-foot .sb-legal a:hover { background: none; color: var(--white); text-decoration: underline; }
.auth-copy a { color: var(--muted); }
.auth-copy a:hover { color: var(--green-dark); }

/* Public legal pages: Privacy, Terms, Data deletion */
.legal-body { background: var(--bg); color: var(--text); font-family: var(--font); margin: 0; }
.legal-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 16px 24px; background: var(--white); border-bottom: 1px solid var(--line); }
.legal-nav { display: flex; gap: 6px; flex-wrap: wrap; }
.legal-nav a { padding: 8px 12px; border-radius: 9px; color: var(--text); font-weight: 600; font-size: 14px; }
.legal-nav a:hover { background: var(--bg); color: var(--text); }
.legal-nav a[aria-current="page"] { background: var(--green-soft); color: var(--green-ink); }
.legal-main { padding: 32px 16px 48px; }
.legal-doc { max-width: 760px; margin: 0 auto; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 36px 40px; line-height: 1.65; font-size: 15.5px; }
.legal-doc h1 { margin: 0 0 4px; font-size: 30px; line-height: 1.2; }
.legal-doc h2 { margin: 30px 0 8px; font-size: 19px; color: var(--green-ink); }
.legal-doc h3 { margin: 18px 0 6px; font-size: 16px; }
.legal-doc p, .legal-doc ul, .legal-doc ol { margin: 0 0 12px; }
.legal-doc li { margin: 4px 0; }
.legal-doc a { color: var(--green-dark); text-decoration: underline; }
.legal-doc code { background: var(--chip); padding: 1px 6px; border-radius: 6px; font-size: 13.5px; }
.legal-updated { color: var(--muted); font-size: 14px; margin-bottom: 20px !important; }
.legal-foot { text-align: center; color: var(--muted); font-size: 13px; padding: 0 16px 32px; }
.legal-foot a { color: var(--muted); }
@media (max-width: 600px) {
  .legal-head { padding: 12px 16px; }
  .legal-doc { padding: 22px 18px; font-size: 15px; }
  .legal-doc h1 { font-size: 24px; }
}

/* Publishing calendar (month grid; agenda list on small screens) */
.cal-card { padding: 16px; }
.cal-bar { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; margin-bottom: 14px; }
.cal-nav { display: flex; gap: 6px; flex-wrap: wrap; }
.cal-title { margin: 0; font-size: 20px; text-align: center; white-space: nowrap; }
.cal-legend { display: flex; gap: 14px; justify-content: flex-end; flex-wrap: wrap; }
.cal-legend span { display: inline-flex; align-items: center; gap: 6px; }
.dot { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.dot.scheduled { background: var(--gold); }
.dot.published { background: var(--green); }
.dot.failed { background: var(--danger); }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.cal-dow { padding: 8px 10px; font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--bg); }
.cal-day { min-height: 118px; padding: 6px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 4px; min-width: 0; background: var(--white); }
.cal-day.out { background: #FBFAF8; }
.cal-day.out .cal-num { color: #B3AFA8; }
.cal-day-head { display: flex; justify-content: space-between; align-items: center; min-height: 24px; }
.cal-num { font-size: 13px; font-weight: 700; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; }
.cal-day.today .cal-num { background: var(--green); color: var(--white); }
.cal-add { width: 24px; height: 24px; border-radius: 7px; display: grid; place-items: center; font-weight: 700; font-size: 16px; color: var(--green-dark); opacity: 0; transition: opacity .12s; }
.cal-day:hover .cal-add, .cal-add:focus { opacity: 1; background: var(--green-soft); }
.cal-post { display: block; padding: 4px 6px 5px; border-radius: 7px; border-left: 3px solid var(--line); background: var(--bg); color: var(--text); font-size: 12px; line-height: 1.3; min-width: 0; }
.cal-post:hover { color: var(--text); filter: brightness(.97); }
.cal-meta { display: block; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-cap { display: block; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-post.scheduled, .cal-post.publishing { background: var(--gold-soft); border-left-color: var(--gold); }
.cal-post.published { background: var(--green-soft); border-left-color: var(--green); }
.cal-post.partial { background: var(--gold-soft); border-left-color: var(--green); }
.cal-post.failed { background: var(--danger-soft); border-left-color: var(--danger); }
.cal-post.deleted { background: var(--chip); border-left-color: #B3AFA8; }
.cal-post.deleted .cal-cap { text-decoration: line-through; }
.cal-agenda { display: none; }
.cal-count { display: none; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px; background: var(--gold); color: var(--text); font-size: 11px; font-weight: 800; place-items: center; }
.cal-empty-note { text-align: center; margin: 12px 0 0; }
@media (hover: none) { .cal-add { opacity: 1; } }
@media (max-width: 760px) {
  .cal-bar { grid-template-columns: 1fr; justify-items: center; }
  .cal-legend { justify-content: center; }
  /* Phones: compact month grid (day number, post-count badge, +) and the day-wise list below it. */
  .cal-card { padding: 10px; }
  .cal-dow { padding: 6px 2px; text-align: center; font-size: 10px; letter-spacing: 0; }
  .cal-day { min-height: 54px; padding: 3px; gap: 2px; align-items: center; }
  .cal-day-head { flex-direction: column; gap: 2px; min-height: 0; }
  .cal-day .cal-post { display: none; }
  .cal-count { display: grid; }
  .cal-add { width: 20px; height: 20px; font-size: 14px; opacity: 1; background: var(--green-soft); }
  .cal-agenda { display: flex; flex-direction: column; gap: 14px; margin-top: 14px; }
  .cal-agenda-day { display: flex; flex-direction: column; gap: 6px; }
  .cal-agenda-date { font-weight: 700; font-size: 14px; }
  .cal-agenda-date.today { color: var(--green-dark); }
  .cal-agenda .cal-post { font-size: 13px; padding: 8px 10px; }
  .cal-agenda .cal-cap { white-space: normal; }
}

/* Inbox (comments) */
.inbox-bar { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 10px; border-bottom: 1px solid var(--line); }
.inbox-bar .tabs { border-bottom: 0; }
.inbox-acc { width: auto; min-width: 200px; height: 36px; margin-bottom: 6px; }
.tab-n { display: inline-block; min-width: 22px; padding: 1px 7px; margin-left: 6px; border-radius: 999px; background: var(--chip); font-size: 12px; text-align: center; }
.tabs a.active .tab-n { background: var(--gold); }
.inbox-sync { align-self: center; }
.inbox-list { padding: 0; }
.inbox-item { padding: 16px 20px; border-top: 1px solid var(--line-soft); display: flex; flex-direction: column; gap: 10px; }
.inbox-item:first-child { border-top: 0; }
.inbox-item.is-done { background: #FCFCFA; }
.inbox-ctx { display: flex; align-items: center; gap: 10px; min-width: 0; }
.inbox-ctx img, .inbox-thumb { width: 36px; height: 36px; border-radius: 8px; object-fit: cover; flex: 0 0 36px; background: var(--green-soft); color: var(--green-dark); display: grid; place-items: center; }
.inbox-ctx .grow { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.net { display: inline-block; font-size: 11px; font-weight: 800; padding: 1px 6px; border-radius: 6px; color: var(--white); margin-right: 2px; }
.net.ig { background: var(--ig); }
.net.fb { background: var(--fb); }
.inbox-comment { display: flex; gap: 10px; align-items: flex-start; }
.inbox-comment .grow { flex: 1; min-width: 0; }
.inbox-comment .av { width: 32px; height: 32px; flex: 0 0 32px; border-radius: 50%; background: var(--chip); display: grid; place-items: center; font-weight: 700; font-size: 13px; }
.inbox-reply { margin-left: 42px; padding: 8px 10px; border-radius: 10px; background: var(--bg); }
.inbox-reply.mine { background: var(--green-soft); }
.inbox-reply.mine .av { background: var(--green); color: var(--white); }
.inbox-text { white-space: pre-wrap; word-break: break-word; margin-top: 2px; }
.inbox-replyform { display: flex; gap: 8px; align-items: flex-end; margin-left: 42px; }
.inbox-replyform textarea { flex: 1; min-height: 38px; resize: none; padding: 8px 10px; line-height: 1.4; }
.inbox-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-left: 42px; }
.inbox-reply .inbox-actions { margin-left: 0; margin-top: 4px; }
.linkish { background: none; border: 0; padding: 0; font: inherit; font-weight: 600; color: var(--green-dark); cursor: pointer; }
.linkish:hover { text-decoration: underline; }
.linkish.danger { color: var(--danger); }
@media (max-width: 600px) {
  .inbox-item { padding: 14px; }
  .inbox-reply, .inbox-replyform, .inbox-actions { margin-left: 0; }
  .inbox-acc { width: 100%; }
}

/* Reports */
.rep-filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.rep-filters select { width: auto; min-width: 240px; height: 38px; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--white); }
.seg a { padding: 8px 14px; font-weight: 600; font-size: 14px; color: var(--text); }
.seg a + a { border-left: 1px solid var(--line); }
.seg a.on { background: var(--green-soft); color: var(--green-ink); }
.rep-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.rep-tile .n { font-size: 26px; }
.chg { font-weight: 700; }
.chg.up { color: var(--green-dark); }
.chg.down { color: var(--danger); }
.rep-h { margin: 0; font-size: 16px; }
.rep-chart { position: relative; height: 240px; margin: 4px 0 22px 0; }
.rep-chart svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.rep-grid { stroke: var(--line-soft); stroke-width: 1; vector-effect: non-scaling-stroke; }
.rep-line { fill: none; stroke: var(--green); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.rep-area { fill: var(--green); opacity: .08; }
.rep-yaxis span { position: absolute; left: 0; transform: translateY(-50%); font-size: 11px; color: var(--muted); }
.rep-xaxis span { position: absolute; bottom: -20px; transform: translateX(-50%); font-size: 11px; color: var(--muted); white-space: nowrap; }
.rep-xaxis span:first-child { transform: none; }
.rep-xaxis span:last-child { transform: translateX(-100%); }
.rep-cross { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--muted); opacity: .5; pointer-events: none; }
.rep-dot { position: absolute; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 2px var(--white); pointer-events: none; }
.rep-tip { position: absolute; top: 0; padding: 6px 10px; background: var(--white); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 4px 14px rgba(52, 49, 60, .12); font-size: 12px; pointer-events: none; white-space: nowrap; display: flex; flex-direction: column; }
.rep-tip b { font-size: 15px; }
.rep-tip span { color: var(--muted); }
.rep-table-toggle summary { cursor: pointer; color: var(--green-dark); font-weight: 600; }
.rep-table { width: 100%; border-collapse: collapse; margin-top: 8px; }
.rep-table th, .rep-table td { padding: 8px 10px; border-bottom: 1px solid var(--line-soft); text-align: left; vertical-align: middle; }
.rep-table th { font-size: 12px; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .03em; white-space: nowrap; }
.rep-table .r { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.rep-scroll { overflow-x: auto; }
.rep-posts { min-width: 760px; font-size: 14px; }
.rep-post { display: flex; gap: 10px; align-items: center; max-width: 340px; }
.rep-post img, .rep-post .inbox-thumb { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; flex: 0 0 44px; }
.rep-break { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; }
.rep-break div { display: flex; flex-direction: column; gap: 2px; }
.rep-break b { font-size: 20px; }
@media (max-width: 600px) { .rep-filters select { min-width: 0; width: 100%; } .rep-chart { height: 200px; } }
.rep-tip[hidden], .rep-cross[hidden], .rep-dot[hidden] { display: none; }

/* Inbox: Comments / Instagram messages switch + DMs */
.inbox-kind { margin-bottom: 4px; }
.dm-row { display: flex; gap: 12px; align-items: center; padding: 14px 20px; border-top: 1px solid var(--line-soft); color: var(--text); }
.dm-row:first-child { border-top: 0; }
.dm-row:hover { background: var(--bg); color: var(--text); text-decoration: none; }
.dm-row .av { width: 40px; height: 40px; flex: 0 0 40px; border-radius: 50%; background: var(--chip); display: grid; place-items: center; font-weight: 700; }
.dm-row.unread .av { background: var(--gold); }
.dm-row .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.dm-top { display: flex; justify-content: space-between; gap: 10px; }
.dm-snip { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text); }
.dm-row.unread .dm-snip { font-weight: 600; }
.dm-thread { display: flex; flex-direction: column; gap: 10px; max-height: 60vh; overflow-y: auto; }
.dm-msg { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; max-width: 75%; }
.dm-msg.me { align-self: flex-end; align-items: flex-end; }
.dm-bubble { padding: 9px 13px; border-radius: 14px; background: var(--bg); border: 1px solid var(--line-soft); }
.dm-msg.me .dm-bubble { background: var(--green-soft); border-color: transparent; }
@media (max-width: 600px) { .dm-row { padding: 12px 14px; } .dm-msg { max-width: 90%; } }
.msg-net { margin: 4px 0; }
