:root {
  --bg-darkest: #16131a;
  --bg-dark: #1c1922;
  --bg-mid: #242029;
  --bg-light: #2c2732;
  --bg-hover: #322c39;
  --accent: #b3243a;
  --accent-hover: #d12e46;
  --accent-soft: rgba(179, 36, 58, 0.16);
  --accent-glow: rgba(179, 36, 58, 0.35);
  --text-main: #efe6e8;
  --text-muted: #a8a0ab;
  --text-faint: #6f6875;
  --online: #3ba55d;
  --border: #322c39;
  --radius: 10px;
  --radius-lg: 16px;
  --shadow-lg: 0 20px 60px rgba(0,0,0,.5);
  --ease: cubic-bezier(.2,.7,.3,1);
  --dur-fast: .12s;
  --dur: .2s;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  font-family: var(--font);
  background: var(--bg-darkest);
  color: var(--text-main);
  overflow: hidden;
}
.hidden { display: none !important; }
input, button, select { font-family: inherit; }
button { cursor: pointer; border: none; background: none; color: inherit; }
::selection { background: var(--accent-soft); color: var(--text-main); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}

.icon { width: 20px; height: 20px; display: block; }
.icon-sm { width: 16px; height: 16px; }
.icon-lg { width: 32px; height: 32px; }
.icon-xl { width: 56px; height: 56px; color: var(--text-faint); }
.icon-btn {
  width: 34px; height: 34px; display: flex; align-items: center; justify-content: center;
  border-radius: 8px; color: var(--text-muted); transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease);
  flex-shrink: 0;
}
.icon-btn:hover { background: var(--bg-hover); color: var(--text-main); }
.icon-btn:active { transform: scale(.9); }

/* ---------- Экран авторизации ---------- */
.auth-screen {
  height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px;
  background: radial-gradient(circle at 20% 15%, #2a1720 0%, var(--bg-darkest) 60%);
}
.auth-shell {
  display: grid; grid-template-columns: 1fr 380px; width: 100%; max-width: 900px;
  background: var(--bg-dark); border-radius: 20px; overflow: hidden; box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
  animation: auth-in .5s var(--ease);
}
@keyframes auth-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.auth-brand {
  position: relative; padding: 44px 36px; display: flex; flex-direction: column; justify-content: center;
  background: linear-gradient(160deg, #2a1420 0%, #1a1420 55%, #150f16 100%);
  overflow: hidden; border-right: 1px solid var(--border);
}
.auth-brand-glow {
  position: absolute; width: 320px; height: 320px; border-radius: 50%;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  top: -100px; left: -80px; filter: blur(10px);
  animation: brand-drift 9s ease-in-out infinite alternate;
}
@keyframes brand-drift { from { transform: translate(0,0) scale(1); } to { transform: translate(30px, 40px) scale(1.15); } }
.auth-brand-top { display: flex; align-items: center; gap: 10px; color: var(--accent-hover); position: relative; }
.auth-brand-name { font-size: 20px; font-weight: 700; color: var(--text-main); }
.auth-brand-tagline { position: relative; color: var(--text-muted); font-size: 14.5px; line-height: 1.6; margin: 20px 0 26px; max-width: 30ch; }
.auth-brand-features { position: relative; list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.auth-brand-features li { display: flex; align-items: center; gap: 10px; font-size: 13.5px; color: var(--text-muted); }
.auth-brand-features .icon { color: var(--accent-hover); flex-shrink: 0; }

.auth-card { padding: 40px 36px; display: flex; flex-direction: column; justify-content: center; }
.auth-logo { display: none; align-items: center; gap: 10px; justify-content: center; font-size: 20px; font-weight: 700; color: var(--accent); margin-bottom: 20px; }
.auth-tabs { position: relative; display: flex; margin-bottom: 22px; background: var(--bg-mid); border-radius: 9px; padding: 3px; }
.auth-tab-indicator {
  position: absolute; top: 3px; bottom: 3px; left: 3px; width: calc(50% - 3px);
  background: var(--accent); border-radius: 6px; transition: transform var(--dur) var(--ease);
}
.auth-tab {
  position: relative; z-index: 1; flex: 1; padding: 9px; border-radius: 6px; color: var(--text-muted);
  font-weight: 600; font-size: 13px; transition: color var(--dur-fast) var(--ease);
}
.auth-tab.active { color: #fff; }
.auth-form { display: flex; flex-direction: column; gap: 11px; animation: form-in .25s var(--ease); }
@keyframes form-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.auth-form.hidden { display: none; }

.field {
  position: relative; display: flex; align-items: center;
  background: var(--bg-mid); border: 1px solid var(--border); border-radius: 9px;
  transition: border-color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
}
.field:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.field-icon { margin-left: 12px; color: var(--text-faint); flex-shrink: 0; }
.field input {
  flex: 1; min-width: 0; background: none; border: none; outline: none;
  padding: 11px 12px; color: var(--text-main); font-size: 14px;
}
.auth-error {
  color: var(--accent-hover); font-size: 12.5px; min-height: 14px;
}
.auth-error:not(:empty) { animation: shake .35s var(--ease); }
@keyframes shake { 0%,100% { transform: translateX(0); } 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }

.btn { padding: 11px; border-radius: 9px; font-weight: 600; font-size: 14px; transition: background var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease); }
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-block { width: 100%; position: relative; display: flex; align-items: center; justify-content: center; }
.btn-spinner {
  display: none; width: 15px; height: 15px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,.35); border-top-color: #fff;
  animation: spin .7s linear infinite; margin-left: 8px;
}
.btn.is-loading .btn-spinner { display: inline-block; }
.btn.is-loading { pointer-events: none; opacity: .85; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 720px) {
  .auth-shell { grid-template-columns: 1fr; max-width: 380px; }
  .auth-brand { display: none; }
  .auth-logo { display: flex; }
}

/* ---------- Раскладка приложения ---------- */
.app { display: grid; grid-template-columns: 72px 240px 1fr auto; height: 100vh; animation: app-in .35s var(--ease); }
@keyframes app-in { from { opacity: 0; } to { opacity: 1; } }

.server-rail {
  background: var(--bg-darkest); display: flex; flex-direction: column; align-items: center;
  padding: 12px 0; gap: 8px; overflow-y: auto;
}
.rail-item {
  width: 48px; height: 48px; border-radius: 24px; background: var(--bg-mid);
  display: flex; align-items: center; justify-content: center; color: var(--text-main);
  transition: border-radius var(--dur) var(--ease), background var(--dur) var(--ease), transform var(--dur-fast) var(--ease);
  flex-shrink: 0; position: relative; font-weight: 700; font-size: 16px;
}
.rail-item:hover, .rail-item.active { border-radius: 16px; background: var(--accent); }
.rail-item:active { transform: scale(.92); }
.rail-item.active::before {
  content: ''; position: absolute; left: -12px; width: 4px; height: 24px;
  background: #fff; border-radius: 0 4px 4px 0; animation: pill-in var(--dur) var(--ease);
}
@keyframes pill-in { from { height: 0; opacity: 0; } to { height: 24px; opacity: 1; } }
.rail-add { color: var(--accent); }
.rail-add:hover { background: var(--accent); color: #fff; }
.rail-sep { width: 32px; height: 2px; background: var(--border); border-radius: 1px; margin: 2px 0; }

.sidebar { background: var(--bg-dark); display: flex; flex-direction: column; border-right: 1px solid var(--border); }
.sidebar-header {
  height: 48px; display: flex; align-items: center; justify-content: space-between;
  padding: 0 14px; border-bottom: 1px solid var(--border); font-weight: 700; font-size: 15px;
  box-shadow: 0 1px 0 rgba(0,0,0,.2); flex-shrink: 0;
}
.sidebar-body { flex: 1; overflow-y: auto; padding: 10px 8px; animation: pane-in var(--dur) var(--ease); }
@keyframes pane-in { from { opacity: 0; } to { opacity: 1; } }
.dm-search-btn {
  width: 100%; display: flex; align-items: center; gap: 8px; padding: 9px 10px;
  background: var(--bg-mid); border-radius: 8px; color: var(--text-muted); font-size: 13px; margin-bottom: 8px;
  transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.dm-search-btn:hover { background: var(--bg-hover); color: var(--text-main); }

.list-item {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px;
  color: var(--text-muted); font-size: 14.5px; margin-bottom: 2px; position: relative; cursor: pointer;
  transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.list-item:hover { background: var(--bg-hover); color: var(--text-main); }
.list-item.active { background: var(--accent-soft); color: var(--text-main); }
.list-item .icon { flex-shrink: 0; color: var(--text-faint); }
.list-item.active .icon, .list-item:hover .icon { color: var(--text-muted); }

.channel-group-title {
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
  color: var(--text-faint); padding: 12px 8px 4px;
}
.channel-add-btn {
  display: flex; align-items: center; gap: 6px; padding: 8px 10px; color: var(--text-faint);
  font-size: 13px; border-radius: 6px; transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.channel-add-btn:hover { color: var(--text-main); background: var(--bg-hover); }

/* ---------- Аватары (единая система: цвет+инициалы или картинка) ---------- */
.avatar {
  width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: 13px; flex-shrink: 0; overflow: hidden; line-height: 1;
  background-size: cover; background-position: center; user-select: none;
}
.avatar.sm { width: 26px; height: 26px; font-size: 11px; }
.avatar.lg { width: 72px; height: 72px; font-size: 24px; }
.avatar.xl { width: 88px; height: 88px; font-size: 28px; }

.user-panel {
  display: flex; align-items: center; gap: 8px; padding: 10px; background: var(--bg-darkest);
  border-top: 1px solid var(--border); width: 100%; text-align: left; border-radius: 0;
  transition: background var(--dur-fast) var(--ease);
}
.user-panel:hover { background: var(--bg-mid); }
.user-panel:hover .user-panel-edit { opacity: 1; }
.user-meta { flex: 1; min-width: 0; }
.user-name { font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-status { font-size: 11px; color: var(--text-faint); }
.user-panel-edit { opacity: 0; transition: opacity var(--dur-fast) var(--ease); pointer-events: none; }
.user-panel-logout:hover { color: var(--accent-hover); }

.main { display: flex; flex-direction: column; min-width: 0; background: var(--bg-mid); }
.main-header {
  height: 48px; display: flex; align-items: center; gap: 8px; padding: 0 16px;
  border-bottom: 1px solid var(--border); font-weight: 700; font-size: 15px; flex-shrink: 0;
  box-shadow: 0 1px 0 rgba(0,0,0,.2);
}
.main-header-icon { color: var(--text-faint); }
.main-header-actions { margin-left: auto; display: flex; gap: 4px; }

.chat-view { flex: 1; display: flex; flex-direction: column; min-height: 0; position: relative; animation: pane-in var(--dur) var(--ease); }
.messages { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 2px; }
.msg-group {
  display: flex; gap: 14px; padding: 6px 8px; border-radius: 8px; position: relative;
  animation: msg-in .22s var(--ease);
}
@keyframes msg-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.msg-group:hover { background: rgba(255,255,255,.02); }
.msg-avatar { margin-top: 2px; }
.msg-body { flex: 1; min-width: 0; }
.msg-head { display: flex; align-items: baseline; gap: 8px; }
.msg-author { font-weight: 600; font-size: 15px; }
.msg-time { font-size: 11px; color: var(--text-faint); }
.msg-text { font-size: 14.5px; line-height: 1.45; color: var(--text-main); white-space: pre-wrap; word-break: break-word; }
.msg-edited { font-size: 10.5px; color: var(--text-faint); }

.msg-toolbar {
  position: absolute; top: -14px; right: 10px; display: flex; gap: 2px;
  background: var(--bg-dark); border: 1px solid var(--border); border-radius: 8px; padding: 2px;
  box-shadow: 0 6px 16px rgba(0,0,0,.3);
  opacity: 0; transform: translateY(4px); pointer-events: none;
  transition: opacity var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease);
}
.msg-group:hover .msg-toolbar { opacity: 1; transform: none; pointer-events: auto; }
.msg-toolbar .icon-btn { width: 28px; height: 28px; }

.reactions { display: flex; gap: 6px; margin-top: 4px; flex-wrap: wrap; }
.reaction-chip {
  display: flex; align-items: center; gap: 5px; padding: 2px 8px; border-radius: 10px;
  background: var(--bg-light); border: 1px solid var(--border); font-size: 12.5px; color: var(--text-muted);
  transition: border-color var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease);
  animation: chip-in .18s var(--ease);
}
@keyframes chip-in { from { opacity: 0; transform: scale(.7); } to { opacity: 1; transform: none; } }
.reaction-chip.mine { border-color: var(--accent); background: var(--accent-soft); color: var(--text-main); }
.reaction-chip:hover { border-color: var(--accent); transform: translateY(-1px); }

/* ---------- Вложения ---------- */
.attachment-preview {
  display: flex; align-items: center; gap: 8px; margin: 0 16px; padding: 8px 10px;
  background: var(--bg-light); border: 1px solid var(--border); border-radius: 10px; font-size: 13px;
  color: var(--text-muted); animation: chip-in .18s var(--ease);
}
.attachment-preview-name { color: var(--text-main); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 260px; }
.attachment-preview-size { color: var(--text-faint); flex-shrink: 0; }
.attachment-preview #attachment-preview-remove, .attachment-preview-remove { margin-left: auto; }

.msg-attachment-image {
  display: block; max-width: 320px; max-height: 320px; border-radius: 10px; margin-top: 6px;
  cursor: zoom-in; border: 1px solid var(--border); transition: filter var(--dur-fast) var(--ease);
}
.msg-attachment-image:hover { filter: brightness(1.05); }
.msg-attachment-file {
  display: flex; align-items: center; gap: 10px; margin-top: 6px; padding: 10px 12px;
  background: var(--bg-light); border: 1px solid var(--border); border-radius: 10px; max-width: 320px;
  color: var(--text-main); transition: border-color var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease);
}
.msg-attachment-file:hover { border-color: var(--accent); background: var(--bg-hover); }
.msg-attachment-file .icon { color: var(--accent-hover); flex-shrink: 0; }
.msg-attachment-meta { min-width: 0; flex: 1; }
.msg-attachment-name { font-size: 13.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msg-attachment-size { font-size: 11.5px; color: var(--text-faint); }
.msg-attachment-file .icon.icon-download { color: var(--text-faint); }

.composer { display: flex; align-items: center; gap: 4px; padding: 10px 16px 16px; }
.composer input {
  flex: 1; background: var(--bg-light); border: none; border-radius: 10px; padding: 12px 14px;
  color: var(--text-main); font-size: 14.5px; outline: none; transition: box-shadow var(--dur-fast) var(--ease);
}
.composer input:focus { box-shadow: 0 0 0 2px var(--accent-soft); }
.composer-send-btn { color: var(--accent-hover); }
.emoji-picker {
  position: absolute; bottom: 70px; right: 16px; background: var(--bg-dark); border: 1px solid var(--border);
  border-radius: 10px; padding: 10px; display: grid; grid-template-columns: repeat(8, 1fr); gap: 4px;
  box-shadow: 0 10px 30px rgba(0,0,0,.4); z-index: 20; transform-origin: bottom right;
  animation: pop-in .16s var(--ease);
}
@keyframes pop-in { from { opacity: 0; transform: scale(.9) translateY(6px); } to { opacity: 1; transform: none; } }
.emoji-picker button { font-size: 20px; padding: 4px; border-radius: 6px; transition: background var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease); }
.emoji-picker button:hover { background: var(--bg-hover); transform: scale(1.15); }
#reaction-picker { bottom: auto; right: auto; }

.empty-state { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; color: var(--text-faint); animation: pane-in var(--dur) var(--ease); }

/* ---------- Голосовой звонок ---------- */
.voice-view { flex: 1; padding: 24px; display: flex; animation: pane-in var(--dur) var(--ease); }
.voice-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 16px; align-content: start; width: 100%; }
.voice-tile {
  background: var(--bg-dark); border-radius: 14px; aspect-ratio: 16/10; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 10px; position: relative; border: 2px solid transparent;
  transition: border-color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
  animation: chip-in .2s var(--ease);
}
.voice-tile.speaking { border-color: var(--online); box-shadow: 0 0 0 4px rgba(59,165,93,.15); }
.voice-tile .avatar { width: 60px; height: 60px; font-size: 20px; position: relative; transition: box-shadow var(--dur-fast) var(--ease); }
.voice-tile.speaking .avatar { box-shadow: 0 0 0 4px rgba(59,165,93,.35); }
.voice-tile-name { font-size: 13px; font-weight: 600; color: var(--text-muted); display: flex; align-items: center; gap: 6px; }
.voice-tile-mute { color: var(--accent-hover); display: flex; }
.voice-tile-badge {
  position: absolute; top: 8px; right: 8px; width: 26px; height: 26px; border-radius: 50%;
  background: var(--bg-mid); display: flex; align-items: center; justify-content: center; color: var(--accent-hover);
}

.members-panel { width: 240px; background: var(--bg-dark); border-left: 1px solid var(--border); padding: 16px 10px; overflow-y: auto; }
.members-panel.hidden { display: none; }
.members-header { font-size: 11px; font-weight: 700; text-transform: uppercase; color: var(--text-faint); padding: 0 8px 8px; }
.member-item { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 8px; transition: background var(--dur-fast) var(--ease); }
.member-item:hover { background: var(--bg-hover); }
.member-name { font-size: 14px; color: var(--text-muted); }
.member-item.online .member-name { color: var(--text-main); }

.status-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--text-faint); border: 2px solid var(--bg-dark); flex-shrink: 0; }
.status-dot.online { background: var(--online); }

.call-bar {
  grid-column: 1 / -1; position: fixed; bottom: 0; left: 72px; right: 0; height: 58px;
  background: var(--bg-darkest); border-top: 1px solid var(--border); display: flex; align-items: center;
  justify-content: space-between; padding: 0 20px; z-index: 30; animation: call-bar-in .22s var(--ease);
}
@keyframes call-bar-in { from { transform: translateY(100%); } to { transform: translateY(0); } }
.call-bar-info { display: flex; align-items: center; gap: 10px; font-size: 13.5px; font-weight: 600; color: var(--text-muted); }
.call-bar-live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--online); animation: live-pulse 1.6s ease-in-out infinite; }
@keyframes live-pulse { 0%,100% { opacity: 1; } 50% { opacity: .35; } }
.call-bar-timer { color: var(--text-faint); font-variant-numeric: tabular-nums; }
.call-bar-actions { display: flex; gap: 6px; }
.call-hangup { background: var(--accent); color: #fff; }
.call-hangup:hover { background: var(--accent-hover); }
.icon-btn.active-toggle { background: var(--accent-soft); color: var(--accent-hover); }

/* ---------- Модальные окна ---------- */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.6); display: flex; align-items: center; justify-content: center; z-index: 100;
  animation: overlay-in .16s var(--ease); backdrop-filter: blur(2px);
}
@keyframes overlay-in { from { opacity: 0; } to { opacity: 1; } }
.modal { background: var(--bg-dark); border-radius: 14px; padding: 24px; width: 380px; max-width: calc(100vw - 32px); box-shadow: var(--shadow-lg); animation: modal-in .18s var(--ease); max-height: calc(100vh - 48px); overflow-y: auto; }
@keyframes modal-in { from { opacity: 0; transform: scale(.95) translateY(8px); } to { opacity: 1; transform: none; } }
.modal h3 { margin: 0 0 16px; font-size: 17px; }
.modal input, .modal select {
  width: 100%; background: var(--bg-mid); border: 1px solid var(--border); border-radius: 8px;
  padding: 10px 12px; color: var(--text-main); font-size: 14px; margin-bottom: 10px; outline: none;
  transition: border-color var(--dur-fast) var(--ease);
}
.modal input:focus, .modal select:focus { border-color: var(--accent); }
.modal .modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }
.modal .btn-secondary { background: var(--bg-mid); color: var(--text-muted); }
.modal .btn-secondary:hover { background: var(--bg-hover); color: var(--text-main); }
.modal-error { color: var(--accent-hover); font-size: 12.5px; margin-bottom: 8px; }
.modal-error:not(:empty) { animation: shake .35s var(--ease); }
.invite-code-box {
  background: var(--bg-mid); border-radius: 8px; padding: 10px 12px; font-family: monospace;
  font-size: 15px; text-align: center; letter-spacing: 1px; margin-bottom: 12px; user-select: all;
}

/* ---------- Профиль ---------- */
.profile-avatar-row { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; }
.profile-avatar-edit { position: relative; cursor: pointer; border-radius: 50%; }
.profile-avatar-edit .avatar { transition: filter var(--dur-fast) var(--ease); }
.profile-avatar-edit:hover .avatar { filter: brightness(.7); }
.profile-avatar-edit-badge {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  color: #fff; opacity: 0; transition: opacity var(--dur-fast) var(--ease); pointer-events: none;
}
.profile-avatar-edit:hover .profile-avatar-edit-badge { opacity: 1; }
.profile-avatar-actions { display: flex; flex-direction: column; gap: 6px; }
.profile-avatar-actions button { font-size: 12.5px; color: var(--text-muted); text-align: left; padding: 4px 0; }
.profile-avatar-actions button:hover { color: var(--accent-hover); }
.profile-color-swatches { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.profile-color-swatch {
  width: 28px; height: 28px; border-radius: 50%; border: 2px solid transparent; transition: transform var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease);
}
.profile-color-swatch:hover { transform: scale(1.1); }
.profile-color-swatch.active { border-color: var(--text-main); }
.field-label { font-size: 12px; color: var(--text-faint); text-transform: uppercase; letter-spacing: .03em; margin-bottom: 6px; display: block; }

/* ---------- Toasts ---------- */
.toast-stack { position: fixed; bottom: 20px; right: 20px; display: flex; flex-direction: column; gap: 8px; z-index: 200; }
.toast {
  background: var(--bg-dark); border: 1px solid var(--border); border-radius: 10px; padding: 10px 14px;
  font-size: 13px; color: var(--text-main); box-shadow: var(--shadow-lg); animation: toast-in .2s var(--ease);
  max-width: 320px;
}
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.toast.leaving { animation: toast-out .18s var(--ease) forwards; }
@keyframes toast-out { to { opacity: 0; transform: translateX(20px); } }

::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-thumb { background: var(--bg-light); border-radius: 4px; }
::-webkit-scrollbar-track { background: transparent; }
