﻿:root {
    /* Высота нижней мобильной навигации (включая зону около браузера).
       Используется как отступ снизу для инпута и других элементов на мобильных. */
    --mobile-nav-h: 44px;

    /* Шрифт и базовый размер — управляются из Настройки → Внешний вид
       (см. FontService и window.bimflowFont). Значение по-умолчанию равно
       тому, что было захардкожено раньше — fallback на случай отсутствия
       сохранённой настройки в localStorage. */
    --app-font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    --app-font-size: 15px;
}

html, body {
    font-family: var(--app-font-family);
    font-size: var(--app-font-size);
}

/* ── Глобальный тонкий тёмный scrollbar для всех скроллируемых областей ── */
* {
    scrollbar-width: thin;
    scrollbar-color: #0f1012 transparent;
}

*::-webkit-scrollbar {
    width: 4px;
    height: 4px;
}

*::-webkit-scrollbar-track {
    background: transparent;
}

*::-webkit-scrollbar-thumb {
    background-color: #0f1012;
    border-radius: 2px;
}

*::-webkit-scrollbar-thumb:hover {
    background-color: #000000;
}

*::-webkit-scrollbar-corner {
    background: transparent;
}

h1:focus {
    outline: none;
}

a, .btn-link {
    color: #0071c1;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.content {
    padding-top: 1.1rem;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid red;
}

.validation-message {
    color: red;
}

#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

/* ── Splash / WASM loading screen ── */
.bimflow-splash {
    position: fixed; inset: 0;
    background: #1e1f22;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    gap: 0;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    z-index: 9999;
}

/* Logo */
.bimflow-splash__logo {
    width: 88px; height: 88px;
    animation: splash-pulse 2s ease-in-out infinite;
    margin-bottom: 20px;
}
.bimflow-splash__logo svg {
    width: 100%; height: 100%;
    filter: drop-shadow(0 0 24px rgba(88,101,242,.55));
}
@keyframes splash-pulse {
    0%, 100% { transform: scale(1);   opacity: 1; }
    50%       { transform: scale(1.08); opacity: .85; }
}

/* App name */
.bimflow-splash__title {
    font-size: 26px; font-weight: 700;
    color: #fff; letter-spacing: .5px;
    margin-bottom: 32px;
}

/* Animated dots */
.bimflow-splash__dots {
    display: flex; gap: 8px;
    margin-bottom: 48px;
}
.bimflow-splash__dots span {
    width: 8px; height: 8px; border-radius: 50%;
    background: #5865f2;
    animation: splash-dot 1.2s ease-in-out infinite;
}
.bimflow-splash__dots span:nth-child(1) { animation-delay: 0s; }
.bimflow-splash__dots span:nth-child(2) { animation-delay: .2s; }
.bimflow-splash__dots span:nth-child(3) { animation-delay: .4s; }
@keyframes splash-dot {
    0%, 80%, 100% { transform: scale(.7); opacity: .35; }
    40%           { transform: scale(1.2); opacity: 1; }
}

/* Progress bar */
.bimflow-splash__bar-wrap {
    position: fixed; bottom: 0; left: 0; right: 0;
    height: 3px; background: rgba(255,255,255,.07);
}
.bimflow-splash__bar {
    height: 100%;
    background: linear-gradient(90deg, #5865f2, #7289da);
    transition: width .08s ease-out;
    border-radius: 0 2px 2px 0;
    box-shadow: 0 0 8px rgba(88,101,242,.7);
}

/* Percentage text */
.bimflow-splash__percent {
    position: fixed; bottom: 12px;
    font-size: 12px; color: rgba(255,255,255,.3);
    letter-spacing: .5px;
}
.bimflow-splash__percent::after {
    content: var(--blazor-load-percentage-text, "Загрузка...");
}

/* Keep legacy class names harmless (Blazor may still write them) */
.loading-progress { display: none; }
.loading-progress-text { display: none; }

code {
    color: #c02d76;
}


/* ── Chat PWA additions ── */
html, body { height: 100%; margin: 0; background: #313338; }
#app { height: 100%; }

.chat-empty-state {
    display: flex; flex-direction: column; align-items: center;
    justify-content: center; height: 100%; color: #949ba4;
}
.chat-empty-icon { font-size: 48px; margin-bottom: 12px; }
.chat-empty-text { font-size: 16px; }

.chat-loading, .chat-no-msgs {
    text-align: center; padding: 40px 0; color: #949ba4; font-size: 14px;
}

/* Индикатор подгрузки старых сообщений (scroll-up infinite load) */
.chat-load-more {
    display: flex; justify-content: center; align-items: center;
    padding: 12px 0;
}
.chat-load-more-spinner {
    width: 22px; height: 22px;
    border: 2px solid #4e5058;
    border-top-color: #5865f2;
    border-radius: 50%;
    animation: chat-spin 0.7s linear infinite;
}
@keyframes chat-spin {
    to { transform: rotate(360deg); }
}
.chat-load-more-hint {
    text-align: center; padding: 8px 0; color: #4e5058; font-size: 12px;
}

.chat-panel-hdr-av { margin-right: 8px; flex-shrink: 0; }

/* ── App Shell ── */
.app-shell {
    display: flex;
    height: 100vh;
    overflow: hidden;
    background: #313338;
}
.app-content {
    flex: 1;
    min-width: 0;
    min-height: 0; /* required so height:100% resolves on children in Safari */
    overflow: hidden;
    position: relative; /* anchor for absolute children if needed */
}

/* ── App Rail ── */
.app-rail {
    width: 72px;
    min-width: 72px;
    background: #1e1f22;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px 0;
    gap: 0;
    overflow-y: auto;
    overflow-x: hidden;
}
.app-rail-top { display: flex; flex-direction: column; align-items: center; gap: 8px; flex: 1; }
.app-rail-bottom { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.app-rail-sep { width: 32px; height: 2px; background: rgba(255,255,255,.1); border-radius: 1px; margin: 4px 0; }

.app-rail-item {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #1e1f22;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #dbdee1;
    text-decoration: none;
    font-size: 18px;
    transition: border-radius .15s, background .15s;
    flex-shrink: 0;
    overflow: hidden;
    border: none;
    cursor: pointer;
}
.app-rail-item:hover,
.app-rail-item--active {
    border-radius: 16px;
    background: #5865f2;
    color: #fff;
}
.app-rail-item--add { color: #3ba55d; background: #1e1f22; }
.app-rail-item--add:hover { background: #3ba55d; color: #fff; }
.app-rail-item--bots { color: #3ba55d; background: #1e1f22; }
.app-rail-item--bots:hover, .app-rail-item--bots.app-rail-item--active { background: #3ba55d; color: #fff; }

.app-rail-srv-img { width: 100%; height: 100%; object-fit: cover; }
.app-rail-srv-initials { font-size: 14px; font-weight: 600; }

.app-rail-profile {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #5865f2;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    overflow: hidden;
    transition: border-radius .15s;
}
.app-rail-profile:hover { border-radius: 16px; }
.app-rail-av { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; }

/* ── Modals ── */
.app-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.7);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    box-sizing: border-box;
}
.app-modal {
    background: #2b2d31;
    border-radius: 8px;
    padding: 24px;
    width: 380px;
    max-width: 95vw;
    max-height: 90vh;
    overflow-y: auto;
    color: #dbdee1;
}
.app-modal-header {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 20px;
    color: #fff;
}
.app-modal-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    margin-top: 16px;
}
.app-modal-btn {
    padding: 8px 16px;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    font-size: 14px;
    background: #4e5058;
    color: #fff;
}
.app-modal-btn:hover { background: #5d6069; }
.app-modal-btn--primary { background: #5865f2; }
.app-modal-btn--primary:hover { background: #4752c4; }
.app-modal-btn--danger { background: #da373c; }
.app-modal-btn--danger:hover { background: #c03034; }
.app-modal-btn:disabled { opacity: .5; cursor: not-allowed; }
.app-modal-title { color: #f2f3f5; font-size: 20px; font-weight: 700; margin-bottom: 8px; text-align: center; }
.app-modal-hint  { color: #949ba4; font-size: 13px; text-align: center; margin-bottom: 20px; }
.app-modal-field { margin-bottom: 16px; }
.app-modal-label { display: block; color: #b5bac1; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; margin-bottom: 6px; }
.app-modal-input { width: 100%; padding: 10px 14px; background: #1e1f22; border: 1px solid #3f4147; border-radius: 6px; color: #f2f3f5; font-size: 14px; outline: none; box-sizing: border-box; transition: border-color .15s; }
.app-modal-input:focus { border-color: #5865f2; }
.app-modal-input::placeholder { color: #72767d; }

/* ── Server choice modal ── */
.app-srv-choice-box {
    background: #313338; border-radius: 12px;
    padding: 28px;
    width: 100%;
    max-width: 460px;
    max-height: calc(100vh - 24px);
    overflow-y: auto;
    box-sizing: border-box;
    box-shadow: 0 16px 48px rgba(0,0,0,.5);
}
.app-srv-choice-btns { display: flex; gap: 14px; }
.app-srv-choice-btn {
    flex: 1; min-width: 0; padding: 20px 16px; border-radius: 10px;
    background: #2b2d31; border: 2px solid transparent;
    cursor: pointer; display: flex; flex-direction: column;
    align-items: center; gap: 8px; text-align: center;
    transition: border-color .15s, background .15s;
}
.app-srv-choice-btn:hover { border-color: #5865f2; background: #232428; }
.app-srv-choice-label { color: #f2f3f5; font-weight: 600; font-size: 14px; }
.app-srv-choice-hint  { color: #949ba4; font-size: 12px; }

/* ── Create server modal ── */
.app-create-srv-modal {
    background: #313338; border-radius: 12px;
    padding: 28px;
    width: 100%;
    max-width: 440px;
    max-height: calc(100vh - 24px);
    overflow-y: auto;
    box-sizing: border-box;
    box-shadow: 0 16px 48px rgba(0,0,0,.5);
}

/* ── Mobile adaptation for server modals ── */
@media (max-width: 560px) {
    .app-modal-backdrop { padding: 8px; }
    .app-srv-choice-box,
    .app-create-srv-modal {
        padding: 18px 14px;
        border-radius: 10px;
    }
    .app-srv-choice-btns {
        flex-direction: column;
        gap: 10px;
    }
    .app-srv-choice-btn {
        padding: 14px 12px;
        gap: 6px;
    }
    .app-modal-title { font-size: 17px; }
    .app-modal-hint { font-size: 12px; margin-bottom: 14px; }
    .app-modal-actions {
        flex-wrap: wrap;
    }
    .app-modal-btn {
        flex: 1;
        min-width: 100px;
    }
}
.app-create-srv-img {
    width: 80px; height: 80px; border-radius: 50%;
    border: 2px dashed #4e5058; background: #2b2d31;
    margin: 0 auto 20px; cursor: pointer;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    overflow: hidden; position: relative;
    transition: border-color .15s;
}
.app-create-srv-img:hover { border-color: #5865f2; }
.app-create-srv-img-preview { width: 100%; height: 100%; object-fit: cover; }
.app-create-srv-img-hover {
    position: absolute; inset: 0;
    background: rgba(0,0,0,.6); color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 12px; font-weight: 600; opacity: 0;
    transition: opacity .15s;
}
.app-create-srv-img:hover .app-create-srv-img-hover { opacity: 1; }

/* ── Profile modal ── */
.app-profile-modal {
    background: #2b2d31;
    border-radius: 12px;
    width: 420px; max-width: 95vw;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 16px 48px rgba(0,0,0,.6);
    display: flex; flex-direction: column;
}
.app-profile-banner {
    height: 72px;
    background: linear-gradient(135deg, #5865f2 0%, #3ba55d 100%);
    border-radius: 12px 12px 0 0;
    flex-shrink: 0;
}
.app-profile-av-section {
    display: flex; align-items: flex-end; gap: 14px;
    padding: 0 24px 12px;
    margin-top: -36px;
}
.app-profile-av-wrap {
    position: relative;
    width: 80px; height: 80px;
    border-radius: 50%;
    border: 4px solid #2b2d31;
    overflow: hidden;
    flex-shrink: 0;
    background: #5865f2;
}
.app-profile-av-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.app-profile-av-placeholder {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    font-size: 26px; font-weight: 700; color: #fff;
}
.app-profile-av-overlay {
    position: absolute; inset: 0;
    background: rgba(0,0,0,.55);
    display: flex; align-items: center; justify-content: center;
    opacity: 0; transition: opacity .15s; cursor: pointer;
    border-radius: 50%;
}
.app-profile-av-wrap:hover .app-profile-av-overlay { opacity: 1; }
.app-profile-status-dot {
    position: absolute; bottom: 4px; right: 4px;
    width: 14px; height: 14px; border-radius: 50%;
    border: 2px solid #2b2d31;
}
.app-profile-status-dot--online { background: #23a55a; }
.app-profile-status-dot--away   { background: #f0b232; }
.app-profile-status-dot--dnd    { background: #ed4245; }
.app-profile-username {
    font-size: 18px; font-weight: 700; color: #f2f3f5;
    padding-bottom: 6px;
}
.app-profile-body {
    padding: 8px 24px 24px;
}
.app-profile-about { resize: vertical; min-height: 72px; font-family: inherit; }
.app-profile-error { color: #ed4245; font-size: 13px; margin-bottom: 10px; }
.app-profile-userid { font-family: monospace; font-size: 12px; color: #b5bac1; background: #1e1f22; border: 1px solid #3a3c40; border-radius: 4px; padding: 4px 8px; flex: 1; word-break: break-all; }

/* Status picker */
.app-status-row { display: flex; gap: 8px; }
.app-status-btn {
    flex: 1; display: flex; align-items: center; justify-content: center; gap: 7px;
    padding: 9px 6px; border-radius: 8px;
    background: #1e1f22; border: 2px solid transparent;
    color: #b5bac1; font-size: 13px; font-weight: 500; cursor: pointer;
    transition: border-color .15s, background .15s, color .15s;
}
.app-status-btn:hover { background: #2e2f34; color: #f2f3f5; }
.app-status-btn--active { border-color: #5865f2; color: #f2f3f5; background: #2e2f34; }
.app-status-dot {
    width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0;
}
.app-status-dot--online { background: #23a55a; }
.app-status-dot--away   { background: #f0b232; }
.app-status-dot--dnd    {
    background: #ed4245;
    /* DND = красный круг с чёрточкой внутри */
    position: relative;
}
.app-status-dot--dnd::after {
    content: '';
    position: absolute; top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 5px; height: 2px;
    background: #fff; border-radius: 1px;
}

/* Rail profile with status dot */
.app-rail-profile-wrap {
    position: relative; cursor: pointer;
    width: 48px; height: 48px;
    flex-shrink: 0;
}
.app-rail-status-dot {
    position: absolute; bottom: 0; right: 0;
    width: 14px; height: 14px; border-radius: 50%;
    border: 2px solid #1e1f22;
    pointer-events: none;
}
.app-rail-status-dot--online { background: #23a55a; }
.app-rail-status-dot--away   { background: #f0b232; }
.app-rail-status-dot--dnd    { background: #ed4245; }

/* Legacy - keep for existing markup */
.app-profile-field { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; }
.app-profile-field label { font-size: 11px; font-weight: 600; color: #b5bac1; text-transform: uppercase; }

/* Универсальный тёмный input — используется в модалах, редактировании, приглашениях */
.pm-edit-input {
    width: 100%;
    padding: 9px 12px;
    background: #1e1f22;
    border: 1px solid #3f4147;
    border-radius: 4px;
    color: #f2f3f5;
    font-size: 14px;
    outline: none;
    box-sizing: border-box;
    transition: border-color .15s;
}
.pm-edit-input:focus { border-color: #5865f2; }
.pm-edit-input::placeholder { color: #72767d; }
.pm-edit-input[readonly] { opacity: .75; cursor: default; }
.pm-edit-input[type="number"] { -moz-appearance: textfield; }
.pm-edit-input[type="number"]::-webkit-inner-spin-button,
.pm-edit-input[type="number"]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }

/* ─── Bot badge in member list ─────────────────────────────── */
.srv-bot-badge {
    display: inline-flex;
    align-items: center;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .04em;
    color: #f0b232;
    background: rgba(240,178,50,.15);
    border: 1px solid rgba(240,178,50,.4);
    border-radius: 3px;
    padding: 1px 4px;
    margin-left: 5px;
    vertical-align: middle;
    line-height: 1.4;
}

/* ─── Server rail item wrapper + gear + dropdown ───────────── */
.app-rail-srv-wrap {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.app-rail-srv-gear {
    display: none;
    position: absolute;
    right: -4px; top: 50%;
    transform: translateY(-50%);
    width: 18px; height: 18px;
    background: #2b2d31;
    border: 1px solid #40444b;
    border-radius: 50%;
    color: #b9bbbe;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    padding: 0;
    z-index: 2;
    transition: color .15s, background .15s;
}
.app-rail-srv-gear:hover { background: #5865f2; color: #fff; border-color: #5865f2; }
.app-rail-srv-wrap:hover .app-rail-srv-gear { display: flex; }

.app-rail-muted-icon {
    position: absolute;
    bottom: 0; left: 0;
    font-size: 9px;
    line-height: 1;
    pointer-events: none;
    opacity: .8;
}

.app-rail-srv-dd-backdrop {
    position: fixed;
    inset: 0;
    z-index: 999;
}

.app-rail-srv-dropdown {
    position: absolute;
    left: calc(100% + 10px);
    top: 0;
    z-index: 1000;
    background: #18191c;
    border: 1px solid #040405;
    border-radius: 6px;
    padding: 4px 0;
    min-width: 190px;
    box-shadow: 0 8px 24px rgba(0,0,0,.5);
}

.app-rail-srv-dd-item {
    display: block;
    width: 100%;
    background: none;
    border: none;
    color: #dcddde;
    font-size: 13px;
    text-align: left;
    padding: 8px 12px;
    cursor: pointer;
    transition: background .1s, color .1s;
}
.app-rail-srv-dd-item:hover { background: #5865f2; color: #fff; }
.app-rail-srv-dd-item--danger { color: #ed4245; }
.app-rail-srv-dd-item--danger:hover { background: #ed4245; color: #fff; }

.app-rail-srv-dd-sep {
    height: 1px;
    background: #3f4147;
    margin: 4px 0;
}

/* ─── Server rail mention badge ─────────────────────────────── */
.app-rail-mention-badge {
    position: absolute;
    bottom: 2px; right: 2px;
    min-width: 16px; height: 16px;
    background: #ed4245;
    color: #fff;
    font-size: 10px; font-weight: 700;
    border-radius: 8px;
    padding: 0 4px;
    display: flex; align-items: center; justify-content: center;
    line-height: 1;
    border: 2px solid #1e1f22;
    pointer-events: none;
}

/* ─── Bell shake animation (live notification) ──────────────── */
.app-rail-bell--ringing {
    animation: bf-bell-shake 0.85s cubic-bezier(.36,.07,.19,.97) both;
    transform-origin: 50% 0;   /* пивот наверху "ушка" колокольчика */
}
@keyframes bf-bell-shake {
    0%, 100% { transform: rotate(0deg); }
    10%      { transform: rotate(-15deg); }
    20%      { transform: rotate(13deg); }
    30%      { transform: rotate(-11deg); }
    40%      { transform: rotate(9deg); }
    50%      { transform: rotate(-7deg); }
    60%      { transform: rotate(5deg); }
    70%      { transform: rotate(-3deg); }
    80%      { transform: rotate(2deg); }
    90%      { transform: rotate(-1deg); }
}

/* ─── Bell persistent ring (пока есть непрочитанные) ─────────── */
/* Колокольчик периодически «звенит»: короткая серия покачиваний, затем пауза. */
.app-rail-bell--alert {
    animation: bf-bell-ring 2.4s ease-in-out infinite;
    transform-origin: 50% 0;   /* пивот наверху "ушка" */
}
@keyframes bf-bell-ring {
    0%   { transform: rotate(0deg); }
    3%   { transform: rotate(14deg); }
    7%   { transform: rotate(-12deg); }
    11%  { transform: rotate(9deg); }
    15%  { transform: rotate(-7deg); }
    19%  { transform: rotate(5deg); }
    23%  { transform: rotate(-3deg); }
    27%  { transform: rotate(1deg); }
    30%, 100% { transform: rotate(0deg); }
}

/* Уважаем системную настройку «уменьшить движение». */
@media (prefers-reduced-motion: reduce) {
    .app-rail-bell--alert { animation: none; }
}

/* ─── PM rail notification avatars ──────────────────────────── */
.app-rail-pm-notif {
    position: relative;
    width: 44px; height: 44px;
    border-radius: 50%;
    cursor: pointer;
    margin: 2px auto;
    flex-shrink: 0;
    animation: pm-notif-pop 0.35s cubic-bezier(.34,1.56,.64,1) both;
    transition: transform 0.15s;
}
.app-rail-pm-notif:hover { transform: scale(1.12); }

@keyframes pm-notif-pop {
    from { transform: scale(0) rotate(-15deg); opacity: 0; }
    to   { transform: scale(1) rotate(0deg);  opacity: 1; }
}

.app-rail-pm-av {
    width: 44px; height: 44px;
    border-radius: 50%;
    background: #5865f2;
    display: flex; align-items: center; justify-content: center;
    overflow: hidden;
    border: 2px solid #ed4245;
    box-shadow: 0 0 0 2px rgba(237,66,69,0.35);
}

.app-rail-pm-av-img {
    width: 100%; height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.app-rail-pm-av-initials {
    font-size: 14px; font-weight: 700;
    color: #fff;
    user-select: none;
}

.app-rail-pm-badge {
    position: absolute;
    bottom: -2px; right: -2px;
    min-width: 16px; height: 16px;
    background: #ed4245;
    color: #fff;
    font-size: 10px; font-weight: 700;
    border-radius: 8px;
    padding: 0 4px;
    display: flex; align-items: center; justify-content: center;
    line-height: 1;
    border: 2px solid #1e1f22;
    pointer-events: none;
}

/* ─── Channel sidebar mention badge ─────────────────────────── */
.srv-ch-mention-badge {
    min-width: 16px; height: 16px;
    background: #ed4245;
    color: #fff;
    font-size: 10px; font-weight: 700;
    border-radius: 8px;
    padding: 0 4px;
    display: inline-flex; align-items: center; justify-content: center;
    margin-left: 4px;
    line-height: 1;
}

/* ─── Server header settings dropdown ───────────────────────── */
.srv-hdr-dd-backdrop {
    position: fixed;
    inset: 0;
    z-index: 999;
}

.srv-hdr-dropdown {
    position: absolute;
    right: 0; top: calc(100% + 6px);
    z-index: 1000;
    background: #18191c;
    border: 1px solid #040405;
    border-radius: 6px;
    padding: 4px 0;
    min-width: 200px;
    box-shadow: 0 8px 24px rgba(0,0,0,.5);
}

.srv-hdr-dd-item {
    display: block;
    width: 100%;
    background: none;
    border: none;
    color: #dcddde;
    font-size: 13px;
    text-align: left;
    padding: 8px 12px;
    cursor: pointer;
    transition: background .1s, color .1s;
}
.srv-hdr-dd-item:hover { background: #5865f2; color: #fff; }
.srv-hdr-dd-item--danger { color: #ed4245; }
.srv-hdr-dd-item--danger:hover { background: #ed4245; color: #fff; }

.srv-hdr-dd-sep {
    height: 1px;
    background: #3f4147;
    margin: 4px 0;
}

/* ─── Moderator assigned banner ─────────────────────────────── */
.srv-moderator-banner {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: #5865f2;
    color: #fff;
    font-size: 13px;
    flex-shrink: 0;
}

.srv-moderator-banner span { flex: 1; }

.srv-moderator-banner-close {
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    font-size: 14px;
    opacity: 0.7;
    padding: 0 4px;
    line-height: 1;
}

.srv-moderator-banner-close:hover { opacity: 1; }

/* ─── Guest channel page ────────────────────────────────────── */
.guest-shell {
    min-height: 100vh;
    background: #313338;
    color: #dcddde;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

.guest-page {
    display: flex;
    flex-direction: column;
    height: 100vh;
    max-width: 1080px;
    margin: 0 auto;
}

.guest-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    background: #2b2d31;
    border-bottom: 1px solid #1e1f22;
    flex-shrink: 0;
}

.guest-header-left {
    display: flex;
    align-items: center;
    gap: 8px;
    overflow: hidden;
}

.guest-server-name {
    font-size: 14px;
    font-weight: 600;
    color: #b9bbbe;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.guest-channel-name {
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.guest-login-btn {
    background: #5865f2;
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 6px 16px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    transition: background .15s;
}
.guest-login-btn:hover { background: #4752c4; color: #fff; }

.guest-messages {
    flex: 1;
    overflow-y: auto;
    padding: 8px 0 16px;
    display: flex;
    flex-direction: column;
}

/* ── Date separator ── */
.guest-date-sep {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 16px 20px 8px;
    color: #72767d;
    font-size: 12px;
    font-weight: 600;
}
.guest-date-sep::before,.guest-date-sep::after {
    content:'';flex:1;height:1px;background:#3f4147;
}

/* ── Message row ── */
.guest-msg {
    display: flex;
    align-items: flex-start;
    gap: 0;
    padding: 2px 20px 2px 16px;
    transition: background .05s;
}
.guest-msg:hover { background: rgba(0,0,0,.08); }
.guest-msg--grouped { padding-top: 1px; padding-bottom: 1px; }

/* Left column — avatar or timestamp on hover */
.guest-msg-av-col {
    width: 48px;
    flex-shrink: 0;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 2px;
}
.guest-msg-av {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #5865f2;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    flex-shrink: 0;
}
.guest-msg-time-hover {
    font-size: 10px;
    color: transparent;
    line-height: 20px;
    white-space: nowrap;
    user-select: none;
    text-align: center;
    width: 40px;
}
.guest-msg:hover .guest-msg-time-hover { color: #72767d; }

.guest-msg-body { flex: 1; min-width: 0; padding-top: 2px; }

.guest-msg-meta {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 3px;
}

.guest-msg-author {
    font-size: 15px;
    font-weight: 600;
    color: #fff;
}

.guest-msg-time {
    font-size: 11px;
    color: #72767d;
}

.guest-msg-edited {
    font-size: 11px;
    color: #72767d;
    font-style: italic;
}

.guest-msg-content {
    font-size: 15px;
    color: #dcddde;
    line-height: 1.55;
    word-break: break-word;
}

/* Mentions */
.guest-mention     { background: rgba(88,101,242,.3); color: #c9cdfb; border-radius: 3px; padding: 0 3px; cursor: default; }
.guest-mention-all { background: rgba(250,168,26,.3);  color: #faa81a; border-radius: 3px; padding: 0 3px; cursor: default; }

.guest-msg-attachments {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 4px;
}

.guest-msg-img {
    max-width: min(520px, 100%);
    max-height: 400px;
    border-radius: 8px;
    object-fit: contain;
    display: block;
    cursor: pointer;
    background: #1e1f22;
}
.guest-msg-img:hover { opacity: .93; }

/* Audio player */
.guest-msg-audio {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #2b2d31;
    border: 1px solid #3f4147;
    border-radius: 8px;
    padding: 10px 14px;
    max-width: 420px;
}
.guest-msg-audio audio { flex: 1; height: 32px; }
.guest-msg-audio audio::-webkit-media-controls-panel { background: #2b2d31; }
.guest-msg-audio-name { font-size: 11px; color: #72767d; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 120px; }

.guest-msg-file {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #2b2d31;
    border: 1px solid #3f4147;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 13px;
    color: #dcddde;
    text-decoration: none;
    max-width: 360px;
}
.guest-msg-file:hover { background: #383a40; }

.guest-footer {
    padding: 12px 20px;
    background: #2b2d31;
    border-top: 1px solid #1e1f22;
    flex-shrink: 0;
}

.guest-footer-text {
    font-size: 13px;
    color: #949ba4;
    text-align: center;
}

.guest-footer-text a {
    color: #5865f2;
    text-decoration: none;
    font-weight: 600;
}
.guest-footer-text a:hover { text-decoration: underline; }

.guest-empty {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #72767d;
    font-size: 14px;
}

.guest-loading, .guest-error {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    color: #949ba4;
}

.guest-loading-spinner {
    width: 32px; height: 32px;
    border: 3px solid #3f4147;
    border-top-color: #5865f2;
    border-radius: 50%;
    animation: spin .8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ─── Open-in-App banner (guest pages) ─────────────────────── */
.open-in-app-banner {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    background: #2b2d31;
    border-bottom: 1px solid #1e1f22;
    position: sticky;
    top: 0;
    z-index: 10;
}
.open-in-app-logo {
    width: 36px; height: 36px;
    border-radius: 10px;
    flex-shrink: 0;
    object-fit: cover;
}
.open-in-app-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
}
.open-in-app-name {
    font-weight: 600;
    font-size: 14px;
    color: #e3e5e8;
}
.open-in-app-desc {
    font-size: 12px;
    color: #949ba4;
}
.open-in-app-btn {
    padding: 7px 16px;
    background: #5865f2;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    flex-shrink: 0;
    white-space: nowrap;
}
.open-in-app-btn:hover { background: #4752c4; }

/* ─── Guest link in channel settings ───────────────────────── */
.ch-guest-link-box {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 10px;
    padding: 12px;
    background: #1e1f22;
    border-radius: 6px;
    border: 1px solid #3f4147;
}

.ch-guest-link-label {
    font-size: 12px;
    font-weight: 600;
    color: #b9bbbe;
    text-transform: uppercase;
    letter-spacing: .5px;
}

.ch-guest-link-row {
    display: flex;
    gap: 6px;
    align-items: center;
}

.ch-guest-link-input {
    flex: 1;
    background: #2b2d31;
    border: 1px solid #3f4147;
    border-radius: 4px;
    color: #dcddde;
    font-size: 12px;
    padding: 6px 8px;
    min-width: 0;
}

.ch-guest-link-copy {
    background: #4e5058;
    border: none;
    border-radius: 4px;
    color: #b9bbbe;
    cursor: pointer;
    padding: 6px 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .15s, color .15s;
    flex-shrink: 0;
}
.ch-guest-link-copy:hover { background: #5865f2; color: #fff; }

/* ─── Profile modal tabs ─────────────────────────────────────── */
.prof-modal-tabs {
    display: flex;
    gap: 4px;
    margin: 8px 0 12px;
    border-bottom: 2px solid #2e3035;
    padding-bottom: 0;
}
.prof-modal-tab {
    padding: 6px 14px;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    color: #949ba4;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: color .15s, border-color .15s;
}
.prof-modal-tab:hover { color: #dcddde; }
.prof-modal-tab--active { color: #fff; border-bottom-color: #5865f2; }

.prof-privacy-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 0;
    color: #dcddde;
    font-size: 13px;
    cursor: pointer;
}
.prof-privacy-row span { flex: 1; }

/* ─── Profile public page ────────────────────────────────────── */
.prof-page {
    /* app-content is a flex child of app-shell (height:100vh), so height:100% resolves correctly.
       overflow-y:auto activates scrolling when content exceeds the viewport height. */
    height: 100%;
    overflow-y: auto;
    background: #313338;
}
.prof-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 200px;
}
.prof-loading-spinner {
    width: 36px; height: 36px;
    border: 3px solid #4f545c;
    border-top-color: #5865f2;
    border-radius: 50%;
    animation: spin .7s linear infinite;
}
.prof-error {
    padding: 40px;
    text-align: center;
    color: #949ba4;
    font-size: 15px;
}

.prof-header {
    position: relative;
    background: #2b2d31;
}
.prof-banner {
    height: 120px;
    background: linear-gradient(135deg, #5865f2 0%, #4752c4 100%);
    background-size: cover;
    background-position: center center;
    position: relative;
    cursor: default;
}
.prof-banner--editable { cursor: pointer; }
.prof-banner--editable:hover .prof-banner-edit-hint { opacity: 1; }
.prof-banner-edit-hint {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    background: rgba(0,0,0,.45);
    color: #fff; font-size: 13px; font-weight: 600; gap: 6px;
    opacity: 0; transition: opacity .15s;
    pointer-events: none;
}
.prof-banner-title {
    position: absolute;
    bottom: 10px; left: 20px;
    color: #fff;
    font-size: 17px; font-weight: 700;
    text-shadow: 0 1px 6px rgba(0,0,0,.7);
    pointer-events: none;
    max-width: calc(100% - 40px);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.prof-header-body {
    display: flex;
    align-items: flex-end;
    gap: 16px;
    padding: 0 24px 16px;
    position: relative;
    z-index: 1;
}
.prof-av-wrap {
    width: 80px; height: 80px;
    border-radius: 50%;
    border: 4px solid #2b2d31;
    margin-top: -40px;
    flex-shrink: 0;
    background: #5865f2;
    overflow: hidden;
}
.prof-av-img {
    width: 100%; height: 100%;
    object-fit: cover;
}
.prof-av-placeholder {
    width: 100%; height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 700;
    color: #fff;
}
.prof-header-info {
    flex: 1;
    min-width: 0;       /* flex-трюк: без него текст не обрезается */
    overflow: hidden;
    padding-bottom: 4px;
}
.prof-username {
    font-size: 20px;
    font-weight: 700;
    color: #f2f3f5;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.prof-reg-date,
.prof-last-seen,
.prof-activity {
    font-size: 12px;
    color: #949ba4;
    margin-top: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
/* Колонка справа в шапке: ссылка + кнопка "Написать" */
.prof-header-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
    flex-shrink: 0;
    min-width: 0;
    max-width: 220px;
}
/* Строка со ссылкой профиля в шапке */
.prof-header-actions .prof-handle-badge {
    display: flex;
    align-items: center;
    gap: 4px;
    min-width: 0;
    width: 100%;
    padding: 0;
}
.prof-header-actions .prof-handle-link {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 12px;
    color: #5865f2;
    text-decoration: none;
}
.prof-header-actions .prof-handle-link:hover { text-decoration: underline; }
.prof-handle-hdr-copy {
    background: none;
    border: none;
    cursor: pointer;
    color: #72767d;
    padding: 2px 3px;
    border-radius: 3px;
    display: flex;
    align-items: center;
    flex-shrink: 0;
    transition: color .12s, background .12s;
}
.prof-handle-hdr-copy:hover { color: #fff; background: rgba(255,255,255,.08); }
/* Узкий экран / мобильный — прячем текст ссылки, оставляем только иконку копирования */
@media (max-width: 520px) {
    .prof-header-actions .prof-handle-icon,
    .prof-header-actions .prof-handle-link { display: none; }
    .prof-header-actions { max-width: unset; }
}
.prof-msg-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: #5865f2;
    border: none;
    border-radius: 6px;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s;
    flex-shrink: 0;
}
.prof-msg-btn:hover { background: #4752c4; }

.prof-body {
    display: flex;
    gap: 20px;
    padding: 20px 24px;
    max-width: 960px;
    margin: 0 auto;
}
.prof-left { width: 280px; flex-shrink: 0; display: flex; flex-direction: column; gap: 16px; }
.prof-right { flex: 1; min-width: 0; }

.prof-card {
    background: #2b2d31;
    border-radius: 8px;
    padding: 16px;
}
.prof-card-title {
    font-size: 11px;
    font-weight: 700;
    color: #949ba4;
    text-transform: uppercase;
    letter-spacing: .06em;
    margin-bottom: 10px;
}
.prof-card-text {
    font-size: 14px;
    color: #dcddde;
    white-space: pre-wrap;
    word-break: break-word;
}

.prof-servers-list { display: flex; flex-direction: column; gap: 6px; }
.prof-server-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 6px;
    border-radius: 4px;
    text-decoration: none;
    color: #dcddde;
    font-size: 13px;
    transition: background .12s;
}
.prof-server-item:hover { background: #393c43; }
.prof-server-icon {
    width: 28px; height: 28px;
    border-radius: 50%;
    background: #5865f2;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
}

/* Wall */
.prof-wall { display: flex; flex-direction: column; gap: 12px; }
.prof-wall-disabled { font-size: 13px; color: #72767d; text-align: center; padding: 8px 0; }
.prof-wall-empty    { font-size: 13px; color: #72767d; text-align: center; padding: 8px 0; }

.prof-wall-input-wrap {
    display: flex;
    gap: 10px;
    padding: 10px;
    background: #313338;
    border-radius: 6px;
}
.prof-wall-input-av {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: #5865f2;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
    overflow: hidden;
}
.prof-wall-av-img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.prof-wall-input-right { flex: 1; display: flex; flex-direction: column; gap: 6px; }
.prof-wall-textarea {
    width: 100%;
    background: #404249;
    border: 1px solid #4f545c;
    border-radius: 4px;
    color: #dcddde;
    font-size: 14px;
    padding: 8px 10px;
    resize: vertical;
    box-sizing: border-box;
}
.prof-wall-textarea:focus { outline: none; border-color: #5865f2; }
.prof-wall-input-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.prof-wall-counter { font-size: 11px; color: #72767d; }
.prof-wall-send-btn {
    padding: 6px 16px;
    background: #5865f2;
    border: none;
    border-radius: 4px;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s;
}
.prof-wall-send-btn:hover:not(:disabled) { background: #4752c4; }
.prof-wall-send-btn:disabled { opacity: .5; cursor: not-allowed; }

.prof-wall-post {
    background: #313338;
    border-radius: 6px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.prof-wall-post-hdr {
    display: flex;
    align-items: center;
    gap: 8px;
}
.prof-wall-post-av {
    width: 32px; height: 32px;
    border-radius: 50%;
    background: #5865f2;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
    overflow: hidden;
}
.prof-wall-post-meta { flex: 1; display: flex; flex-direction: column; gap: 1px; }
.prof-wall-post-author {
    font-size: 13px;
    font-weight: 600;
    color: #f2f3f5;
    text-decoration: none;
}
.prof-wall-post-author:hover { text-decoration: underline; color: #5865f2; }
.prof-wall-post-date { font-size: 11px; color: #72767d; }
.prof-wall-post-content {
    font-size: 14px;
    color: #dcddde;
    white-space: pre-wrap;
    word-break: break-word;
}
.prof-wall-del-btn {
    background: none;
    border: none;
    color: #72767d;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    transition: color .12s, background .12s;
}
.prof-wall-del-btn:hover { color: #ed4245; background: rgba(237,66,69,.1); }

.prof-wall-load-more {
    width: 100%;
    padding: 8px;
    background: #2b2d31;
    border: 1px solid #3f4147;
    border-radius: 6px;
    color: #b5bac1;
    font-size: 13px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: background .12s, color .12s;
}
.prof-wall-load-more:hover:not(:disabled) { background: #313338; color: #fff; }
.prof-wall-load-more:disabled { opacity: .6; cursor: default; }
.prof-wall-load-spinner {
    width: 12px; height: 12px;
    border: 2px solid #5865f2;
    border-top-color: transparent;
    border-radius: 50%;
    animation: prof-spin .7s linear infinite;
    flex-shrink: 0;
}
@keyframes prof-spin { to { transform: rotate(360deg); } }

@media (max-width: 700px) {
    .prof-body { flex-direction: column; padding: 12px; }
    .prof-left { width: 100%; }
}

/* ── Sound picker ─────────────────────────────────────────── */
.sound-pick-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 6px;
}
.sound-pick-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 7px 10px;
    border-radius: 6px;
    background: #2f3136;
    cursor: pointer;
    border: 1.5px solid transparent;
    transition: border-color .12s, background .12s;
}
.sound-pick-row:hover { background: #36393f; }
.sound-pick-row--active {
    border-color: #5865f2;
    background: rgba(88,101,242,.12);
}
.sound-pick-name {
    font-size: 13px;
    color: #dcddde;
}
.sound-pick-row--active .sound-pick-name { color: #fff; font-weight: 600; }
.sound-preview-btn {
    background: none;
    border: none;
    color: #72767d;
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    transition: color .12s, background .12s;
}
.sound-preview-btn:hover { color: #5865f2; background: rgba(88,101,242,.15); }

/* ── Wall badge on profile rail icon ─────────────────────── */
.app-rail-wall-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #5865f2;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    min-width: 16px;
    height: 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    line-height: 1;
    pointer-events: none;
}

/* ── Plan badge ──────────────────────────────────────────────── */
.plan-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 9px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .5px;
    text-transform: uppercase;
    cursor: default;
    user-select: none;
}
.plan-badge--free     { background: rgba(114,118,125,.18); color: #b9bbbe; border: 1px solid #72767d; }
.plan-badge--ads      { background: rgba(88,101,242,.18);  color: #8892f8; border: 1px solid #5865f2; }
.plan-badge--vip      { background: rgba(240,178,50,.18);  color: #f0b232; border: 1px solid #f0b232; }
.plan-badge--business { background: rgba(185,131,255,.18); color: #c9a0ff; border: 1px solid #b983ff; }

/* clickable badge in own profile */
.app-profile-av-section .plan-badge { cursor: pointer; margin-top: 4px; transition: opacity .12s; }
.app-profile-av-section .plan-badge:hover { opacity: .8; }

/* ── Plan picker modal ───────────────────────────────────────── */
.plan-picker {
    background: #2f3136;
    border-radius: 12px;
    width: min(800px, 96vw);
    max-height: 92vh;
    overflow-y: auto;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    box-shadow: 0 8px 40px rgba(0,0,0,.5);
}
.plan-picker-hdr {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.plan-picker-title { font-size: 18px; font-weight: 700; color: #f2f3f5; }
.plan-picker-close {
    background: none; border: none; color: #72767d; cursor: pointer;
    padding: 4px; border-radius: 4px; display: flex; align-items: center;
    transition: color .12s;
}
.plan-picker-close:hover { color: #f2f3f5; }

/* Period toggle */
.plan-period-row { display: flex; justify-content: center; }
.plan-period-toggle {
    display: flex;
    background: #202225;
    border-radius: 8px;
    padding: 3px;
    gap: 2px;
}
.plan-period-btn {
    flex: 1;
    padding: 7px 20px;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: #72767d;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 7px;
    white-space: nowrap;
    transition: background .15s, color .15s;
}
.plan-period-btn--active { background: #5865f2; color: #fff; }
.plan-period-save {
    font-size: 10px;
    background: #3ba55d;
    color: #fff;
    padding: 1px 6px;
    border-radius: 4px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .3px;
}

/* Grid */
.plan-picker-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}
@media (max-width: 680px) { .plan-picker-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 400px) { .plan-picker-grid { grid-template-columns: 1fr; } }

/* Card */
.plan-card {
    background: #202225;
    border-radius: 10px;
    padding: 16px 14px 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    border: 1.5px solid transparent;
    transition: border-color .15s;
}
.plan-card--active  { border-color: #5865f2; }
.plan-card--blocked { opacity: .7; }

.plan-card-top { display: flex; flex-direction: column; gap: 6px; }

.plan-card-price-block { display: flex; flex-direction: column; gap: 2px; }
.plan-card-price-main  { font-size: 16px; font-weight: 700; color: #f2f3f5; }
.plan-card-price-save  {
    font-size: 11px; font-weight: 700;
    color: #3ba55d; letter-spacing: .3px;
}

.plan-card-features {
    list-style: none; padding: 0; margin: 0;
    display: flex; flex-direction: column; gap: 6px; flex: 1;
}
.plan-card-feature {
    display: flex; align-items: flex-start; gap: 6px;
    font-size: 12px; color: #b9bbbe; line-height: 1.4;
}
.plan-card-feature svg { flex-shrink: 0; color: #43b581; margin-top: 1px; }

/* Blocked downgrade hint */
.plan-card-blocked-msg {
    display: flex; align-items: center; gap: 5px;
    font-size: 11px; color: #f0b232;
    background: rgba(240,178,50,.1);
    border-radius: 4px;
    padding: 5px 8px;
}
.plan-card-blocked-msg svg { flex-shrink: 0; }

/* Expiry date */
.plan-card-expiry {
    text-align: center;
    font-size: 11px;
    color: #72767d;
    margin-top: -4px;
}

/* Buttons */
.plan-card-btn {
    width: 100%; padding: 9px 8px;
    border-radius: 6px; border: none;
    font-size: 13px; font-weight: 600;
    cursor: pointer;
    background: #5865f2; color: #fff;
    display: flex; align-items: center; justify-content: center; gap: 6px;
    transition: background .12s, opacity .12s;
}
.plan-card-btn:hover:not(:disabled) { background: #4752c4; }
.plan-card-btn:disabled             { cursor: not-allowed; opacity: .55; }
.plan-card-btn--active              { background: #3ba55d; }
.plan-card-btn--extend              { background: #f0b232; color: #1e1e1e; }
.plan-card-btn--extend:hover:not(:disabled) { background: #d9a020; }
.plan-card-btn--disabled            { background: #36393f; color: #72767d; }
.plan-card-btn--contact             { background: #b983ff; color: #fff; }
.plan-card-btn--contact:hover:not(:disabled) { background: #a06ae0; }

.plan-card-btn-spin {
    width: 12px; height: 12px;
    border: 2px solid rgba(255,255,255,.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin .7s linear infinite;
    flex-shrink: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── Secret chat rail icons ─────────────────────────────────── */
.app-rail-sc-wrap {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 2px auto;
}

.sc-rail-icon {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid #57f287;
    cursor: pointer;
    text-decoration: none;
    background: transparent;
    transition: transform .2s, box-shadow .2s;
    box-shadow: 0 0 0 1px rgba(87,242,135,.25);
    animation: sc-icon-pop .35s cubic-bezier(.34,1.56,.64,1) both;
    overflow: visible;
}
.sc-rail-icon:hover { transform: scale(1.1); box-shadow: 0 0 0 3px rgba(87,242,135,.4); }
.sc-rail-icon--active { box-shadow: 0 0 0 3px rgba(87,242,135,.6); }
.sc-rail-icon--unread {
    box-shadow: 0 0 0 2px #57f287, 0 0 8px 2px rgba(87,242,135,.35);
    animation: sc-unread-pulse 1.6s ease-in-out infinite;
}
@keyframes sc-unread-pulse {
    0%,100% { box-shadow: 0 0 0 2px #57f287, 0 0 8px 2px rgba(87,242,135,.35); }
    50%      { box-shadow: 0 0 0 3px #57f287, 0 0 18px 5px rgba(87,242,135,.65); }
}

.sc-rail-menu-btn {
    display: none;
    position: absolute;
    right: -4px; top: 50%;
    transform: translateY(-50%);
    width: 18px; height: 18px;
    background: #2b2d31;
    border: 1px solid #40444b;
    border-radius: 50%;
    color: #b9bbbe;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    padding: 0;
    font-size: 10px;
    line-height: 1;
    z-index: 2;
    transition: color .15s, background .15s, border-color .15s;
}
.sc-rail-menu-btn:hover { background: #57f287; color: #1e1f22; border-color: #57f287; }
.app-rail-sc-wrap:hover .sc-rail-menu-btn { display: flex; }

@keyframes sc-icon-pop {
    from { transform: scale(0) rotate(-10deg); opacity: 0; }
    to   { transform: scale(1) rotate(0deg);  opacity: 1; }
}

.sc-rail-icon-av {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #5865f2;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    user-select: none;
}
.sc-rail-icon-av img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }

.sc-lock-badge {
    position: absolute;
    bottom: -3px;
    right: -3px;
    width: 18px;
    height: 18px;
    background: #1e1f22;
    border: 2px solid #57f287;
    border-radius: 50%;
    font-size: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #57f287;
    pointer-events: none;
    z-index: 1;
}

/* Счётчик непрочитанных сообщений секретного чата — зелёный, сверху-справа */
.sc-unread-badge {
    position: absolute;
    top: -4px; right: -4px;
    min-width: 16px; height: 16px;
    background: #57f287;
    color: #1e1f22;
    font-size: 10px; font-weight: 700;
    border-radius: 8px;
    padding: 0 4px;
    display: flex; align-items: center; justify-content: center;
    line-height: 1;
    border: 2px solid #1e1f22;
    pointer-events: none;
    z-index: 2;
}
/* Бейдж «новый секретный чат» — красный с ! */
.sc-new-badge {
    position: absolute;
    top: -4px; right: -4px;
    min-width: 16px; height: 16px;
    background: #ed4245;
    color: #fff;
    font-size: 11px; font-weight: 900;
    border-radius: 8px;
    padding: 0 4px;
    display: flex; align-items: center; justify-content: center;
    line-height: 1;
    border: 2px solid #1e1f22;
    pointer-events: none;
    z-index: 2;
    animation: sc-new-badge-pulse 1.4s ease-in-out infinite;
}
@keyframes sc-new-badge-pulse {
    0%, 100% { transform: scale(1); }
    50%       { transform: scale(1.2); }
}

/* ─── Rail context menu (server + secret chat) ───────────────── */
.rail-ctx-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1999;
}

.rail-ctx-menu {
    position: fixed;
    z-index: 2000;
    background: #18191c;
    border: 1px solid #040405;
    border-radius: 6px;
    padding: 4px 0;
    min-width: 200px;
    box-shadow: 0 8px 24px rgba(0,0,0,.6);
}

.rail-ctx-item {
    display: block;
    width: 100%;
    background: none;
    border: none;
    color: #dcddde;
    font-size: 13px;
    text-align: left;
    padding: 8px 14px;
    cursor: pointer;
    transition: background .1s, color .1s;
}
.rail-ctx-item:hover { background: #5865f2; color: #fff; }
.rail-ctx-item--danger { color: #ed4245; }
.rail-ctx-item--danger:hover { background: #ed4245; color: #fff; }

.rail-ctx-sep {
    height: 1px;
    background: #3f4147;
    margin: 4px 0;
}

/* ── Bots page ── */
.bots-page {
    max-width: 780px;
    margin: 0 auto;
    padding: 32px 20px;
    color: #dcddde;
}
.bots-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    gap: 12px;
    flex-wrap: wrap;
}
.bots-header-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}
.bots-title { font-size: 24px; font-weight: 700; color: #fff; margin: 0; }
.bots-back-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    color: #b9bbbe;
    padding: 6px;
    border-radius: 6px;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: color .15s, background .15s;
}
.bots-back-btn:hover { color: #fff; background: rgba(255,255,255,.06); }
.bots-btn {
    padding: 8px 18px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity .15s;
}
.bots-btn:hover { opacity: .85; }
.bots-btn--primary   { background: #5865f2; color: #fff; }
.bots-btn--secondary { background: #4f545c; color: #fff; }
.bots-btn--danger    { background: #ed4245; color: #fff; }
.bots-loading, .bots-empty { color: #72767d; padding: 20px 0; }
.bots-limit-badge { font-size: 12px; color: #b9bbbe; background: #2f3136; border: 1px solid #3a3c40; border-radius: 12px; padding: 2px 10px; }
.bots-limit-warn { background: #2c2013; border: 1px solid #f0a500; color: #f0a500; border-radius: 6px; padding: 10px 14px; margin-bottom: 14px; font-size: 13px; }
.bots-list { display: flex; flex-direction: column; gap: 12px; }
.bots-card {
    background: #2f3136;
    border-radius: 8px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.bots-card-body {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    flex: 1;
    min-width: 0;
}
.bots-card-info { display: flex; flex-direction: column; gap: 4px; }
.bots-card-name { font-size: 16px; font-weight: 700; color: #fff; word-break: break-word; }
.bots-card-meta { font-size: 13px; color: #b9bbbe; word-break: break-word; }
.bots-id-badge {
    display: inline-block;
    font-size: 11px;
    color: #72767d;
    background: #1e1f22;
    border-radius: 4px;
    padding: 1px 5px;
    vertical-align: middle;
    font-family: monospace;
    user-select: all;
}
.bots-card-date { font-size: 12px; color: #72767d; }
.bots-card-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    flex-shrink: 0;
}
.bots-card-actions-row {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: flex-end;
}
.bots-status-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}
.bots-status-dot--online  { background: #23a559; }
.bots-status-dot--offline { background: #72767d; }
.bots-status-label { font-size: 12px; color: #72767d; }
.bots-status-label--online { color: #23a559; }
.bots-error { color: #ed4245; font-size: 13px; margin-top: 8px; }
.bots-token-modal {
    position: fixed; inset: 0;
    background: rgba(0,0,0,.6);
    display: flex; align-items: center; justify-content: center;
    z-index: 9999;
}
.bots-token-box {
    background: #2f3136;
    border-radius: 10px;
    padding: 28px 32px;
    max-width: 520px;
    width: 100%;
    color: #dcddde;
}
.bots-token-title { font-size: 18px; font-weight: 700; color: #fff; margin-bottom: 12px; }
.bots-token-warning { color: #faa61a; font-size: 13px; margin-bottom: 10px; }
.bots-token-value {
    background: #202225;
    border-radius: 6px;
    padding: 10px 14px;
    font-family: monospace;
    font-size: 13px;
    word-break: break-all;
    margin-bottom: 14px;
    color: #43b581;
}
.bots-token-api {
    margin-top: 16px;
    background: #202225;
    border-radius: 6px;
    padding: 12px 14px;
    font-size: 12px;
    color: #b9bbbe;
}
.bots-token-api pre { margin: 6px 0 0; font-size: 11px; overflow-x: auto; color: #43b581; }
.bots-form-label { display: block; font-size: 12px; font-weight: 600; color: #b9bbbe; text-transform: uppercase; margin: 12px 0 4px; }
.bots-form-input {
    width: 100%; box-sizing: border-box;
    background: #202225; border: 1px solid #4f545c;
    border-radius: 4px; color: #dcddde;
    padding: 8px 12px; font-size: 14px;
}
.bots-form-input:focus { outline: none; border-color: #5865f2; }

/* ── Bot Docs landing ── */
.docs-page { background: #1e1f22; min-height: 100vh; color: #dcddde; font-family: 'Helvetica Neue', sans-serif; }
.docs-container { max-width: 900px; margin: 0 auto; padding: 0 24px; }

/* Hero */
.docs-hero { background: linear-gradient(135deg, #1e1f22 0%, #2b2d31 100%); padding: 80px 24px 72px; text-align: center; border-bottom: 1px solid #3a3c42; }
.docs-hero-inner { max-width: 640px; margin: 0 auto; }
.docs-hero-icon { color: #3ba55d; margin-bottom: 20px; display: flex; justify-content: center; }
.docs-hero-title { font-size: 42px; font-weight: 800; color: #fff; margin: 0 0 16px; letter-spacing: -.5px; }
.docs-hero-sub { font-size: 17px; color: #b9bbbe; line-height: 1.6; margin: 0 0 32px; }
.docs-hero-btns { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.docs-btn { padding: 12px 28px; border-radius: 8px; font-size: 15px; font-weight: 600; text-decoration: none; transition: opacity .15s, transform .1s; display: inline-block; }
.docs-btn:hover { opacity: .88; transform: translateY(-1px); }
.docs-btn--primary { background: #3ba55d; color: #fff; }
.docs-btn--ghost { background: transparent; color: #b9bbbe; border: 1.5px solid #4f545c; }

/* Features */
.docs-features { padding: 56px 24px; }
.docs-feat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.docs-feat-card { background: #2b2d31; border-radius: 12px; padding: 20px; display: flex; gap: 16px; align-items: flex-start; }
.docs-feat-icon { width: 44px; height: 44px; border-radius: 10px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.docs-feat-name { font-size: 15px; font-weight: 700; color: #fff; margin-bottom: 6px; }
.docs-feat-desc { font-size: 13px; color: #b9bbbe; line-height: 1.5; }

/* Sections */
.docs-section { padding: 64px 24px; }
.docs-section--alt { background: #2b2d31; }
.docs-section-title { font-size: 28px; font-weight: 800; color: #fff; margin: 0 0 8px; }
.docs-section-sub { font-size: 15px; color: #b9bbbe; margin: 0 0 36px; }

/* Steps */
.docs-steps { display: flex; flex-direction: column; gap: 24px; }
.docs-step { display: flex; gap: 20px; align-items: flex-start; }
.docs-step-num { width: 36px; height: 36px; border-radius: 50%; background: #3ba55d; color: #fff; font-size: 16px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; margin-top: 2px; }
.docs-step-title { font-size: 17px; font-weight: 700; color: #fff; margin-bottom: 8px; }
.docs-step-desc { font-size: 14px; color: #b9bbbe; line-height: 1.5; }

/* Code blocks */
.docs-code {
    background: #111214;
    border: 1px solid #3a3c42;
    border-radius: 8px;
    padding: 16px 20px;
    font-family: 'Fira Code', 'Consolas', monospace;
    font-size: 13px;
    line-height: 1.65;
    color: #dcddde;
    overflow-x: auto;
    margin: 12px 0 0;
    white-space: pre;
}
.dc-kw  { color: #c678dd; }
.dc-type{ color: #e5c07b; }
.dc-fn  { color: #61afef; }
.dc-str { color: #98c379; }
.dc-cm  { color: #5c6370; font-style: italic; }

/* Reference tables */
.docs-ref-class { font-size: 18px; font-weight: 700; color: #5865f2; font-family: monospace; margin-bottom: 12px; }
.docs-ref-table { border: 1px solid #3a3c42; border-radius: 8px; overflow: hidden; }
.docs-ref-row { display: grid; grid-template-columns: 260px 1fr; gap: 16px; padding: 10px 16px; border-bottom: 1px solid #3a3c42; font-size: 13px; align-items: start; }
.docs-ref-row:last-child { border-bottom: none; }
.docs-ref-row--head { background: #1e1f22; font-size: 11px; font-weight: 700; text-transform: uppercase; color: #72767d; letter-spacing: .06em; }
.docs-ref-row code { color: #61afef; font-family: monospace; }

/* Examples */
.docs-example-tab-label { font-size: 13px; font-weight: 700; color: #b9bbbe; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 0; }

/* API list */
.docs-api-list { display: flex; flex-direction: column; gap: 16px; }
.docs-api-item { background: #1e1f22; border: 1px solid #3a3c42; border-radius: 10px; padding: 18px 20px; }
.docs-api-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.docs-api-method { padding: 2px 8px; border-radius: 4px; font-size: 11px; font-weight: 800; letter-spacing: .06em; }
.docs-api-method--post   { background: #3ba55d20; color: #3ba55d; }
.docs-api-method--delete { background: #ed424520; color: #ed4245; }
.docs-api-path { font-family: monospace; font-size: 14px; color: #fff; }
.docs-api-auth { font-size: 12px; color: #faa61a; margin-left: auto; }
.docs-api-desc { font-size: 13px; color: #b9bbbe; margin-bottom: 8px; }
.docs-api-resp { font-size: 12px; color: #72767d; margin-top: 8px; }
.docs-api-resp code { color: #b9bbbe; }

/* Footer */
.docs-footer { border-top: 1px solid #3a3c42; padding: 24px; text-align: center; font-size: 13px; color: #4f545c; }
.docs-footer-link { color: #5865f2; text-decoration: none; }
.docs-footer-link:hover { text-decoration: underline; }

@media (max-width: 600px) {
    .docs-hero-title { font-size: 28px; }
    .docs-ref-row { grid-template-columns: 1fr; gap: 4px; }
    .docs-step { flex-direction: column; }
}

/* ── Bot avatar in Bots page ── */
.bots-avatar-wrap {
    position: relative; width: 60px; height: 60px;
    border-radius: 50%; overflow: hidden; flex-shrink: 0;
    cursor: pointer; display: block;
}
.bots-avatar-img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.bots-avatar-placeholder {
    width: 100%; height: 100%; border-radius: 50%;
    background: #f0a500; display: flex; align-items: center; justify-content: center; color: #fff;
}
.bots-avatar-edit-hint {
    position: absolute; inset: 0; border-radius: 50%;
    background: rgba(0,0,0,.45); display: flex; align-items: center; justify-content: center;
    font-size: 18px; opacity: 0; transition: opacity .15s;
}
.bots-avatar-wrap:hover .bots-avatar-edit-hint { opacity: 1; }
.bots-card-about { font-size: 13px; color: #b9bbbe; margin-top: 4px; word-break: break-word; }

/* ── Bots page: мобильная адаптация ──────────────────────────── */
@media (max-width: 768px) {
    .bots-page {
        padding: 16px 12px calc(24px + env(safe-area-inset-bottom));
        max-width: 100%;
    }

    .bots-header { margin-bottom: 14px; }
    .bots-title { font-size: 20px; flex: 1; min-width: 0; }
    .bots-back-btn { display: flex; }

    .bots-header-actions {
        width: 100%;
        gap: 6px;
    }
    .bots-header-actions .bots-btn {
        flex: 1 1 auto;
        text-align: center;
        white-space: nowrap;
        padding: 10px 12px;
        font-size: 13px;
    }
    .bots-limit-badge { order: -1; }

    .bots-card {
        flex-direction: column;
        align-items: stretch;
        padding: 14px;
        gap: 12px;
    }

    .bots-card-body {
        gap: 12px;
    }

    .bots-avatar-wrap {
        width: 52px;
        height: 52px;
    }
    .bots-avatar-edit-hint { opacity: .45; font-size: 16px; }

    .bots-card-actions {
        align-items: stretch;
        width: 100%;
    }
    .bots-card-actions-row {
        width: 100%;
        justify-content: stretch;
        gap: 6px;
    }
    .bots-card-actions-row .bots-btn {
        flex: 1 1 0;
        min-width: 0;
        padding: 9px 8px;
        font-size: 13px;
        text-align: center;
    }

    .bots-card-meta { font-size: 12px; }
    .bots-card-date { font-size: 11px; }

    /* Модалки создания/токена */
    .bots-token-modal { padding: 12px; }
    .bots-token-box {
        padding: 18px 16px;
        max-width: 100%;
        max-height: calc(100vh - 24px);
        overflow-y: auto;
        box-sizing: border-box;
    }
    .bots-token-title { font-size: 16px; }
    .bots-token-value { font-size: 12px; padding: 8px 10px; }
    .bots-token-api { padding: 10px 12px; font-size: 11px; }
    .bots-token-api pre { font-size: 10.5px; }

    /* Анти-зум iOS */
    .bots-form-input { font-size: 16px; }
}

/* Copy ID button – copied state */
.app-modal-btn--copied {
    background: rgba(35,165,89,.2) !important;
    color: #23a559 !important;
    border-color: transparent !important;
}


/* ================================================================
   UserStatusPopup  (Discord-style bottom-left popup)
   ================================================================ */

.usp-backdrop { position: fixed; inset: 0; z-index: 1199; }

.usp-popup {
    position: fixed; bottom: 60px; left: 8px; width: 280px;
    background: #18191c; border: 1px solid #2e3035; border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0,0,0,.6); z-index: 1200; overflow: hidden;
    animation: uspFadeIn .12s ease;
}
@keyframes uspFadeIn { from { opacity:0; transform:translateY(6px); } to { opacity:1; transform:none; } }

.usp-card { background: #111214; }
.usp-card-banner { height: 52px; background: linear-gradient(135deg,#5865f2 0%,#3b4dc8 100%); }
.usp-card-body { padding: 0 12px 12px; }
.usp-card-av-wrap { position: relative; display: inline-block; margin-top: -24px; margin-bottom: 6px; }
.usp-card-av {
    width: 52px; height: 52px; border-radius: 50%; background: #36393f;
    border: 3px solid #111214; display: flex; align-items: center;
    justify-content: center; font-size: 18px; font-weight: 700; color: #fff; overflow: hidden;
}
.usp-card-av img { width: 100%; height: 100%; object-fit: cover; }
.usp-av-status {
    position: absolute; bottom: 2px; right: 2px;
    width: 13px; height: 13px; border-radius: 50%; border: 2px solid #111214;
}
.usp-av-status--online  { background: #23a559; }
.usp-av-status--away    { background: #f0b232; }
.usp-av-status--dnd     { background: #f23f43; }
.usp-card-name-row { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; margin-bottom: 4px; }
.usp-card-name  { font-size: 15px; font-weight: 700; color: #fff; }
.usp-card-title { font-size: 11px; font-weight: 400; color: #b5bac1; line-height: 1.3; max-width: 120px; word-break: break-word; }

.usp-sep { height: 1px; background: #2e3035; margin: 4px 0; }

.usp-item {
    display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 12px;
    background: none; border: none; color: #dcddde; font-size: 13px;
    cursor: pointer; text-align: left; transition: background .1s, color .1s;
}
.usp-item:hover { background: rgba(255,255,255,.06); color: #fff; }
.usp-item-icon { width: 16px; height: 16px; flex-shrink: 0; opacity: .7; }
.usp-item-label { flex: 1; }
.usp-chevron { width: 16px; height: 16px; opacity: .5; transition: transform .2s; flex-shrink: 0; }
.usp-chevron--open { transform: rotate(90deg); }

.usp-submenu { background: #111214; border-top: 1px solid #2e3035; }
.usp-subitem {
    display: flex; align-items: center; gap: 10px; width: 100%;
    padding: 9px 16px 9px 28px; background: none; border: none;
    color: #b9bbbe; font-size: 13px; cursor: pointer; text-align: left;
    transition: background .1s;
}
.usp-subitem:hover { background: rgba(255,255,255,.05); color: #fff; }
.usp-subitem--active { color: #fff; }
.usp-subitem-text { flex: 1; display: flex; flex-direction: column; }
.usp-subitem-desc { font-size: 11px; color: #72767d; margin-top: 1px; }
.usp-check { width: 14px; height: 14px; color: #23a559; flex-shrink: 0; }


/* ================================================================
   SettingsModal  (Discord-style full-screen settings)
   ================================================================ */

.smod-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.7); z-index: 1299; }

.smod-root {
    position: fixed; inset: 0; z-index: 1300;
    display: flex; outline: none; animation: smodIn .15s ease;
}
@keyframes smodIn { from { opacity:0; } to { opacity:1; } }

.smod-sidebar {
    width: 240px; min-width: 200px; background: #2b2d31;
    display: flex; flex-direction: column; padding: 20px 6px 12px;
    overflow-y: auto; flex-shrink: 0;
}

.smod-user-header {
    display: flex; align-items: center; gap: 10px; padding: 8px 10px 12px;
    border-bottom: 1px solid rgba(255,255,255,.06); margin-bottom: 8px;
}
.smod-user-av-wrap { position: relative; flex-shrink: 0; }
.smod-user-av {
    width: 40px; height: 40px; border-radius: 50%; background: #5865f2;
    display: flex; align-items: center; justify-content: center;
    font-size: 14px; font-weight: 700; color: #fff; overflow: hidden;
}
.smod-user-av img { width: 100%; height: 100%; object-fit: cover; }
.smod-user-info { flex: 1; min-width: 0; }
.smod-user-name {
    font-size: 14px; font-weight: 700; color: #fff;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.smod-edit-link {
    background: none; border: none; padding: 0; color: #00b0f4;
    font-size: 11px; cursor: pointer; display: flex; align-items: center; gap: 3px;
}
.smod-edit-link:hover { text-decoration: underline; }

.smod-search-wrap { position: relative; margin: 4px 4px 8px; }
.smod-search-icon {
    position: absolute; left: 9px; top: 50%; transform: translateY(-50%);
    width: 14px; height: 14px; color: #72767d; pointer-events: none;
}
.smod-search {
    width: 100%; padding: 6px 8px 6px 30px; background: #1e1f22;
    border: 1px solid #1e1f22; border-radius: 4px; color: #dcddde;
    font-size: 13px; box-sizing: border-box;
}
.smod-search:focus { outline: none; border-color: #5865f2; }

.smod-nav { flex: 1; }
.smod-nav-section-label {
    font-size: 11px; font-weight: 700; color: #949ba4; letter-spacing: .5px;
    text-transform: uppercase; padding: 6px 10px 4px;
}
.smod-nav-item {
    display: flex; align-items: center; justify-content: flex-start; gap: 10px; width: 100%; padding: 8px 10px;
    background: none; border: none; color: #b9bbbe; font-size: 14px;
    cursor: pointer; text-align: left; border-radius: 4px; transition: background .1s, color .1s;
}
.smod-nav-item:hover { background: rgba(255,255,255,.06); color: #fff; }
.smod-nav-item--active { background: rgba(88,101,242,.25); color: #fff; }
.smod-nav-icon { width: 16px; height: 16px; flex-shrink: 0; opacity: .75; }
.smod-nav-sep { height: 1px; background: rgba(255,255,255,.06); margin: 8px 10px; }
.smod-nav-item--danger { color: #f23f43 !important; }
.smod-nav-item--danger:hover { background: rgba(242,63,67,.1) !important; }
.smod-sidebar-bottom { margin-top: auto; }

.smod-content { flex: 1; background: #313338; display: flex; flex-direction: column; position: relative; overflow: hidden; }
.smod-content-inner { flex: 1; overflow-y: auto; padding: 40px 40px 60px; width: 100%; max-width: 740px; box-sizing: border-box; }
.smod-field-group,
.smod-sound-list,
.smod-sessions-list { width: 100%; box-sizing: border-box; }

.smod-section-title {
    font-size: 20px; font-weight: 700; color: #fff; margin-bottom: 20px;
    padding-bottom: 12px; border-bottom: 1px solid rgba(255,255,255,.06);
}
.smod-section-subtitle {
    font-size: 11px; font-weight: 700; color: #949ba4;
    letter-spacing: .5px; text-transform: uppercase; margin-bottom: 8px;
}

.smod-banner-preview {
    width: 100%; height: 80px;
    border-radius: 8px;
    background: linear-gradient(135deg, #5865f2 0%, #4752c4 100%);
    background-size: cover; background-position: center top;
    position: relative; overflow: hidden;
    margin-bottom: 4px;
}
.smod-banner-preview-title {
    position: absolute; bottom: 8px; left: 12px;
    color: #fff; font-size: 14px; font-weight: 700;
    text-shadow: 0 1px 4px rgba(0,0,0,.7);
    pointer-events: none;
}
.smod-avatar-row { display: flex; align-items: center; gap: 16px; margin-bottom: 24px; }
.smod-av-wrap { position: relative; }
.smod-av-img { width: 80px; height: 80px; border-radius: 50%; object-fit: cover; }
.smod-av-placeholder {
    width: 80px; height: 80px; border-radius: 50%; background: #5865f2;
    display: flex; align-items: center; justify-content: center;
    font-size: 28px; font-weight: 700; color: #fff;
}
.smod-av-overlay {
    position: absolute; inset: 0; border-radius: 50%; background: rgba(0,0,0,.5);
    display: flex; align-items: center; justify-content: center;
    opacity: 0; cursor: pointer; transition: opacity .15s;
}
.smod-av-wrap:hover .smod-av-overlay { opacity: 1; }
.smod-username-display { font-size: 18px; font-weight: 700; color: #fff; margin-bottom: 6px; }

.smod-field-group { background: #2b2d31; border-radius: 8px; padding: 16px; margin-bottom: 16px; }
.smod-field { margin-bottom: 14px; }
.smod-field:last-child { margin-bottom: 0; }
.smod-label {
    display: block; font-size: 11px; font-weight: 700; color: #949ba4;
    text-transform: uppercase; letter-spacing: .5px; margin-bottom: 6px;
}
.smod-input {
    width: 100%; padding: 9px 12px; background: #1e1f22; border: 1px solid #1e1f22;
    border-radius: 4px; color: #dcddde; font-size: 14px;
    box-sizing: border-box; transition: border-color .15s;
}
.smod-input:focus { outline: none; border-color: #5865f2; }
.smod-input:disabled { opacity: .5; cursor: not-allowed; }
.smod-textarea { resize: vertical; min-height: 80px; }
.smod-select {
    padding: 6px 10px; background: #1e1f22; border: 1px solid #1e1f22;
    border-radius: 4px; color: #dcddde; font-size: 13px;
    cursor: pointer; flex-shrink: 0;
}
.smod-select:focus { outline: none; border-color: #5865f2; }

.smod-toggle-row {
    display: flex; align-items: center; justify-content: space-between;
    padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,.04);
    cursor: pointer; gap: 12px;
}
.smod-toggle-row:last-child { border-bottom: none; padding-bottom: 0; }
.smod-toggle-label { font-size: 14px; color: #dcddde; }
.smod-toggle-desc { font-size: 12px; color: #72767d; margin-top: 2px; }
/* ── Toggle switch ─── */
.smod-sw { position: relative; display: inline-block; width: 40px; height: 22px; flex-shrink: 0; }
.smod-sw input { opacity: 0; width: 0; height: 0; position: absolute; }
.smod-sw-track {
    position: absolute; inset: 0; background: #72767d; border-radius: 11px;
    cursor: pointer; transition: background .2s;
}
.smod-sw-track::after {
    content: ""; position: absolute; width: 16px; height: 16px; border-radius: 50%;
    background: #fff; top: 3px; left: 3px; transition: left .2s;
}
.smod-sw input:checked + .smod-sw-track { background: #23a559; }
.smod-sw input:checked + .smod-sw-track::after { left: 21px; }

.smod-number-input {
    width: 72px; flex-shrink: 0;
    background: #1e1f22; border: 1px solid #1e1f22; border-radius: 4px;
    color: #dcddde; font-size: 14px; padding: 6px 8px; text-align: center;
    outline: none; transition: border-color .15s;
}
.smod-number-input:focus { border-color: #5865f2; }

.smod-sound-list { display: flex; flex-direction: column; gap: 2px; }
.smod-sound-row {
    display: flex; align-items: center; justify-content: space-between;
    padding: 8px 12px; border-radius: 6px; cursor: pointer; color: #b9bbbe;
    transition: background .1s, color .1s;
}
.smod-sound-row:hover { background: rgba(255,255,255,.05); color: #fff; }
.smod-sound-row--active { background: rgba(88,101,242,.2); color: #fff; }
.smod-sound-name { font-size: 13px; }
.smod-sound-preview {
    background: none; border: none; color: #b9bbbe; cursor: pointer;
    padding: 4px; border-radius: 4px; display: flex;
}
.smod-sound-preview:hover { background: rgba(255,255,255,.08); color: #fff; }

.smod-userid {
    font-family: monospace; font-size: 12px; color: #b9bbbe;
    background: #1e1f22; padding: 3px 8px; border-radius: 4px;
}
.smod-ghost-btn {
    background: none; border: 1px solid #4e5058; color: #b9bbbe;
    padding: 7px 14px; border-radius: 4px; font-size: 13px;
    cursor: pointer; transition: background .1s, color .1s;
}
.smod-ghost-btn:hover { background: rgba(255,255,255,.06); color: #fff; }
.smod-ghost-btn--ok { border-color: #23a559; color: #23a559; }

.smod-error {
    color: #f23f43; font-size: 13px; margin: 8px 0; padding: 8px 12px;
    background: rgba(242,63,67,.1); border-radius: 4px;
}
.smod-save-row { margin-top: 20px; display: flex; gap: 8px; }
.smod-btn { padding: 9px 18px; border-radius: 4px; border: none; font-size: 14px; font-weight: 500; cursor: pointer; transition: filter .1s; }
.smod-btn--primary { background: #5865f2; color: #fff; }
.smod-btn--primary:hover { filter: brightness(1.1); }
.smod-btn:disabled { opacity: .5; cursor: not-allowed; }
.smod-btn:not(.smod-btn--primary):not(.smod-btn--danger) { background: #404249; color: #f2f3f5; }
.smod-btn:not(.smod-btn--primary):not(.smod-btn--danger):hover { background: #4a4d54; }
.smod-btn--danger { background: #d83c3e; color: #fff; }
.smod-btn--danger:hover { filter: brightness(1.1); }
.smod-field-label { display: block; color: #b9bbbe; font-size: 12px; margin: 8px 0 4px; }

/* LC send error bar */
.pm-lc-send-error { display:flex; align-items:center; gap:6px; padding:6px 14px; background:rgba(240,71,71,.15); border-top:1px solid rgba(240,71,71,.3); color:#f04747; font-size:12px; cursor:pointer; user-select:none; }
.pm-lc-send-error:hover { background:rgba(240,71,71,.22); }

/* LC debug bar (DEBUG builds only) */
.pm-lc-debug { padding:4px 14px; background:rgba(0,0,0,.45); border-top:1px solid rgba(255,255,255,.06); font-size:11px; color:#72767d; font-family:monospace; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.pm-lc-debug__label { color:#faa81a; margin-right:6px; font-weight:600; }

/* Limited connectivity section */
.smod-lc-hint-box { background: rgba(88,101,242,.12); border: 1px solid rgba(88,101,242,.3); border-radius: 8px; padding: 14px 16px; margin-bottom: 16px; }
.smod-lc-hint-title { font-size: 13px; font-weight: 600; color: #8ea1f1; margin-bottom: 6px; }
.smod-lc-hint-body { font-size: 12px; color: #b9bbbe; line-height: 1.5; }
.smod-lc-link { color: #8ea1f1; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.smod-lc-link:hover { color: #aab8f5; }
.smod-lc-configured-badge { display: flex; align-items: center; gap: 6px; margin-top: 12px; font-size: 12px; color: #3ba55d; }

/* Disabled toggle row */
.smod-toggle-row--disabled { opacity: .4; pointer-events: none; cursor: default; }

/* LC beta confirmation card */
.smod-lc-beta-confirm {
    margin: 12px 0 4px;
    background: rgba(250,168,26,.08);
    border: 1px solid rgba(250,168,26,.35);
    border-radius: 10px;
    padding: 16px;
    display: flex; flex-direction: column; align-items: flex-start; gap: 8px;
}
.smod-lc-beta-confirm__icon { color: #faa81a; display: flex; }
.smod-lc-beta-confirm__title { font-size: 14px; font-weight: 600; color: #faa81a; }
.smod-lc-beta-confirm__body { font-size: 13px; color: #b9bbbe; line-height: 1.5; }
.smod-lc-beta-confirm__actions { display: flex; gap: 8px; margin-top: 4px; }

/* Blocked users list */
.smod-blocked-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255,255,255,.04);
}
.smod-blocked-row:last-child { border-bottom: none; }
.smod-blocked-av {
    width: 36px; height: 36px; border-radius: 50%;
    background: #5865f2; color: #fff;
    display: flex; align-items: center; justify-content: center;
    overflow: hidden; flex-shrink: 0;
}
.smod-blocked-av img { width: 100%; height: 100%; object-fit: cover; }
.smod-blocked-av-letter { font-weight: 600; font-size: 14px; }
.smod-blocked-name { flex: 1; min-width: 0; color: #f2f3f5; font-size: 14px;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.smod-close-btn {
    position: absolute; top: 16px; right: 16px; background: rgba(255,255,255,.08);
    border: none; color: #b9bbbe; width: 32px; height: 32px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; transition: background .1s, color .1s;
}
.smod-close-btn:hover { background: rgba(255,255,255,.15); color: #fff; }

/* ── Sessions section ─────────────────────────────────────────── */
.smod-section-desc { color: var(--text-muted,#72767d); font-size: 13px; margin: 0 0 16px; }
.smod-sessions-loading { color: #72767d; font-size: 14px; padding: 12px 0; }

.smod-sessions-list { display: flex; flex-direction: column; gap: 8px; }

.smod-session-row {
    display: flex; align-items: center; gap: 12px;
    background: rgba(255,255,255,.04); border-radius: 8px; padding: 12px 14px;
    border: 1px solid rgba(255,255,255,.06);
    transition: background .15s;
}
.smod-session-row--current { border-color: rgba(88,101,242,.4); }
.smod-session-row:hover { background: rgba(255,255,255,.07); }

.smod-session-icon { color: #72767d; flex-shrink: 0; display: flex; }

.smod-session-info { flex: 1; min-width: 0; }
.smod-session-name {
    font-size: 14px; font-weight: 500; color: #dcddde;
    display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.smod-session-badge {
    font-size: 11px; font-weight: 600; color: #5865f2;
    background: rgba(88,101,242,.15); border-radius: 4px; padding: 1px 6px;
}
.smod-session-meta { font-size: 12px; color: #72767d; margin-top: 2px; }

.smod-session-revoke {
    display: flex; align-items: center; gap: 5px;
    background: transparent; border: 1px solid rgba(242,63,67,.4);
    color: #f23f43; border-radius: 4px; padding: 5px 10px;
    font-size: 12px; cursor: pointer; white-space: nowrap; flex-shrink: 0;
    transition: background .1s;
}
.smod-session-revoke:hover { background: rgba(242,63,67,.15); }

.smod-qr-wrap { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.smod-qr-img { width: 160px; height: 160px; border-radius: 8px; background: #fff; padding: 8px; }
.smod-qr-hint { color: #72767d; font-size: 13px; max-width: 220px; line-height: 1.4; }

/* ── Auth tabs (login page QR) ────────────────────────────────── */
.auth-tabs {
    display: flex; margin: 0 -24px 8px; border-bottom: 1px solid rgba(255,255,255,.08);
}
.auth-tab {
    flex: 1; padding: 10px; background: transparent; border: none;
    color: #72767d; font-size: 14px; font-weight: 500; cursor: pointer;
    border-bottom: 2px solid transparent; margin-bottom: -1px;
    transition: color .15s, border-color .15s;
}
.auth-tab--active { color: #5865f2; border-bottom-color: #5865f2; }
.auth-tab:hover:not(.auth-tab--active) { color: #dcddde; }

/* ── QR section on login ──────────────────────────────────────── */
.auth-qr {
    display: flex; flex-direction: column; align-items: center;
    padding: 20px 0 8px; gap: 12px; min-height: 260px;
}
.auth-qr-hint { color: #b9bbbe; font-size: 14px; text-align: center; margin: 0; }
.auth-qr-frame {
    background: #fff; border-radius: 12px; padding: 12px;
    display: inline-flex; box-shadow: 0 4px 20px rgba(0,0,0,.4);
}
.auth-qr-img { width: 180px; height: 180px; display: block; }
.auth-qr-sub { color: #72767d; font-size: 13px; text-align: center; margin: 0; }
.auth-qr-success { display: flex; flex-direction: column; align-items: center; gap: 8px; color: #43b581; font-size: 16px; font-weight: 500; }

/* ── QrApprove page ───────────────────────────────────────────── */
.qra-card { max-width: 400px; }
.qra-body { padding: 8px 0 8px; }
.qra-msg { font-size: 15px; color: #dcddde; line-height: 1.5; margin: 0 0 16px; }
.qra-msg--warn { color: #faa61a; }
.qra-sub { font-size: 13px; color: #72767d; margin: 4px 0 0; }
.qra-buttons { display: flex; gap: 10px; }
.qra-spinner {
    width: 32px; height: 32px; border: 3px solid rgba(255,255,255,.1);
    border-top-color: #5865f2; border-radius: 50%; animation: spin .8s linear infinite; margin: auto;
}

/* ── API Token block ─────────────────────────────────────────── */
.smod-api-token-block { border-top: 1px solid rgba(255,255,255,.06); padding-top: 16px; margin-top: 4px; }

.smod-api-token-badge {
    font-size: 10px; font-weight: 600; letter-spacing: .4px; text-transform: uppercase;
    background: rgba(88,101,242,.2); color: #7289da; border-radius: 3px; padding: 2px 6px;
}
.smod-api-token-row {
    display: flex; gap: 8px; align-items: flex-start; flex-wrap: wrap; margin-top: 6px;
}
.smod-api-token-value {
    display: block; background: rgba(0,0,0,.35); border: 1px solid rgba(255,255,255,.08);
    border-radius: 4px; padding: 7px 10px; font-size: 11px; color: #b9bbbe;
    word-break: break-all; line-height: 1.5; width: 100%;
    font-family: 'Courier New', monospace;
    max-height: 72px; overflow-y: auto;
}
.smod-api-token-hint {
    font-size: 12px; color: #72767d; margin-top: 6px; line-height: 1.4;
}

/* ── QR Scanner Modal ─────────────────────────────────────────── */
.qrscan-overlay {
    position: fixed; inset: 0; z-index: 10000;
    background: rgba(0,0,0,.75); display: flex; align-items: center; justify-content: center;
}
.qrscan-card {
    background: #2f3136; border-radius: 12px; width: 340px; max-width: 95vw;
    box-shadow: 0 8px 32px rgba(0,0,0,.5); overflow: hidden;
}
.qrscan-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 14px 16px; border-bottom: 1px solid rgba(255,255,255,.06);
    color: #fff; font-weight: 600; font-size: 15px;
}
.qrscan-close {
    background: none; border: none; cursor: pointer; color: #72767d; padding: 2px;
    display: flex; align-items: center;
}
.qrscan-close:hover { color: #dcddde; }
.qrscan-viewport {
    position: relative; background: #000; margin: 12px; border-radius: 8px; overflow: hidden;
}
.qrscan-viewport video { width: 100%; display: block; max-height: 240px; object-fit: cover; }
.qrscan-frame {
    position: absolute; inset: 0; border: 2px solid rgba(88,101,242,.8);
    border-radius: 8px; box-shadow: inset 0 0 0 3000px rgba(0,0,0,.15);
    pointer-events: none;
}
.qrscan-hint {
    color: #72767d; font-size: 13px; text-align: center;
    padding: 0 16px 14px; margin: 0;
}
.qrscan-status {
    display: flex; flex-direction: column; align-items: center;
    padding: 32px 16px; text-align: center; color: #dcddde; font-size: 15px;
}

.qrscan-result-overlay {
    position: absolute; inset: 0; border-radius: 8px;
    background: rgba(0,0,0,.75);
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 12px; color: #fff; font-size: 15px; font-weight: 500;
    animation: qrscan-fadein .2s ease;
}
.qrscan-result-overlay--ok { background: rgba(67,181,129,.18); }
.qrscan-result-overlay--error { background: rgba(240,71,71,.18); }
@keyframes qrscan-fadein { from { opacity:0; } to { opacity:1; } }

/* ── SettingsModal: кнопка «Назад» (только мобильный) ────────── */
.smod-mobile-back { display: none; }

/* ── SettingsModal: мобильная адаптация ──────────────────────── */
@media (max-width: 768px) {
    .smod-root {
        flex-direction: column;
        overflow: hidden;
    }

    .smod-sidebar {
        flex: 1 1 auto;
        min-height: 0;
        width: 100%;
        min-width: 0;
        height: auto;
        padding: calc(14px + env(safe-area-inset-top)) 6px max(12px, env(safe-area-inset-bottom));
        box-sizing: border-box;
        overflow-y: auto;
    }

    .smod-content {
        display: none;
        flex: 1 1 auto;
        min-height: 0;
        width: 100%;
        height: auto;
    }

    .smod-root--content-open .smod-sidebar { display: none; }
    .smod-root--content-open .smod-content { display: flex; }

    .smod-mobile-back {
        display: inline-flex;
        align-items: center;
        gap: 4px;
        background: none;
        border: none;
        color: #dcddde;
        font-size: 14px;
        padding: 12px 14px 8px;
        padding-top: calc(12px + env(safe-area-inset-top));
        cursor: pointer;
        flex-shrink: 0;
        align-self: flex-start;
    }
    .smod-mobile-back:hover { color: #fff; }

    .smod-content-inner {
        padding: 8px 16px calc(80px + env(safe-area-inset-bottom));
        max-width: 100%;
    }

    .smod-section-title {
        font-size: 18px;
        margin-bottom: 14px;
        padding-bottom: 10px;
    }

    .smod-close-btn {
        top: calc(8px + env(safe-area-inset-top));
        right: 8px;
        width: 36px;
        height: 36px;
        z-index: 2;
    }

    .smod-avatar-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    .smod-av-img,
    .smod-av-placeholder { width: 72px; height: 72px; }
    .smod-av-placeholder { font-size: 24px; }
    .smod-av-overlay { opacity: .55; }

    .smod-field-group { padding: 14px; }

    .smod-session-row {
        flex-wrap: wrap;
        align-items: flex-start;
    }
    .smod-session-name {
        white-space: normal;
    }
    .smod-session-revoke {
        margin-left: auto;
        padding: 4px 10px;
    }

    .smod-toggle-row { gap: 10px; }

    .smod-qr-wrap { align-items: center; }
    .smod-qr-img { width: 200px; height: 200px; }
    .smod-qr-hint { text-align: center; max-width: 280px; }

    /* Предотвращаем зум iOS при фокусе на поля */
    .smod-input,
    .smod-search { font-size: 16px; }

    .smod-api-token-value { font-size: 10px; }

    .smod-save-row { flex-wrap: wrap; }
    .smod-btn { width: 100%; }
    .smod-btn--primary { padding: 11px 18px; }
}


/* ── Mobile: скрываем app-rail когда открыт чат ── */
@media (max-width: 767px) {
    .app-rail--chat-open {
        display: none;
    }
}



/* ── Connection notice bar (inside chat panel) ─────────────────── */
.pm-lc-notice {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 6px 16px;
    color: rgba(255,255,255,.95);
    font-size: 12px;
    font-weight: 500;
    flex-shrink: 0;
    user-select: none;
}
.pm-lc-notice--lc       { background: #2e86c1; }
.pm-lc-notice--reconnect { background: #e8a317; }

/* ── Reconnect banner ─────────────────────────────────────────── */
.reconnect-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 16px;
    background: #e8a317;
    color: #fff;
    font-size: 13px;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(0,0,0,.35);
}

.reconnect-banner__spin {
    flex-shrink: 0;
    animation: reconnect-spin 1.2s linear infinite;
}

@keyframes reconnect-spin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

/* ── Storage unavailable banner ───────────────────────────────── */
.storage-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9998;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 16px;
    background: #b25c4d;
    color: #fff;
    font-size: 13px;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(0,0,0,.35);
}
/* Если уже отображается reconnect-banner — двигаем storage ниже, чтобы обе видны */
.storage-banner--stacked { top: 36px; }

/* ── App lock overlay (код-пароль) ────────────────────────────── */
.app-lock-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: #1e1f22;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}
.app-lock-card {
    width: 100%;
    max-width: 320px;
    background: #2b2d31;
    border-radius: 10px;
    padding: 24px 20px;
    box-shadow: 0 4px 16px rgba(0,0,0,.45);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}
.app-lock-icon {
    color: #5865f2;
    margin-bottom: 6px;
}
.app-lock-title {
    color: #f2f3f5;
    font-size: 17px;
    font-weight: 600;
}
.app-lock-subtitle {
    color: #b9bbbe;
    font-size: 12px;
    margin-bottom: 8px;
}
.app-lock-input {
    width: 100%;
    background: #1e1f22;
    border: 1px solid #1e1f22;
    border-radius: 6px;
    padding: 10px 12px;
    color: #f2f3f5;
    font-size: 18px;
    letter-spacing: 4px;
    text-align: center;
    box-sizing: border-box;
}
.app-lock-input:focus {
    outline: none;
    border-color: #5865f2;
}
.app-lock-error {
    color: #f04747;
    font-size: 12px;
}
.app-lock-btn {
    width: 100%;
    padding: 10px 14px;
    border: none;
    background: #5865f2;
    color: #fff;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background .12s;
}
.app-lock-btn:disabled { opacity: .55; cursor: not-allowed; }
.app-lock-btn:not(:disabled):hover { background: #4752c4; }




/* ── Onboarding tour ─────────────────────────────────────────── */

/* Click blocker — prevents interaction with app behind the overlay */
.ob-blocker {
    position: fixed;
    inset: 0;
    z-index: 9001;
    cursor: default;
}

/* Pulsing highlight ring around the target element */
.ob-ring {
    position: fixed;
    z-index: 9002;
    border: 2px solid #5865f2;
    box-shadow: 0 0 0 4px rgba(88,101,242,.3), 0 0 24px rgba(88,101,242,.25);
    pointer-events: none;
    animation: ob-pulse 2s ease-in-out infinite;
    transition: left .35s ease, top .35s ease, width .35s ease, height .35s ease;
}
@keyframes ob-pulse {
    0%,100% { box-shadow: 0 0 0 4px rgba(88,101,242,.3), 0 0 24px rgba(88,101,242,.25); }
    50%      { box-shadow: 0 0 0 9px rgba(88,101,242,.18), 0 0 40px rgba(88,101,242,.35); }
}

/* Tooltip card */
.ob-tip {
    position: fixed;
    z-index: 9003;
    background: #2b2d31;
    border-radius: 14px;
    padding: 20px 20px 16px;
    color: #dbdee1;
    box-shadow: 0 16px 48px rgba(0,0,0,.55);
    display: flex;
    flex-direction: column;
    gap: 8px;
    animation: ob-fadein .2s ease;
}
@keyframes ob-fadein { from { opacity:0; transform: scale(.95); } to { opacity:1; transform: scale(1); } }

/* Arrows */
.ob-tip--right::before {
    content: '';
    position: absolute;
    left: -8px;
    top: 50%;
    transform: translateY(-50%);
    border: 8px solid transparent;
    border-right-color: #2b2d31;
    border-left: none;
}
.ob-tip--left::after {
    content: '';
    position: absolute;
    right: -8px;
    top: 50%;
    transform: translateY(-50%);
    border: 8px solid transparent;
    border-left-color: #2b2d31;
    border-right: none;
}
.ob-tip--above::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    border: 8px solid transparent;
    border-top-color: #2b2d31;
    border-bottom: none;
}

.ob-tip-emoji  { font-size: 32px; line-height: 1; }
.ob-tip-title  { font-size: 15px; font-weight: 700; color: #fff; }
.ob-tip-body   { font-size: 13px; line-height: 1.55; color: #b5bac1; flex: 1; }

.ob-tip-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 4px;
}
.ob-tip-dots  { display: flex; gap: 6px; align-items: center; }
.ob-tip-dot   { width: 7px; height: 7px; border-radius: 50%; background: #4e5058; cursor: pointer; transition: background .2s, transform .2s; border: none; padding: 0; }
.ob-tip-dot--on { background: #5865f2; transform: scale(1.35); }
.ob-tip-btns  { display: flex; gap: 6px; }

.ob-tip-skip {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    color: #4e5058;
    cursor: pointer;
    font-size: 13px;
    line-height: 1;
    padding: 3px 5px;
    border-radius: 4px;
    transition: color .15s, background .15s;
}
.ob-tip-skip:hover { color: #dbdee1; background: #3d3f45; }

/* Shared buttons */
.ob-btn {
    padding: 7px 16px;
    border-radius: 7px;
    font-size: 13px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: background .15s, transform .1s;
}
.ob-btn:active         { transform: scale(.96); }
.ob-btn--ghost         { background: transparent; color: #80848e; }
.ob-btn--ghost:hover   { color: #dbdee1; background: #3d3f45; }
.ob-btn--primary       { background: #5865f2; color: #fff; }
.ob-btn--primary:hover { background: #4752c4; }
.ob-btn--success       { background: #3ba55d; color: #fff; }
.ob-btn--success:hover { background: #2d8049; }

/* Centered modal (welcome & last step) */
.ob-center-bg {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.78);
    z-index: 9000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}
.ob-center-card {
    position: relative;
    background: #2b2d31;
    border-radius: 16px;
    padding: 40px 36px 32px;
    width: 420px;
    max-width: 100%;
    color: #dbdee1;
    box-shadow: 0 24px 64px rgba(0,0,0,.6);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    animation: ob-fadein .25s ease;
}
.ob-close-btn {
    position: absolute;
    top: 14px;
    right: 14px;
    background: none;
    border: none;
    color: #80848e;
    cursor: pointer;
    padding: 4px;
    border-radius: 6px;
    display: flex;
    transition: color .15s, background .15s;
}
.ob-close-btn:hover { color: #dbdee1; background: #3d3f45; }
.ob-center-emoji  { font-size: 52px; line-height: 1; margin-bottom: 18px; }
.ob-center-title  { font-size: 20px; font-weight: 700; color: #fff; text-align: center; margin-bottom: 12px; }
.ob-center-body   { font-size: 14px; line-height: 1.6; color: #b5bac1; text-align: center; margin-bottom: 28px; }
.ob-center-nav    { display: flex; flex-direction: column; align-items: center; gap: 16px; width: 100%; }

@media (max-width: 480px) {
    .ob-center-card { padding: 32px 18px 24px; }
    .ob-center-emoji { font-size: 40px; }
    .ob-tip { max-width: calc(100vw - 24px); }
}

/* ── Share-target picker (Android: «Поделиться через BimFlow») ───────────── */
.share-picker-box {
    background: #2b2d31;
    border-radius: 10px;
    padding: 18px;
    width: 420px;
    max-width: 95vw;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    color: #dbdee1;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
}

.share-picker-title {
    font-size: 17px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.share-picker-preview {
    background: rgba(255, 255, 255, 0.05);
    border-left: 3px solid #5865f2;
    border-radius: 6px;
    padding: 8px 10px;
    font-size: 13px;
    color: #b5bac1;
    margin-bottom: 8px;
    max-height: 90px;
    overflow-y: auto;
    white-space: pre-wrap;
    word-break: break-word;
}

.share-picker-files {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 10px;
}

.share-picker-file {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #b5bac1;
    background: rgba(255, 255, 255, 0.04);
    padding: 5px 8px;
    border-radius: 5px;
}

.share-picker-search {
    background: #1e1f22;
    border: 1px solid rgba(255, 255, 255, 0.06);
    color: #f2f3f5;
    border-radius: 6px;
    padding: 8px 10px;
    font-size: 14px;
    outline: none;
    margin-bottom: 8px;
}

    .share-picker-search:focus {
        border-color: #5865f2;
    }

.share-picker-list {
    flex: 1;
    overflow-y: auto;
    min-height: 120px;
    max-height: 50vh;
    margin: 0 -6px;
    padding: 0 6px;
}

.share-picker-empty {
    color: #80848e;
    text-align: center;
    padding: 20px 0;
    font-size: 13px;
}

.share-picker-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    background: transparent;
    border: none;
    color: inherit;
    padding: 6px 8px;
    border-radius: 6px;
    cursor: pointer;
    text-align: left;
    transition: background .12s;
}

    .share-picker-item:hover {
        background: rgba(88, 101, 242, 0.18);
    }

.share-picker-avatar {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
}

.share-picker-name {
    flex: 1;
    color: #f2f3f5;
    font-size: 14px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.share-picker-badge {
    font-size: 10px;
    background: rgba(88, 101, 242, 0.25);
    color: #c2c8ff;
    padding: 2px 6px;
    border-radius: 10px;
    text-transform: uppercase;
}

.share-picker-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 12px;
}

/* ═══════════════════════════════════════════════════════════
   Profile handle card (on /profile page)
═══════════════════════════════════════════════════════════ */
.prof-handle-card {
    background: var(--color-bg-secondary, #2f3136);
    border-radius: 8px;
    padding: 12px 16px;
    margin: 0 16px 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.prof-handle-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--color-text-muted, #72767d);
    display: flex;
    align-items: center;
    gap: 5px;
}
.prof-handle-url-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.prof-handle-url {
    font-size: 14px;
    color: var(--color-text-primary, #dcddde);
    word-break: break-all;
}
.prof-handle-copy-btn, .prof-handle-edit-icon {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--color-text-muted, #72767d);
    padding: 4px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    transition: color .15s, background .15s;
}
.prof-handle-copy-btn:hover, .prof-handle-edit-icon:hover {
    color: var(--color-text-primary, #dcddde);
    background: rgba(255,255,255,.06);
}
.prof-handle-copied {
    font-size: 12px;
    color: #3ba55c;
}
.prof-handle-empty-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.prof-handle-hint {
    font-size: 13px;
    color: var(--color-text-muted, #72767d);
    flex: 1;
}
.prof-handle-set-btn {
    background: var(--color-accent, #5865f2);
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 5px 12px;
    font-size: 13px;
    cursor: pointer;
    transition: opacity .15s;
}
.prof-handle-set-btn:hover { opacity: .85; }
.prof-handle-edit-row {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}
.prof-handle-base-url {
    font-size: 13px;
    color: var(--color-text-muted, #72767d);
    white-space: nowrap;
}
.prof-handle-input {
    background: var(--color-bg-tertiary, #202225);
    border: 1px solid var(--color-border, #40444b);
    border-radius: 4px;
    color: var(--color-text-primary, #dcddde);
    font-size: 14px;
    padding: 5px 8px;
    flex: 1;
    min-width: 120px;
    outline: none;
}
.prof-handle-input:focus { border-color: var(--color-accent, #5865f2); }
.prof-handle-save-btn {
    background: var(--color-accent, #5865f2);
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 5px 12px;
    font-size: 13px;
    cursor: pointer;
    transition: opacity .15s;
}
.prof-handle-save-btn:disabled { opacity: .5; cursor: default; }
.prof-handle-cancel-btn {
    background: none;
    border: none;
    color: var(--color-text-muted, #72767d);
    cursor: pointer;
    font-size: 16px;
    padding: 4px 8px;
    border-radius: 4px;
}
.prof-handle-cancel-btn:hover { color: #ed4245; }
.prof-handle-error {
    font-size: 12px;
    color: #ed4245;
}
.prof-handle-badge {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 0 16px 8px;
    font-size: 13px;
    color: var(--color-text-muted, #72767d);
}
.prof-handle-link {
    color: var(--color-accent, #5865f2);
    text-decoration: none;
}
.prof-handle-link:hover { text-decoration: underline; }

/* ═══════════════════════════════════════════════════════════
   Public profile page  (/{Handle})
═══════════════════════════════════════════════════════════ */
.pub-prof-shell {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    background: var(--color-bg-primary, #36393f);
}
.pub-prof-card {
    background: var(--color-bg-secondary, #2f3136);
    border-radius: 12px;
    padding: 32px 28px 24px;
    max-width: 380px;
    width: 100%;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0,0,0,.35);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}
.pub-prof-card--center { justify-content: center; }
.pub-prof-branding {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 700;
    color: var(--color-text-muted, #72767d);
    letter-spacing: .04em;
    margin-bottom: 8px;
}
.pub-prof-logo-icon { opacity: .6; }
.pub-prof-avatar-wrap { margin-bottom: 4px; }
.pub-prof-avatar {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--color-accent, #5865f2);
}
.pub-prof-avatar-placeholder {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    background: var(--color-accent, #5865f2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: 700;
    color: #fff;
    border: 3px solid rgba(255,255,255,.12);
}
.pub-prof-name {
    font-size: 22px;
    font-weight: 700;
    color: var(--color-text-primary, #dcddde);
    line-height: 1.2;
}
.pub-prof-handle {
    font-size: 14px;
    color: var(--color-text-muted, #72767d);
    margin-top: -4px;
}
.pub-prof-about {
    font-size: 14px;
    color: var(--color-text-secondary, #b9bbbe);
    line-height: 1.5;
    max-width: 300px;
    margin-top: 4px;
}
.pub-prof-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    margin-top: 8px;
}
.pub-prof-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: none;
    border-radius: 6px;
    padding: 11px 20px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: opacity .15s, filter .15s;
    width: 100%;
    box-sizing: border-box;
}
.pub-prof-btn:hover { filter: brightness(1.1); }
.pub-prof-btn:disabled { opacity: .5; cursor: default; filter: none; }
.pub-prof-btn--primary  { background: var(--color-accent, #5865f2); color: #fff; }
.pub-prof-btn--outline  { background: transparent; color: var(--color-text-primary, #dcddde); border: 1.5px solid var(--color-border, #40444b); }
.pub-prof-btn--ghost    { background: transparent; color: var(--color-text-muted, #72767d); font-size: 13px; font-weight: 400; padding: 6px; }
.pub-prof-btn--success  { background: #3ba55c; color: #fff; }
.pub-prof-error {
    font-size: 12px;
    color: #ed4245;
    text-align: center;
    width: 100%;
}
.pub-prof-app-hint {
    margin-top: 12px;
    font-size: 12px;
    color: var(--color-text-muted, #72767d);
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: center;
}
.pub-prof-app-link {
    background: none;
    border: none;
    color: var(--color-accent, #5865f2);
    font-size: 12px;
    cursor: pointer;
    padding: 0;
    text-decoration: underline;
}
.pub-prof-spinner-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
}
.pub-prof-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid rgba(255,255,255,.1);
    border-top-color: var(--color-accent, #5865f2);
    border-radius: 50%;
    animation: pub-spin .8s linear infinite;
}
@keyframes pub-spin { to { transform: rotate(360deg); } }
.pub-prof-404-icon  { font-size: 48px; }
.pub-prof-404-title { font-size: 18px; font-weight: 700; color: var(--color-text-primary, #dcddde); margin-top: 8px; }
.pub-prof-404-sub   { font-size: 14px; color: var(--color-text-muted, #72767d); margin-top: 4px; }

