/* ═══════════════════════════════════════════════
   Shoutbox v3.3  —  Dark theme
   ═══════════════════════════════════════════════ */

#sb-wrap, #sb-wrap * { box-sizing: border-box; }

/* ── Wrapper ──────────────────────────────────── */
#sb-wrap {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    font-size: 13px; line-height: 1.45;
    background: #1c1d20; border-radius: 8px; overflow: hidden;
    border: 1px solid #2a2b2f; box-shadow: 0 6px 24px rgba(0,0,0,.5);
    margin: 10px 0 18px; color: #c8cad0;
}

/* ── Header / Tabs ────────────────────────────── */
#sb-head {
    display: flex; align-items: center; justify-content: space-between;
    background: #282b30; border-bottom: 1px solid #2a2b2f;
    padding: 0 12px 0 0; min-height: 42px;
}
#sb-tabs { display: flex; align-items: stretch; height: 42px; }
.sb-tab {
    padding: 0 16px; border: none; background: transparent;
    color: #6a6c74; font-size: 13px; font-weight: 600; cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: color .15s, border-color .15s;
    display: inline-flex; align-items: center; gap: 6px; font-family: inherit;
}
.sb-tab:hover  { color: #c8cad0; }
.sb-tab.active { color: #fff; border-bottom-color: #fff; }

.sb-tab-badge {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 18px; height: 18px; background: #e05252; color: #000;
    font-size: 10px; font-weight: 800; border-radius: 9px; padding: 0 4px; line-height: 1;
}
.sb-tab-badge-users { background: #fff; }

#sb-head-right { display: flex; align-items: center; gap: 8px; }
#sb-toggle {
    width: 26px; height: 26px; border-radius: 50%; border: none;
    background: #26272b; color: #9ea0a8; cursor: pointer; font-size: 11px;
    display: flex; align-items: center; justify-content: center; padding: 0;
    transition: background .2s, color .2s;
}
#sb-toggle:hover { background: #3a3b40; color: #fff; }

/* ── Pinned message bar ───────────────────────── */
#sb-pinned-container:empty { display: none; }
#sb-pinned-bar {
    display: flex; align-items: center; gap: 8px;
    padding: 6px 12px; background: #1a1f2e;
    border-bottom: 1px solid #2d3555;
    font-size: 12px; min-height: 34px;
    animation: sbSlide .2s ease;
}
.sb-pin-icon { font-size: 13px; flex-shrink: 0; opacity: .8; }
.sb-pin-author {
    font-weight: 700; color: #6ab0f5; flex-shrink: 0;
    white-space: nowrap;
}
.sb-pin-sep { color: #3a3c44; flex-shrink: 0; }
.sb-pin-text {
    color: #9ea0a8; white-space: nowrap; overflow: hidden;
    text-overflow: ellipsis; flex: 1;
}
.sb-pin-unpin {
    flex-shrink: 0; background: none; border: none; color: #46484f;
    cursor: pointer; font-size: 12px; padding: 2px 5px; border-radius: 3px;
    transition: color .15s, background .15s; line-height: 1;
}
.sb-pin-unpin:hover { color: #ee0055; background: rgba(238,0,85,.1); }

/* ── Messages window ──────────────────────────── */
#sb-window {
    overflow-y: auto; background: #1c1d20; scroll-behavior: smooth;
}
#sb-window::-webkit-scrollbar { width: 5px; }
#sb-window::-webkit-scrollbar-thumb { background: #35363b; border-radius: 3px; }

/* ── Shout row ────────────────────────────────── */
.sb-entry {
    display: flex; align-items: center; padding: 5px 12px 5px 10px;
    border-bottom: 1px solid rgba(255,255,255,.035);
    transition: background .1s; min-height: 40px; position: relative;
}
.sb-entry:last-child  { border-bottom: none; }
.sb-entry:hover       { background: #222327; }
.sb-entry:nth-child(even)       { background: #1f2024; }
.sb-entry:nth-child(even):hover { background: #222327; }
.sb-entry.me-entry .sb-text { font-style: italic; color: #8a8c94; }
.sb-entry.bot-entry { border-left: 2px solid #cc4444; background: rgba(204,68,68,.05) !important; }
.sb-entry.bot-entry:hover { background: rgba(204,68,68,.09) !important; }

/* ── Avatar col ───────────────────────────────── */
.sb-avatar-col {
    flex-shrink: 0; width: 40px; height: 34px;
    display: flex; align-items: center; justify-content: center; margin-right: 9px;
}
.sb-avatar-col img.sb-avatar,
.sb-avatar-col .sb-av-initial,
.sb-avatar-col .sb-av-bot {
    width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0; display: block;
}
img.sb-avatar { object-fit: cover; border: 1px solid rgba(255,255,255,.09); background: #2a2b30; }
.sb-av-initial {
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 13px; color: #fff; text-transform: uppercase;
    border: 1px solid rgba(255,255,255,.1);
}
.sb-av-bot {
    display: flex; align-items: center; justify-content: center;
    font-size: 14px; background: rgba(204,68,68,.15); border: 1px solid rgba(204,68,68,.3); color: #cc4444;
}

/* ── Username col ─────────────────────────────── */
.sb-user-col {
    flex-shrink: 0; width: 130px; min-width: 80px; max-width: 160px;
    display: flex; align-items: center; gap: 4px; overflow: visible;
    padding-right: 10px; justify-content: flex-end;
}

/* Default — no namestyle */
.sb-username {
    font-weight: 700 !important;
    text-decoration: none !important;
    color: #6ab0f5 !important;
    white-space: nowrap !important;
    transition: opacity .15s !important;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    display: block;
}
.sb-username:hover { opacity: .78; }

.sb-username.sb-has-style {
    color: unset !important;
    font-weight: unset !important;
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: unset !important;
    max-width: none !important;
    display: inline !important;
    text-decoration: none !important;
    transition: opacity .15s !important;
}
.sb-username.sb-has-style:hover { opacity: .85; }

.sb-bot-name { font-weight: 700; color: #cc4444; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-bot-badge {
    display: inline-block; background: #2a1010; color: #cc4444;
    font-size: 9px; font-weight: 800; letter-spacing: .5px; text-transform: uppercase;
    border: 1px solid rgba(204,68,68,.4); border-radius: 3px; padding: 1px 4px; line-height: 1.5; flex-shrink: 0;
}

/* ── Text col ─────────────────────────────────── */
.sb-text-col {
    flex: 1; min-width: 0; padding: 0 10px;
    color: #c8cad0; word-break: break-word; overflow-wrap: anywhere;
    border-left: 1px solid #2e2f35; display: flex; flex-direction: column; gap: 3px;
}
.sb-text { display: inline; }
.sb-text img.smilie { vertical-align: middle; max-height: 20px; }
.sb-text a { color: #5ba5f5; text-decoration: none; }
.sb-text a:hover { text-decoration: underline; }
.sb-mention { color: #5ba5f5; font-weight: 600; text-decoration: none; padding: 0 1px; border-radius: 3px; }
.sb-mention:hover { background: rgba(91,165,245,.15); }

/* ── Quoted reply block ───────────────────────── */
.sb-reply-quote {
    display: flex; align-items: center; gap: 7px;
    background: rgba(255,255,255,.04); border-radius: 4px;
    padding: 4px 8px; font-size: 12px; max-width: 100%;
    overflow: hidden; cursor: default;
}
.sb-rq-bar {
    flex-shrink: 0; width: 3px; height: 22px;
    background: #fff; border-radius: 2px;
}
.sb-rq-author { font-weight: 700; color: #6ab0f5; flex-shrink: 0; white-space: nowrap; }
.sb-rq-text { color: #6a6c74; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; }

/* ── Right col ────────────────────────────────── */
.sb-right-col {
    flex-shrink: 0; display: flex; align-items: center; gap: 3px;
    padding-left: 8px; white-space: nowrap;
    opacity: 0; transition: opacity .15s;
}
.sb-entry:hover .sb-right-col { opacity: 1; }
.sb-right-col .sb-date { opacity: 1; }
.sb-date { font-size: 11px; color: #46484f; padding-left: 4px; }

/* ── Reply strip ──────────────────────────────── */
#sb-reply-strip {
    display: flex; align-items: center; gap: 7px;
    background: #1a2035; border-top: 1px solid #2a2b2f;
    padding: 5px 12px; font-size: 12px; flex-wrap: nowrap;
}
.sb-rs-label  { color: #5865f2; font-weight: 600; flex-shrink: 0; }
.sb-rs-author { color: #6ab0f5; font-weight: 700; flex-shrink: 0; }
.sb-rs-sep    { color: #3a3c44; flex-shrink: 0; }
.sb-rs-preview { color: #6a6c74; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; }
.sb-rs-cancel {
    flex-shrink: 0; background: none; border: none; color: #55575f; cursor: pointer;
    font-size: 13px; padding: 2px 4px; border-radius: 3px; transition: color .15s;
    font-family: inherit; line-height: 1;
}
.sb-rs-cancel:hover { color: #ee0055; }

/* ── Reply + mod buttons ──────────────────────── */
.sb-reply-btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 20px; height: 20px; font-size: 13px; border-radius: 3px;
    cursor: pointer; text-decoration: none; border: none; background: transparent;
    color: #4a8ccc; transition: background .15s, color .15s; line-height: 1;
}
.sb-reply-btn:hover { background: #1a2e44; color: #6ab0f5; }

.sb-mod-btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 18px; height: 18px; font-size: 10px; font-weight: 700;
    border-radius: 3px; cursor: pointer; text-decoration: none;
    border: none; background: transparent; color: #3a3c44;
    transition: background .15s, color .15s; font-family: inherit; line-height: 1;
}
.sb-mod-btn:hover      { background: #2e2f38; color: #c8cad0; }
.sb-mod-btn.del:hover  { background: #3a1414; color: #ee0055; }
.sb-mod-btn.edit:hover { background: #1a2a1a; color: #44cc44; }
.sb-mod-btn.ban:hover  { background: #3a2010; color: #e07020; }
.sb-mod-btn.clr:hover  { background: #2a1a3a; color: #aa55ff; }
.sb-mod-btn.pin:hover  { background: #1a1f2e; color: #6ab0f5; }
.sb-ip { font-size: 10px; color: #3a3b40; font-family: monospace; }

/* ── Mod bar ──────────────────────────────────── */
#sb-modbar {
    display: flex; align-items: center; gap: 6px; padding: 5px 12px;
    background: #161719; border-top: 1px solid #2a2b2f; border-bottom: 1px solid #2a2b2f;
}
#sb-modbar > span { font-size: 11px; font-weight: 700; color: #8a6020; text-transform: uppercase; letter-spacing: .4px; }
.sb-modbar-btn {
    padding: 2px 9px; background: #26272b; color: #9ea0a8; border: 1px solid #35363b;
    border-radius: 4px; font-size: 11px; cursor: pointer; transition: background .15s, color .15s; font-family: inherit;
}
.sb-modbar-btn:hover        { background: #35363b; color: #e2e4ea; }
.sb-modbar-btn.danger:hover { background: #3a1414; color: #ee0055; border-color: #5a2020; }

/* ── Input area ───────────────────────────────── */
#sb-input-area, #sb-pm-input-area {
    background: #ff; border-top: 1px solid #2a2b2f; padding: 8px 10px;
    flex-shrink: 0;
}
#sb-input-row, #sb-pm-input-row { display: flex; align-items: flex-end; gap: 5px; }
#sb-textarea, #sb-pm-textarea {
    flex: 1; background: #26272b; border: 1px solid #35363b; border-radius: 6px;
    color: #c8cad0; font-family: inherit; font-size: 13px; padding: 7px 10px;
    resize: none; outline: none; line-height: 1.4;
    max-height: 120px; min-height: 36px; overflow-y: hidden; transition: border-color .2s;
}
#sb-textarea::placeholder, #sb-pm-textarea::placeholder { color: #46484f; }
#sb-textarea:focus, #sb-pm-textarea:focus { border-color: #5865f2; background: #2a2b30; }
#sb-send, .sb-send-btn {
    width: 36px; height: 36px; flex-shrink: 0; background: #26272b;
    border: 1px solid #35363b; border-radius: 6px; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    color: #5865f2; transition: background .15s, border-color .15s; padding: 0;
}
#sb-send:hover, .sb-send-btn:hover { background: #ff; border-color: #fff; color: #fff; }
#sb-send svg, .sb-send-btn svg { width: 15px; height: 15px; }
#sb-smilie-btn, #sb-pm-smilie-btn {
    width: 36px; height: 36px; flex-shrink: 0; background: transparent; border: none;
    cursor: pointer; font-size: 18px; display: flex; align-items: center; justify-content: center;
    border-radius: 6px; transition: background .15s; color: #9ea0a8; padding: 0;
}
#sb-smilie-btn:hover, #sb-pm-smilie-btn:hover { background: #26272b; color: #fff; }
#sb-toolbar, #sb-pm-toolbar { display: flex; align-items: center; margin-top: 4px; }
#sb-charcount, #sb-pm-charcount { font-size: 11px; color: #46484f; }
#sb-charcount.over, #sb-pm-charcount.over { color: #e05252; font-weight: 700; }

/* ── PM pane ──────────────────────────────────── */
#sb-pane-pm  { display: flex; flex-direction: column; }
#sb-pane-users { display: flex; flex-direction: column; }
#sb-pm-list-view, #sb-pm-thread-view { display: flex; flex-direction: column; flex: 1; min-height: 0; }
#sb-pm-list-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 8px 12px; border-bottom: 1px solid #2a2b2f; flex-shrink: 0;
    font-size: 12px; font-weight: 700; color: #8a8c94; text-transform: uppercase; letter-spacing: .4px;
}
#sb-pm-list { overflow-y: auto; flex: 1; min-height: 0; }
#sb-pm-list::-webkit-scrollbar { width: 5px; }
#sb-pm-list::-webkit-scrollbar-thumb { background: #35363b; border-radius: 3px; }

.sb-conv-item {
    display: flex; align-items: center; gap: 10px; padding: 9px 12px;
    cursor: pointer; border-bottom: 1px solid rgba(255,255,255,.03);
    transition: background .1s; width: 100%;
}
.sb-conv-item:hover { background: #222327; }
.sb-conv-item:last-child { border-bottom: none; }
.sb-conv-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.sb-conv-name { font-weight: 700; color: #e2e4ea; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-conv-time { font-size: 11px; color: #55575f; }
.sb-conv-unread {
    flex-shrink: 0; min-width: 20px; height: 20px; border-radius: 10px;
    background: #5865f2; color: #fff; font-size: 10px; font-weight: 800;
    display: flex; align-items: center; justify-content: center; padding: 0 5px;
}
.sb-pm-empty { padding: 28px 16px; text-align: center; color: #46484f; font-style: italic; line-height: 1.7; }
.sb-pm-loading { padding: 20px; text-align: center; color: #46484f; }

#sb-pm-thread-view { display: flex; flex-direction: column; flex: 1; min-height: 0; }
#sb-pm-thread-header {
    display: flex; align-items: center; gap: 10px;
    padding: 8px 12px; border-bottom: 1px solid #2a2b2f; background: #161719;
    font-size: 13px; font-weight: 700; color: #e2e4ea; flex-shrink: 0;
}
.sb-back-btn {
    background: none; border: none; color: #5ba5f5; cursor: pointer; font-size: 13px;
    padding: 2px 6px; border-radius: 4px; transition: background .15s; font-family: inherit;
}
.sb-back-btn:hover { background: #1a3a5c; }
#sb-pm-thread-title { flex: 1; }
#sb-pm-thread {
    overflow-y: auto; flex: 1; min-height: 0; padding: 10px 12px;
    display: flex; flex-direction: column; gap: 6px;
}
#sb-pm-thread::-webkit-scrollbar { width: 5px; }
#sb-pm-thread::-webkit-scrollbar-thumb { background: #35363b; border-radius: 3px; }

.sb-pm-msg { display: flex; gap: 8px; align-items: flex-start; max-width: 85%; position: relative; }
.sb-pm-msg-mine    { align-self: flex-end; flex-direction: row-reverse; }
.sb-pm-msg-theirs  { align-self: flex-start; }
.sb-pm-msg-avatar  { flex-shrink: 0; }
.sb-pm-msg-avatar img.sb-avatar,
.sb-pm-msg-avatar .sb-av-initial { width: 28px; height: 28px; border-radius: 50%; font-size: 11px; }
.sb-pm-msg-avatar img.sb-avatar { object-fit: cover; border: 1px solid rgba(255,255,255,.09); }
.sb-pm-msg-avatar .sb-av-initial { display: flex; align-items: center; justify-content: center; font-weight: 700; color: #fff; text-transform: uppercase; }
.sb-pm-msg-bubble { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.sb-pm-msg-meta { display: flex; align-items: center; gap: 6px; font-size: 11px; color: #55575f; }
.sb-pm-msg-mine .sb-pm-msg-meta { flex-direction: row-reverse; }
.sb-pm-msg-name { font-weight: 700; color: #9ea0a8; }
.sb-pm-msg-time { font-size: 10px; }
.sb-pm-msg-text {
    background: #26272b; border-radius: 8px; padding: 7px 10px;
    color: #c8cad0; word-break: break-word; font-size: 13px; line-height: 1.45;
    border: 1px solid #2e2f35;
}
.sb-pm-msg-mine .sb-pm-msg-text { background: #2a2f4e; border-color: #3a4070; color: #d0d4f5; }
.sb-pm-msg-text a { color: #5ba5f5; }
.sb-pm-msg-actions { display: none; gap: 2px; margin-left: 4px; }
.sb-pm-msg:hover .sb-pm-msg-actions { display: inline-flex; }

/* ── Users pane ───────────────────────────────── */
#sb-users-list { overflow-y: auto; flex: 1; min-height: 0; padding: 10px 12px; }
#sb-users-list::-webkit-scrollbar { width: 5px; }
#sb-users-list::-webkit-scrollbar-thumb { background: #35363b; border-radius: 3px; }
.sb-users-list-inner {
    display: flex; flex-direction: row; flex-wrap: wrap;
    gap: 4px; align-content: flex-start;
}
.sb-user-link {
    display: inline-flex; align-items: center;
    padding: 3px 10px; border-radius: 12px;
    background: #26272b; border: 1px solid #35363b;
    color: #6ab0f5; font-weight: 600; font-size: 12px;
    text-decoration: none; transition: background .1s, border-color .1s, color .1s;
    white-space: nowrap;
}
.sb-user-link:hover { background: #1a2e44; border-color: #4a7aaa; color: #7ec4ff; text-decoration: none; }
.sb-user-guest { color: #6a6c74; border-color: #2e2f35; cursor: default; }
.sb-user-guest:hover { background: #26272b; border-color: #2e2f35; color: #6a6c74; }

/* ── Single-tab inactive overlay ─────────────── */
#sb-inactive-overlay {
    position: absolute; inset: 0; background: rgba(20,21,23,.92);
    display: flex; align-items: center; justify-content: center;
    z-index: 100; backdrop-filter: blur(3px); border-radius: 8px;
}
#sb-wrap { position: relative; }
.sb-inactive-msg { text-align: center; color: #c8cad0; padding: 20px; }
.sb-inactive-icon { font-size: 32px; margin-bottom: 10px; }
.sb-inactive-msg p { margin: 0 0 14px; color: #9ea0a8; font-size: 13px; }
.sb-inactive-msg button {
    background: #5865f2; color: #fff; border: none; border-radius: 6px;
    padding: 8px 20px; font-size: 13px; font-weight: 600; cursor: pointer;
    transition: opacity .15s; font-family: inherit;
}
.sb-inactive-msg button:hover { opacity: .85; }

/* ── Floating smilie picker ───────────────────── */
#sb-smilie-picker, #sb-pm-smilie-picker {
    position: fixed; z-index: 99997; display: none;
    filter: drop-shadow(0 6px 20px rgba(0,0,0,.6));
}
#sb-smilie-picker.open, #sb-pm-smilie-picker.open { display: block; animation: sbPickerIn .15s ease; }
@keyframes sbPickerIn {
    from { opacity:0; transform: translateY(6px) scale(.97); }
    to   { opacity:1; transform: translateY(0) scale(1);     }
}
#sb-smilie-picker::after, #sb-pm-smilie-picker::after {
    content: ''; position: absolute; bottom: -7px; left: 50%; transform: translateX(-50%);
    border: 7px solid transparent; border-top-color: #35363b; pointer-events: none;
}
#sb-smilie-picker::before, #sb-pm-smilie-picker::before {
    content: ''; position: absolute; bottom: -6px; left: 50%; transform: translateX(-50%);
    border: 6px solid transparent; border-top-color: #2a2b30; pointer-events: none; z-index: 1;
}
#sb-smilie-picker-inner, #sb-pm-smilie-picker-inner {
    background: #2a2b30; border: 1px solid #35363b; border-radius: 10px; padding: 8px;
    display: flex; flex-wrap: wrap; gap: 2px; max-width: 260px; max-height: 180px; overflow-y: auto;
}
#sb-smilie-picker-inner::-webkit-scrollbar,
#sb-pm-smilie-picker-inner::-webkit-scrollbar { width: 4px; }
#sb-smilie-picker-inner::-webkit-scrollbar-thumb,
#sb-pm-smilie-picker-inner::-webkit-scrollbar-thumb { background: #45464d; border-radius: 2px; }
.sb-smilie { cursor: pointer; padding: 4px; border-radius: 5px; max-height: 28px; display: block; transition: background .12s, transform .1s; }
.sb-smilie:hover { background: #35363b; transform: scale(1.2); }

/* ── Notices ──────────────────────────────────── */
.sb-notice { padding: 9px 14px; font-size: 12px; text-align: center; color: #8a8c94; border-top: 1px solid #2a2b2f; }
.sb-notice.banned { color: #cc4444; background: rgba(204,68,68,.08); }
.sb-notice a { color: #5ba5f5; }
#sb-empty { padding: 30px 0; text-align: center; color: #46484f; font-style: italic; }
#sb-body.collapsed { display: none; }

/* ── Local card (/help etc.) ──────────────────── */
.sb-local-card {
    margin: 6px 10px; background: #1e2030; border: 1px solid #35363b;
    border-radius: 8px; padding: 12px 14px 10px; position: relative; font-size: 13px;
    animation: sbSlide .2s ease;
}
.sb-local-card-close {
    position: absolute; top: 8px; right: 8px; background: none; border: none;
    color: #55575f; cursor: pointer; font-size: 13px; padding: 2px 5px;
    border-radius: 4px; transition: background .15s, color .15s;
}
.sb-local-card-close:hover { background: #3a1414; color: #ee0055; }
.sb-help-popup { color: #c8cad0; }
.sb-help-title { font-weight: 700; font-size: 13px; color: #e2e4ea; margin-bottom: 8px; }
.sb-help-table { border-collapse: collapse; width: 100%; }
.sb-help-table td { padding: 4px 8px 4px 0; vertical-align: top; }
.sb-help-cmd  { font-family: monospace; color: #6ab0f5; font-size: 12px; white-space: nowrap; padding-right: 14px; }
.sb-help-desc { color: #8a8c94; font-size: 12px; }

/* ── Toast ────────────────────────────────────── */
.sb-toast { padding: 7px 14px; font-size: 12px; animation: sbSlide .2s ease; }
@keyframes sbSlide {
    from { opacity:0; transform: translateY(-4px); }
    to   { opacity:1; transform: translateY(0);    }
}

/* ── Inline edit ──────────────────────────────── */
.sb-edit-area {
    display: block; width: 100%; background: #26272b; border: 1px solid #5865f2;
    border-radius: 4px; color: #c8cad0; font-family: inherit; font-size: 13px;
    padding: 4px 8px; resize: none; outline: none; margin-top: 3px;
}
.sb-edit-actions { display: flex; gap: 5px; margin-top: 4px; }

/* ── Modal ────────────────────────────────────── */
.sb-modal-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,.72);
    display: flex; align-items: center; justify-content: center;
    z-index: 99999; backdrop-filter: blur(2px);
}
.sb-modal {
    background: #1e1f23; border: 1px solid #2a2b2f; border-radius: 10px;
    width: 460px; max-width: 95vw; max-height: 70vh;
    display: flex; flex-direction: column;
    box-shadow: 0 20px 60px rgba(0,0,0,.7); color: #c8cad0;
}
.sb-modal-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 13px 16px; border-bottom: 1px solid #2a2b2f;
    font-size: 14px; font-weight: 700; color: #e2e4ea;
}
.sb-modal-close {
    width: 26px; height: 26px; background: #26272b; border: none; border-radius: 50%;
    cursor: pointer; color: #9ea0a8; font-size: 13px;
    display: flex; align-items: center; justify-content: center;
    transition: background .15s, color .15s; font-family: inherit; padding: 0;
}
.sb-modal-close:hover { background: #3a1414; color: #ee0055; }
.sb-modal-body { padding: 14px 16px; overflow-y: auto; flex: 1; }
.sb-modal-body label {
    display: block; font-size: 11px; color: #8a8c94;
    text-transform: uppercase; letter-spacing: .4px; margin-bottom: 10px;
}
.sb-modal-body label input {
    display: block; margin-top: 4px; width: 100%; background: #26272b;
    border: 1px solid #35363b; border-radius: 5px; color: #c8cad0;
    font-family: inherit; font-size: 13px; padding: 7px 10px; outline: none;
    text-transform: none; letter-spacing: 0; font-weight: 400; transition: border-color .2s;
}
.sb-modal-body label input:focus { border-color: #5865f2; }
.sb-modal-footer {
    padding: 10px 16px 13px; display: flex; justify-content: flex-end;
    gap: 7px; border-top: 1px solid #2a2b2f;
}
.sb-btn { padding: 6px 15px; border-radius: 5px; border: none; cursor: pointer; font-size: 13px; font-weight: 600; font-family: inherit; transition: opacity .15s; }
.sb-btn:hover   { opacity: .85; }
.sb-btn-primary { background: #5865f2; color: #fff; }
.sb-btn-ghost   { background: #26272b; color: #9ea0a8; border: 1px solid #35363b; }
.sb-btn-danger  { background: #cc4444; color: #fff; }
.sb-btn-sm      { padding: 3px 10px; font-size: 11px; }

/* ── Ban list ─────────────────────────────────── */
.sb-ban-item { padding: 8px 0; border-bottom: 1px solid #26272b; display: flex; align-items: center; gap: 5px; flex-wrap: wrap; font-size: 12px; }
.sb-ban-item:last-child { border-bottom: none; }
.sb-ban-item strong { color: #e2e4ea; }
.sb-ban-item .sb-btn { margin-left: auto; }

/* ── @mention autocomplete dropdown ──────────── */
#sb-ac-dropdown {
    position: fixed; z-index: 99996;
    background: #2a2b30; border: 1px solid #3a3b42; border-radius: 8px;
    width: 240px; max-height: 260px; overflow-y: auto;
    box-shadow: 0 8px 24px rgba(0,0,0,.55); padding: 4px;
    animation: sbPickerIn .12s ease;
}
#sb-ac-dropdown::-webkit-scrollbar { width: 4px; }
#sb-ac-dropdown::-webkit-scrollbar-thumb { background: #45464d; border-radius: 2px; }
.sb-ac-item { display: flex; align-items: center; gap: 9px; padding: 6px 8px; border-radius: 5px; cursor: pointer; transition: background .1s; user-select: none; }
.sb-ac-item:hover, .sb-ac-item.active { background: #35363d; }
.sb-ac-avatar { flex-shrink: 0; width: 28px; height: 28px; }
.sb-ac-av-img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; display: block; border: 1px solid rgba(255,255,255,.08); }
.sb-ac-av-initial { width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; color: #fff; background: #5865f2; text-transform: uppercase; }
.sb-ac-name { font-size: 13px; font-weight: 600; color: #e2e4ea; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
