/* Connect · оформление в дизайн-системе rossdelo.ru (Apple) */

:root {
  color-scheme: light;
  --page: #ffffff;
  --alt: #f5f5f7;
  --bg: #f2f2f7;
  --bg-2: #e8e8ed;
  --surface: #ffffff;
  --ink: #1d1d1f;
  --ink-2: #424245;
  --muted: #86868b;
  --muted-2: #6e6e73;
  --line: rgba(0, 0, 0, .08);
  --line-2: #d2d2d7;
  --fill: rgba(118, 118, 128, .12);
  --fill-2: rgba(118, 118, 128, .2);
  --accent: #0071e3;
  --accent-hover: #0077ed;
  --link: #0066cc;
  --sys-blue: #007aff;
  --ok: #34c759;
  --ok-ink: #248a3d;
  --ok-soft: #e7f8ec;
  --danger: #ff3b30;
  --danger-ink: #c1271d;
  --danger-soft: #ffeceb;
  --warn-soft: #fff4e5;
  --brand-ink: #bf4800;
  --blue-soft: #e8f1ff;
  --violet-soft: #f3e8ff;
  --violet-ink: #7a3fb0;
  --bubble-in: #e9e9eb;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --ease: cubic-bezier(.28, .11, .32, 1);
  --spring: cubic-bezier(.2, .9, .25, 1.15);
  --shadow: 0 0 0 1px var(--line), 0 6px 20px -14px rgba(0, 0, 0, .2);
  --shadow-lg: 0 4px 12px rgba(0, 0, 0, .05), 0 30px 70px -20px rgba(0, 0, 0, .25);
  font: 400 1rem/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { min-width: 300px; margin: 0; background: var(--bg); color: var(--ink); }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { color: inherit; font: inherit; }
button, summary { cursor: pointer; }
button:disabled { cursor: wait; opacity: .5; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible, .stream:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px;
}
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-family: var(--display); line-height: 1.12; letter-spacing: -.028em; }
h1 { font-size: clamp(1.8rem, 3.2vw, 2.5rem); font-weight: 600; }
h2 { font-size: 1.3rem; font-weight: 600; }
h3 { font-size: 1.05rem; font-weight: 600; }
small { font-size: .875rem; }
code { overflow-wrap: anywhere; }
.muted { color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* ── Кнопки ───────────────────────────────── */
.button, .nav-button, .text-button {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  min-height: 2.75rem; padding: .5rem 1.25rem; border: 0; border-radius: 980px;
  background: var(--fill); color: var(--ink); font-size: 1rem; font-weight: 500; text-align: center; line-height: 1.2;
  transition: background .2s var(--ease), box-shadow .2s var(--ease), color .2s var(--ease), transform .2s var(--ease);
}
.button:hover, .nav-button:hover { background: var(--fill-2); }
.button:active, .nav-button:active, .text-button:active { transform: scale(.97); }
.button.primary { background: var(--accent); color: #fff; }
.button.primary:hover { background: var(--accent-hover); }
.button.small { min-height: 2.1rem; padding: .3rem .9rem; font-size: .875rem; }
.button.danger { background: var(--danger-soft); color: var(--danger-ink); }
.button.danger:hover { background: #ffdcd9; }
.text-button { background: transparent; color: var(--link); padding: .3rem .5rem; }
.text-button:hover { background: transparent; text-decoration: underline; }

.stack { display: grid; gap: .9rem; }
.stack .button { justify-self: start; }
label { display: grid; gap: .35rem; font-size: .9rem; font-weight: 600; color: var(--ink-2); }
input:not([type=checkbox]), textarea, select {
  width: 100%; min-width: 0; border: 0; border-radius: .8rem;
  background: var(--fill); padding: .65rem .85rem; font-weight: 400; color: var(--ink);
  transition: box-shadow .25s var(--ease), background .25s var(--ease);
}
input:not([type=checkbox]):focus, textarea:focus, select:focus {
  outline: none; background-color: #fff;
  box-shadow: 0 0 0 4px rgba(0, 125, 250, .18), inset 0 0 0 1px var(--sys-blue);
}
input::placeholder, textarea::placeholder { color: var(--muted); }
textarea { resize: vertical; }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted-2) 50%), linear-gradient(135deg, var(--muted-2) 50%, transparent 50%); background-position: calc(100% - 1.15rem) 1.1rem, calc(100% - .85rem) 1.1rem; background-size: .34rem .34rem, .34rem .34rem; background-repeat: no-repeat; padding-right: 2.2rem; }

.brand { display: inline-flex; align-items: center; gap: .65rem; width: fit-content; line-height: 1; }
.brand img { object-fit: contain; border-radius: .7rem; background: #fff; flex: none; }
.brand strong, .brand small { display: block; }
.brand strong { font-family: var(--display); font-size: 1.3rem; font-weight: 600; letter-spacing: -.02em; }
.brand small { margin-top: .22rem; color: var(--muted); font-size: .64rem; font-weight: 600; letter-spacing: .14em; }
.avatar {
  display: inline-grid; place-items: center; width: 2.25rem; height: 2.25rem; flex: none;
  border-radius: 50%; background: linear-gradient(180deg, #4aa3ff, var(--sys-blue)); color: #fff; font-weight: 600; font-size: .9rem;
}
.notice { padding: .85rem 1.05rem; border-radius: .95rem; background: var(--blue-soft); color: #0058c2; }
.notice.error { background: var(--danger-soft); color: var(--danger-ink); }
.credential { display: flex; align-items: center; flex-wrap: wrap; gap: .7rem 1rem; margin-top: .55rem; }
.credential code { margin-left: .25rem; padding: .12rem .3rem; border-radius: .4rem; background: rgba(0, 0, 0, .06); font-weight: 600; }

/* ── Вход и профиль ───────────────────────── */
.auth-page { display: grid; place-items: center; min-height: 100svh; padding: clamp(.85rem, 5vw, 4rem); }
.auth-shell {
  display: grid; grid-template-columns: 1fr minmax(0, 1fr); width: min(100%, 66rem);
  min-height: 37rem; overflow: hidden; background: var(--surface); border: 1px solid var(--line);
  border-radius: 1.75rem; box-shadow: var(--shadow-lg);
}
.auth-card { min-width: 0; display: flex; flex-direction: column; gap: 3rem; padding: clamp(1.5rem, 4.6vw, 3.6rem); }
.auth-content { display: grid; gap: 1rem; width: min(100%, 25rem); }
.auth-content .stack { gap: 1rem; }
.auth-content .button.primary { justify-self: stretch; min-height: 3rem; font-size: 1.05rem; }
.auth-note { color: var(--muted); font-size: .875rem; }
.auth-logout .text-button { padding-inline: 0; }
.back-link { justify-self: start; color: var(--link); font-weight: 500; }
.back-link:hover { text-decoration: underline; }
.auth-art {
  position: relative; isolation: isolate; overflow: hidden; min-height: 12rem;
  background:
    radial-gradient(ellipse at 30% 22%, #7dc4ff55, transparent 58%),
    radial-gradient(ellipse at 78% 78%, #64d2ff4d, transparent 60%),
    linear-gradient(155deg, #0a84ff 0%, #0071e3 42%, #0040a3 100%);
}
.art-ring, .art-core, .art-point { position: absolute; border-radius: 50%; }
.art-ring { top: 50%; left: 50%; width: 78%; aspect-ratio: 1.5; border: 1px solid rgba(255, 255, 255, .4); box-shadow: 0 0 2rem rgba(160, 214, 255, .35); }
.art-ring.r1 { transform: translate(-50%, -50%) rotate(-28deg); }
.art-ring.r2 { transform: translate(-50%, -50%) rotate(31deg); border-color: rgba(255, 255, 255, .28); }
.art-ring.r3 { transform: translate(-50%, -50%) rotate(85deg); border-color: rgba(255, 255, 255, .2); }
.art-core {
  top: 50%; left: 50%; width: 26%; aspect-ratio: 1; transform: translate(-50%, -50%);
  background: radial-gradient(circle at 36% 30%, #ffffff, #bfe0ff 24%, #4aa3ff 60%, #0a5bc4 88%);
  box-shadow: 0 0 clamp(1rem, 6vw, 5rem) rgba(120, 190, 255, .6);
}
.art-point { width: 3.1%; aspect-ratio: 1; background: #ffffff; box-shadow: 0 0 1.25rem rgba(200, 232, 255, .95); }
.art-point.p1 { left: 19%; top: 43%; }
.art-point.p2 { left: 74%; top: 64%; }

/* ── Верхняя панель ───────────────────────── */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: .8rem;
  min-height: 3.25rem; padding: .4rem clamp(.85rem, 3.1vw, 2.4rem);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, .72); backdrop-filter: saturate(1.8) blur(20px); -webkit-backdrop-filter: saturate(1.8) blur(20px);
}
.account-bar, .account-link { display: flex; align-items: center; gap: .6rem; }
.account-name { max-width: 13rem; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-link { border-radius: 980px; padding: .2rem .4rem .2rem .2rem; }
.account-link:hover { background: var(--fill); }
.account-link:focus-visible { border-radius: 980px; }

/* ── Рабочий экран ────────────────────────── */
.workspace {
  display: grid; grid-template-columns: minmax(11rem, 16rem) minmax(0, 1fr) minmax(12rem, 17rem);
  gap: .85rem; height: calc(100svh - 3.25rem); min-height: 39rem;
  max-width: 108rem; margin: auto; padding: .85rem;
}
.sidebar, .channel, .details-panel { min-width: 0; min-height: 0; border-radius: 1.35rem; }
.sidebar { overflow: auto; padding: .85rem .55rem; background: var(--alt); border: 1px solid var(--line); color: var(--ink); }
.sidebar summary { padding: .2rem .6rem .5rem; font-size: .78rem; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.sidebar nav { margin-top: .3rem; }
.team-heading { display: flex; align-items: center; gap: .45rem; margin: 1rem .6rem .3rem; font-size: .78rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.team-dot { width: .55rem; height: .55rem; flex: none; border-radius: 50%; background: var(--sys-blue); }
.team-dot.mint { background: var(--ok); }
.team-dot.violet { background: #af52de; }
.team-dot.amber { background: #ff9f0a; }
.room-link { min-height: 2.3rem; display: flex; align-items: center; gap: .5rem; padding: .42rem .6rem; border-radius: .65rem; color: var(--ink); font-size: .94rem; transition: background .18s var(--ease); }
.room-link:hover { background: rgba(0, 0, 0, .05); }
.room-link.current { background: var(--blue-soft); color: #0058c2; font-weight: 600; }
.room-mark { color: var(--muted); font-weight: 600; }
.room-link.current .room-mark { color: var(--accent); }
.room-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.unread { margin-left: auto; min-width: 1.35rem; padding: .05rem .4rem; border-radius: 999px; background: var(--sys-blue); color: #fff; text-align: center; font-size: .72rem; font-weight: 600; }
.sidebar-note { margin: 1rem .6rem; color: var(--muted); font-size: .9rem; }
.channel, .details-panel { border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow); }
.channel { display: flex; flex-direction: column; overflow: hidden; }
.channel > .notice { margin: .75rem; }
.channel-header {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap;
  gap: .65rem .9rem; padding: .85rem clamp(.7rem, 2.6vw, 1.65rem); border-bottom: 1px solid var(--line);
}
.channel-title { display: flex; align-items: center; gap: .7rem; min-width: 0; }
.channel-title h1 { overflow-wrap: anywhere; font-size: clamp(1.3rem, 2.4vw, 1.8rem); }
.eyebrow { color: var(--accent); font-weight: 600; font-size: .78rem; letter-spacing: .04em; text-transform: uppercase; }
.room-icon { display: inline-grid; place-items: center; flex: none; width: 2.75rem; height: 2.75rem; border-radius: .85rem; background: linear-gradient(180deg, #4aa3ff, var(--sys-blue)); color: #fff; font-weight: 700; font-size: 1.35rem; box-shadow: inset 0 0 0 .5px rgba(0, 0, 0, .08); }
.room-icon.mint { background: linear-gradient(180deg, #5be07f, var(--ok)); }
.room-icon.violet { background: linear-gradient(180deg, #c88bef, #af52de); }
.room-icon.amber { background: linear-gradient(180deg, #ffc45c, #ff9f0a); }
.search { display: flex; align-items: center; gap: .35rem; max-width: 18rem; padding: .18rem .22rem .18rem .8rem; border-radius: 1rem; background: var(--fill); transition: box-shadow .25s var(--ease), background .25s var(--ease); }
.search:focus-within { background: #fff; box-shadow: 0 0 0 4px rgba(0, 125, 250, .18), inset 0 0 0 1px var(--sys-blue); }
.search input { border: 0; background: transparent; box-shadow: none; padding: .4rem 0; font-size: .95rem; }
.search input:focus { background: transparent; box-shadow: none; }
.search .button.small { min-height: 1.95rem; }
.pinned { display: flex; align-items: baseline; flex-wrap: wrap; gap: .5rem; padding: .65rem 1rem; border-bottom: 1px solid var(--line); background: var(--blue-soft); font-size: .9rem; color: #0058c2; }
.pin-text { overflow-wrap: anywhere; color: #0058c2; }
.pinned .message-action { margin-left: auto; }
.stream { flex: 1; min-height: 0; overflow: auto; display: flex; flex-direction: column; align-items: flex-start; gap: .1rem; padding: 1rem clamp(.75rem, 2.6vw, 1.7rem); scrollbar-gutter: stable; scroll-behavior: smooth; }
.stream:focus-visible { outline-offset: -2px; }
.older { display: block; align-self: center; margin: 0 auto .6rem; }
.date-divider { align-self: center; text-align: center; margin: .9rem 0 .3rem; color: var(--muted); font-size: .78rem; font-weight: 500; }
.message { display: flex; flex-direction: column; align-items: flex-start; max-width: 100%; padding: .1rem 0; }
.message.mine { align-self: flex-end; align-items: flex-end; }
.message-meta { display: flex; align-items: baseline; gap: .5rem; margin: .55rem .35rem .22rem; font-size: .76rem; color: var(--muted); }
.message-meta strong { font-weight: 600; color: var(--muted-2); }
.message.mine .message-meta { justify-content: flex-end; }
.message-meta time { color: var(--muted); }
.message-content {
  max-width: min(78%, 42rem); padding: .55rem .9rem; border-radius: 1.2rem;
  background: var(--bubble-in); color: var(--ink); font-size: 1rem; line-height: 1.36; letter-spacing: -.012em;
  border-bottom-left-radius: .4rem;
}
.message.mine .message-content { background: linear-gradient(180deg, #0a84ff, var(--sys-blue)); color: #fff; border-bottom-left-radius: 1.2rem; border-bottom-right-radius: .4rem; }
.message-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.message-actions { display: flex; flex-wrap: wrap; gap: .7rem; margin: .22rem .35rem 0; opacity: .55; transition: opacity .2s var(--ease); }
.message:hover .message-actions, .message:focus-within .message-actions { opacity: 1; }
.message-action { padding: .1rem 0; border: 0; background: transparent; color: var(--link); font-size: .8rem; font-weight: 500; }
.message-action:hover { text-decoration: underline; }
.quoted { display: block; margin: .05rem 0 .35rem; padding: .3rem .6rem; border-left: 3px solid rgba(0, 0, 0, .18); border-radius: .4rem; background: rgba(0, 0, 0, .06); font-size: .84rem; overflow-wrap: anywhere; }
.message.mine .quoted { border-left-color: rgba(255, 255, 255, .6); background: rgba(255, 255, 255, .2); color: #fff; }
.reply-draft { display: flex; align-items: baseline; justify-content: space-between; gap: .5rem; margin-bottom: .4rem; padding: .35rem .6rem; border-left: 3px solid #9cc4f2; border-radius: .4rem; background: var(--blue-soft); color: #3a5a86; font-size: .86rem; overflow-wrap: anywhere; }
.reply-preview { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.composer { padding: .7rem clamp(.75rem, 2.6vw, 1.4rem) .9rem; border-top: 1px solid var(--line); background: var(--surface); }
.composer textarea { display: block; min-height: 3rem; max-height: 11rem; border-radius: 1.1rem; padding: .75rem 1rem; font-size: 1rem; }
.composer-footer { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-top: .5rem; }
.composer-footer small, .reading { color: var(--muted); }
.chat-status, .reading { padding: .5rem 1rem; font-size: .875rem; }
.chat-status { background: var(--warn-soft); color: var(--brand-ink); }
.reading { background: var(--alt); }
.channel-empty, .empty-chat { display: grid; justify-items: center; align-content: center; gap: .6rem; min-height: 12rem; padding: 1rem; text-align: center; }
.channel-empty { flex: 1; }
.stream > .empty-chat { align-self: stretch; }
.details-panel { overflow: auto; padding: 1.15rem; }
.details-panel > p { margin: .5rem 0 1.2rem; font-size: .9rem; }
.details-panel h3 { margin-top: 1rem; }
.people { display: grid; gap: .75rem; margin: .65rem 0 1rem; padding: 0; list-style: none; }
.people li { display: flex; align-items: center; gap: .6rem; min-width: 0; }
.people strong, .people small { display: block; overflow-wrap: anywhere; }
.people strong { font-weight: 600; }
.people small { font-size: .76rem; color: var(--muted); }
.people .avatar { width: 2rem; height: 2rem; font-size: .82rem; }
.room-settings { padding-top: .8rem; border-top: 1px solid var(--line); }
.room-settings summary { font-weight: 600; font-size: .9rem; }
.room-settings form { margin-top: .7rem; }

/* ── Админка ──────────────────────────────── */
.admin-shell { max-width: 85rem; margin-inline: auto; padding: clamp(.9rem, 4vw, 2.5rem); }
.admin-title p { margin-top: .4rem; }
.tabs { display: inline-flex; flex-wrap: wrap; gap: 2px; margin: 1rem 0; padding: 2px; border-radius: .75rem; background: var(--fill); }
.tabs a { padding: .45rem 1rem; border-radius: .6rem; font-size: .9rem; font-weight: 500; color: var(--ink); transition: background .2s var(--ease); }
.tabs a:hover { background: rgba(0, 0, 0, .04); }
.tabs a[aria-current=page] { background: var(--surface); font-weight: 600; box-shadow: 0 1px 3px rgba(0, 0, 0, .14); }
.team-tabs { display: flex; flex-wrap: wrap; gap: .45rem; margin: 1rem 0; }
.team-tabs a { display: inline-flex; align-items: center; gap: .45rem; }
.team-tabs a[aria-current=page] { background: var(--accent); color: #fff; }
.team-tabs a[aria-current=page]:hover { background: var(--accent-hover); }
.groups-layout { display: grid; grid-template-columns: minmax(15rem, 21rem) minmax(0, 1fr); gap: 1rem; align-items: start; }
.group-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2px; align-content: start; }
.group-list h2 { padding: .2rem .5rem .6rem; }
.group-total { margin-left: .4rem; color: var(--muted); font-weight: 500; font-size: 1rem; }
.group-item { display: flex; align-items: center; gap: .65rem; min-width: 0; padding: .6rem .65rem; border-radius: .75rem; transition: background .18s var(--ease); }
.group-item:hover { background: rgba(0, 0, 0, .05); }
.group-item.current { background: var(--blue-soft); }
.group-item .team-dot { width: .6rem; height: .6rem; }
.group-info { min-width: 0; flex: 1; }
.group-name { display: block; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.group-item.current .group-name { font-weight: 600; color: #0058c2; }
.group-info small { display: block; color: var(--muted); font-size: .78rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.group-count { flex: none; min-width: 1.7rem; padding: .1rem .45rem; border-radius: 999px; background: var(--fill); color: var(--muted-2); text-align: center; font-size: .76rem; font-weight: 600; }
.group-item.current .group-count { background: rgba(0, 113, 227, .16); color: #0058c2; }
.admin-shell > .notice { margin-bottom: 1rem; }
.admin-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); gap: 1rem; align-items: start; }
.admin-card { min-width: 0; padding: clamp(.95rem, 3vw, 1.7rem); border-radius: 1.6rem; background: var(--surface); box-shadow: var(--shadow); }
.admin-card > h2 { margin-bottom: .75rem; }
.staff-row { display: flex; align-items: center; flex-wrap: wrap; gap: .55rem; padding: .7rem 0; border-top: 1px solid var(--line); }
.staff-name { flex: 1 0 8rem; min-width: 0; }
.staff-name strong, .staff-name small { display: block; overflow-wrap: anywhere; }
.staff-name strong { font-weight: 600; }
.staff-name small { color: var(--muted); }
.staff-actions, .rights { display: flex; align-items: center; flex-wrap: wrap; gap: .4rem .65rem; }
.member-editor { display: grid; gap: .65rem; margin-top: .65rem; padding: .85rem 0; border-top: 1px solid var(--line); }
.member-editor strong { font-weight: 600; }
.membership-add { margin-top: .8rem; padding-top: .8rem; border-top: 1px solid var(--line); }
.admin-room-choice { display: flex; align-items: end; gap: .65rem; margin-bottom: .85rem; }
.admin-room-choice label { flex: 1; min-width: 0; }
.room-access-note { margin: .75rem 0 .5rem; }
.member-editor small { margin-left: .35rem; }
.account-profile { padding-bottom: 1rem; border-bottom: 1px solid var(--line); }
.check { display: inline-flex; align-items: center; gap: .35rem; font-size: .88rem; font-weight: 500; color: var(--ink); }
.check input { accent-color: var(--sys-blue); width: 1.05rem; height: 1.05rem; }

/* ── Адаптив ──────────────────────────────── */
@media (max-width: 1080px) {
  .workspace { grid-template-columns: minmax(10rem, 13rem) minmax(0, 1fr); height: auto; min-height: calc(100svh - 3.25rem); }
  .groups-layout { grid-template-columns: 1fr; }
  .channel { height: calc(100svh - 4.95rem); min-height: 33rem; }
  .details-panel { grid-column: 2; }
  .channel-empty { min-height: 14rem; }
}
@media (max-width: 700px) {
  .auth-shell { grid-template-columns: 1fr; min-height: 0; border-radius: 1.25rem; }
  .auth-card { gap: 1.5rem; }
  .auth-art { min-height: 9.5rem; }
  .art-ring { width: min(70%, 17rem); }
  .art-core { width: min(24%, 5.5rem); }
  .topbar { min-height: 3rem; gap: .4rem; }
  .topbar .brand img { width: 32px; height: 32px; }
  .topbar .brand strong { font-size: 1.1rem; }
  .account-bar { gap: .25rem; }
  .account-name { display: none; }
  .account-bar .avatar { width: 1.75rem; height: 1.75rem; font-size: .82rem; }
  .account-bar .nav-button, .account-bar .text-button { padding: .34rem .55rem; font-size: .81rem; }
  .workspace { display: flex; flex-direction: column; gap: .55rem; padding: .55rem; }
  .sidebar { padding: .58rem .6rem; }
  .sidebar summary { padding: .12rem .2rem; }
  .sidebar nav { max-height: 43svh; overflow: auto; }
  .channel { height: clamp(31rem, calc(100svh - 7rem), 44rem); min-height: 30rem; }
  .message-content { max-width: 84%; }
  .details-panel { padding: .9rem; }
  .channel-header { padding: .62rem .68rem; }
  .search { max-width: none; width: 100%; }
  .admin-grid { grid-template-columns: 1fr; }
}
