/* ==========================================================================
   Delivery Scout — feedback board styles (extends styles.css tokens)
   ========================================================================== */

.fb-whoami { color: var(--text-dim); font-size: 14px; margin-top: 14px; }
.fb-handle {
  font-weight: 700; color: var(--accent);
  background: rgba(61, 220, 151, .1);
  border: 1px solid rgba(61, 220, 151, .28);
  border-radius: 999px; padding: 2px 10px; white-space: nowrap;
}
.fb-whoami-note { color: var(--text-dim); font-weight: 400; }

.fb-section { padding: 8px 0 72px; }
.fb-layout {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}
@media (max-width: 860px) {
  .fb-layout { grid-template-columns: 1fr; gap: 20px; }
}

/* ---- composer ---------------------------------------------------------- */
.fb-composer { padding: 22px; position: sticky; top: 84px; }
@media (max-width: 860px) { .fb-composer { position: static; } }
.fb-composer-title { font-size: 17px; margin: 0 0 16px; }
.fb-field { margin-bottom: 14px; display: flex; flex-direction: column; gap: 6px; }
.fb-field label { font-size: 12.5px; font-weight: 600; color: var(--text-dim); letter-spacing: .01em; }
.fb-field input[type="text"],
.fb-field textarea,
.fb-field select {
  width: 100%;
  font: inherit;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.fb-field textarea { resize: vertical; min-height: 92px; line-height: 1.5; }
.fb-field input:focus, .fb-field textarea:focus, .fb-field select:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(61, 220, 151, .16);
}
.fb-field-row { display: grid; grid-template-columns: 1fr; gap: 12px; }
.fb-hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.fb-turnstile:empty { display: none; }
.fb-composer-foot { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 4px; }
.fb-composer-foot .btn { flex: 0 0 auto; }
.fb-status { font-size: 13px; color: var(--text-dim); }
.fb-status.err { color: var(--decline); }
.fb-status.ok { color: var(--accent); }

/* ---- toolbar ----------------------------------------------------------- */
.fb-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap; margin-bottom: 16px;
}
.fb-tabs { display: inline-flex; background: var(--card); border: 1px solid var(--border); border-radius: 999px; padding: 3px; }
.fb-tab {
  font: inherit; font-size: 13.5px; font-weight: 600; color: var(--text-dim);
  background: none; border: 0; border-radius: 999px; padding: 7px 16px; cursor: pointer;
  transition: color .15s ease, background .15s ease;
}
.fb-tab.is-active { color: #06140d; background: var(--accent); }
.fb-filters { display: flex; flex-wrap: wrap; gap: 6px; }
.fb-chip {
  font: inherit; font-size: 12.5px; font-weight: 600; color: var(--text-dim);
  background: var(--card); border: 1px solid var(--border); border-radius: 999px;
  padding: 6px 12px; cursor: pointer; transition: color .15s ease, border-color .15s ease;
}
.fb-chip:hover { color: var(--text); }
.fb-chip.is-active { color: var(--text); border-color: var(--accent); background: rgba(61, 220, 151, .1); }

/* ---- list + cards ------------------------------------------------------ */
.fb-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.fb-loading, .fb-empty { color: var(--text-dim); font-size: 14px; padding: 24px 4px; text-align: center; }
.fb-more { margin: 18px auto 0; display: block; }

.fb-card {
  display: grid; grid-template-columns: 52px minmax(0, 1fr);
  gap: 14px; padding: 16px 18px;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
}
.fb-card.is-mine { border-color: rgba(61, 220, 151, .35); }

/* vote column */
.fb-vote { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.fb-vbtn {
  width: 34px; height: 30px; display: grid; place-items: center;
  background: none; border: 1px solid transparent; border-radius: 8px; cursor: pointer;
  color: var(--text-dim); transition: color .15s ease, background .15s ease;
}
.fb-vbtn:hover { color: var(--text); background: rgba(167, 176, 192, .1); }
.fb-vbtn.is-on[data-dir="1"] { color: var(--accent); background: rgba(61, 220, 151, .14); }
.fb-vbtn.is-on[data-dir="-1"] { color: var(--decline); background: rgba(235, 87, 87, .14); }
.fb-vbtn svg { width: 18px; height: 18px; }
.fb-score { font-weight: 800; font-size: 15px; color: var(--text); font-variant-numeric: tabular-nums; }

/* body column */
.fb-main { min-width: 0; }
.fb-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; font-size: 12px; color: var(--text-dim); }
.fb-badge { font-size: 11px; font-weight: 700; letter-spacing: .03em; padding: 3px 9px; border-radius: 999px; text-transform: uppercase; }
.fb-badge[data-status="open"] { color: var(--text-dim); background: rgba(167, 176, 192, .12); }
.fb-badge[data-status="planned"] { color: var(--accent-2); background: rgba(43, 200, 220, .14); }
.fb-badge[data-status="in_progress"] { color: var(--consider); background: rgba(242, 201, 76, .14); }
.fb-badge[data-status="done"] { color: var(--accent); background: rgba(61, 220, 151, .14); }
.fb-badge[data-status="declined"] { color: var(--text-dim); background: rgba(167, 176, 192, .1); }
.fb-cat { text-transform: capitalize; }
.fb-dot { opacity: .5; }
.fb-title { font-size: 16px; font-weight: 700; line-height: 1.35; margin: 0 0 4px; color: var(--text); word-break: break-word; }
.fb-body { font-size: 14px; line-height: 1.55; color: var(--text); white-space: pre-wrap; word-break: break-word; margin: 0; }
.fb-body.is-clamped { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.fb-expand { font-size: 12.5px; font-weight: 600; color: var(--accent); background: none; border: 0; cursor: pointer; padding: 4px 0 0; }

.fb-actions { display: flex; align-items: center; gap: 16px; margin-top: 10px; }
.fb-act { font: inherit; font-size: 12.5px; font-weight: 600; color: var(--text-dim); background: none; border: 0; cursor: pointer; display: inline-flex; align-items: center; gap: 5px; padding: 0; }
.fb-act:hover { color: var(--text); }
.fb-act svg { width: 14px; height: 14px; }

/* replies */
.fb-replies { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border); display: none; }
.fb-replies.is-open { display: block; }
.fb-reply { padding: 8px 0; border-bottom: 1px solid rgba(167, 176, 192, .08); }
.fb-reply:last-of-type { border-bottom: 0; }
.fb-reply-meta { font-size: 11.5px; color: var(--text-dim); margin-bottom: 3px; display: flex; gap: 7px; align-items: center; }
.fb-reply-op { color: var(--accent); font-weight: 700; }
.fb-reply-body { font-size: 13.5px; line-height: 1.5; color: var(--text); white-space: pre-wrap; word-break: break-word; }
.fb-reply-form { display: flex; gap: 8px; margin-top: 10px; }
.fb-reply-form textarea { flex: 1; font: inherit; color: var(--text); background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 8px 10px; resize: vertical; min-height: 40px; }
.fb-reply-form textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(61, 220, 151, .16); }
.fb-reply-status { font-size: 12px; color: var(--text-dim); margin-top: 6px; }
.fb-reply-status.err { color: var(--decline); }

@media (max-width: 520px) {
  .fb-card { grid-template-columns: 44px minmax(0, 1fr); gap: 10px; padding: 14px; }
  .fb-toolbar { gap: 10px; }
}

/* ---- admin controls (only rendered when the admin token is set) --------- */
.fb-adminbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  display: flex; align-items: center; justify-content: center; gap: 14px;
  padding: 10px 16px; font-size: 13px; font-weight: 600; color: #06140d;
  background: var(--accent); box-shadow: 0 -6px 20px rgba(0,0,0,.3);
}
.fb-adminbar-off {
  font: inherit; font-weight: 700; color: #06140d;
  background: rgba(0,0,0,.14); border: 0; border-radius: 999px; padding: 5px 12px; cursor: pointer;
}
.fb-admin {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--border);
}
.fb-admin-tag {
  font-size: 10.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
  color: var(--accent-2); background: rgba(43,200,220,.12); border-radius: 999px; padding: 3px 8px;
}
.fb-admin-sel {
  font: inherit; font-size: 13px; color: var(--text);
  background: var(--bg); border: 1px solid var(--border); border-radius: 8px; padding: 5px 8px; cursor: pointer;
}
.fb-admin-sel:focus { outline: none; border-color: var(--accent); }
.fb-admin-btn {
  font: inherit; font-size: 12.5px; font-weight: 600; color: var(--text-dim);
  background: var(--card); border: 1px solid var(--border); border-radius: 8px; padding: 5px 11px; cursor: pointer;
  transition: color .15s ease, border-color .15s ease;
}
.fb-admin-btn:hover { color: var(--text); border-color: var(--text-dim); }
.fb-admin-danger:hover { color: var(--decline); border-color: var(--decline); }
.fb-admin-mini { padding: 2px 8px; font-size: 11px; margin-left: auto; }

/* ---- staff byline + staff reply ---------------------------------------- */
.fb-staff-by { display: inline-flex; align-items: center; gap: 6px; }
.fb-staff-star { width: 13px; height: 13px; color: var(--accent); fill: var(--accent); stroke: none; }
.fb-staff-name { font-weight: 800; color: var(--accent); }
.fb-staff-role {
  font-size: 10.5px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase;
  color: #06140d; background: var(--accent); border-radius: 999px; padding: 2px 8px;
}
.fb-card.is-staff { border-color: rgba(61, 220, 151, .4); background: linear-gradient(180deg, rgba(61,220,151,.05), transparent 60%), var(--card); }
.fb-reply-staff {
  background: rgba(61, 220, 151, .06); border: 1px solid rgba(61, 220, 151, .28);
  border-radius: var(--radius-sm); padding: 10px 12px; margin: 6px 0;
}
.fb-card.is-hidden { opacity: .6; }

.fb-chip-pin, .fb-chip-warn {
  font-size: 10.5px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase;
  border-radius: 999px; padding: 2px 8px;
}
.fb-chip-pin { color: var(--accent-2); background: rgba(43, 200, 220, .14); }
.fb-chip-warn { color: var(--consider); background: rgba(242, 201, 76, .14); }

/* ---- staff composer options ------------------------------------------- */
.fb-staff-compose { display: flex; flex-wrap: wrap; gap: 12px 18px; align-items: center; margin: 4px 0 14px; padding: 12px; border: 1px dashed var(--border); border-radius: var(--radius-sm); }
.fb-staff-toggle { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: var(--text); cursor: pointer; }
.fb-staff-toggle input { width: auto; }
.fb-staff-opts { display: flex; gap: 8px; flex-wrap: wrap; width: 100%; }
.fb-staff-input { flex: 1; min-width: 140px; font: inherit; color: var(--text); background: var(--bg); border: 1px solid var(--border); border-radius: 8px; padding: 7px 10px; }
.fb-staff-input:focus { outline: none; border-color: var(--accent); }
.fb-reply-form-wrap .fb-staff-toggle { margin-bottom: 8px; }

/* ---- admin bar extra button ------------------------------------------- */
.fb-adminbar-btn {
  font: inherit; font-weight: 700; font-size: 12.5px; color: #06140d;
  background: rgba(0,0,0,.14); border: 0; border-radius: 999px; padding: 5px 12px; cursor: pointer;
}
.fb-adminbar-btn.is-on { background: #06140d; color: var(--accent); }

/* ---- team sign-in link ------------------------------------------------- */

/* ---- login modal ------------------------------------------------------- */
.fb-login {
  position: fixed; inset: 0; z-index: 200; display: grid; place-items: center;
  background: rgba(4, 8, 12, .72); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  padding: 20px;
}
.fb-login-card {
  width: 100%; max-width: 380px; background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px; box-shadow: 0 30px 80px rgba(0,0,0,.5);
}
.fb-login-title { font-size: 18px; margin: 0 0 6px; }
.fb-login-sub { font-size: 13.5px; color: var(--text-dim); margin: 0 0 16px; }
.fb-login-input { width: 100%; font: inherit; color: var(--text); background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 11px 12px; }
.fb-login-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(61,220,151,.16); }
.fb-login-msg { font-size: 13px; color: var(--text-dim); min-height: 18px; margin: 8px 0 4px; }
.fb-login-msg.err { color: var(--decline); }
.fb-login-row { display: flex; justify-content: flex-end; gap: 10px; margin-top: 12px; }
