/* ═══ Support & ideas (Feedback Hub) — Specs/FeedbackHub-Spec.md §11 ═══
   Everything is prefixed fb- and built on tokens.css. Meaning is never carried by colour alone: every chip and
   badge has an icon or text too. */

/* ── Status chip ── */
.fb-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    max-width: 100%;
    padding: 3px 10px;
    border-radius: var(--r-pill);
    font-size: var(--fs-head);
    font-weight: 600;
    line-height: 18px;
    white-space: nowrap;
    border: 1px solid transparent;
}
.fb-chip-text { overflow: hidden; text-overflow: ellipsis; }
.fb-chip-compact { padding: 1px 8px; font-size: 11.5px; }
.fb-chip-neutral   { background: var(--surface-4); color: var(--ink-4); }
.fb-chip-review    { background: #e8f0fb; color: #1f5fa8; }
.fb-chip-attention { background: var(--accent-bg); color: var(--accent-ink); }
.fb-chip-planned   { background: #e6f0f4; color: var(--teal); border-color: #c9dde6; }
.fb-chip-next      { background: var(--teal); color: #fff; }
.fb-chip-done      { background: var(--ok-bg); color: var(--ok); }
.fb-chip-closed    { background: var(--surface-4); color: var(--ink-5); }

/* ── Page shell ── */
.fb-page {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
    padding: 10px 10px 10px 0;
}
.fb-shell {
    display: flex;
    flex: 1;
    min-height: 0;
    background: var(--surface);
    border: 1px solid var(--rule-sec);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 57, 81, 0.04);
}
.fb-side {
    width: 320px;
    min-width: 320px;
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--rule-soft);
    background: var(--surface-2);
}
.fb-side-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 16px 16px 12px;
}
.fb-side-title {
    margin: 0;
    font-size: 17px;
    font-weight: 700;
    color: var(--ink-strong);
    display: flex;
    align-items: center;
    gap: 8px;
}
.fb-side-title i { color: var(--teal); }

.fb-scope {
    display: flex;
    margin: 0 16px 10px;
    padding: 3px;
    border-radius: var(--r-field);
    background: var(--surface-4);
}
.fb-scope-btn {
    flex: 1;
    border: 0;
    background: transparent;
    border-radius: var(--r-btn);
    padding: 5px 8px;
    font-size: var(--fs-control);
    font-weight: 600;
    color: var(--ink-4);
    cursor: pointer;
}
.fb-scope-btn.active { background: var(--surface); color: var(--teal); box-shadow: 0 1px 2px rgba(15, 40, 54, .08); }
.fb-scope-btn:focus-visible { outline: 2px solid var(--teal); outline-offset: 1px; }

.fb-list { flex: 1; overflow-y: auto; padding: 0 8px 12px; }
.fb-list-items { list-style: none; margin: 0; padding: 0; }
.fb-list-item {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 10px 12px;
    margin-bottom: 2px;
    border: 1px solid transparent;
    border-radius: 10px;
    background: transparent;
    text-align: left;
    cursor: pointer;
    color: var(--ink);
}
.fb-list-item:hover { background: var(--surface-4); }
.fb-list-item:focus-visible { outline: 2px solid var(--teal); outline-offset: -2px; }
.fb-list-item.active { background: var(--surface); border-color: var(--rule-sec); box-shadow: 0 1px 2px rgba(15, 40, 54, .06); }
.fb-list-top { display: flex; align-items: flex-start; gap: 8px; }
.fb-list-title {
    flex: 1;
    min-width: 0;
    font-size: var(--fs-cell);
    font-weight: 500;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.fb-list-item.unread .fb-list-title { font-weight: 700; }
.fb-unread-dot {
    flex: none;
    width: 9px;
    height: 9px;
    margin-top: 5px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 2px var(--accent-bg);
}
.fb-list-bottom { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 0; }
.fb-list-time { flex: none; font-size: var(--fs-hint); color: var(--ink-5); }
.fb-list-by { font-size: var(--fs-hint); color: var(--ink-5); }
.fb-list-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 40px 16px;
    text-align: center;
    color: var(--ink-5);
    font-size: var(--fs-hint);
}
.fb-list-empty i { font-size: 26px; color: var(--ink-7); }
.fb-list-empty strong { color: var(--ink-3); font-size: var(--fs-cell); }

/* ── Conversation pane ── */
.fb-pane {
    position: relative; /* the drop overlay covers the whole pane */
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}
.fb-pane-head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    border-bottom: 1px solid var(--rule-soft);
    min-height: 60px;
}
.fb-pane-heading { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.fb-pane-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--ink-strong);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.fb-pane-sub { font-size: var(--fs-hint); color: var(--ink-5); }
.fb-back {
    display: none; /* phones only */
    border: 0;
    background: transparent;
    color: var(--teal);
    width: 34px;
    height: 34px;
    border-radius: var(--r-btn);
    cursor: pointer;
}
.fb-back:hover { background: var(--surface-4); }
.fb-pane-scroll { flex: 1; min-height: 0; overflow-y: auto; padding: 20px; }
.fb-pane-foot { padding: 12px 20px 16px; border-top: 1px solid var(--rule-soft); background: var(--surface); }
.fb-pane-error {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    border-radius: var(--r-section);
    background: var(--crit-row);
    color: var(--crit-ink);
    font-size: var(--fs-cell);
}
.fb-readonly { display: flex; align-items: center; gap: 8px; font-size: var(--fs-control); color: var(--ink-5); }
.fb-denied {
    margin: 60px auto;
    max-width: 420px;
    text-align: center;
    color: var(--ink-4);
}
.fb-denied i { font-size: 32px; color: var(--ink-7); margin-bottom: 12px; }

/* New request */
.fb-new { max-width: 560px; margin: 24px auto 0; text-align: center; }
.fb-new-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 14px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    background: #e6f0f4;
    color: var(--teal);
    font-size: 24px;
}
.fb-new h2 { font-size: 22px; font-weight: 700; color: var(--ink-strong); margin: 0 0 6px; }
.fb-new p { color: var(--ink-4); font-size: var(--fs-cell); margin: 0 0 20px; }
.fb-kinds { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.fb-kind {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px 10px;
    border: 1px solid var(--rule-sec);
    border-radius: var(--r-section);
    background: var(--surface);
    color: var(--ink-2);
    font-size: var(--fs-control);
    font-weight: 600;
    cursor: pointer;
    transition: border-color .15s, background .15s;
}
.fb-kind i { font-size: 20px; color: var(--ink-5); }
.fb-kind:hover { border-color: var(--teal); }
.fb-kind:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
.fb-kind.selected { border-color: var(--teal); background: #eef5f8; color: var(--teal); box-shadow: var(--focus-ring); }
.fb-kind.selected i { color: var(--teal); }

/* ── Messages ── */
.fb-messages { display: flex; flex-direction: column; gap: 14px; max-width: 820px; margin: 0 auto; }
.fb-msg { display: flex; flex-direction: column; gap: 4px; max-width: 78%; }
.fb-msg-right { align-self: flex-end; align-items: flex-end; }
.fb-msg-left { align-self: flex-start; align-items: flex-start; }
.fb-msg-head { display: flex; align-items: baseline; gap: 8px; font-size: var(--fs-hint); color: var(--ink-5); padding: 0 4px; }
.fb-msg-author { font-weight: 600; color: var(--ink-3); }
.fb-msg-time { font-size: 11.5px; color: var(--ink-6); }
.fb-msg-body {
    padding: 10px 14px;
    border-radius: 14px;
    font-size: var(--fs-cell);
    line-height: 1.5;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}
.fb-msg-client .fb-msg-body { background: var(--teal); color: #fff; }
.fb-msg-right .fb-msg-body { border-bottom-right-radius: 4px; }
.fb-msg-left .fb-msg-body { border-bottom-left-radius: 4px; }
.fb-msg-team .fb-msg-body { background: var(--surface-4); color: var(--ink); border: 1px solid var(--rule-soft); }
.fb-msg-draft .fb-msg-body { background: var(--accent-bg); border: 1px dashed var(--accent); color: var(--ink); }
.fb-draft-tag { color: var(--accent-ink); font-weight: 600; }
.fb-msg-system {
    align-self: center;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 6px 8px;
    max-width: 90%;
    padding: 6px 14px;
    border-radius: var(--r-pill);
    background: var(--surface-3);
    border: 1px solid var(--rule-soft);
    color: var(--ink-4);
    font-size: var(--fs-control);
    text-align: center;
}
.fb-msg-system i { color: var(--teal); }

/* ── Attachments in a message ── */
.fb-attachments { display: flex; flex-direction: column; gap: 6px; }
.fb-msg-right .fb-attachments { align-items: flex-end; }
.fb-grid { display: grid; gap: 4px; width: 320px; max-width: 100%; }
.fb-grid-1 { grid-template-columns: 1fr; }
.fb-grid-2, .fb-grid-3, .fb-grid-4 { grid-template-columns: 1fr 1fr; }
.fb-grid-cell {
    position: relative;
    padding: 0;
    border: 1px solid var(--rule-soft);
    border-radius: 10px;
    overflow: hidden;
    background: var(--surface-4);
    cursor: zoom-in;
    aspect-ratio: 1 / 1;
}
.fb-grid-1 .fb-grid-cell { aspect-ratio: auto; max-height: 240px; }
.fb-grid-cell img { display: block; width: 100%; height: 100%; object-fit: cover; }
.fb-grid-1 .fb-grid-cell img { object-fit: contain; max-height: 240px; background: var(--surface-4); }
.fb-grid-cell:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
.fb-grid-placeholder { position: absolute; inset: 0; display: grid; place-items: center; color: var(--ink-7); font-size: 22px; min-height: 90px; }
.fb-grid-more {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    background: rgba(15, 40, 54, .55);
    color: #fff;
    font-size: 22px;
    font-weight: 700;
}
.fb-file-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    max-width: 320px;
    padding: 8px 12px;
    border: 1px solid var(--rule-sec);
    border-radius: var(--r-field);
    background: var(--surface);
    color: var(--ink-2);
    font-size: var(--fs-control);
    cursor: pointer;
    text-align: left;
}
.fb-file-chip > i:first-child { color: var(--fb-file, var(--ink-5)); font-size: 18px; }
.fb-file-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.fb-file-size { flex: none; color: var(--ink-5); font-size: var(--fs-hint); }
.fb-file-dl { flex: none; color: var(--ink-6); }
.fb-file-chip:hover { border-color: var(--teal); }
.fb-file-chip:hover .fb-file-dl { color: var(--teal); }
.fb-file-chip:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }

/* ── Image viewer ── */
.fb-viewer {
    position: fixed;
    inset: 0;
    z-index: 1080; /* above Bootstrap modals (1050) and their backdrops */
    display: flex;
    flex-direction: column;
    background: rgba(8, 20, 28, .92);
    outline: none;
}
.fb-viewer-bar { display: flex; align-items: center; gap: 10px; padding: 12px 16px; color: #fff; }
.fb-viewer-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.fb-viewer-count { font-size: var(--fs-hint); opacity: .8; }
.fb-viewer-btn, .fb-viewer-nav {
    border: 0;
    background: rgba(255, 255, 255, .12);
    color: #fff;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: grid;
    place-items: center;
}
.fb-viewer-btn:hover, .fb-viewer-nav:hover { background: rgba(255, 255, 255, .24); }
.fb-viewer-btn:focus-visible, .fb-viewer-nav:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.fb-viewer-stage { position: relative; flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; padding: 0 64px 24px; }
.fb-viewer-img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 6px; box-shadow: 0 10px 40px rgba(0, 0, 0, .4); cursor: default; }
.fb-viewer-nav { position: absolute; top: 50%; transform: translateY(-50%); }
.fb-viewer-prev { left: 16px; }
.fb-viewer-next { right: 16px; }
.fb-viewer-loading { color: #fff; font-size: 28px; }

/* ── Composer ── */
.fb-composer { position: static; } /* the drop overlay positions against the pane, not the composer */
.fb-composer-box {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    padding: 6px 6px 6px 12px;
    border: 1px solid var(--rule-field);
    border-radius: 14px;
    background: var(--surface);
    transition: border-color .15s, box-shadow .15s;
}
.fb-composer-box:focus-within { border-color: var(--teal); box-shadow: var(--focus-ring); }
.fb-composer-box-invalid { border-color: var(--crit); }
.fb-composer-box .fb-composer-text {
    flex: 1;
    border: 0 !important;
    box-shadow: none !important;
    padding: 8px 0;
    min-height: 40px;
    max-height: 160px; /* about six lines, then it scrolls */
    resize: none;
    font-size: var(--fs-cell);
    background: transparent;
}
.fb-composer-actions { display: flex; align-items: center; gap: 6px; padding-bottom: 2px; }
.fb-icon-btn {
    width: 38px;
    height: 38px;
    padding: 0 !important;
    border-radius: 10px !important;
    background: transparent !important;
    border: 0 !important;
    color: var(--ink-4) !important;
}
.fb-icon-btn:hover { background: var(--surface-4) !important; color: var(--teal) !important; }
.fb-send-btn { height: 38px; border-radius: 10px !important; font-weight: 600; }
.fb-composer-error { margin-top: 6px; color: var(--crit-ink); font-size: var(--fs-hint); }
.fb-composer-hint {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 6px;
    font-size: var(--fs-hint);
    color: var(--ink-5);
}
.fb-composer-hint i { color: var(--accent); }

.fb-drop-overlay {
    position: absolute;
    inset: 0;
    z-index: 5;
    display: grid;
    place-items: center;
    background: rgba(0, 57, 81, .08);
    border: 2px dashed var(--teal);
    border-radius: 12px;
    pointer-events: none; /* purely visual: the drop lands on the pane underneath */
}
.fb-drop-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 20px 28px;
    border-radius: var(--r-card);
    background: var(--surface);
    box-shadow: 0 10px 30px rgba(0, 57, 81, .15);
    color: var(--ink-3);
    font-size: var(--fs-hint);
}
.fb-drop-card i { font-size: 30px; color: var(--teal); }
.fb-drop-card strong { font-size: 16px; color: var(--ink-strong); }

/* ── Upload tiles ── */
.fb-tiles { list-style: none; margin: 0 0 8px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.fb-tile {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    width: 232px;
    max-width: 100%;
    padding: 6px 34px 6px 6px;
    border: 1px solid var(--rule-sec);
    border-radius: 12px;
    background: var(--surface);
}
.fb-tile-error { border-color: #f1c0c0; background: var(--crit-row); }
.fb-tile-thumb {
    position: relative;
    flex: none;
    width: 56px;
    height: 56px;
    border-radius: 8px;
    overflow: hidden;
    display: grid;
    place-items: center;
    background: var(--surface-4);
    color: var(--fb-file, var(--ink-5));
    font-size: 22px;
}
.fb-tile-thumb img { width: 100%; height: 100%; object-fit: cover; }
.fb-tile-busy .fb-tile-thumb img { opacity: .55; }
.fb-ring { position: absolute; inset: 0; display: grid; place-items: center; }
.fb-ring svg { width: 34px; height: 34px; transform: rotate(-90deg); }
.fb-ring-track { fill: rgba(255, 255, 255, .85); stroke: var(--rule-sec); stroke-width: 3.5; }
.fb-ring-value { fill: none; stroke: var(--teal); stroke-width: 3.5; stroke-linecap: round; transition: stroke-dasharray .15s linear; }
.fb-tile-alert {
    position: absolute;
    right: 3px;
    bottom: 3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--crit);
    color: #fff;
    font-size: 10px;
    display: grid;
    place-items: center;
}
.fb-tile-meta { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.fb-tile-name { font-size: var(--fs-control); font-weight: 600; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fb-tile-size { font-size: var(--fs-hint); color: var(--ink-5); }
.fb-tile-problem { font-size: var(--fs-hint); color: var(--crit-ink); line-height: 1.3; }
.fb-link {
    border: 0;
    padding: 0;
    margin-left: 4px;
    background: none;
    color: var(--teal);
    font-weight: 600;
    text-decoration: underline;
    cursor: pointer;
    font-size: inherit;
}
.fb-tile-remove {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 24px;
    height: 24px;
    border: 0;
    border-radius: 50%;
    background: var(--surface-4);
    color: var(--ink-4);
    display: grid;
    place-items: center;
    cursor: pointer;
    opacity: 0; /* shown on hover and focus; always on touch screens */
    transition: opacity .15s;
}
.fb-tile:hover .fb-tile-remove, .fb-tile:focus-within .fb-tile-remove, .fb-tile-error .fb-tile-remove { opacity: 1; }
.fb-tile-remove:hover { background: var(--crit-bg); color: var(--crit-ink); }
.fb-tile-remove:focus-visible { opacity: 1; outline: 2px solid var(--teal); outline-offset: 1px; }
@media (hover: none) { .fb-tile-remove { opacity: 1; } }

/* ── Entry points: Contact support modal, nav dot, forum hint ── */
.fb-entry { margin-bottom: 18px; }
.fb-entry-title {
    font-size: var(--fs-section);
    font-weight: 600;
    letter-spacing: var(--ls-section);
    text-transform: uppercase;
    color: var(--ink-5);
    margin-bottom: 8px;
}
.fb-entry-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.fb-entry-tile {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 12px;
    border: 1px solid var(--rule-sec);
    border-radius: var(--r-section);
    background: var(--surface);
    text-align: left;
    cursor: pointer;
    color: var(--ink-2);
    transition: border-color .15s, box-shadow .15s;
}
.fb-entry-tile:hover { border-color: var(--teal); box-shadow: 0 2px 8px rgba(0, 57, 81, .08); }
.fb-entry-tile:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
.fb-entry-tile i { font-size: 18px; color: var(--teal); }
.fb-entry-tile strong { font-size: var(--fs-control); }
.fb-entry-tile span { font-size: var(--fs-hint); color: var(--ink-5); line-height: 1.3; }
.fb-entry-tile .fb-entry-new { color: var(--accent-ink); font-weight: 600; }
.fb-capture { display: flex; flex-direction: column; gap: 2px; margin-top: 10px; font-size: var(--fs-hint); color: var(--ink-5); }

.fb-nav-dot {
    position: absolute;
    top: 6px;
    right: 8px;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 2px #fff;
}

.fb-forum-hint {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 10px;
    padding: 10px 14px;
    border-radius: var(--r-section);
    background: #eef5f8;
    color: var(--ink-3);
    font-size: var(--fs-control);
}
.fb-forum-hint i { color: var(--teal); }
.fb-forum-hint a { font-weight: 600; color: var(--teal); }

/* ── Phones and narrow windows: one column, the list first ── */
@media (max-width: 900px) {
    .fb-page { padding: 0; }
    .fb-shell { border-radius: 0; border: 0; }
    .fb-side { width: 100%; min-width: 0; border-right: 0; }
    .fb-shell-list .fb-pane { display: none; }
    .fb-shell-pane .fb-side { display: none; }
    .fb-back { display: grid; place-items: center; }
    .fb-msg { max-width: 92%; }
    .fb-pane-scroll { padding: 14px; }
    .fb-pane-foot { padding: 10px 12px 12px; }
    .fb-kinds { grid-template-columns: 1fr; }
    .fb-entry-tiles { grid-template-columns: 1fr; }
    .fb-composer-hint-keys { display: none; }
    .fb-viewer-stage { padding: 0 8px 16px; }
    .fb-viewer-nav { width: 36px; height: 36px; }
}

@media (prefers-reduced-motion: reduce) {
    .fb-kind, .fb-entry-tile, .fb-composer-box, .fb-tile-remove, .fb-ring-value { transition: none; }
}

/* ═══ STAS staff side: inbox, item page, drafts, modals ═══ */
.fb-muted { color: var(--ink-5); }
.fb-small { font-size: var(--fs-hint); }
.fb-footer-left { margin-right: auto; }

.fb-tabs .nav-pills .nav-link { color: var(--ink-3); font-weight: 600; border-radius: var(--r-btn); }
.fb-tabs .nav-pills .nav-link.active, .fb-tabs .nav-pills .show > .nav-link { background: var(--teal); color: #fff; }

.fb-type { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-control); font-weight: 600; }
.fb-type-Bug { color: var(--crit-ink); }
.fb-type-FeatureRequest, .fb-type-Improvement { color: var(--teal); }
.fb-type-Question { color: #1f5fa8; }

.fb-inbox-title { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.fb-inbox-badges { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.fb-inbox-badges:empty { display: none; }

.fb-failed-card .card-header { background: var(--crit-row); }
.fb-failed-list { list-style: none; margin: 0; padding: 0; }
.fb-failed-list > li { display: flex; gap: 16px; justify-content: space-between; align-items: flex-start; padding: 12px 16px; border-top: 1px solid var(--rule-soft); }
.fb-failed-list > li:first-child { border-top: 0; }
.fb-failed-main { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.fb-failed-text { font-size: var(--fs-control); color: var(--ink-3); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.fb-failed-error { display: block; font-size: 11.5px; color: var(--crit-ink); white-space: pre-wrap; overflow-wrap: anywhere; }
.fb-failed-actions { flex: none; display: flex; gap: 6px; }

.fb-item-back { margin-bottom: 10px; }
.fb-item-facts { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 6px; }
.fb-item-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--block-gap); align-items: start; }
.fb-item-col { display: flex; flex-direction: column; gap: var(--block-gap); min-width: 0; }
.fb-card { border-radius: var(--r-section) !important; border-color: var(--rule-card) !important; }
.fb-card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-weight: 700; color: var(--ink-strong); background: var(--surface-2) !important; }
.fb-banner { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 10px 14px; margin-bottom: 12px; border-radius: var(--r-section); font-size: var(--fs-control); }
.fb-banner-warn { background: var(--accent-bg); color: var(--accent-ink); }
.fb-banner-info { background: #e8f0fb; color: #1f5fa8; }
.fb-banner a { font-weight: 600; }

.fb-report { margin: 0; display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; font-size: var(--fs-control); }
.fb-report dt { color: var(--ink-5); font-weight: 600; }
.fb-report dd { margin: 0; color: var(--ink-2); }
.fb-report ul { margin: 0; padding-left: 18px; }

.fb-decisions { display: flex; flex-wrap: wrap; gap: 8px; }
.fb-decision-btn { display: inline-flex !important; align-items: center; gap: 6px; border: 1px solid var(--rule-sec) !important; font-weight: 600; }
.fb-decision-btn:hover { border-color: var(--teal) !important; color: var(--teal) !important; }
.fb-decision-current { padding: 10px 12px; margin-bottom: 12px; border-radius: var(--r-field); background: var(--surface-3); border: 1px solid var(--rule-soft); font-size: var(--fs-control); }
.fb-decision-fact { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 8px 0; font-size: var(--fs-control); color: var(--ink-2); }
.fb-decision-fact > i { color: var(--teal); }
.fb-reason { display: inline-flex; flex-direction: column; gap: 1px; }
.fb-reason > span { font-size: var(--fs-hint); color: var(--ink-5); font-weight: 400; }

.fb-link-row { display: grid; grid-template-columns: 130px 1fr; gap: 10px; padding: 8px 0; border-top: 1px solid var(--rule-soft); font-size: var(--fs-control); }
.fb-link-row:first-child { border-top: 0; padding-top: 0; }
.fb-link-label { color: var(--ink-5); font-weight: 600; font-size: var(--fs-hint); text-transform: uppercase; letter-spacing: var(--ls-section); }

.fb-history { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; font-size: var(--fs-control); }
.fb-history li { display: flex; justify-content: space-between; gap: 12px; }

.fb-threads-title { font-size: var(--fs-section); font-weight: 600; letter-spacing: var(--ls-section); text-transform: uppercase; color: var(--ink-5); margin: 0; }
.fb-thread-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: var(--surface-2) !important; }
.fb-thread-who { min-width: 0; display: flex; flex-direction: column; }
.fb-thread-badges { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 10px; }
.fb-thread-badges:empty { display: none; }
.fb-messages-staff { max-width: none; margin: 0 0 10px; }
.fb-thread-reply { margin-top: 10px; }
.fb-thread-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.fb-thread-send { margin-left: auto; }
.fb-context-toggle { margin-top: 12px; border: 0; background: none; padding: 0; color: var(--teal); font-weight: 600; font-size: var(--fs-control); cursor: pointer; }
.fb-context { margin-top: 8px; font-size: var(--fs-hint); }
.fb-context pre { margin: 6px 0 0; max-height: 280px; overflow: auto; padding: 10px; border-radius: var(--r-field); background: var(--surface-3); border: 1px solid var(--rule-soft); font-size: 11.5px; white-space: pre-wrap; overflow-wrap: anywhere; }

.fb-drafts { display: flex; flex-direction: column; gap: var(--block-gap); max-width: 980px; }
.fb-draft-context { margin-bottom: 12px; }
.fb-draft-actions { display: flex; justify-content: space-between; gap: 8px; margin-top: 10px; }

.fb-model-row { margin-bottom: 14px; }
.fb-model-help { font-size: var(--fs-hint); color: var(--ink-5); margin: -2px 0 6px; }

.fb-pick-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; max-height: 420px; overflow-y: auto; }
.fb-pick-item { width: 100%; text-align: left; display: flex; flex-direction: column; gap: 4px; padding: 10px 12px; border: 1px solid var(--rule-sec); border-radius: var(--r-field); background: var(--surface); cursor: pointer; }
.fb-pick-item:hover { border-color: var(--teal); }
.fb-pick-item:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
.fb-pick-title { font-weight: 600; color: var(--ink-2); }
.fb-pick-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: var(--fs-hint); color: var(--ink-5); }
.fb-pick-empty { padding: 20px 0; text-align: center; color: var(--ink-5); }

@media (max-width: 1200px) {
    .fb-item-grid { grid-template-columns: 1fr; }
}
