/* ============================================================
   CommHub — "Graphite" skin
   Dark grey glass, silver accents, restrained motion.
   ============================================================ */

:root {
  color-scheme: dark;
  --bg: #090a0b;
  --bg-2: #0e0f11;
  --panel: rgba(18, 19, 22, .72);
  --panel-2: rgba(21, 23, 26, .66);
  --panel-3: rgba(29, 32, 36, .62);
  --line: rgba(255, 255, 255, .065);
  --line-strong: rgba(255, 255, 255, .12);
  --text: #ecedef;
  --muted: #9aa0a8;
  --muted-2: #6d747d;
  --accent: #c9cdd4;
  --accent-2: #e2e5ea;
  --accent-strong: #aeb4bd;
  --cyan: #aab2bd;
  --pink: #b9c0c9;
  --green: #57c98b;
  --red: #e07383;
  --yellow: #d9b36b;
  --shadow-sm: 0 8px 24px rgba(0, 0, 0, .4);
  --shadow-md: 0 18px 50px rgba(0, 0, 0, .5);
  --shadow-lg: 0 30px 90px rgba(0, 0, 0, .65);
  --font-body: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Sora", "DM Sans", system-ui, sans-serif;
  --blur: 20px;
}

* { box-sizing: border-box; }

html, body { height: 100%; margin: 0; }

body {
  font-family: var(--font-body);
  color: var(--text);
  background-color: var(--bg);
  background-image:
    radial-gradient(1100px 760px at 10% -12%, rgba(255, 255, 255, .045), transparent 62%),
    radial-gradient(1000px 720px at 105% -5%, rgba(255, 255, 255, .025), transparent 55%),
    radial-gradient(900px 900px at 55% 118%, rgba(255, 255, 255, .02), transparent 62%);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: rgba(220, 224, 230, .3); color: #fff; }

button, input, textarea, select { font: inherit; }

button {
  position: relative;
  border: 0;
  cursor: pointer;
  color: inherit;
  overflow: hidden;
  background: transparent;
  transition: background .18s ease, border-color .18s ease, transform .18s ease,
              box-shadow .18s ease, color .18s ease, border-radius .2s ease;
}

button:active { transform: translateY(1px) scale(.995); }

input, textarea, select {
  color: var(--text);
  background: rgba(13, 14, 16, .8);
  border: 1px solid rgba(255, 255, 255, .09);
  border-radius: 11px;
  padding: 12px 14px;
  outline: none;
  width: 100%;
  transition: border-color .18s, box-shadow .18s, background .18s;
}

input:hover, textarea:hover, select:hover { border-color: rgba(255, 255, 255, .16); }

input:focus, textarea:focus, select:focus {
  border-color: rgba(210, 215, 222, .55);
  background: rgba(17, 18, 21, .92);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, .06), 0 0 26px -8px rgba(255, 255, 255, .3);
}

textarea { resize: vertical; min-height: 92px; }

input::placeholder, textarea::placeholder { color: #61676f; }

:focus-visible { outline: 2px solid rgba(210, 215, 222, .5); outline-offset: 2px; }

.hidden { display: none !important; }
.muted { color: var(--muted); }
.tiny { font-size: 11px; }
.full { width: 100%; }

.eyebrow {
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 1.7px;
  color: #8b9198;
  text-transform: uppercase;
}

/* ---------- scrollbars ---------- */

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(200, 205, 212, .4), rgba(140, 146, 154, .22));
  border: 2px solid transparent;
  background-clip: padding-box;
  border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover { background: linear-gradient(180deg, rgba(225, 229, 234, .6), rgba(160, 166, 174, .35)); background-clip: padding-box; }

/* ---------- ambient / fx ---------- */

.ambient {
  position: fixed;
  pointer-events: none;
  filter: blur(110px);
  opacity: .3;
  z-index: 0;
  border-radius: 50%;
  will-change: transform;
}

.ambient-one {
  width: 420px; height: 420px;
  background: radial-gradient(circle, #5a616a, transparent 68%);
  top: -190px; left: 28%;
  animation: drift-a 26s ease-in-out infinite alternate;
}

.ambient-two {
  width: 380px; height: 380px;
  background: radial-gradient(circle, #3a4047, transparent 68%);
  bottom: -200px; right: 2%;
  animation: drift-b 32s ease-in-out infinite alternate;
}

.ambient-three {
  width: 340px; height: 340px;
  background: radial-gradient(circle, #2c3137, transparent 68%);
  top: 42%; left: -150px;
  opacity: .25;
  animation: drift-c 38s ease-in-out infinite alternate;
}

.cursor-glow {
  position: fixed;
  left: 0; top: 0;
  width: 620px; height: 620px;
  margin: -310px 0 0 -310px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 1;
  opacity: 0;
  background: radial-gradient(circle, rgba(255, 255, 255, .05), rgba(255, 255, 255, .02) 42%, transparent 66%);
  mix-blend-mode: screen;
  transition: opacity .5s ease;
  will-change: transform;
}
.cursor-glow.is-active { opacity: 1; }

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 60;
  pointer-events: none;
  opacity: .028;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}

/* ---------- buttons ---------- */

.primary {
  position: relative;
  background: linear-gradient(135deg, #f4f5f7 0%, #d3d8de 48%, #a9b0b9 100%);
  background-size: 160% 160%;
  color: #141517;
  border-radius: 11px;
  padding: 11px 17px;
  font-weight: 800;
  letter-spacing: .1px;
  box-shadow:
    0 8px 22px -10px rgba(0, 0, 0, .9),
    inset 0 1px 0 rgba(255, 255, 255, .8);
}

.primary::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, .5) 48%, transparent 62%);
  transform: translateX(-120%);
  transition: transform .7s ease;
  pointer-events: none;
}

.primary:hover {
  background-position: 100% 50%;
  box-shadow:
    0 14px 34px -10px rgba(0, 0, 0, .95),
    0 0 26px -8px rgba(255, 255, 255, .35),
    inset 0 1px 0 rgba(255, 255, 255, .95);
  transform: translateY(-1px);
}

.primary:hover::before { transform: translateX(120%); }

.secondary {
  background: rgba(45, 49, 54, .9);
  color: #e8eaed;
  border: 1px solid rgba(255, 255, 255, .09);
  border-radius: 10px;
  padding: 10px 14px;
  font-weight: 700;
  backdrop-filter: blur(8px);
}
.secondary:hover { background: rgba(58, 63, 69, .95); border-color: rgba(255, 255, 255, .18); }

.subtle-button { background: transparent; color: var(--muted); padding: 10px; border-radius: 9px; }
.subtle-button:hover { color: #fff; background: rgba(255, 255, 255, .06); }

.link-button { background: none; color: var(--accent-2); padding: 0; font-weight: 700; overflow: visible; }
.link-button:hover { text-decoration: underline; text-underline-offset: 3px; }

.small-action {
  background: rgba(52, 57, 63, .9);
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 9px;
  padding: 8px 11px;
  font-size: 10.5px;
  font-weight: 800;
  color: #dfe2e6;
  flex: none;
}
.small-action:hover { background: rgba(68, 74, 81, .95); border-color: rgba(255, 255, 255, .18); transform: translateY(-1px); }

.small-action.primary-action {
  background: linear-gradient(135deg, #eef0f3, #b9c0c9);
  color: #141517;
  border-color: transparent;
  box-shadow: 0 8px 20px -8px rgba(0, 0, 0, .9);
}
.small-action.primary-action:hover { box-shadow: 0 10px 26px -6px rgba(0, 0, 0, 1); }

/* ---------- auth ---------- */

.auth-screen {
  position: relative;
  z-index: 2;
  height: 100%;
  min-height: 650px;
  display: grid;
  grid-template-columns: minmax(370px, 470px) minmax(320px, 520px);
  justify-content: center;
  align-items: center;
  gap: clamp(35px, 8vw, 130px);
  padding: 40px;
}

.auth-card {
  position: relative;
  width: 100%;
  padding: 38px;
  border: 1px solid transparent;
  border-radius: 24px;
  background:
    linear-gradient(160deg, rgba(29, 31, 35, .95), rgba(17, 18, 21, .97)) padding-box,
    linear-gradient(130deg, rgba(255, 255, 255, .22), rgba(255, 255, 255, .05) 45%, rgba(255, 255, 255, .12)) border-box;
  box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255, 255, 255, .06);
  backdrop-filter: blur(24px);
  animation: card-in .7s cubic-bezier(.2, .8, .25, 1) both;
}

.auth-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(600px 260px at 50% -10%, rgba(255, 255, 255, .05), transparent 70%);
}

.auth-card > * { position: relative; }

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 30px;
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: .2px;
  font-size: 16px;
}

.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: linear-gradient(145deg, #f2f3f5, #9299a2);
  display: grid;
  place-items: center;
  font-size: 19px;
  font-weight: 900;
  color: #131416;
  box-shadow: 0 10px 26px -8px rgba(0, 0, 0, .9), inset 0 1px 0 rgba(255, 255, 255, .9);
}

.auth-card .eyebrow { margin: 0 0 10px; }

.auth-card h1 {
  font-family: var(--font-display);
  font-size: 29px;
  letter-spacing: -.9px;
  margin: 0 0 8px;
}

.auth-card > p.muted { margin: 0 0 25px; font-size: 13px; }

.auth-form { display: grid; gap: 10px; }

.auth-form > * { animation: rise .55s cubic-bezier(.2, .8, .25, 1) both; }
.auth-form > *:nth-child(1) { animation-delay: .08s; }
.auth-form > *:nth-child(2) { animation-delay: .13s; }
.auth-form > *:nth-child(3) { animation-delay: .18s; }
.auth-form > *:nth-child(4) { animation-delay: .23s; }
.auth-form > *:nth-child(5) { animation-delay: .28s; }

.auth-form label, .field-label {
  font-size: 11px;
  font-weight: 700;
  color: #aab0b8;
  margin-top: 3px;
}

.handle-input { position: relative; }

.handle-input > span {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: #d3d8de;
  font-weight: 800;
  pointer-events: none;
}

.handle-input input { padding-left: 35px; }

.auth-submit {
  margin-top: 13px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  padding: 13px;
  font-size: 13px;
}

.auth-submit span { font-size: 17px; transition: transform .25s ease; }
.auth-submit:hover span { transform: translateX(4px); }

.auth-switch { text-align: center; font-size: 12px; margin: 22px 0 0; color: var(--muted); }

.auth-note { text-align: center; margin: 20px 0 0; line-height: 1.55; }
.auth-note strong { color: #e6e9ed; }

.auth-side-copy { max-width: 440px; position: relative; animation: rise .8s .15s cubic-bezier(.2, .8, .25, 1) both; }

.auth-side-copy h2 {
  font-family: var(--font-display);
  font-size: clamp(32px, 4vw, 48px);
  letter-spacing: -2px;
  line-height: 1.12;
  margin: 15px 0;
}

.auth-side-copy h2 span {
  background: linear-gradient(100deg, #ffffff 0%, #c8cdd4 40%, #8f969e 75%, #ffffff 100%);
  background-size: 250% 100%;
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  animation: hue-flow 9s linear infinite;
}

.auth-side-copy p { color: var(--muted); max-width: 340px; font-size: 14px; line-height: 1.75; }

.auth-orbit {
  width: 250px;
  height: 190px;
  position: relative;
  margin: 38px 0 0 5px;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(255, 255, 255, .07), transparent 66%);
  animation: bob 9s ease-in-out infinite alternate;
  box-shadow: 0 0 80px -24px rgba(255, 255, 255, .35);
}

.auth-orbit:before, .auth-orbit:after {
  content: "";
  position: absolute;
  inset: 20px 40px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 50%;
  animation: spin 26s linear infinite;
}

.auth-orbit:after {
  inset: 45px 10px;
  border-color: rgba(255, 255, 255, .07);
  animation: spin 34s linear infinite reverse;
}

.orbit-core {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 58px;
  height: 58px;
  border-radius: 19px;
  background: linear-gradient(145deg, #f0f1f4, #8b929b);
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 900;
  color: #131416;
  box-shadow: 0 0 50px rgba(255, 255, 255, .3), inset 0 1px 0 rgba(255, 255, 255, .8);
  animation: core-pulse 4.5s ease-in-out infinite;
}

.orbit-node {
  position: absolute;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: rgba(38, 41, 46, .94);
  border: 1px solid rgba(255, 255, 255, .14);
  color: #dfe2e6;
  box-shadow: 0 10px 24px rgba(0, 0, 0, .55);
  animation: bob 7s ease-in-out infinite alternate;
}

.node-a { left: 16px; top: 38px; animation-delay: -1s; }
.node-b { right: 24px; top: 18px; animation-delay: -2.6s; }
.node-c { right: 44px; bottom: 6px; animation-delay: -4.2s; }

/* ---------- app shell ---------- */

.app {
  position: relative;
  z-index: 2;
  height: 100vh;
  display: grid;
  grid-template-columns: 76px 260px minmax(0, 1fr);
  background: rgba(9, 10, 11, .45);
  backdrop-filter: blur(2px);
}

.servers-rail {
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 10px;
  padding: 15px 0;
  background: linear-gradient(180deg, rgba(13, 14, 16, .94), rgba(10, 11, 12, .9));
  border-right: 1px solid var(--line);
  backdrop-filter: blur(var(--blur));
  z-index: 3;
}

.home-button, .server-icon, .rail-add, .rail-discover, .rail-profile {
  width: 46px;
  height: 46px;
  border-radius: 16px;
  background: rgba(31, 33, 37, .92);
  color: #b9bec4;
  font-weight: 800;
  font-size: 15px;
  display: grid;
  place-items: center;
  position: relative;
  flex: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05), 0 6px 16px rgba(0, 0, 0, .4);
}

.home-button {
  background: linear-gradient(145deg, #f0f1f3, #9ba1a9);
  color: #131416;
  font-size: 20px;
  box-shadow: 0 10px 26px -8px rgba(0, 0, 0, .9), inset 0 1px 0 rgba(255, 255, 255, .85);
}

.home-button:hover, .server-icon:hover, .rail-add:hover, .rail-discover:hover, .rail-profile:hover {
  border-radius: 13px;
  background: rgba(58, 63, 69, .95);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 10px 26px -6px rgba(0, 0, 0, .65), inset 0 1px 0 rgba(255, 255, 255, .12);
}

.home-button:hover {
  background: linear-gradient(145deg, #ffffff, #b4bac2);
  box-shadow: 0 12px 30px -8px rgba(0, 0, 0, .95);
}

.home-button.active, .server-icon.active {
  background: linear-gradient(145deg, #5a6068, #2b2f34);
  color: #fff;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, .35),
    0 0 26px -6px rgba(255, 255, 255, .35),
    inset 0 1px 0 rgba(255, 255, 255, .18);
}

.home-button.active {
  background: linear-gradient(145deg, #ffffff, #9aa1a9);
  color: #111;
}

.rail-divider { width: 28px; height: 1px; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .16), transparent); margin: 2px 0; }

.server-icons {
  display: flex;
  flex-direction: column;
  gap: 9px;
  align-items: center;
  overflow-y: auto;
  overflow-x: hidden;
  max-height: calc(100vh - 230px);
  width: 100%;
  padding: 0 8px;
}

.server-icon { border-radius: 15px; background: rgba(36, 39, 43, .92); }

.rail-add { color: #d2d7dd; background: rgba(31, 33, 37, .9); font-size: 24px; }
.rail-add:hover { background: rgba(58, 63, 69, .95); color: #fff; box-shadow: 0 0 22px -6px rgba(255, 255, 255, .3); }

.rail-discover, .rail-profile { font-size: 20px; background: transparent; color: #8b9198; box-shadow: none; }
.rail-profile { background: rgba(36, 39, 43, .65); }

.rail-spacer { flex: 1; }

/* ---------- sidebar ---------- */

.sidebar {
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: linear-gradient(180deg, rgba(23, 25, 28, .84), rgba(14, 15, 18, .9));
  border-right: 1px solid var(--line);
  backdrop-filter: blur(var(--blur));
}

.sidebar-top {
  min-height: 76px;
  padding: 0 19px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  flex: none;
}

.sidebar-top h2 {
  font-family: var(--font-display);
  font-size: 17px;
  margin: 3px 0 0;
  letter-spacing: -.4px;
}

.icon-button {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  display: inline-grid;
  place-items: center;
  background: transparent;
  color: #8a9099;
  font-size: 15px;
  position: relative;
}
.icon-button:hover { background: rgba(255, 255, 255, .08); color: #fff; }

.nav-item {
  position: relative;
  width: calc(100% - 18px);
  margin: 7px 9px 0;
  padding: 11px 12px;
  border-radius: 10px;
  background: transparent;
  text-align: left;
  color: #aeb4bc;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12.5px;
  font-weight: 650;
}

.nav-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 3px;
  height: 20px;
  border-radius: 0 4px 4px 0;
  background: linear-gradient(180deg, #ffffff, #8f969e);
  box-shadow: 0 0 14px rgba(255, 255, 255, .45);
  transform: translateY(-50%) scaleY(0);
  transition: transform .22s cubic-bezier(.2, .8, .25, 1);
}

.nav-item:hover { background: rgba(255, 255, 255, .045); color: #fff; }

.nav-item.selected {
  background: linear-gradient(90deg, rgba(255, 255, 255, .1), rgba(255, 255, 255, .03) 70%, transparent);
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .07);
}

.nav-item.selected::before { transform: translateY(-50%) scaleY(1); }

.nav-glyph { width: 17px; text-align: center; color: #8a9099; font-size: 16px; transition: color .2s; }
.nav-item:hover .nav-glyph, .nav-item.selected .nav-glyph { color: #e3e6ea; }

.count {
  margin-left: auto;
  color: #e3e6ea;
  font-weight: 800;
  font-size: 10px;
  background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .12);
  padding: 2px 7px;
  border-radius: 999px;
}

.section-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 25px 17px 9px;
  color: #767c84;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 1.4px;
}

.mini-add { background: none; color: #8a9099; font-size: 19px; padding: 0 3px; border-radius: 6px; }
.mini-add:hover { color: #fff; background: rgba(255, 255, 255, .08); }

.dm-entry, .channel-entry, .member-entry {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 13px;
  margin: 2px 8px;
  border-radius: 9px;
  color: #abb1b9;
  cursor: pointer;
  font-size: 12px;
  width: calc(100% - 16px);
  text-align: left;
}

.dm-entry:hover, .channel-entry:hover, .channel-entry.selected {
  background: rgba(255, 255, 255, .06);
  color: #fff;
}

.channel-entry.selected {
  background: linear-gradient(90deg, rgba(255, 255, 255, .1), rgba(255, 255, 255, .045));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08);
}

.channel-entry .hash { font-size: 16px; color: #79808a; }
.channel-entry.selected .hash { color: #e3e6ea; }

.member-entry { cursor: pointer; padding: 7px 10px; font-size: 11px; }
.member-entry:hover { background: rgba(255, 255, 255, .05); }

.avatar {
  width: 38px;
  height: 38px;
  flex: none;
  border-radius: 13px;
  background:
    radial-gradient(120% 120% at 15% 0%, rgba(255, 255, 255, .26), transparent 55%),
    linear-gradient(145deg, #7e858e, #2c3137);
  display: grid;
  place-items: center;
  font-weight: 800;
  color: #fff;
  text-transform: uppercase;
  overflow: hidden;
  object-fit: cover;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2), 0 4px 14px rgba(0, 0, 0, .4);
  position: relative;
}

.avatar img, .avatar-image { width: 100%; height: 100%; object-fit: cover; }

.avatar.small { width: 35px; height: 35px; border-radius: 11px; }
.avatar.tiny-avatar { width: 25px; height: 25px; border-radius: 8px; font-size: 10px; }
.avatar-button { padding: 0; }

.user-panel {
  margin-top: auto;
  background: linear-gradient(90deg, rgba(16, 17, 19, .92), rgba(23, 25, 28, .92));
  border-top: 1px solid var(--line);
  padding: 12px 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex: none;
  backdrop-filter: blur(12px);
}

.user-meta { display: grid; min-width: 0; flex: 1; }
.user-meta strong { font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-meta span { font-size: 9.5px; color: #858b93; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.status-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  border: 0;
  background: var(--green);
  padding: 0;
  box-shadow: 0 0 0 2px rgba(87, 201, 139, .16), 0 0 12px rgba(87, 201, 139, .7);
  flex: none;
}
.status-dot.online { animation: dot-pulse 2.6s ease-in-out infinite; }
.status-dot.idle { background: var(--yellow); box-shadow: 0 0 0 2px rgba(217, 179, 107, .16), 0 0 12px rgba(217, 179, 107, .65); }
.status-dot.dnd { background: var(--red); box-shadow: 0 0 0 2px rgba(224, 115, 131, .16), 0 0 12px rgba(224, 115, 131, .65); }
.status-dot.offline { background: #667079; box-shadow: 0 0 0 2px rgba(102, 112, 121, .16); animation: none; }

.logout-button { font-size: 16px; }

.server-context { display: flex; align-items: center; padding: 12px 12px 6px; gap: 10px; }

.server-context-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(145deg, #6f767f, #2c3035);
  font-weight: 900;
  box-shadow: 0 8px 22px -10px rgba(0, 0, 0, .9), inset 0 1px 0 rgba(255, 255, 255, .16);
}

.server-context-copy { min-width: 0; flex: 1; display: grid; }
.server-context-copy strong { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.server-context-copy span { font-size: 9px; color: var(--muted-2); margin-top: 3px; }

.member-label { padding-top: 22px; }
.member-label span { color: #878d95; }
.member-list { max-height: 38vh; overflow: auto; }
.member-role {
  font-size: 8px;
  color: #c9ced4;
  text-transform: uppercase;
  margin-left: auto;
  letter-spacing: .7px;
  background: rgba(255, 255, 255, .08);
  border-radius: 5px;
  padding: 2px 5px;
}

.invite-button { margin: 12px 12px 3px; width: calc(100% - 24px); }

/* ---------- main ---------- */

.main-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  background:
    radial-gradient(ellipse at 92% 0%, rgba(255, 255, 255, .025), transparent 38%),
    rgba(15, 16, 18, .55);
}

.main-panel::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  z-index: 4;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .35), rgba(255, 255, 255, .15), transparent);
  background-size: 200% 100%;
  animation: hue-slide 14s linear infinite;
  opacity: .6;
}

.topbar {
  height: 76px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 26px;
  font-weight: 800;
  font-size: 14px;
  flex: none;
  background: rgba(14, 15, 17, .55);
  backdrop-filter: blur(18px);
  z-index: 3;
}

.topbar-title-wrap { display: flex; align-items: center; gap: 11px; }

.topbar-mark {
  width: 26px;
  height: 26px;
  border-radius: 9px;
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .1);
  display: grid;
  place-items: center;
  color: #d8dce1;
  font-size: 12px;
  box-shadow: 0 0 18px -8px rgba(255, 255, 255, .3);
}

.topbar-actions { display: flex; align-items: center; gap: 9px; }

.connection-dot {
  width: 7px;
  height: 7px;
  background: var(--green);
  border-radius: 50%;
  box-shadow: 0 0 12px rgba(87, 201, 139, .8);
  animation: dot-pulse 3s ease-in-out infinite;
}

.notification-dot {
  position: absolute;
  right: 4px;
  top: 4px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 10px rgba(224, 115, 131, .8);
  animation: dot-pulse 1.8s ease-in-out infinite;
}

.notification-button { font-size: 17px; margin-left: 10px; }

.content {
  padding: 28px 32px 24px;
  overflow: auto;
  flex: 1;
  min-height: 0;
  scroll-behavior: smooth;
  background-image: radial-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px);
  background-size: 32px 32px;
  background-position: -10px -10px;
}

.content > * { animation: rise .45s cubic-bezier(.2, .8, .25, 1) both; }

.page-heading {
  font-family: var(--font-display);
  font-size: 25px;
  letter-spacing: -.8px;
  margin: 0 0 5px;
}

.page-subtitle { color: var(--muted); margin: 0 0 23px; font-size: 12.5px; line-height: 1.6; }

.toolbar { display: flex; gap: 10px; align-items: center; margin-bottom: 19px; }

.search-input {
  background: rgba(22, 24, 27, .85);
  border-color: rgba(255, 255, 255, .08);
  border-radius: 11px;
  padding: 11px 14px;
  color: #fff;
  min-width: 0;
  flex: 1;
  backdrop-filter: blur(8px);
}

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(285px, 1fr)); gap: 12px; }

.user-card, .panel-card, .server-card {
  position: relative;
  background:
    linear-gradient(150deg, rgba(30, 32, 36, .94), rgba(20, 22, 25, .94)) padding-box,
    linear-gradient(140deg, rgba(255, 255, 255, .16), rgba(255, 255, 255, .03) 40%, rgba(255, 255, 255, .07)) border-box;
  border: 1px solid transparent;
  border-radius: 14px;
  padding: 14px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04), 0 10px 30px -20px rgba(0, 0, 0, .95);
  transition: transform .22s cubic-bezier(.2, .8, .25, 1), box-shadow .22s, border-color .22s;
}

.user-card::after, .panel-card::after, .server-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(115deg, transparent 35%, rgba(255, 255, 255, .06) 50%, transparent 65%);
  transform: translateX(-130%);
  transition: transform .8s ease;
}

.user-card:hover, .panel-card:hover, .server-card:hover {
  transform: translateY(-3px);
  box-shadow:
    0 22px 44px -22px rgba(0, 0, 0, 1),
    0 0 30px -14px rgba(255, 255, 255, .3);
}

.user-card:hover::after, .panel-card:hover::after, .server-card:hover::after { transform: translateX(130%); }

.user-card { display: flex; align-items: center; gap: 11px; text-align: left; }
.user-card .grow { flex: 1; min-width: 0; }
.user-card strong, .user-card span { display: block; }
.user-card strong { font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-card span { font-size: 10px; color: var(--muted); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.empty-state {
  min-height: 240px;
  display: grid;
  place-items: center;
  text-align: center;
  color: var(--muted);
  padding: 26px;
}

.cards > .empty-state { grid-column: 1 / -1; }

.empty-state strong { color: var(--text); font-size: 17px; font-family: var(--font-display); letter-spacing: -.3px; }
.empty-state p { font-size: 12px; line-height: 1.7; max-width: 360px; }

/* ---------- chat ---------- */

.chat-message {
  position: relative;
  display: flex;
  gap: 12px;
  padding: 12px 12px 12px 10px;
  border-radius: 11px;
  animation: rise .42s cubic-bezier(.2, .8, .25, 1) both;
  transition: background .18s ease;
}

.chat-message:nth-child(1) { animation-delay: .02s; }
.chat-message:nth-child(2) { animation-delay: .05s; }
.chat-message:nth-child(3) { animation-delay: .08s; }
.chat-message:nth-child(4) { animation-delay: .11s; }
.chat-message:nth-child(5) { animation-delay: .14s; }
.chat-message:nth-child(6) { animation-delay: .17s; }
.chat-message:nth-child(7) { animation-delay: .2s; }
.chat-message:nth-child(8) { animation-delay: .23s; }

.chat-message:hover { background: rgba(255, 255, 255, .035); }

.chat-message::before {
  content: "";
  position: absolute;
  left: 0; top: 12px; bottom: 12px;
  width: 2px;
  border-radius: 2px;
  background: linear-gradient(180deg, #ffffff, #8f969e);
  opacity: 0;
  transform: scaleY(.4);
  transition: opacity .2s, transform .2s;
}

.chat-message:hover::before { opacity: .7; transform: scaleY(1); }

.chat-message .avatar { width: 36px; height: 36px; border-radius: 12px; }

.message-body { min-width: 0; }
.message-head { display: flex; align-items: baseline; gap: 9px; }
.message-head strong { font-size: 12.5px; cursor: pointer; }
.message-head strong:hover { color: #ffffff; text-decoration: underline; text-underline-offset: 3px; }
.message-head time { font-size: 9px; color: var(--muted-2); }

.message-text {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.65;
  margin-top: 5px;
  color: #d6d9dd;
  font-size: 12.5px;
}

.composer { padding: 12px 28px 17px; flex: none; }

.composer form {
  display: flex;
  gap: 10px;
  align-items: center;
  background: rgba(27, 29, 33, .85);
  padding: 7px 8px 7px 12px;
  border: 1px solid rgba(255, 255, 255, .09);
  border-radius: 15px;
  box-shadow: 0 12px 32px -14px rgba(0, 0, 0, .9), inset 0 1px 0 rgba(255, 255, 255, .05);
  backdrop-filter: blur(14px);
  transition: border-color .22s, box-shadow .22s;
}

.composer form:focus-within {
  border-color: rgba(210, 215, 222, .4);
  box-shadow: 0 12px 32px -14px rgba(0, 0, 0, .9), 0 0 0 3px rgba(255, 255, 255, .05);
}

.composer input { border: 0; background: transparent; flex: 1; box-shadow: none; padding: 9px 3px; font-size: 12.5px; }
.composer input:focus { box-shadow: none; background: transparent; }

.composer-plus {
  width: 29px;
  height: 29px;
  border-radius: 9px;
  background: rgba(56, 60, 66, .9);
  color: #c4c9cf;
  font-size: 19px;
  flex: none;
}
.composer-plus:hover { background: rgba(72, 78, 85, 1); color: #fff; }

.send-button {
  background: linear-gradient(135deg, #f1f2f4, #b3bac3);
  border-radius: 11px;
  width: 38px;
  height: 36px;
  font-size: 15px;
  flex: none;
  color: #141517;
  box-shadow: 0 8px 22px -8px rgba(0, 0, 0, .9), inset 0 1px 0 rgba(255, 255, 255, .8);
}
.send-button:hover { box-shadow: 0 10px 26px -6px rgba(0, 0, 0, 1); transform: translateY(-1px); }

.composer-hint { text-align: right; font-size: 9px; color: #5d636b; padding: 7px 4px 0; }

/* ---------- toast / modal ---------- */

.toast {
  position: fixed;
  bottom: 22px;
  right: 22px;
  background: rgba(38, 41, 46, .96);
  border: 1px solid rgba(255, 255, 255, .14);
  padding: 13px 17px;
  border-radius: 12px;
  box-shadow: var(--shadow-lg), 0 0 40px -16px rgba(255, 255, 255, .3);
  z-index: 70;
  font-size: 12.5px;
  max-width: min(420px, calc(100vw - 40px));
  backdrop-filter: blur(14px);
}

.toast:not(.hidden) { animation: toast-in .35s cubic-bezier(.2, .8, .25, 1) both; }

.app-modal {
  background:
    linear-gradient(160deg, rgba(34, 36, 41, .97), rgba(21, 23, 26, .98)) padding-box,
    linear-gradient(135deg, rgba(255, 255, 255, .2), rgba(255, 255, 255, .06) 50%, rgba(255, 255, 255, .12)) border-box;
  border: 1px solid transparent;
  color: var(--text);
  border-radius: 19px;
  padding: 18px 22px 22px;
  width: min(510px, calc(100% - 28px));
  max-height: 90vh;
  overflow: auto;
  box-shadow: 0 30px 110px rgba(0, 0, 0, .85), inset 0 1px 0 rgba(255, 255, 255, .06);
}

.app-modal[open] { animation: modal-in .32s cubic-bezier(.2, .8, .25, 1) both; }

.app-modal::backdrop {
  background: rgba(4, 5, 6, .74);
  backdrop-filter: blur(10px);
}

.profile-modal { width: min(900px, calc(100% - 28px)); }

.modal-close-row { display: flex; justify-content: flex-end; margin-bottom: 1px; }
.close-modal { font-size: 18px; }

.app-modal h2 {
  font-family: var(--font-display);
  margin: 0 0 7px;
  font-size: 22px;
  letter-spacing: -.7px;
}

.app-modal p { font-size: 12.5px; line-height: 1.65; }

.modal-form { display: grid; gap: 13px; margin-top: 20px; }
.modal-form label { display: grid; gap: 7px; color: #a6acb3; font-size: 11px; font-weight: 650; }
.modal-input { margin-top: 0; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }

.invite-code {
  padding: 14px 15px;
  background: rgba(12, 13, 15, .88);
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 11px;
  overflow-wrap: anywhere;
  color: #dfe2e6;
  font-size: 12px;
  margin: 12px 0;
  font-family: ui-monospace, "SF Mono", Consolas, monospace;
  box-shadow: inset 0 0 30px -14px rgba(255, 255, 255, .25);
}

.invite-link-row { display: flex; gap: 8px; }
.invite-link-row input { font-size: 10px; }

/* ---------- profile ---------- */

.profile-page { max-width: 1020px; margin: 0 auto; }

.profile-cover {
  position: relative;
  height: 210px;
  border-radius: 19px 19px 0 0;
  background:
    radial-gradient(900px 300px at 20% -40%, rgba(255, 255, 255, .08), transparent 60%),
    linear-gradient(120deg, #26282c, #1a1c1f 55%, #222427);
  background-position: center;
  background-size: cover;
  border: 1px solid rgba(255, 255, 255, .1);
  border-bottom: 0;
  overflow: hidden;
}

.profile-cover::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, .04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .04) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: radial-gradient(ellipse at 30% 10%, #000 10%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at 30% 10%, #000 10%, transparent 70%);
}

.profile-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, .03), rgba(10, 11, 13, .6));
}

.profile-cover-label {
  position: absolute;
  z-index: 2;
  right: 18px;
  bottom: 14px;
  font-size: 9px;
  color: rgba(255, 255, 255, .62);
  letter-spacing: 1.2px;
  text-transform: uppercase;
}

.profile-main {
  position: relative;
  z-index: 1;
  border: 1px solid rgba(255, 255, 255, .1);
  border-top: 0;
  border-radius: 0 0 19px 19px;
  background: linear-gradient(150deg, rgba(27, 29, 33, .95), rgba(18, 20, 23, .97));
  padding: 0 24px 24px;
  overflow: hidden;
  box-shadow: 0 26px 70px -34px rgba(0, 0, 0, .95);
}

.profile-main.has-background { background-size: cover; background-position: center; }

.profile-main.has-background::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(16, 18, 21, .9);
  backdrop-filter: blur(6px);
}

.profile-main > * { position: relative; }

.profile-head {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: flex-end;
  gap: 16px;
  margin-top: -48px;
  min-height: 136px;
}

.profile-avatar-wrap {
  width: 100px;
  height: 100px;
  margin-top: auto;
  border-radius: 29px;
  padding: 4px;
  background: linear-gradient(140deg, #f0f2f4, #a2a9b1 55%, #6c737c);
  z-index: 2;
  box-shadow: 0 16px 40px rgba(0, 0, 0, .7), 0 0 26px -12px rgba(255, 255, 255, .4);
  flex: none;
}

.profile-avatar-wrap .avatar { width: 100%; height: 100%; border-radius: 25px; font-size: 28px; }

.profile-identity { padding-bottom: 10px; flex: 1; min-width: 0; }
.profile-identity h1 { font-family: var(--font-display); margin: 0; font-size: 23px; letter-spacing: -.8px; }
.profile-handle { font-size: 11px; color: #a3a9b1; margin-top: 3px; }
.profile-status-line { font-size: 10px; color: #b0b6be; margin-top: 8px; }

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid rgba(255, 255, 255, .12);
  background: rgba(255, 255, 255, .04);
  padding: 5px 9px;
  border-radius: 30px;
  font-size: 9px;
  color: #c6cbd2;
}

.status-pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--green); box-shadow: 0 0 8px rgba(87, 201, 139, .7); }
.status-pill.idle::before { background: var(--yellow); box-shadow: 0 0 8px rgba(217, 179, 107, .7); }
.status-pill.dnd::before { background: var(--red); box-shadow: 0 0 8px rgba(224, 115, 131, .7); }
.status-pill.offline::before { background: #6c737c; box-shadow: none; }

.profile-actions { padding-bottom: 10px; }
.profile-actions button { white-space: nowrap; }

.profile-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(230px, .8fr); gap: 13px; margin-top: 20px; }

.profile-section {
  background: rgba(16, 18, 21, .74);
  border: 1px solid rgba(255, 255, 255, .07);
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 12px;
  backdrop-filter: blur(12px);
  position: relative;
  overflow: hidden;
}

.profile-section::before {
  content: "";
  position: absolute;
  left: 16px; right: 16px; top: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .18), transparent);
}

.profile-section h3 {
  font-family: var(--font-display);
  margin: 0 0 12px;
  font-size: 10.5px;
  letter-spacing: 1px;
  color: #ccd1d7;
}

.profile-section p { font-size: 11.5px; line-height: 1.75; color: #c0c5cc; margin: 0; overflow-wrap: anywhere; }
.profile-section .section-note { font-size: 9px; color: #7c828a; margin: -7px 0 12px; }

.profile-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid rgba(255, 255, 255, .05);
  font-size: 10.5px;
}
.profile-meta-row:last-child { border-bottom: 0; padding-bottom: 0; }
.profile-meta-row span { color: #8b919a; }
.profile-meta-row strong { font-weight: 650; text-align: right; }

.profile-chip-list { display: flex; gap: 7px; flex-wrap: wrap; }

.profile-chip {
  background: linear-gradient(135deg, rgba(255, 255, 255, .1), rgba(255, 255, 255, .04));
  border: 1px solid rgba(255, 255, 255, .14);
  color: #e3e6ea;
  border-radius: 8px;
  padding: 7px 10px;
  font-size: 9.5px;
}

.profile-link {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, .05);
  color: #dfe2e6;
  text-decoration: none;
  font-size: 10.5px;
  overflow-wrap: anywhere;
}
.profile-link:last-child { border-bottom: 0; }
.profile-link:hover { color: #fff; }

.profile-people { display: flex; flex-direction: column; gap: 8px; }

.profile-person {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, .04);
  border: 1px solid rgba(255, 255, 255, .06);
  border-radius: 10px;
  padding: 7px;
  cursor: pointer;
  text-align: left;
}
.profile-person:hover { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .18); }
.profile-person .avatar { width: 27px; height: 27px; border-radius: 9px; font-size: 9px; }
.profile-person span:last-child { font-size: 10.5px; color: #d4d8dd; }

.empty-inline { font-size: 10px !important; color: #7d838b !important; }

.profile-edit-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.upload-field { display: flex; flex-direction: column; gap: 7px; }
.upload-field input { padding: 8px; font-size: 10px; }
.upload-field small { font-size: 9px; color: #7d838b; }

.status-option { display: flex; align-items: center; gap: 8px; }
.status-color { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.status-color.online { background: var(--green); box-shadow: 0 0 8px rgba(87, 201, 139, .7); }
.status-color.idle { background: var(--yellow); }
.status-color.dnd { background: var(--red); }
.status-color.offline { background: #737b84; }

.form-help { font-size: 9px; color: #7d838b; line-height: 1.5; }

.profile-cover.empty { display: grid; place-items: center; color: rgba(255, 255, 255, .3); font-size: 10px; letter-spacing: 1.6px; }

.mobile-menu { display: none; }

.connection-row { display: flex; align-items: center; gap: 8px; border-bottom: 1px solid rgba(255, 255, 255, .05); }
.connection-row:last-child { border-bottom: 0; }
.connection-row .profile-link { flex: 1; min-width: 0; border-bottom: 0; }
.connection-row .profile-link span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }

.divider-label { margin: 5px 0 0; padding-top: 5px; border-top: 1px solid rgba(255, 255, 255, .06); }

/* ---------- page intro ---------- */

.page-intro { animation: rise .45s cubic-bezier(.2, .8, .25, 1) both; }

/* ---------- ripple ---------- */

.fx-ripple {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(circle, rgba(255, 255, 255, .45), rgba(255, 255, 255, .12) 45%, transparent 70%);
  transform: scale(0);
  opacity: .5;
  animation: ripple .62s ease-out forwards;
}

/* ---------- keyframes ---------- */

@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes card-in {
  from { opacity: 0; transform: translateY(18px) scale(.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes modal-in {
  from { opacity: 0; transform: translateY(14px) scale(.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes toast-in {
  from { opacity: 0; transform: translateY(12px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes drift-a {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(90px, 60px, 0) scale(1.15); }
}

@keyframes drift-b {
  from { transform: translate3d(0, 0, 0) scale(1.05); }
  to { transform: translate3d(-110px, -50px, 0) scale(.92); }
}

@keyframes drift-c {
  from { transform: translate3d(0, 0, 0) scale(.95); }
  to { transform: translate3d(140px, -70px, 0) scale(1.12); }
}

@keyframes bob {
  from { transform: translateY(-4px); }
  to { transform: translateY(6px); }
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes core-pulse {
  0%, 100% { box-shadow: 0 0 36px rgba(255, 255, 255, .2), inset 0 1px 0 rgba(255, 255, 255, .8); }
  50% { box-shadow: 0 0 68px rgba(255, 255, 255, .45), inset 0 1px 0 rgba(255, 255, 255, .9); }
}

@keyframes hue-flow {
  from { background-position: 0% 50%; }
  to { background-position: 250% 50%; }
}

@keyframes hue-slide {
  from { background-position: 0% 50%; }
  to { background-position: 200% 50%; }
}

@keyframes dot-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .45; }
}

@keyframes ripple {
  to { transform: scale(1); opacity: 0; }
}

/* ---------- responsive ---------- */

@media (max-width: 950px) {
  .auth-screen { grid-template-columns: minmax(340px, 440px); gap: 0; }
  .auth-side-copy { display: none; }
  .app { grid-template-columns: 65px 230px minmax(0, 1fr); }
  .profile-grid { grid-template-columns: 1fr; }
  .profile-cover { height: 175px; }
}

@media (max-width: 650px) {
  body { overflow: auto; }
  .auth-screen { min-height: 100vh; padding: 18px; }
  .auth-card { padding: 27px 23px; }
  .app { height: 100vh; grid-template-columns: 58px minmax(0, 1fr); }
  .sidebar { display: none; }
  .main-panel { grid-column: 2; }
  .content { padding: 19px 15px; }
  .topbar { height: 62px; padding: 0 15px; }
  .servers-rail { padding-top: 10px; }
  .server-icons { max-height: calc(100vh - 215px); }
  .toolbar { flex-wrap: wrap; }
  .toolbar .search-input { flex-basis: 100%; }
  .profile-cover { height: 138px; }
  .profile-main { padding: 0 13px 15px; }
  .profile-head { gap: 10px; margin-top: -37px; min-height: 118px; }
  .profile-avatar-wrap { width: 78px; height: 78px; border-radius: 23px; padding: 3px; }
  .profile-avatar-wrap .avatar { border-radius: 20px; }
  .profile-identity h1 { font-size: 18px; }
  .profile-identity { padding-bottom: 7px; }
  .profile-actions { padding-bottom: 5px; }
  .profile-actions button { font-size: 9px; padding: 8px; }
  .profile-grid { margin-top: 14px; }
  .profile-section { padding: 13px; }
  .profile-edit-grid { grid-template-columns: 1fr; }
  .composer { padding: 8px 12px 12px; }
  .app-modal { padding: 15px; }
  .member-list { max-height: 27vh; }
}

@media (hover: none) {
  .cursor-glow { display: none; }
}

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