/* ==========================================================================
   Messenger — оформление в стиле Telegram Web
   ========================================================================== */

:root {
    --primary: #3390ec;
    --primary-soft: rgba(51, 144, 236, .1);
    --text: #000000;
    --secondary: #707579;
    --surface: #ffffff;
    --surface-hover: #f4f4f5;
    --border: #dfe1e5;
    --input-bg: #f4f4f5;
    --danger: #e53935;
    --success: #4fae4e;
    --badge: #4fae4e;

    --bubble-in: #ffffff;
    --bubble-out: #eeffde;
    --meta-in: #686c72;
    --meta-out: #4fae4e;
    --tick: #4fae4e;
    --tick-read: #1e88e5;
    --chip-bg: rgba(78, 111, 67, .42);
    --float-bg: rgba(255, 255, 255, .92);
    --mention-bg: #fff3c4;
    --mention-text: #8a5a00;
    --shadow: 0 1px 2px rgba(16, 35, 47, .15);
    --menu-shadow: 0 .25rem .5rem .125rem rgba(0, 0, 0, .1);

    --wallpaper:
        radial-gradient(circle at 12% 18%, rgba(219, 221, 187, .95) 0, transparent 52%),
        radial-gradient(circle at 88% 12%, rgba(107, 165, 135, .85) 0, transparent 50%),
        radial-gradient(circle at 85% 88%, rgba(213, 216, 141, .95) 0, transparent 55%),
        radial-gradient(circle at 15% 85%, rgba(136, 184, 132, .9) 0, transparent 55%),
        #a9c79a;

    --radius-bubble: 15px;
    --radius-small: 6px;
    color-scheme: light;
}

@media (prefers-color-scheme: dark) {
    :root {
        --primary: #8774e1;
        --primary-soft: rgba(135, 116, 225, .15);
        --text: #ffffff;
        --secondary: #aaaaaa;
        --surface: #212121;
        --surface-hover: #2c2c2c;
        --border: #0f0f0f;
        --input-bg: #181818;
        --danger: #ff595a;
        --badge: #8774e1;

        --bubble-in: #212121;
        --bubble-out: #766ac8;
        --meta-in: #aaaaaa;
        --meta-out: rgba(255, 255, 255, .7);
        --tick: rgba(255, 255, 255, .7);
        --tick-read: #7fd0ff;
        --chip-bg: rgba(0, 0, 0, .35);
        --float-bg: rgba(33, 33, 33, .92);
        --mention-bg: #4a3b10;
        --mention-text: #ffd977;
        --shadow: 0 1px 2px rgba(0, 0, 0, .35);
        --menu-shadow: 0 .25rem .5rem .125rem rgba(0, 0, 0, .35);

        --wallpaper:
            radial-gradient(circle at 15% 20%, rgba(52, 70, 56, .9) 0, transparent 55%),
            radial-gradient(circle at 85% 15%, rgba(36, 52, 66, .9) 0, transparent 50%),
            radial-gradient(circle at 80% 90%, rgba(60, 54, 88, .8) 0, transparent 55%),
            #0f0f0f;
        color-scheme: dark;
    }
}

/* ---------- База ---------- */

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html, body { height: 100%; }

body {
    margin: 0;
    background: var(--surface);
    color: var(--text);
    font: 16px/1.35 Roboto, -apple-system, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    -webkit-text-size-adjust: 100%;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

h1 { font-size: 1.6rem; font-weight: 600; margin: 0 0 .5rem; }
h2 { font-size: 1.25rem; font-weight: 600; margin: 0 0 .5rem; }
h3 { font-size: .95rem; font-weight: 600; color: var(--primary); margin: 1.25rem 0 .5rem; }

svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
svg .fill { fill: currentColor; stroke: none; }

.muted { color: var(--secondary); }
.empty { padding: 1rem; text-align: center; }
.inline { display: inline; }

/* ---------- Кнопки и поля ---------- */

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    height: 48px;
    padding: 0 1.25rem;
    border: 0;
    border-radius: 12px;
    background: var(--primary);
    color: #fff;
    font: inherit;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: filter .15s, background-color .15s;
}
.button:hover { filter: brightness(1.08); text-decoration: none; }
.button:disabled { opacity: .5; cursor: default; }
.button.small { height: 34px; padding: 0 .9rem; font-size: .9rem; border-radius: 8px; }
.button.danger { background: var(--danger); }
.button.text {
    height: 40px;
    padding: 0 .9rem;
    background: transparent;
    color: var(--primary);
    text-transform: uppercase;
    font-weight: 600;
    font-size: .9rem;
    letter-spacing: .02em;
    border-radius: 8px;
}
.button.text:hover { background: var(--primary-soft); filter: none; }
.button.text.danger { color: var(--danger); }
.button.text.danger:hover { background: rgba(229, 57, 53, .08); }
.button.text.small { height: 32px; font-size: .78rem; }
.button.secondary { background: var(--surface-hover); color: var(--text); }
.button.secondary:hover { filter: brightness(.96); }

.link-button {
    border: 0;
    background: none;
    color: var(--primary);
    font: inherit;
    cursor: pointer;
    padding: .25rem;
}

.icon-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--secondary);
    cursor: pointer;
    transition: background-color .15s;
}
.icon-button:hover { background: var(--surface-hover); }

input, textarea {
    width: 100%;
    padding: .8rem 1rem;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
    color: var(--text);
    font: inherit;
    font-size: 16px; /* меньше 16px — iOS увеличивает страницу при фокусе */
    font-weight: 400;
    transition: border-color .15s, box-shadow .15s;
}
input:hover { border-color: var(--primary); }
input:focus, textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary) inset; }
input::placeholder, textarea::placeholder { color: var(--secondary); }

.form { display: grid; gap: 1rem; margin: 1.5rem 0 1rem; }
.form label, .field { display: grid; gap: .35rem; font-size: .9rem; color: var(--secondary); font-weight: 500; }
.hint { font-size: .8rem; font-weight: 400; }
.field-error, .form-error { color: var(--danger); font-size: .85rem; font-weight: 400; }
.field-error:empty { display: none; }
.field-wrap.invalid input, .field-wrap.invalid input:hover { border-color: var(--danger); }
.field-wrap.invalid input:focus { box-shadow: 0 0 0 1px var(--danger) inset; }
.field-wrap.invalid .hint { display: none; }
.field-wrap.valid input { border-color: var(--success); }
.field-wrap.valid input:focus { box-shadow: 0 0 0 1px var(--success) inset; }
.form-error:empty { display: none; }

.alert { padding: .75rem 1rem; border-radius: 12px; margin: 1rem 0; font-size: .95rem; }
.alert-error { background: rgba(229, 57, 53, .1); color: var(--danger); }

.flashes { position: fixed; top: 12px; left: 50%; transform: translateX(-50%); z-index: 50; display: grid; gap: .5rem; width: min(480px, calc(100vw - 2rem)); }
.flash { padding: .75rem 1rem; border-radius: 12px; box-shadow: var(--menu-shadow); background: var(--surface); animation: pop .2s ease; }
.flash-success { border-left: 4px solid var(--success); }
.flash-error { border-left: 4px solid var(--danger); }

.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;
    min-width: 22px;
    height: 22px;
    padding: 0 7px;
    border-radius: 11px;
    background: var(--badge);
    color: #fff;
    font-size: .8rem;
    font-weight: 500;
    line-height: 1;
}

.tag, .role-tag {
    flex: none;
    padding: .1rem .5rem;
    border-radius: 6px;
    background: var(--primary-soft);
    color: var(--primary);
    font-size: .75rem;
    font-weight: 500;
}

/* ---------- Аватары (палитра Telegram) ---------- */

.avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    color: #fff;
    font-size: 1.15rem;
    font-weight: 500;
    letter-spacing: .02em;
    user-select: none;
    background: linear-gradient(#72d5fd, #2a9ef1);
}
.avatar.c0 { background: linear-gradient(#ff885e, #ff516a); }
.avatar.c1 { background: linear-gradient(#ffcd6a, #ffa85c); }
.avatar.c2 { background: linear-gradient(#82b1ff, #665fff); }
.avatar.c3 { background: linear-gradient(#a0de7e, #54cb68); }
.avatar.c4 { background: linear-gradient(#53edd6, #28c9b7); }
.avatar.c5 { background: linear-gradient(#72d5fd, #2a9ef1); }
.avatar.c6 { background: linear-gradient(#e0a2f3, #d669ed); }
.avatar.small { width: 40px; height: 40px; font-size: .95rem; }
.avatar.tiny { width: 24px; height: 24px; font-size: .62rem; }
.avatar.large { width: 72px; height: 72px; font-size: 1.6rem; }

.sender.c0 { color: #e05757; }
.sender.c1 { color: #d9822b; }
.sender.c2 { color: #7563e0; }
.sender.c3 { color: #3fa63c; }
.sender.c4 { color: #1fa59b; }
.sender.c5 { color: #2d8fd8; }
.sender.c6 { color: #c254cf; }

/* ---------- Страницы входа, регистрации, админки ---------- */

body.page { background: var(--surface); }

.card {
    margin: 0 auto;
    padding: 3rem 1.5rem 2rem;
    background: var(--surface);
}
.card.narrow { max-width: 400px; }
.card.wide { max-width: 980px; padding-top: 1.5rem; }
.card.narrow h1 { text-align: center; }
.card.narrow > .muted { text-align: center; }

.auth-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 140px;
    height: 140px;
    margin: 0 auto 1.75rem;
    border-radius: 32px;
    background: linear-gradient(135deg, #6366f1, #a855f7);
    color: #fff;
    box-shadow: 0 10px 30px rgba(99, 102, 241, .35);
}
.auth-logo svg { width: 140px; height: 140px; stroke: none; }
.auth-logo .dot { fill: #8b5cf6; stroke: none; }
.auth-subtitle { text-align: center; color: var(--secondary); margin: 0 0 .5rem; }
.auth-switch { text-align: center; color: var(--secondary); font-size: .95rem; }
.form .button { width: 100%; margin-top: .5rem; }

.topbar {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    height: 56px;
    padding: 0 1rem;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
}
.topbar-back { display: inline-flex; align-items: center; gap: .5rem; color: var(--text); font-weight: 500; }
.topbar-back svg { color: var(--secondary); }
.topbar-back:hover { text-decoration: none; color: var(--primary); }
.topbar-nav { display: flex; align-items: center; gap: 1rem; min-width: 0; }
.topbar-user { color: var(--secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 480px) { .topbar-user { display: none; } }

.card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap; }
.card-head a { display: none; }

.tabs { display: flex; gap: .25rem; border-bottom: 1px solid var(--border); margin: 1rem 0; overflow-x: auto; }
.tabs .tab { position: relative; padding: .75rem 1rem; color: var(--secondary); font-weight: 500; white-space: nowrap; }
.tabs .tab:hover { text-decoration: none; color: var(--text); }
.tabs .tab.active { color: var(--primary); }
.tabs .tab.active::after { content: ""; position: absolute; left: .5rem; right: .5rem; bottom: -1px; height: 3px; border-radius: 3px 3px 0 0; background: var(--primary); }
.tabs .count { margin-left: .25rem; padding: 0 .45rem; border-radius: 10px; background: var(--surface-hover); color: var(--secondary); font-size: .8rem; }

.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: .75rem .5rem; border-bottom: 1px solid var(--border); text-align: left; vertical-align: middle; }
.table th { color: var(--secondary); font-weight: 500; font-size: .85rem; }
.table tbody tr:hover { background: var(--surface-hover); }
.table .actions { text-align: right; white-space: nowrap; }
.table .actions form + form { margin-left: .35rem; }
@media (max-width: 640px) {
    .table thead { display: none; }
    .table tr { display: block; padding: .75rem 0; border-bottom: 1px solid var(--border); }
    .table td { display: block; border: 0; padding: .15rem 0; }
    .table .actions { text-align: left; padding-top: .5rem; }
}

.adoption { display: flex; gap: .75rem; margin: 0 0 1rem; flex-wrap: wrap; }
.adoption-item { display: flex; flex-direction: column; padding: .6rem 1rem; border-radius: 12px; background: var(--surface-hover); }
.adoption-item strong { font-size: 1.15rem; }
.adoption-item span { color: var(--secondary); font-size: .85rem; }
.status-ok { color: var(--success); white-space: nowrap; }
.status-no { color: var(--secondary); white-space: nowrap; }

.pager { display: flex; gap: .35rem; margin-top: 1rem; flex-wrap: wrap; }
.pager a { min-width: 36px; padding: .35rem .7rem; border-radius: 8px; text-align: center; color: var(--text); }
.pager a:hover { background: var(--surface-hover); text-decoration: none; }
.pager a.active { background: var(--primary); color: #fff; }

/* ==========================================================================
   Мессенджер
   ========================================================================== */

body.page-chat { overflow: hidden; background: var(--surface); }

.app {
    display: grid;
    grid-template-columns: minmax(300px, 26.5%) 1fr;
    height: 100vh;
    height: 100dvh;
    /* Видимая высота с учётом экранной клавиатуры (задаёт app.js через Visual Viewport API) */
    height: var(--app-height, 100dvh);
}
.app.thread-open { grid-template-columns: minmax(300px, 26.5%) 1fr minmax(320px, 26.5%); }
.sidebar { grid-column: 1; }
.conversation, .placeholder { grid-column: 2; }
.thread { grid-column: 3; }

/* ---------- Левая колонка ---------- */

.sidebar {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
    background: var(--surface);
    border-right: 1px solid var(--border);
}

.sidebar-head {
    display: flex;
    align-items: center;
    gap: .5rem;
    height: 56px;
    padding: 0 .75rem 0 .5rem;
    flex: none;
}

.search-field {
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
    min-width: 0;
    height: 42px;
    border-radius: 22px;
    background: var(--input-bg);
    border: 2px solid transparent;
    color: var(--secondary);
    transition: border-color .15s, background-color .15s;
}
.search-field:focus-within { border-color: var(--primary); background: var(--surface); color: var(--primary); }
.search-field svg { width: 20px; height: 20px; margin-left: .75rem; }
.search-field input { height: 100%; padding: 0 .75rem 0 .6rem; border: 0; background: transparent; border-radius: 22px; }
.search-field input:focus { box-shadow: none; }
.search-field input::-webkit-search-cancel-button { cursor: pointer; }

.menu-wrap { position: relative; }
.menu {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    z-index: 30;
    width: 280px;
    padding: .3rem 0;
    border-radius: 12px;
    background: var(--float-bg);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    box-shadow: var(--menu-shadow);
    animation: pop .15s ease;
    transform-origin: top left;
}
.menu-profile { display: flex; align-items: center; gap: .75rem; padding: .6rem 1rem .75rem; border-bottom: 1px solid var(--border); margin-bottom: .3rem; }
.menu-profile .avatar { width: 42px; height: 42px; font-size: 1rem; }
.menu-profile-text { display: flex; flex-direction: column; min-width: 0; }
.menu-profile-text strong { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.menu-profile-text small { color: var(--secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.menu form { margin: 0; }
.menu-item {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    width: calc(100% - .5rem);
    margin: 0 .25rem;
    padding: .5rem .75rem;
    border: 0;
    border-radius: 8px;
    background: none;
    color: var(--text);
    font: inherit;
    font-size: .9rem;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
}
.menu-item:hover { background: rgba(0, 0, 0, .06); text-decoration: none; }
.menu-item svg { width: 22px; height: 22px; color: var(--secondary); }
.menu-item .badge { margin-left: auto; }
.menu-item.danger, .menu-item.danger svg { color: var(--danger); }
.menu-item.on svg { color: var(--success); }

/* Предложение установить приложение */
.install-banner {
    display: flex;
    align-items: center;
    gap: .6rem;
    margin: 0 .75rem .5rem;
    padding: .5rem .5rem .5rem .6rem;
    border-radius: 12px;
    background: var(--primary-soft);
    flex: none;
}
.install-banner img { border-radius: 10px; flex: none; }
.install-banner-text { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.install-banner-text strong { font-weight: 600; font-size: .9rem; }
.install-banner-text small { color: var(--secondary); font-size: .78rem; }
.install-banner .icon-button { width: 32px; height: 32px; }
.install-banner .icon-button svg { width: 18px; height: 18px; }

.install-sheet {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    background: rgba(0, 0, 0, .45);
    animation: fade .2s ease;
}
.install-card {
    width: 100%;
    max-width: 480px;
    max-height: 100%;
    overflow-y: auto;
    padding: 1.75rem 1.25rem calc(1.25rem + env(safe-area-inset-bottom));
    border-radius: 20px 20px 0 0;
    background: var(--surface);
    text-align: center;
    animation: slide-up .25s ease;
}
.install-icon { border-radius: 22px; box-shadow: 0 8px 24px rgba(99, 102, 241, .35); }
.install-card h2 { margin: 1rem 0 .75rem; font-size: 1.3rem; }
.install-benefits { list-style: none; margin: 0 0 1.25rem; padding: 0; text-align: left; display: grid; gap: .6rem; }
.install-benefits li { display: flex; gap: .6rem; align-items: flex-start; line-height: 1.35; }
.install-steps { margin: 0 0 1rem; padding: .9rem 1rem .9rem 2.2rem; text-align: left; border-radius: 14px; background: var(--surface-hover); display: grid; gap: .55rem; }
.install-steps .inline-icon { width: 20px; height: 20px; vertical-align: -4px; color: var(--primary); }
.install-button { width: 100%; height: 52px; font-size: 1.05rem; margin-bottom: .5rem; }
.install-later { display: block; margin: .5rem auto 0; color: var(--secondary); font-size: .9rem; }
@keyframes fade { from { opacity: 0; } }
@keyframes slide-up { from { transform: translateY(40px); opacity: 0; } }

/* Заявки на регистрацию — для администраторов */
.admin-banner {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin: 0 .75rem .5rem;
    padding: .6rem .75rem;
    border-radius: 12px;
    background: #fff4e5;
    border: 1px solid #ffd8a8;
    color: #8a4b00;
    flex: none;
    animation: pop .2s ease;
}
.admin-banner:hover { text-decoration: none; filter: brightness(.98); }
.admin-banner-icon { font-size: 1.4rem; }
.admin-banner-text { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.admin-banner-text strong { font-weight: 600; }
.admin-banner-text small { opacity: .8; }
.admin-banner-go { font-size: 1.4rem; opacity: .6; }
@media (prefers-color-scheme: dark) {
    .admin-banner { background: #3a2a12; border-color: #6b4a1a; color: #ffc879; }
}

#menu-button { position: relative; }
.menu-dot {
    position: absolute;
    top: 2px;
    right: 0;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 9px;
    border: 2px solid var(--surface);
    background: var(--danger);
    color: #fff;
    font-size: .68rem;
    font-weight: 700;
    line-height: 14px;
    text-align: center;
}
.badge.danger { background: var(--danger); }
.tabs .tab.attention .count { background: var(--danger); color: #fff; }

/* Вкладки-папки над списком чатов */
.folders {
    display: flex;
    flex: none;
    gap: 0;
    padding: 0 .4rem;
    border-bottom: 1px solid var(--border);
    overflow-x: auto;
    scrollbar-width: none;
}
.folders::-webkit-scrollbar { display: none; }
.folder {
    position: relative;
    display: inline-flex;
    flex: 1 1 auto;
    justify-content: center;
    align-items: center;
    gap: .25rem;
    padding: .7rem .25rem .75rem;
    border: 0;
    border-radius: 8px 8px 0 0;
    background: none;
    color: var(--secondary);
    font: inherit;
    font-size: .88rem;
    font-weight: 500;
    white-space: nowrap;
    cursor: pointer;
}
.folder:hover { background: var(--surface-hover); }
.folder.active { color: var(--primary); }
.folder.active::after {
    content: "";
    position: absolute;
    left: .5rem;
    right: .5rem;
    bottom: 0;
    height: 3px;
    border-radius: 3px 3px 0 0;
    background: var(--primary);
}
.folder-count:empty { display: none; }
.folder-count {
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 9px;
    line-height: 18px !important;
    background: var(--secondary);
    color: var(--surface);
    font-size: .75rem;
    line-height: 20px;
    text-align: center;
}
.folder.active .folder-count { background: var(--primary); color: #fff; }

/* Раздел «Треды» */
.segmented { display: flex; gap: .25rem; margin: .25rem .5rem .5rem; padding: .2rem; border-radius: 10px; background: var(--surface-hover); }
.segment {
    flex: 1;
    padding: .4rem .5rem;
    border: 0;
    border-radius: 8px;
    background: none;
    color: var(--secondary);
    font: inherit;
    font-size: .9rem;
    font-weight: 500;
    cursor: pointer;
}
.segment.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.thread-item { align-items: flex-start; min-height: 84px; }
.thread-item .avatar { margin-top: .15rem; }
.thread-root { color: var(--secondary); font-size: .85rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-left: .5rem; border-left: 2px solid var(--border); }
.thread-root .who { color: var(--secondary); font-weight: 500; }
.thread-item.unread .list-item-title, .thread-item.unread .list-item-sub { font-weight: 600; color: var(--text); }
.reply-count { flex: none; color: var(--secondary); font-size: .78rem; }
.muted-icon { flex: none; font-size: .8rem; opacity: .7; }
.thread-item.active .thread-root, .thread-item.active .thread-root .who, .thread-item.active .reply-count { color: rgba(255, 255, 255, .85); border-color: rgba(255, 255, 255, .5); }
.thread-item.active { background: var(--primary); }
.thread-item.active .list-item-title, .thread-item.active .list-item-time,
.thread-item.active .list-item-sub, .thread-item.active .list-item-sub .who, .thread-item.active .type-icon { color: #fff; }

.type-icon { display: inline-flex; color: var(--secondary); }
.type-icon svg { width: 16px; height: 16px; stroke-width: 2.2; }
.chat-item.active .type-icon { color: #fff; }

.panel { flex: 1; overflow-y: auto; min-height: 0; padding: .35rem .5rem .5rem; overscroll-behavior: contain; }
.panel-caption { padding: .75rem .75rem .35rem; color: var(--secondary); font-size: .9rem; font-weight: 500; }
.more { display: block; margin: .5rem auto; }

.empty-state { padding: 3rem 1.5rem; text-align: center; }
.empty-state p { margin: .35rem 0; }
.empty-icon { font-size: 3rem; margin-bottom: .5rem; }

.list { list-style: none; margin: 0; padding: 0; }
.list-item {
    display: flex;
    align-items: center;
    gap: .75rem;
    width: 100%;
    min-height: 72px;
    padding: .5rem .6rem;
    border: 0;
    border-radius: 12px;
    background: none;
    color: var(--text);
    font: inherit;
    text-align: left;
    cursor: pointer;
    transition: background-color .12s;
}
.list-item:hover { background: var(--surface-hover); }
.list-item.static { cursor: default; }
.list-item.static:hover { background: none; }
.list-item-main { display: flex; flex-direction: column; gap: .15rem; min-width: 0; flex: 1; }
.list-item-top, .list-item-bottom { display: flex; align-items: center; gap: .35rem; min-width: 0; }
.list-item-title { flex: 1; min-width: 0; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-item-time { flex: none; color: var(--secondary); font-size: .75rem; }
.list-item-sub { flex: 1; min-width: 0; color: var(--secondary); font-size: .95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-item-sub .who { color: var(--text); }
.list-item-top .ticks { font-size: .85rem; }
.list.compact .list-item { min-height: 56px; padding: .35rem .5rem; }
.list.compact .avatar { width: 42px; height: 42px; font-size: 1rem; }

.chat-item.active { background: var(--primary); }
.chat-item.active .list-item-title,
.chat-item.active .list-item-time,
.chat-item.active .list-item-sub,
.chat-item.active .list-item-sub .who,
.chat-item.active .ticks { color: #fff; }
.chat-item.active .badge { background: #fff; color: var(--primary); }

.fab {
    position: absolute;
    right: 1.25rem;
    bottom: 1.25rem;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border: 0;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .25);
    cursor: pointer;
    transition: transform .15s, filter .15s;
}
.fab:hover { filter: brightness(1.08); transform: scale(1.04); }
.fab svg { width: 26px; height: 26px; }

/* ---------- Чат и тред ---------- */

.conversation, .thread, .placeholder {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
    background: var(--wallpaper);
    background-attachment: fixed;
}
.thread { border-left: 1px solid var(--border); }

.placeholder { align-items: center; justify-content: center; padding: 1rem; }
.placeholder-chip, .date-sep span {
    padding: .2rem .7rem;
    border-radius: 16px;
    background: var(--chip-bg);
    color: #fff;
    font-size: .9rem;
    font-weight: 500;
}

.pane-head {
    display: flex;
    align-items: center;
    gap: .5rem;
    height: 56px;
    padding: 0 .75rem 0 1rem;
    flex: none;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    z-index: 2;
}
.pane-head .back { display: none; margin-left: -.5rem; }
.thread-follow .bell-off { display: none; }
.thread-follow.muted .bell-on { display: none; }
.thread-follow.muted .bell-off { display: inline; }
.thread-follow:not(.muted) { color: var(--primary); }
.pane-peer {
    display: flex;
    align-items: center;
    gap: .75rem;
    flex: 1;
    min-width: 0;
    padding: 0;
    border: 0;
    background: none;
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: default;
}
.pane-peer.clickable { cursor: pointer; }
.pane-peer .avatar { width: 42px; height: 42px; font-size: 1rem; }
.pane-title { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.pane-name { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pane-sub { color: var(--secondary); font-size: .875rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.messages { flex: 1; overflow-y: auto; min-height: 0; overscroll-behavior: contain; }
.messages-inner { max-width: 760px; margin: 0 auto; padding: .5rem 1rem .25rem; }
.load-older {
    display: block;
    margin: .5rem auto;
    padding: .3rem .9rem;
    border: 0;
    border-radius: 16px;
    background: var(--chip-bg);
    color: #fff;
    font: inherit;
    font-size: .875rem;
    cursor: pointer;
}
.message-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }

.date-sep { position: sticky; top: .5rem; z-index: 1; display: flex; justify-content: center; margin: .5rem 0; pointer-events: none; }

/* --- Сообщение --- */

.msg { position: relative; display: flex; align-items: flex-end; gap: .4rem; max-width: 100%; }
.msg.first-in-group { margin-top: .35rem; }
.msg.mine { flex-direction: row-reverse; }

.is-group .msg.theirs { padding-left: 42px; }
.msg-avatar { display: none; }
.is-group .msg.theirs .msg-avatar { display: inline-flex; position: absolute; left: 0; bottom: 0; width: 34px; height: 34px; font-size: .8rem; visibility: hidden; }
.is-group .msg.theirs.last-in-group .msg-avatar { visibility: visible; }

.bubble {
    position: relative;
    max-width: min(480px, 85%);
    min-width: 56px;
    padding: .35rem .55rem .4rem .65rem;
    border-radius: var(--radius-bubble);
    background: var(--bubble-in);
    box-shadow: var(--shadow);
}
.msg.mine .bubble { background: var(--bubble-out); }
.msg.has-thread .bubble { min-width: 240px; }

/* Склейка подряд идущих сообщений: внутренние углы меньше */
.msg.theirs:not(.first-in-group) .bubble { border-top-left-radius: var(--radius-small); }
.msg.theirs:not(.last-in-group) .bubble { border-bottom-left-radius: var(--radius-small); }
.msg.mine:not(.first-in-group) .bubble { border-top-right-radius: var(--radius-small); }
.msg.mine:not(.last-in-group) .bubble { border-bottom-right-radius: var(--radius-small); }

/* Хвостик у последнего сообщения в группе */
.msg.last-in-group .bubble::before {
    content: "";
    position: absolute;
    bottom: 0;
    width: 9px;
    height: 17px;
    background: inherit;
    -webkit-mask: var(--tail) no-repeat;
    mask: var(--tail) no-repeat;
}
.msg.theirs.last-in-group .bubble { border-bottom-left-radius: 0; }
.msg.theirs.last-in-group .bubble::before {
    left: -8.4px;
    --tail: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='9' height='17'%3E%3Cpath d='M9 0v17H1.6c-1.3 0-1.9-1.5-1-2.4C4.9 10 8.2 5.6 9 0z'/%3E%3C/svg%3E");
}
.msg.mine.last-in-group .bubble { border-bottom-right-radius: 0; }
.msg.mine.last-in-group .bubble::before {
    right: -8.4px;
    --tail: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='9' height='17'%3E%3Cpath d='M0 0v17h7.4c1.3 0 1.9-1.5 1-2.4C4.1 10 .8 5.6 0 0z'/%3E%3C/svg%3E");
}

.sender { font-size: .875rem; font-weight: 500; line-height: 1.25; margin-bottom: .1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conversation:not(.is-group) .sender,
.thread:not(.is-group) .sender,
.msg:not(.first-in-group):not(.root) .sender { display: none; }

.text { position: relative; white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-word; line-height: 1.32; }
/* Невидимый «хвост» строки резервирует место под время, само время стоит в правом нижнем углу (как в Telegram) */
.text::after { content: ""; display: inline-block; width: var(--meta-w, 2.9rem); height: 1px; }
.msg.mine .text { --meta-w: 4rem; }
.is-group .msg.mine .text { --meta-w: 4.9rem; }
.msg.pending .text, .msg.root .text { --meta-w: 3.6rem; }
.mention { color: var(--primary); font-weight: 500; }
.msg.mine .mention { color: var(--meta-out); }
.mention.me, .msg.mine .mention.me { background: var(--mention-bg); color: var(--mention-text); border-radius: 4px; padding: 0 2px; }

/* Время и галочки — в правом нижнем углу текста */
.meta {
    position: absolute;
    right: -.1rem;
    bottom: -.2rem;
    display: inline-flex;
    align-items: center;
    gap: .2rem;
    height: 1.1rem;
    color: var(--meta-in);
    font-size: .75rem;
    line-height: 1;
    white-space: nowrap;
    user-select: none;
}
.msg.mine .meta { color: var(--meta-out); }

.ticks { display: inline-flex; align-items: center; font-size: .82rem; letter-spacing: -.32em; padding-right: .3em; color: var(--tick); }
.ticks.read { color: var(--tick-read); }
.ticks.failed { color: var(--danger); font-weight: 700; letter-spacing: 0; padding-right: 0; }
.ticks.pending { letter-spacing: 0; padding-right: 0; font-size: .7rem; }
.read-count {
    display: inline-flex;
    align-items: center;
    gap: .15rem;
    padding: 0;
    border: 0;
    background: none;
    color: inherit;
    font: inherit;
    letter-spacing: inherit;
    cursor: pointer;
}
.read-count span { letter-spacing: 0; margin-left: .35em; font-size: .72rem; font-weight: 600; }
.read-count:hover span { text-decoration: underline; }

.msg.mention-me .bubble { box-shadow: var(--shadow), 0 0 0 1.5px rgba(245, 166, 35, .75) inset; }
.msg.pending .bubble { opacity: .85; }
.msg.failed .bubble { box-shadow: var(--shadow), 0 0 0 1px var(--danger) inset; }
.msg.flash .bubble { animation: flash 2s ease; }
@keyframes flash { 0%, 50% { background: var(--mention-bg); } }

/* Полоса треда внизу пузыря */
.thread-bar {
    display: flex;
    align-items: center;
    gap: .5rem;
    width: calc(100% + 1.2rem);
    margin: .45rem -.55rem -.4rem -.65rem;
    padding: .45rem .65rem;
    border: 0;
    border-top: 1px solid rgba(0, 0, 0, .08);
    border-radius: 0 0 var(--radius-bubble) var(--radius-bubble);
    background: none;
    color: var(--primary);
    font: inherit;
    font-size: .9rem;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
    clear: both;
}
.msg.mine .thread-bar { color: var(--meta-out); }
.thread-bar:hover { background: rgba(0, 0, 0, .04); }
.thread-bar svg { width: 20px; height: 20px; }
.thread-bar svg:last-child { width: 18px; height: 18px; margin-left: auto; opacity: .7; }
.thread-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--primary); }
.msg.mine .thread-dot { background: var(--meta-out); }
@media (prefers-color-scheme: dark) {
    .thread-bar { border-top-color: rgba(255, 255, 255, .1); }
    .thread-bar:hover { background: rgba(255, 255, 255, .05); }
    .msg.mine .mention { color: #fff; text-decoration: underline; }
}

/* Кнопка «ответить в треде» рядом с пузырём */
.msg-action {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: none;
    width: 32px;
    height: 32px;
    margin-bottom: 2px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: var(--chip-bg);
    color: #fff;
    cursor: pointer;
    opacity: 0;
    transition: opacity .15s;
}
.msg-action svg { width: 18px; height: 18px; }
.msg:hover .msg-action, .msg.actions-visible .msg-action, .msg-action:focus-visible { opacity: 1; }

/* Корневое сообщение в треде */
.msg.root { margin-bottom: .5rem; }
.msg.root .bubble { max-width: 100%; }
.thread .msg.root.theirs { padding-left: 0; }
.thread .msg.root .msg-avatar { display: none; }

/* --- Вложения в сообщениях --- */

.media-grid { display: grid; gap: 2px; margin: .1rem 0 .35rem; border-radius: 10px; overflow: hidden; }
.media-grid.n2, .media-grid.n3, .media-grid.n4 { grid-template-columns: 1fr 1fr; min-width: 240px; }
.media-grid.n3 .media:first-child { grid-column: 1 / -1; }
.media { display: block; background: rgba(0, 0, 0, .06); line-height: 0; }
.media img { display: block; width: 100%; height: auto; max-height: 360px; object-fit: cover; }
.media-grid.n2 img, .media-grid.n3 img, .media-grid.n4 img { aspect-ratio: 1; height: 100%; max-height: 220px; }
.media-grid.n3 .media:first-child img { aspect-ratio: 2 / 1; }
.msg.has-media .bubble { padding-top: .3rem; }
.text.no-text { min-height: 1rem; }
.text.no-text::after { width: var(--meta-w, 2.9rem); }

.file {
    display: flex;
    align-items: center;
    gap: .7rem;
    min-width: 220px;
    margin: .15rem 0 .35rem;
    color: inherit;
    text-decoration: none;
}
a.file:hover { text-decoration: none; }
a.file:hover .file-name { color: var(--primary); }
.file-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    overflow: hidden;
}
.msg.mine .file-icon { background: var(--meta-out); }
.file-info { display: flex; flex-direction: column; min-width: 0; }
.file-name { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 300px; }
.file-size { color: var(--meta-in); font-size: .85rem; }
.msg.mine .file-size { color: var(--meta-out); }

.upload-bar { display: block; height: 3px; margin: .1rem 0 .4rem; border-radius: 2px; background: rgba(0, 0, 0, .1); overflow: hidden; }
.upload-bar span { display: block; width: 0; height: 100%; background: var(--meta-out); transition: width .2s; }

.drop-overlay {
    position: absolute;
    inset: 56px 0 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(51, 144, 236, .12);
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
    pointer-events: none;
}
.drop-overlay span {
    padding: 2.5rem 2rem;
    border: 2px dashed var(--primary);
    border-radius: 16px;
    background: var(--surface);
    color: var(--primary);
    font-weight: 500;
    text-align: center;
}

/* --- Поле ввода --- */

.composer {
    position: relative;
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: end;
    gap: .5rem;
    width: 100%;
    max-width: 760px;
    margin: 0 auto;
    padding: .25rem 1rem calc(1rem + env(safe-area-inset-bottom));
    flex: none;
}
.composer-box {
    position: relative;
    min-width: 0;
    border-radius: 16px 16px 0 16px;
    background: var(--surface);
    box-shadow: var(--shadow);
}
.composer-box::after {
    content: "";
    position: absolute;
    right: -8.4px;
    bottom: 0;
    width: 9px;
    height: 17px;
    background: var(--surface);
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='9' height='17'%3E%3Cpath d='M0 0v17h7.4c1.3 0 1.9-1.5 1-2.4C4.1 10 .8 5.6 0 0z'/%3E%3C/svg%3E") no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='9' height='17'%3E%3Cpath d='M0 0v17h7.4c1.3 0 1.9-1.5 1-2.4C4.1 10 .8 5.6 0 0z'/%3E%3C/svg%3E") no-repeat;
}
.composer-row { display: flex; align-items: flex-end; }
.attach-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;
    width: 44px;
    height: 50px;
    margin-left: .2rem;
    color: var(--secondary);
    cursor: pointer;
    transition: color .15s;
}
.attach-button:hover { color: var(--primary); }
.attach-button svg { width: 24px; height: 24px; transform: rotate(45deg); }
.attach-button input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.attach-button:focus-within { color: var(--primary); }
.composer-input:disabled ~ * { opacity: .5; }

.composer-files {
    list-style: none;
    margin: 0;
    padding: .5rem .5rem 0;
    display: flex;
    flex-direction: column;
    gap: .35rem;
    max-height: 220px;
    overflow-y: auto;
}
.pick { display: flex; align-items: center; gap: .6rem; padding: .3rem; border-radius: 10px; background: var(--surface-hover); }
.pick-thumb { width: 42px; height: 42px; border-radius: 8px; object-fit: cover; flex: none; }
.pick-thumb.file-icon { border-radius: 8px; width: 42px; height: 42px; }
.pick-info { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.pick-name { font-size: .9rem; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pick-size { font-size: .8rem; color: var(--secondary); }
.pick-remove { width: 28px; height: 28px; flex: none; border: 0; border-radius: 50%; background: none; color: var(--secondary); font-size: 1.2rem; line-height: 1; cursor: pointer; }
.pick-remove:hover { background: rgba(0, 0, 0, .08); color: var(--danger); }

.composer-input {
    display: block;
    padding-left: .4rem !important;
    max-height: 180px;
    padding: .9rem 1rem;
    border: 0;
    border-radius: inherit;
    background: transparent;
    resize: none;
    line-height: 1.32;
}
.composer-input:focus { box-shadow: none; }
.composer-input:disabled { cursor: not-allowed; }
.send-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 54px;
    height: 54px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: var(--surface);
    color: var(--secondary);
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: color .15s, background-color .15s, transform .1s;
}
.send-button svg { width: 26px; height: 26px; margin-left: 3px; }
.composer.has-text .send-button { background: var(--primary); color: #fff; }
.send-button:active { transform: scale(.95); }
.composer-error:empty { display: none; }
.composer-error {
    grid-column: 1 / -1;
    justify-self: center;
    padding: .2rem .7rem;
    border-radius: 12px;
    background: var(--danger);
    color: #fff;
    font-size: .85rem;
}

.mention-menu {
    position: absolute;
    left: 0;
    bottom: calc(100% + .5rem);
    z-index: 5;
    list-style: none;
    margin: 0;
    padding: .3rem;
    min-width: 240px;
    max-width: 100%;
    border-radius: 12px;
    background: var(--float-bg);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    box-shadow: var(--menu-shadow);
}
.mention-menu li { display: flex; align-items: center; gap: .6rem; padding: .4rem .6rem; border-radius: 8px; cursor: pointer; font-size: .95rem; }
.mention-menu li.active, .mention-menu li:hover { background: var(--surface-hover); }

/* ---------- Диалоги ---------- */

.dialog {
    width: min(440px, calc(100vw - 2rem));
    max-height: calc(100dvh - 2rem);
    padding: 1.25rem 1.25rem .75rem;
    border: 0;
    border-radius: 14px;
    background: var(--surface);
    color: var(--text);
    box-shadow: 0 10px 40px rgba(0, 0, 0, .3);
}
.dialog[open] { animation: pop .18s ease; }
.dialog.small { width: min(360px, calc(100vw - 2rem)); }
.dialog::backdrop { background: rgba(0, 0, 0, .4); }
.dialog form { display: grid; gap: .9rem; }
.dialog h2 + .muted { margin-top: -.25rem; font-size: .9rem; }
.dialog-actions { display: flex; justify-content: flex-end; gap: .25rem; margin-top: .75rem; flex-wrap: wrap; }
.info-head { display: flex; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.info-head h2 { margin: 0; }
.info-head p { margin: .15rem 0 0; }
.inline-form { display: flex !important; gap: .5rem; align-items: center; }
.inline-form input { flex: 1; }
.picker-results { max-height: 240px; overflow-y: auto; }
#info-members { max-height: 320px; overflow-y: auto; }

.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .4rem; }
.chips:empty { display: none; }
.chip { display: inline-flex; align-items: center; gap: .4rem; padding: .15rem .3rem .15rem .15rem; border-radius: 16px; background: var(--surface-hover); font-size: .9rem; }
.chip-remove { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; padding: 0; border: 0; border-radius: 50%; background: none; color: var(--secondary); font-size: 1.1rem; line-height: 1; cursor: pointer; }
.chip-remove:hover { background: rgba(0, 0, 0, .08); color: var(--danger); }

/* ---------- Всплывающие уведомления ---------- */

.toasts {
    position: fixed;
    right: 1rem;
    top: 4.25rem;
    z-index: 100;
    display: flex;
    flex-direction: column;
    gap: .5rem;
    width: min(360px, calc(100vw - 2rem));
}
.toast {
    padding: .75rem 1rem;
    border-radius: 12px;
    background: rgba(0, 0, 0, .82);
    color: #fff;
    box-shadow: 0 6px 24px rgba(0, 0, 0, .25);
    cursor: pointer;
    animation: pop .2s ease;
}
.toast-title { font-weight: 500; }
.toast-text { margin-top: .2rem; font-size: .9rem; opacity: .85; white-space: pre-wrap; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
.toast-mention { background: var(--surface); color: var(--text); border-left: 4px solid #f5a623; }
.toast-mention .toast-title::before { content: "@ "; color: #f5a623; font-weight: 700; }
.toast-error { border-left: 4px solid var(--danger); }
/* Отчёты и инструкции — показываем текст целиком */
.toast-report .toast-text { display: block; -webkit-line-clamp: unset; overflow: visible; }
.toast-thread { background: var(--surface); color: var(--text); border-left: 4px solid var(--primary); }
.toast-thread .toast-title::before { content: "💬 "; }
.toast-thread .toast-text { color: var(--secondary); }

@keyframes pop { from { transform: scale(.96); opacity: 0; } }

/* ---------- Мобильная раскладка: один экран за раз ---------- */

@media (max-width: 767px) {
    .app, .app.thread-open { grid-template-columns: 1fr; }
    .app > * { grid-row: 1; grid-column: 1 !important; }
    .app[data-view="list"] .conversation,
    .app[data-view="list"] .thread,
    .app[data-view="conv"] .sidebar,
    .app[data-view="conv"] .thread,
    .app[data-view="thread"] .sidebar,
    .app[data-view="thread"] .conversation,
    .placeholder { display: none !important; }
    .sidebar { border-right: 0; }
    .thread { border-left: 0; }
    .pane-head .back { display: inline-flex; }
    .close-desktop { display: none; }
    .messages-inner { padding: .5rem .5rem .25rem; }
    .composer { padding: .25rem .5rem calc(.5rem + env(safe-area-inset-bottom)); }
    .send-button { width: 48px; height: 48px; }
    .bubble { max-width: 86%; }
    .msg.has-thread .bubble { min-width: 200px; }
    .list-item { min-height: 68px; }
    .avatar { width: 50px; height: 50px; }
    .toasts { left: .75rem; right: .75rem; top: .75rem; width: auto; }
    .card { padding-top: 2rem; }
    .auth-logo { width: 110px; height: 110px; border-radius: 26px; }
    .auth-logo svg { width: 110px; height: 110px; }
}
