* { box-sizing: border-box; }

    html, body {
      margin: 0;
      min-height: 100%;
      font-family: 'Inter', sans-serif;
      color: var(--text);
      transition: var(--theme-transition);
      background:
        radial-gradient(circle at 12% 24%, rgba(139,92,246,.20), transparent 24%),
        radial-gradient(circle at 88% 14%, rgba(59,130,246,.16), transparent 20%),
        radial-gradient(circle at 74% 68%, rgba(168,85,247,.15), transparent 22%),
        linear-gradient(180deg, #050816 0%, #040812 100%);
      overflow-x: hidden;
    }

    body::before {
      content: '';
      position: fixed;
      inset: 0;
      pointer-events: none;
      background:
        radial-gradient(circle at center, rgba(255,255,255,.12) 0 1px, transparent 1.8px);
      background-size: 44px 44px;
      mask-image: radial-gradient(circle at center, black 24%, transparent 80%);
      opacity: .14;
    }

    .page-particles {
      position: fixed;
      inset: 0;
      overflow: hidden;
      pointer-events: none;
      z-index: 0;
    }

    .page-particles span {
      position: absolute;
      display: block;
      border-radius: 999px;
      background: radial-gradient(circle, rgba(255,255,255,.92), rgba(147,197,253,.25) 55%, transparent 72%);
      opacity: .35;
      filter: blur(.2px);
      animation: particleFloat linear infinite;
    }

    @keyframes particleFloat {
      from {
        transform: translate3d(0, 0, 0) scale(.9);
        opacity: 0;
      }
      12% { opacity: .45; }
      88% { opacity: .25; }
      to {
        transform: translate3d(-80px, -120vh, 0) scale(1.08);
        opacity: 0;
      }
    }

    .container {
      width: min(1320px, calc(100% - 28px));
      margin: 0 auto;
      padding: 18px 0 24px;
      position: relative;
      z-index: 1;
    }

    .hidden { display: none !important; }

    .topbar {
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 20px;
      margin-bottom: 18px;
    }

    .brand {
      display: flex;
      align-items: center;
      gap: 14px;
    }

    .brand-mark {
      position: relative;
      overflow: hidden;
      width: 58px;
      height: 58px;
      border-radius: 20px;
      display: grid;
      place-items: center;
      background: linear-gradient(135deg, rgba(91,140,255,.95), rgba(140,77,255,.92));
      box-shadow: 0 18px 40px rgba(91, 140, 255, .28);
      border: 1px solid rgba(255,255,255,.16);
    }

    .brand-mark svg {
      width: 34px;
      height: 34px;
      display: block;
      filter: drop-shadow(0 4px 12px rgba(140,77,255,.18));
      animation: miniOwlFloat 3.4s ease-in-out infinite;
    }

    .brand-mark::after {
      content: '';
      position: absolute;
      inset: -8px;
      border-radius: inherit;
      background: radial-gradient(circle, rgba(255,255,255,.18), rgba(139,92,246,.10) 45%, transparent 72%);
      opacity: .55;
      filter: blur(8px);
      animation: miniOwlPulse 2.8s ease-in-out infinite alternate;
      pointer-events: none;
    }

    @keyframes miniOwlFloat {
      0% { transform: translateY(0); }
      50% { transform: translateY(-2.5px); }
      100% { transform: translateY(0); }
    }

    @keyframes miniOwlPulse {
      from { opacity: .42; transform: scale(.96); }
      to { opacity: .72; transform: scale(1.04); }
    }

    .brand-title {
      font-size: 28px;
      font-weight: 800;
      letter-spacing: -0.03em;
      margin: 0;
    }

    .brand-subtitle {
      margin: 4px 0 0;
      color: var(--muted);
      font-size: 14px;
    }

    .user-badge {
      display: inline-flex;
      align-items: center;
      gap: 10px;
      padding: 12px 14px;
      border: 1px solid rgba(255,255,255,.15);
      border-radius: 999px;
      background: rgba(255,255,255,0.07);
      color: var(--muted);
      backdrop-filter: blur(10px);
      max-width: 420px;
      overflow: hidden;
      white-space: nowrap;
      text-overflow: ellipsis;
    }

    .user-dot {
      width: 10px;
      height: 10px;
      border-radius: 50%;
      background: var(--success);
      box-shadow: 0 0 0 5px rgba(34,197,94,.14);
      flex: 0 0 auto;
    }

    .card {
      background: rgba(8, 14, 30, 0.74);
      border: 1px solid rgba(255,255,255,0.10);
      border-radius: 24px;
      backdrop-filter: blur(18px);
      box-shadow: var(--shadow);
    }

    .auth-shell {
      min-height: calc(100vh - 100px);
      display: grid;
      align-items: stretch;
    }

    .auth-split {
      min-height: calc(100vh - 100px);
      display: grid;
      grid-template-columns: minmax(0, 1.08fr) minmax(420px, 520px);
      gap: 24px;
      align-items: stretch;
    }

    .hero-panel {
      position: relative;
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 40px 20px 40px 34px;
      overflow: hidden;
      min-height: 720px;
    }

    .hero-swirls,
    .hero-swirls::before,
    .hero-swirls::after {
      position: absolute;
      inset: 0;
      content: '';
      pointer-events: none;
    }

    .hero-swirls {
      background:
        radial-gradient(circle at 24% 48%, rgba(168,85,247,.18), transparent 18%),
        radial-gradient(circle at 74% 58%, rgba(56,189,248,.12), transparent 16%);
      filter: blur(2px);
    }

    .hero-swirls::before {
      width: 76%;
      height: 50%;
      left: 2%;
      top: 12%;
      border-radius: 50%;
      border: 1px solid rgba(166,139,250,.18);
      box-shadow:
        0 0 0 1px rgba(147,197,253,.05) inset,
        0 0 42px rgba(168,85,247,.12);
      transform: rotate(-14deg);
    }

    .hero-swirls::after {
      width: 64%;
      height: 40%;
      right: -4%;
      bottom: 14%;
      border-radius: 50%;
      border: 1px solid rgba(96,165,250,.18);
      box-shadow:
        0 0 42px rgba(96,165,250,.12),
        0 0 0 1px rgba(255,255,255,.04) inset;
      transform: rotate(14deg);
    }

    .hero-copy {
      position: absolute;
      left: 34px;
      top: 28px;
      max-width: 340px;
      z-index: 2;
    }

    .hero-copy h2 {
      margin: 0 0 10px;
      font-size: clamp(28px, 4vw, 56px);
      line-height: .96;
      letter-spacing: -0.05em;
    }

    .hero-copy p {
      margin: 0;
      color: var(--muted);
      line-height: 1.6;
      max-width: 280px;
    }

    .hero-stage {
      position: relative;
      width: min(680px, 100%);
      height: min(780px, 88vh);
      min-height: 640px;
      z-index: 1;
      display: flex;
      align-items: center;
      justify-content: center;
    }

    .owl-hero {
      position: relative;
      width: min(520px, 92%);
      height: min(700px, 94%);
      filter: drop-shadow(0 40px 80px rgba(0,0,0,.34));
      user-select: none;
      transition: transform .3s ease;
    }

    .owl-glow {
      position: absolute;
      inset: auto 50% 4% auto;
      transform: translateX(50%);
      width: 72%;
      height: 18%;
      background: radial-gradient(circle, rgba(139,92,246,.40), transparent 70%);
      filter: blur(18px);
      opacity: .8;
    }

    .owl-body {
      position: absolute;
      left: 50%;
      top: 18%;
      transform: translateX(-50%);
      width: 68%;
      height: 58%;
      border-radius: 44% 44% 36% 36% / 34% 34% 44% 44%;
      background:
        radial-gradient(circle at 35% 18%, rgba(255,255,255,.95), rgba(219,234,254,.72) 24%, rgba(174,189,255,.34) 48%, rgba(124,77,255,.18) 72%, rgba(255,255,255,.08) 100%),
        linear-gradient(180deg, rgba(255,255,255,.26), rgba(255,255,255,.10));
      border: 1px solid rgba(255,255,255,.28);
      backdrop-filter: blur(8px);
      box-shadow:
        inset 0 0 0 1px rgba(255,255,255,.10),
        0 14px 44px rgba(91,140,255,.14);
    }

    .owl-body::before {
      content: '';
      position: absolute;
      inset: 10% 10% 8%;
      border-radius: 42% 42% 40% 40% / 32% 32% 48% 48%;
      background:
        radial-gradient(circle at 24% 26%, rgba(168,85,247,.42), transparent 18%),
        radial-gradient(circle at 76% 28%, rgba(56,189,248,.35), transparent 18%),
        linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.03));
      opacity: .95;
    }

    .owl-wire {
      position: absolute;
      border-radius: 999px;
      border: 2px solid rgba(191,144,255,.50);
      box-shadow: 0 0 16px rgba(168,85,247,.18);
      opacity: .85;
    }

    .owl-wire.w1 { width: 36%; height: 14%; left: 18%; top: 14%; transform: rotate(16deg); }
    .owl-wire.w2 { width: 30%; height: 12%; right: 16%; top: 18%; transform: rotate(-24deg); }
    .owl-wire.w3 { width: 28%; height: 10%; left: 26%; top: 26%; transform: rotate(-10deg); }
    .owl-wire.w4 { width: 34%; height: 14%; right: 20%; top: 34%; transform: rotate(18deg); }
    .owl-wire.w5 { width: 32%; height: 12%; left: 20%; top: 44%; transform: rotate(-28deg); }
    .owl-wire.w6 { width: 36%; height: 16%; right: 14%; top: 50%; transform: rotate(20deg); }

    .owl-head {
      position: absolute;
      left: 50%;
      top: 0;
      transform: translateX(-50%);
      width: 72%;
      height: 42%;
      border-radius: 46% 46% 40% 40% / 52% 52% 32% 32%;
      background:
        radial-gradient(circle at 36% 24%, rgba(255,255,255,.96), rgba(224,231,255,.70) 28%, rgba(142,159,255,.26) 64%, rgba(255,255,255,.06) 100%),
        linear-gradient(180deg, rgba(255,255,255,.2), rgba(255,255,255,.08));
      border: 1px solid rgba(255,255,255,.3);
      box-shadow:
        inset 0 0 0 1px rgba(255,255,255,.08),
        0 18px 44px rgba(123,92,246,.10);
      z-index: 2;
      overflow: visible;
    }

    .owl-ear {
      position: absolute;
      top: -3%;
      width: 24%;
      height: 28%;
      border-radius: 50% 50% 16% 16%;
      background:
        radial-gradient(circle at 50% 30%, rgba(255,255,255,.88), rgba(191,219,254,.4) 52%, rgba(124,77,255,.18) 100%);
      border: 1px solid rgba(255,255,255,.25);
      box-shadow: 0 10px 26px rgba(91,140,255,.12);
    }

    .owl-ear.left { left: 8%; transform: rotate(-18deg); }
    .owl-ear.right { right: 8%; transform: rotate(18deg); }

    .owl-face {
      position: absolute;
      left: 50%;
      top: 22%;
      width: 74%;
      height: 38%;
      transform: translateX(-50%);
      z-index: 3;
      transition: opacity .2s ease;
    }

    .owl-face-mask {
      position: absolute;
      inset: 0 6%;
      border-radius: 48% / 42%;
      background:
        radial-gradient(circle at 35% 45%, rgba(255,255,255,.88), rgba(223,228,255,.44) 44%, rgba(170,130,255,.22) 70%, transparent 100%),
        radial-gradient(circle at 66% 45%, rgba(255,255,255,.85), rgba(223,228,255,.36) 44%, rgba(103,204,255,.18) 68%, transparent 100%);
      filter: drop-shadow(0 0 28px rgba(168,85,247,.22));
      opacity: .9;
    }

    .owl-eye-wrap {
      position: absolute;
      top: 18%;
      width: 38%;
      height: 64%;
      border-radius: 50%;
      display: grid;
      place-items: center;
      background: radial-gradient(circle at center, rgba(245,243,255,.72), rgba(219,234,254,.12) 70%, transparent 100%);
      border: 1px solid rgba(255,255,255,.14);
      box-shadow: inset 0 0 12px rgba(255,255,255,.16);
    }

    .owl-eye-wrap.left { left: 8%; }
    .owl-eye-wrap.right { right: 8%; }

    .owl-eye {
      position: relative;
      width: 86%;
      height: 86%;
      border-radius: 50%;
      background:
        radial-gradient(circle at 42% 42%, #050816 0 22%, #281856 23% 44%, #7c3aed 45% 62%, #d8b4fe 63% 80%, rgba(255,255,255,.96) 81% 100%);
      box-shadow:
        0 0 36px rgba(168,85,247,.30),
        0 0 18px rgba(59,130,246,.14);
      overflow: hidden;
    }

    .owl-pupil {
      position: absolute;
      left: 50%;
      top: 50%;
      width: 28%;
      height: 28%;
      transform: translate(-50%, -50%);
      border-radius: 50%;
      background: #020617;
      box-shadow:
        0 0 0 1px rgba(255,255,255,.12),
        inset 0 0 8px rgba(255,255,255,.06);
      transition: transform .09s linear;
    }

    .owl-pupil::after {
      content: '';
      position: absolute;
      left: 24%;
      top: 22%;
      width: 22%;
      height: 22%;
      border-radius: 50%;
      background: rgba(255,255,255,.95);
      filter: blur(.4px);
    }

    .owl-beak {
      position: absolute;
      left: 50%;
      top: 53%;
      transform: translate(-50%, -50%);
      width: 11%;
      height: 22%;
      clip-path: polygon(50% 100%, 0 0, 100% 0);
      background: linear-gradient(180deg, #ffe082, #f59e0b);
      filter: drop-shadow(0 10px 20px rgba(245,158,11,.18));
      z-index: 4;
    }

    .owl-wing {
      position: absolute;
      top: 34%;
      width: 40%;
      height: 44%;
      border-radius: 48% 48% 40% 40%;
      background:
        radial-gradient(circle at 50% 20%, rgba(255,255,255,.84), rgba(224,231,255,.34) 40%, rgba(124,77,255,.18) 100%),
        linear-gradient(180deg, rgba(255,255,255,.14), rgba(255,255,255,.05));
      border: 1px solid rgba(255,255,255,.26);
      box-shadow: 0 14px 36px rgba(59,130,246,.10);
      z-index: 4;
      transition: transform .36s ease-in-out, opacity .36s ease-in-out;
    }

    .owl-wing.left { left: 0; transform: rotate(20deg); transform-origin: top right; }
    .owl-wing.right { right: 0; transform: rotate(-20deg); transform-origin: top left; }

    .owl-wing::before {
      content: '';
      position: absolute;
      inset: 12% 16% 10%;
      border-radius: inherit;
      background:
        repeating-linear-gradient(
          180deg,
          rgba(192,132,252,.34) 0 12px,
          rgba(96,165,250,.15) 12px 24px
        );
      opacity: .42;
      filter: blur(.4px);
    }

    .owl-feet {
      position: absolute;
      left: 50%;
      bottom: 8%;
      width: 28%;
      height: 9%;
      transform: translateX(-50%);
      z-index: 4;
    }

    .owl-foot {
      position: absolute;
      bottom: 12%;
      width: 18%;
      height: 70%;
      border-radius: 999px;
      background: linear-gradient(180deg, rgba(229,231,235,.9), rgba(147,197,253,.35));
      border: 1px solid rgba(255,255,255,.18);
    }

    .owl-foot.left { left: 24%; }
    .owl-foot.right { right: 24%; }

    .owl-branch {
      position: absolute;
      left: 50%;
      bottom: 4%;
      width: 66%;
      height: 14px;
      transform: translateX(-50%);
      border-radius: 999px;
      background:
        linear-gradient(180deg, rgba(206,215,255,.78), rgba(137,161,255,.28)),
        linear-gradient(90deg, rgba(255,255,255,.06), rgba(255,255,255,.02));
      border: 1px solid rgba(255,255,255,.18);
      box-shadow: 0 8px 30px rgba(91,140,255,.10);
      z-index: 3;
    }

    .owl-branch::after {
      content: '';
      position: absolute;
      right: 8%;
      top: 70%;
      width: 28%;
      height: 8px;
      transform: rotate(24deg);
      border-radius: 999px;
      background: inherit;
      border: inherit;
    }

    .owl-eyes-glow {
      position: absolute;
      left: 50%;
      top: 23%;
      transform: translateX(-50%);
      width: 52%;
      height: 16%;
      background: radial-gradient(circle at center, rgba(192,132,252,.44), rgba(59,130,246,.14) 46%, transparent 74%);
      filter: blur(12px);
      opacity: 0;
      transition: opacity .28s ease-in-out;
      z-index: 5;
      pointer-events: none;
    }

    .owl-hero.cover .owl-eyes-glow { opacity: .92; }
    .owl-hero.cover .owl-face { opacity: .34; }

    .owl-hero.cover .owl-wing.left {
      transform: translate(40%, -34%) rotate(-12deg);
    }

    .owl-hero.cover .owl-wing.right {
      transform: translate(-40%, -34%) rotate(12deg);
    }

    .auth-panel {
      min-height: 100%;
      display: flex;
      align-items: center;
      justify-content: flex-end;
      padding: 18px 0 18px 18px;
    }

    .auth-card {
      width: min(100%, 480px);
      min-height: calc(100vh - 100px);
      padding: 34px 30px 28px;
      position: relative;
      overflow: hidden;
      transition: min-height .28s ease;
      background:
        linear-gradient(180deg, rgba(255,255,255,.14), rgba(255,255,255,.08)),
        rgba(14, 20, 39, 0.38);
      border: 1px solid rgba(255,255,255,.26);
      box-shadow:
        inset 0 1px 0 rgba(255,255,255,.26),
        inset 0 -1px 0 rgba(255,255,255,.05),
        0 30px 80px rgba(0,0,0,.35);
      backdrop-filter: blur(20px) saturate(150%);
      -webkit-backdrop-filter: blur(20px) saturate(150%);
    }

    .auth-card::before {
      content: '';
      position: absolute;
      inset: 0;
      background:
        linear-gradient(115deg, rgba(255,255,255,.16), transparent 30%),
        radial-gradient(circle at 70% 30%, rgba(139,92,246,.16), transparent 24%),
        radial-gradient(circle at 62% 54%, rgba(56,189,248,.14), transparent 18%);
      pointer-events: none;
      mix-blend-mode: screen;
    }

    .auth-card::after {
      content: '';
      position: absolute;
      inset: 0;
      border-radius: inherit;
      pointer-events: none;
      box-shadow: inset 0 0 0 1px rgba(255,255,255,.08);
    }

    .auth-brand {
      display: flex;
      align-items: center;
      gap: 12px;
      margin-bottom: 34px;
      position: relative;
      z-index: 1;
    }

    .auth-brand .brand-mark {
      position: relative;
      overflow: hidden;
      width: 54px;
      height: 54px;
      border-radius: 18px;
    }

    .auth-brand .brand-title {
      font-size: 24px;
    }

    .auth-brand .brand-subtitle {
      font-size: 13px;
      color: rgba(238,244,255,.74);
    }

    .auth-title {
      position: relative;
      z-index: 1;
      margin: 0 0 10px;
      font-size: clamp(36px, 5vw, 68px);
      letter-spacing: -0.06em;
      line-height: .96;
      text-wrap: balance;
      text-shadow: 0 4px 18px rgba(0,0,0,.26);
    }

    .auth-text {
      margin: 0 0 28px;
      color: rgba(238,244,255,.78);
      line-height: 1.6;
      font-size: 15px;
      position: relative;
      z-index: 1;
      max-width: 360px;
    }

    .auth-form-shell {
      overflow: hidden;
      transition: height .28s ease;
      position: relative;
      z-index: 1;
      padding-bottom: 10px;
    }

    .auth-grid {
      display: grid;
      gap: 12px;
    }

    .field {
      display: grid;
      gap: 6px;
    }

    .field-error {
      font-size: 12px;
      color: #fda4af;
      min-height: 16px;
      padding-left: 2px;
    }

    .input-shell {
      display: flex;
      align-items: center;
      gap: 12px;
      min-height: 62px;
      padding: 0 16px 0 15px;
      border-radius: 20px;
      border: 1px solid rgba(255,255,255,.22);
      background: rgba(255,255,255,.08);
      box-shadow:
        inset 0 1px 0 rgba(255,255,255,.10),
        0 10px 30px rgba(0,0,0,.12);
      transition: .18s ease;
    }

    .input-shell:focus-within {
      border-color: rgba(139, 92, 246, 0.82);
      box-shadow:
        inset 0 1px 0 rgba(255,255,255,.12),
        0 0 0 4px rgba(139, 92, 246, 0.14);
      background: rgba(255,255,255,.1);
    }

    .input-shell.input-shell-error {
      border-color: rgba(251,113,133,.88);
      background: rgba(251,113,133,.09);
      box-shadow: 0 0 0 4px rgba(251,113,133,.08);
    }

    .input-icon {
      width: 22px;
      height: 22px;
      color: rgba(238,244,255,.74);
      flex: 0 0 auto;
      opacity: .9;
    }

    .input {
      width: 100%;
      padding: 0;
      border: none;
      background: transparent;
      color: var(--text);
      outline: none;
      font-size: 15px;
      font-family: inherit;
    }

    .input::placeholder { color: rgba(238,244,255,.62); }

    .submit-btn {
      width: 100%;
      border: none;
      border-radius: 20px;
      padding: 17px 18px;
      font-weight: 700;
      font-size: 16px;
      cursor: pointer;
      transition: .22s ease;
      color: white;
      background: linear-gradient(135deg, var(--accent), var(--accent-2));
      box-shadow:
        0 18px 40px rgba(91, 140, 255, 0.28),
        0 0 28px rgba(124,77,255,.20);
      margin-top: 8px;
    }

    .submit-btn:hover {
      transform: scale(1.02) translateY(-1px);
      box-shadow:
        0 22px 42px rgba(91, 140, 255, 0.30),
        0 0 34px rgba(124,77,255,.26);
    }

    .auth-switch {
      margin-top: 20px;
      font-size: 14px;
      color: rgba(238,244,255,.74);
    }

    .auth-switch button {
      border: none;
      background: transparent;
      color: #ffffff;
      font: inherit;
      font-weight: 700;
      cursor: pointer;
      padding: 0;
      margin-left: 4px;
      text-shadow: 0 2px 12px rgba(124,77,255,.18);
    }

    .auth-switch button:hover { text-decoration: underline; }

    .auth-global {
      min-height: 18px;
      margin-top: 2px;
      font-size: 13px;
      color: #fda4af;
    }

    /* ── APP GRID ── */
    .app-grid {
      display: grid;
      grid-template-columns: 320px 1fr;
      gap: 16px;
      align-items: stretch;
      min-height: calc(100vh - 110px);
    }

    /* ── SIDEBAR ── */
    .sidebar {
      padding: 20px;
      min-height: 76vh;
      display: flex;
      flex-direction: column;
      gap: 16px;
      background: rgba(255, 255, 255, 0.05);
      backdrop-filter: blur(25px);
      -webkit-backdrop-filter: blur(25px);
      border: 1px solid rgba(255, 255, 255, 0.1);
      border-radius: 24px;
      box-shadow: 0 8px 32px rgba(0,0,0,0.3);
      color: #ffffff;
    }

    .panel-title {
      margin: 0;
      font-size: 18px;
      font-weight: 700;
      letter-spacing: -0.03em;
      color: #ffffff;
      text-shadow: 0 1px 3px rgba(0,0,0,0.3);
    }

    .panel-muted {
      margin: 5px 0 0;
      color: rgba(255, 255, 255, 0.5);
      font-size: 13px;
      line-height: 1.45;
      text-shadow: 0 1px 2px rgba(0,0,0,0.2);
    }

    .users-list {
      display: flex;
      flex-direction: column;
      gap: 8px;
      overflow: auto;
      padding-right: 2px;
      padding-top: 4px;
      flex: 1;
    }

    .users-list::-webkit-scrollbar { width: 2px; }
    .users-list::-webkit-scrollbar-track { background: transparent; }
    .users-list::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.2); border-radius: 999px; }
    .users-list::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.4); }

    .empty-note {
      color: rgba(255,255,255,0.5);
      font-size: 14px;
      line-height: 1.5;
      padding: 14px;
      border-radius: 16px;
      background: rgba(255,255,255,0.03);
      border: 1px dashed rgba(255,255,255,0.1);
      text-align: center;
    }

    /* ── USER ITEM ── */
    .user-item {
      border: none;
      border-radius: 16px;
      padding: 12px 14px;
      background: rgba(255,255,255,0.04);
      cursor: pointer;
      transition: background .2s ease, box-shadow .2s ease;
      display: flex;
      align-items: center;
      gap: 12px;
      text-align: left;
      position: relative;
      overflow: visible;
    }

    .user-item:hover {
      background: rgba(255,255,255,0.07);
      box-shadow:
        inset 0 1px 1px rgba(255,255,255,0.06),
        0 4px 16px rgba(0,0,0,0.2);
      z-index: 1;
    }

    .user-item.active {
      border: none !important;
      background: rgba(255,255,255,0.06) !important;
      box-shadow:
        inset 0 1px 1px rgba(255,255,255,0.10),
        0 10px 20px rgba(0,0,0,0.3) !important;
    }

    /* Неоновая полоска слева — только у активного */
    .user-item.active::before {
      content: "";
      position: absolute;
      left: 0;
      top: 15%;
      height: 70%;
      width: 3px;
      background: #6366f1;
      box-shadow: 0 0 10px #6366f1, 0 0 4px #6366f1;
      border-radius: 0 4px 4px 0;
      pointer-events: none;
    }

    /* Avatar circle */
    .user-avatar {
      width: 38px;
      height: 38px;
      border-radius: 50%;
      background: linear-gradient(135deg, var(--accent), var(--accent-2));
      display: flex;
      align-items: center;
      justify-content: center;
      font-weight: 700;
      font-size: 15px;
      color: white;
      flex-shrink: 0;
      box-shadow: 0 4px 14px rgba(91,140,255,0.3);
    }

    .user-info { flex: 1; min-width: 0; }

    .user-name, .card-name {
      font-weight: 600;
      font-size: 15px;
      margin-bottom: 2px;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      color: #ffffff !important;
      text-shadow: 0 1px 3px rgba(0,0,0,0.5);
      display: flex;
      align-items: center;
      gap: 6px;
    }

    .unread-badge {
      position: absolute;
      top: -3px;
      left: -3px;
      z-index: 5;
      background: #3b82f6;
      color: #fff;
      font-size: 10px;
      font-weight: 800;
      min-width: 20px;
      height: 20px;
      padding: 0 5px;
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      flex-shrink: 0;
      box-shadow: 0 0 10px rgba(59,130,246,0.35), 0 2px 6px rgba(0,0,0,0.25);
      text-shadow: none;
      line-height: 1;
      border: 3px solid #07111f;
      letter-spacing: -0.5px;
      font-family: 'Inter', 'Roboto', system-ui, sans-serif;
    }

    .user-email {
      color: rgba(255, 255, 255, 0.4) !important;
      font-size: 12px;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      text-shadow: 0 1px 2px rgba(0,0,0,0.2);
    }

    .user-status, .card-status {
      font-size: 11px;
      color: #64748b;
      font-weight: 400;
      margin-top: 3px;
      letter-spacing: 0.2px;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .status-online-text {
      color: #a855f7 !important;
      font-weight: 500;
    }

    /* ── BUTTONS ── */
    .btn {
      border: none;
      border-radius: 16px;
      padding: 14px 18px;
      font-weight: 700;
      font-size: 15px;
      font-family: inherit;
      cursor: pointer;
      transition: all .2s ease;
    }

    .btn:hover { transform: translateY(-1px); opacity: .9; }

    .btn-primary {
      color: white;
      background: linear-gradient(135deg, var(--accent), var(--accent-2));
      box-shadow: 0 8px 24px rgba(91, 140, 255, 0.3);
    }

    .btn-danger {
      background: rgba(239,68,68,0.1);
      border: 1px solid rgba(239,68,68,0.22);
      color: #fecaca;
    }

    /* ── CHAT CARD ── */
    .chat-card {
      min-height: 76vh;
      display: flex;
      flex-direction: column;
      padding: 20px;
      gap: 16px;
      background: rgba(255, 255, 255, 0.05);
      backdrop-filter: blur(25px);
      -webkit-backdrop-filter: blur(25px);
      border: 1px solid rgba(255, 255, 255, 0.1);
      border-radius: 24px;
      box-shadow: 0 8px 32px rgba(0,0,0,0.3);
      color: #ffffff;
    }

    .chat-header {
      display: flex;
      align-items: center;
      gap: 14px;
      padding-bottom: 14px;
      border-bottom: 1px solid rgba(255,255,255,0.07);
    }

    /* Chat header avatar */
    .chat-header-avatar {
      width: 44px;
      height: 44px;
      border-radius: 50%;
      background: linear-gradient(135deg, var(--accent), var(--accent-2));
      display: flex;
      align-items: center;
      justify-content: center;
      font-weight: 700;
      font-size: 17px;
      color: white;
      flex-shrink: 0;
      box-shadow: 0 4px 16px rgba(91,140,255,0.35);
    }

    .chat-title {
      margin: 0;
      font-size: 18px;
      font-weight: 700;
      letter-spacing: -0.02em;
      color: #ffffff;
      text-shadow: 0 1px 3px rgba(0,0,0,0.3);
    }

    .chat-subtitle {
      margin: 4px 0 0;
      color: rgba(255, 255, 255, 0.6);
      font-size: 13px;
      transition: color .3s ease;
    }

    .chat-subtitle.status-online-text {
      color: #a855f7 !important;
      font-weight: 500;
    }

    /* ── MESSAGES ── */
    .messages {
      flex: 1;
      min-height: 400px;
      max-height: 62vh;
      overflow-y: auto;
      display: flex;
      flex-direction: column;
      gap: 8px;
      padding: 12px 4px;
    }

    .messages::-webkit-scrollbar { width: 2px; }
    .messages::-webkit-scrollbar-track { background: transparent; }
    .messages::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.2); border-radius: 999px; }
    .messages::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.4); }

    .message {
      max-width: 70%;
      padding: 12px 16px 10px;
      line-height: 1.5;
      word-break: break-word;
      white-space: pre-wrap;
      font-size: 14.5px;
      margin-bottom: 10px;
      animation: msgIn .18s ease;
    }

    @keyframes msgIn {
      from { opacity: 0; transform: translateY(6px) scale(.97); }
      to   { opacity: 1; transform: translateY(0) scale(1); }
    }

    .message.mine {
      align-self: flex-end;
      background: linear-gradient(135deg, rgba(138, 43, 226, 0.75), rgba(65, 105, 225, 0.75));
      color: #ffffff;
      border-radius: 20px 20px 5px 20px;
      box-shadow: 0 4px 15px rgba(65, 105, 225, 0.3);
      backdrop-filter: blur(10px);
      border: 1px solid rgba(138,43,226,0.3);
    }

    .message.theirs {
      align-self: flex-start;
      background: rgba(255, 255, 255, 0.08) !important;
      border: 1px solid rgba(255, 255, 255, 0.1) !important;
      color: #ffffff !important;
      border-radius: 18px 18px 18px 4px !important;
      backdrop-filter: blur(10px) !important;
      -webkit-backdrop-filter: blur(10px) !important;
      box-shadow: 0 4px 15px rgba(0,0,0,0.2);
      max-width: 70%;
      padding: 12px 16px;
    }

    .message-meta {
      margin-top: 5px;
      font-size: 11px;
      opacity: .65;
    }

    /* ── COMPOSER ── */
    .composer {
      display: flex;
      gap: 10px;
      align-items: center;
      padding: 8px 8px 8px 20px;
      background: rgba(255, 255, 255, 0.07);
      border: 1px solid rgba(255, 255, 255, 0.14);
      border-radius: 999px;
      backdrop-filter: blur(15px);
      -webkit-backdrop-filter: blur(15px);
      box-shadow: 0 4px 24px rgba(0,0,0,0.25), inset 0 1px 0 rgba(255,255,255,0.1);
      transition: border-color .2s;
    }
    .composer:focus-within {
      border-color: rgba(138, 43, 226, 0.5);
      box-shadow: 0 0 0 3px rgba(138,43,226,0.1), 0 4px 24px rgba(0,0,0,0.25);
    }

    .composer .input-shell {
      flex: 1;
      min-height: auto;
      border: none !important;
      background: transparent !important;
      box-shadow: none !important;
      padding: 0 !important;
      border-radius: 0 !important;
    }

    .composer .input-shell:focus-within {
      box-shadow: none !important;
      border: none !important;
    }

    .composer .input {
      font-size: 15px;
      color: #ffffff;
      border: none !important;
      outline: none !important;
      box-shadow: none !important;
    }
    .composer .input::placeholder { color: rgba(255,255,255,0.35); }

    .composer .btn-primary {
      border-radius: 999px;
      padding: 11px 24px;
      font-size: 14px;
      font-weight: 700;
      white-space: nowrap;
      flex-shrink: 0;
      background: linear-gradient(135deg, #8A2BE2, #5b8cff);
      box-shadow: 0 4px 14px rgba(138,43,226,0.35);
    }

    .send-btn {
      transition: opacity 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease;
    }
    .send-btn[disabled],
    .input[disabled] {
      opacity: .35;
      cursor: not-allowed;
      box-shadow: none !important;
      pointer-events: none;
    }
    .send-btn:not([disabled]):hover {
      opacity: .92;
    }
    .send-btn:not([disabled]):active {
      transform: scale(0.96);
    }

    @media (max-width: 1120px) {
      .auth-split {
        grid-template-columns: 1fr;
      }

      .hero-panel {
        min-height: 480px;
        padding: 18px;
      }

      .hero-copy {
        position: relative;
        left: auto;
        top: auto;
        margin-bottom: 8px;
      }

      .hero-stage {
        min-height: 440px;
        height: 440px;
      }

      .auth-panel {
        padding: 0;
      }

      .auth-card {
        min-height: auto;
      }
    }

    @media (max-width: 900px) {
      .app-grid { grid-template-columns: 1fr; }
      .sidebar, .chat-card { min-height: auto; }
      .messages { max-height: 52vh; }
    }

    @media (max-width: 680px) {
      .container { width: min(100% - 18px, 1320px); }
      .topbar { align-items: flex-start; flex-direction: column; }
      .hero-panel { display: none; }
      .auth-split { grid-template-columns: 1fr; min-height: auto; }
      .auth-card { padding: 24px 18px 18px; min-height: calc(100vh - 116px); }
      .auth-title { font-size: 42px; }
      .composer { grid-template-columns: 1fr; }
      .messages { min-height: 360px; }
      .message { max-width: 88%; }
    }

    /* ══ GURNYX HARD OVERRIDE ══ */
    .message.theirs {
      background: rgba(255, 255, 255, 0.08) !important;
      border: 1px solid rgba(255, 255, 255, 0.12) !important;
      border-radius: 18px 18px 18px 4px !important;
      backdrop-filter: blur(10px) !important;
      -webkit-backdrop-filter: blur(10px) !important;
      color: #ffffff !important;
      box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2) !important;
    }
    .message.mine {
      background: linear-gradient(135deg, #8A2BE2, #4169E1) !important;
      border-radius: 18px 18px 4px 18px !important;
      color: #ffffff !important;
      border: none !important;
      box-shadow: 0 4px 15px rgba(138, 43, 226, 0.35) !important;
    }
    .message {
      color: #ffffff !important;
      max-width: 70% !important;
      margin-bottom: 8px !important;
      padding: 12px 16px !important;
    }
    .user-name { color: #ffffff !important; }
    .user-email { color: rgba(255,255,255,0.4) !important; }
    .panel-title { color: #ffffff !important; }
    .panel-muted { color: rgba(255,255,255,0.5) !important; }
    .chat-title { color: #ffffff !important; }
    .chat-subtitle { color: rgba(255,255,255,0.5) !important; }
    [data-theme="dark"] .sidebar {
      background: rgba(7, 17, 31, 0.55) !important;
      backdrop-filter: blur(16px) saturate(1.4) !important;
      -webkit-backdrop-filter: blur(16px) saturate(1.4) !important;
    }
    [data-theme="dark"] .chat-card {
      background: rgba(7, 17, 31, 0.5) !important;
      backdrop-filter: blur(16px) saturate(1.4) !important;
      -webkit-backdrop-filter: blur(16px) saturate(1.4) !important;
    }
    .composer {
      background: rgba(255,255,255,0.05) !important;
      border-radius: 30px !important;
      backdrop-filter: blur(15px) !important;
      padding: 10px 10px 10px 20px !important;
      border: 1px solid rgba(255,255,255,0.12) !important;
    }
    .message-meta { color: rgba(255,255,255,0.55) !important; }
    .empty-note { color: rgba(255,255,255,0.45) !important; }

  
  /* ── FINAL POLISH ── */
  .composer {
    padding: 10px 10px 10px 24px !important;
    border-radius: 999px !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    background: rgba(255,255,255,0.05) !important;
    border: 1px solid rgba(255,255,255,0.12) !important;
  }
  .composer:focus-within {
    border-color: rgba(138,43,226,0.5) !important;
    box-shadow: 0 0 0 3px rgba(138,43,226,0.1) !important;
  }
  .composer .input {
    padding-left: 4px !important;
    color: #ffffff !important;
    background: transparent !important;
    border: none !important;
    outline: none !important;
  }
  .user-item.active {
    background: rgba(255,255,255,0.06) !important;
    border: none !important;
    box-shadow:
      inset 0 1px 1px rgba(255,255,255,0.10),
      0 10px 20px rgba(0,0,0,0.3) !important;
  }

  /* ── SIDEBAR POLISH ── */
  .user-item {
    padding-left: 15px !important;
  }
  .user-item.active {
    background: rgba(255,255,255,0.06) !important;
    border: none !important;
    box-shadow:
      inset 0 1px 1px rgba(255,255,255,0.10),
      0 10px 20px rgba(0,0,0,0.3) !important;
  }

  /* ── STATUS DOTS ── */
  .message-info {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 5px;
    margin-top: 4px;
  }

  .status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
    transition: all 0.4s ease;
  }

  .status-sent {
    background: rgba(255, 255, 255, 0.25);
    box-shadow: none;
  }

  .status-delivered {
    background: #4facfe;
    box-shadow: 0 0 8px #4facfe;
  }

  .status-read {
    background: #8A2BE2;
    box-shadow: 0 0 10px #8A2BE2, 0 0 18px #8A2BE2;
    animation: neon-pulse 2s infinite;
  }

  @keyframes neon-pulse {
    0%   { transform: scale(1);   opacity: 1; }
    50%  { transform: scale(1.4); opacity: 0.6; }
    100% { transform: scale(1);   opacity: 1; }
  }

  /* ── STATUS DOTS FINAL ── */
  .status-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
    transition: all 0.4s ease;
  }
  .status-sent     { background: rgba(255,255,255,0.25); }
  .status-delivered{ background: #4facfe; box-shadow: 0 0 8px #4facfe; }
  .status-read     {
    background: #8A2BE2;
    box-shadow: 0 0 10px #8A2BE2, 0 0 18px #8A2BE2;
    animation: neon-pulse 2s infinite;
  }
  @keyframes neon-pulse {
    0%   { transform: scale(1);   opacity: 1; }
    50%  { transform: scale(1.4); opacity: 0.6; }
    100% { transform: scale(1);   opacity: 1; }
  }

  /* ── OFFLINE MODE ── */
  .network-status-line {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: transparent;
    transition: background 0.4s, box-shadow 0.4s;
    z-index: 9999;
    pointer-events: none;
  }

  body.is-offline .network-status-line {
    background: #ffcc00;
    box-shadow: 0 0 10px #ffcc00, 0 0 20px rgba(255,204,0,0.4);
  }

  body.is-offline .chat-card {
    position: relative;
  }

  body.is-offline .chat-card::before {
    content: "⚠️ Режим офлайн — сообщения отправятся при восстановлении сети";
    position: absolute;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 204, 0, 0.12);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 204, 0, 0.35);
    color: #ffe066;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 100;
    pointer-events: none;
  }

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

  /* ══ PRESENCE / STATUS INDICATOR ══ */
  .user-avatar {
    position: relative !important;
  }

  /* ── PRESENCE INDICATORS — clean version ── */

  /* Зеленая точка у имени — убрана */
  .user-item.user-online .user-name::after {
    display: none;
  }

  /* Кружок-бейдж на аватаре — убран */
  .status-indicator {
    display: none !important;
  }

  /* Мягкое фиолетовое свечение аватара онлайн-пользователей */
  .user-item.user-online .user-avatar {
    box-shadow: 0 0 0 1.5px rgba(168,85,247,0.55), 0 0 10px rgba(168,85,247,0.25);
    transition: box-shadow 0.4s ease;
  }

  .user-item.user-offline .user-avatar {
    box-shadow: none;
    transition: box-shadow 0.4s ease;
  }

  /* 2. Composer — капсула */
  .composer {
    border-radius: 30px !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    border: 1px solid rgba(255,255,255,0.1) !important;
    background: rgba(255,255,255,0.05) !important;
    box-shadow: none !important;
    padding: 10px 10px 10px 22px !important;
  }
  .composer:focus-within {
    border-color: rgba(138,43,226,0.45) !important;
    box-shadow: 0 0 0 3px rgba(138,43,226,0.08) !important;
  }

  /* 3. Кнопка Выйти */
  [data-theme="dark"] #logoutBtn {
    background: transparent !important;
    border: 1px solid rgba(248, 113, 113, 0.15) !important;
    color: rgba(248, 113, 113, 0.5) !important;
    transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease !important;
  }
  [data-theme="dark"] #logoutBtn:hover {
    background: rgba(248, 113, 113, 0.08) !important;
    border-color: rgba(248, 113, 113, 0.6) !important;
    color: #f87171 !important;
  }

  
  /* ── WELCOME SCREEN ── */
  .welcome-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    opacity: 0.7;
    animation: welcomeFadeIn 0.5s ease;
  }

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

  .welcome-owl {
    width: 120px;
    height: auto;
    margin-bottom: 24px;
    filter: drop-shadow(0 0 20px rgba(138,43,226,0.6)) drop-shadow(0 0 40px rgba(91,140,255,0.3));
    animation: owlFloat 3.5s ease-in-out infinite;
  }

  @keyframes owlFloat {
    0%,100% { transform: translateY(0); }
    50%      { transform: translateY(-8px); }
  }

  .welcome-title {
    margin: 0;
    color: #ffffff;
    font-size: 20px;
    font-weight: 600;
    letter-spacing: -0.02em;
    font-family: 'Inter', sans-serif;
  }

  .welcome-subtitle {
    margin: 8px 0 0;
    color: rgba(255,255,255,0.5);
    font-size: 14px;
    text-align: center;
    max-width: 280px;
    line-height: 1.5;
  }

  #chatMain {
    flex: 1;
    overflow: hidden;
  }

  
  /* ── LOGOUT BUTTON ── */
  [data-theme="dark"] #logoutBtn {
    background: transparent !important;
    border: 1px solid rgba(248, 113, 113, 0.15) !important;
    box-shadow: none !important;
    color: rgba(248, 113, 113, 0.5) !important;
    border-radius: 12px !important;
    transition: background 0.3s ease, border-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease !important;
  }
  [data-theme="dark"] #logoutBtn:hover {
    background: rgba(248, 113, 113, 0.08) !important;
    border-color: rgba(248, 113, 113, 0.6) !important;
    color: #f87171 !important;
    box-shadow: 0 0 15px rgba(248, 113, 113, 0.15) !important;
  }

  
  /* ── STICKER SYSTEM ── */
  .sticker-toggle-btn {
    background: transparent;
    border: none;
    color: rgba(255,255,255,0.5);
    cursor: pointer;
    padding: 6px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color .2s, background .2s;
    flex-shrink: 0;
  }
  .sticker-toggle-btn:hover { color: #fff; background: rgba(255,255,255,0.08); }
  .sticker-toggle-btn.active { color: #8A2BE2; }
  [data-theme="light"] .sticker-toggle-btn {
    color: #64748b;
  }
  [data-theme="light"] .sticker-toggle-btn:hover {
    color: #1e293b;
    background: rgba(0,0,0,0.05);
  }
  [data-theme="light"] .sticker-toggle-btn.active {
    color: #3b82f6;
  }
  .sticker-toggle-btn:disabled { opacity: 0.3; cursor: not-allowed; }

  .sticker-picker {
    position: absolute;
    bottom: 80px;
    left: 20px;
    right: 20px;
    background: rgba(15,12,30,0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 20px;
    padding: 16px;
    z-index: 200;
    box-shadow: 0 8px 32px rgba(0,0,0,0.5);
    animation: pickerSlideUp .2s ease;
  }

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

  .sticker-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
    justify-items: center;
  }

  .sticker-item {
    cursor: pointer;
    border-radius: 12px;
    padding: 8px;
    transition: background .15s, transform .15s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
  }
  .sticker-item:hover {
    background: rgba(138,43,226,0.15);
    transform: scale(1.08);
  }
  .sticker-item img {
    width: 72px;
    height: 72px;
    object-fit: contain;
    filter: drop-shadow(0 0 8px rgba(0,195,255,0.3));
  }
  .sticker-item span {
    font-size: 10px;
    color: rgba(255,255,255,0.5);
    text-align: center;
  }

  /* Стикер в чате */
  .chat-sticker {
    max-width: 180px;
    height: auto;
    filter: drop-shadow(0 0 12px rgba(0,195,255,0.4));
    transition: transform .2s ease;
    cursor: default;
    display: block;
  }
  .chat-sticker:hover { transform: scale(1.05); }

  /* Сообщение-стикер без пузыря */
  .sticker-message {
    display: flex;
    margin-bottom: 8px;
  }
  .sticker-message.mine { justify-content: flex-end; }
  .sticker-message.theirs { justify-content: flex-start; }

  
  /* ── STICKER FIXES ── */
  .sticker-item {
    cursor: pointer;
    border-radius: 14px;
    padding: 6px !important;
    transition: background .15s, transform .15s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
  }
  .sticker-item:hover {
    background: rgba(138,43,226,0.18) !important;
    transform: scale(1.08) !important;
  }
  .sticker-item img {
    width: 80px !important;
    height: 80px !important;
    object-fit: contain !important;
    padding: 6px !important;
    filter: drop-shadow(0 0 6px rgba(0,195,255,0.25));
  }
  .sticker-item span {
    font-size: 10px;
    color: rgba(255,255,255,0.5);
    text-align: center;
  }

  /* Стикер в чате */
  .chat-sticker {
    max-width: 180px !important;
    height: auto !important;
    display: block !important;
    filter: drop-shadow(0 0 10px rgba(0,195,255,0.4)) !important;
    transition: transform .2s ease !important;
  }
  .chat-sticker:hover { transform: scale(1.05) !important; }

  .sticker-message {
    display: flex !important;
    margin-bottom: 10px !important;
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
  }
  .sticker-message.mine   { justify-content: flex-end !important; }
  .sticker-message.theirs { justify-content: flex-start !important; }

  /* ── User search ── */
  .user-search-wrap {
    position: relative;
    margin: 8px 0 4px;
    flex-shrink: 0;
  }
  .user-search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    font-weight: 700;
    color: #5b8cff;
    pointer-events: none;
    line-height: 1;
    user-select: none;
  }
  [data-theme="dark"] .user-search-input {
    width: 100%;
    padding: 10px 14px 10px 30px;
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 0;
    color: #eef4ff;
    font-size: 13px;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
  }
  [data-theme="dark"] .user-search-input::placeholder {
    color: rgba(148, 163, 184, 0.45);
  }
  [data-theme="dark"] .user-search-input:focus {
    border-color: rgba(91, 140, 255, 0.4);
    box-shadow: none;
  }

  /* ── Skeleton State (State B) ── */
  @keyframes neonPulse {
    0%   { opacity: 0.05; box-shadow: 0 0 5px rgba(0, 242, 255, 0); }
    50%  { opacity: 0.18; box-shadow: 0 0 15px rgba(0, 242, 255, 0.2); }
    100% { opacity: 0.05; box-shadow: 0 0 5px rgba(0, 242, 255, 0); }
  }
  .skeleton-item {
    display: flex;
    align-items: center;
    padding: 12px;
    margin-bottom: 8px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
    animation: neonPulse 2.5s ease-in-out infinite;
  }
  .skeleton-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    margin-right: 12px;
    flex-shrink: 0;
  }
  .skeleton-line {
    height: 9px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 4px;
  }

  /* ── Кнопка удаления чата ── */
  /* ── Кнопка удаления чата ── */
  .chat-delete-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: transparent;
    border: none;
    color: rgba(255,255,255,0.2);
    cursor: pointer;
    flex-shrink: 0;
    margin-left: auto;
    opacity: 0;
    transition: opacity 0.15s, color 0.15s, background 0.15s;
    padding: 0;
  }
  .chat-delete-btn svg {
    width: 14px;
    height: 14px;
    pointer-events: none;
  }
  .user-item:hover .chat-delete-btn { opacity: 1; }
  .chat-delete-btn:hover {
    color: #ef4444 !important;
    background: rgba(239,68,68,0.12) !important;
    opacity: 1 !important;
  }

  /* Кастомный тултип через псевдоэлементы */
  .chat-delete-btn::after {
    content: "Удалить";
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%) scale(0.9);
    background: rgba(0,0,0,0.88);
    color: #fff;
    font-size: 11px;
    font-weight: 500;
    padding: 4px 9px;
    border-radius: 6px;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease 0.25s, transform 0.2s ease 0.25s;
  }
  .chat-delete-btn::before {
    content: "";
    position: absolute;
    bottom: calc(100% + 1px);
    left: 50%;
    transform: translateX(-50%);
    border: 4px solid transparent;
    border-top-color: rgba(0,0,0,0.88);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease 0.25s;
  }
  .chat-delete-btn:hover::after,
  .chat-delete-btn:hover::before { opacity: 1; transform: translateX(-50%) scale(1); }
  .chat-delete-btn:hover::before { transform: translateX(-50%); }

  /* ── Модальное окно удаления ── */
  /* ── Кнопка настроек (шестерёнка) ── */
  .settings-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: transparent;
    border: none;
    color: rgba(255,255,255,0.45);
    cursor: pointer;
    padding: 4px;
    flex-shrink: 0;
    border-radius: 6px;
    transition: color 0.2s ease, transform 0.3s ease, filter 0.2s ease;
  }
  .settings-btn svg { width: 16px; height: 16px; pointer-events: none; }
  .settings-btn:hover {
    color: #93c5fd;
    transform: rotate(45deg);
    filter: drop-shadow(0 0 5px rgba(147,197,253,0.5));
  }
  [data-theme="light"] .settings-btn {
    color: #1e293b;
    opacity: 0.55;
  }
  [data-theme="light"] .settings-btn:hover {
    color: #3b82f6 !important;
    opacity: 1;
    filter: none;
    transform: rotate(45deg);
  }

  /* ── Toggle переключатель темы ── */
  .theme-toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 0;
    border-bottom: 1px solid rgba(255,255,255,0.07);
  }
  [data-theme="light"] .theme-toggle-row { border-color: rgba(0,0,0,0.07); }
  .theme-toggle-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
  }
  .theme-toggle-label svg { width: 18px; height: 18px; opacity: 0.7; }
  .theme-switch {
    position: relative;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
  }
  .theme-switch input { opacity: 0; width: 0; height: 0; }
  .theme-switch-track {
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0.15);
    border-radius: 999px;
    cursor: pointer;
    transition: background 0.25s;
  }
  .theme-switch input:checked + .theme-switch-track { background: #3b82f6; }
  .theme-switch-track::after {
    content: "";
    position: absolute;
    width: 18px; height: 18px;
    left: 3px; top: 3px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.25s cubic-bezier(.34,1.56,.64,1);
  }
  .theme-switch input:checked + .theme-switch-track::after {
    transform: translateX(20px);
  }

  .gurnyx-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 9000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: modal-fade-in 0.2s ease;
  }
  @keyframes modal-fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
  }
  .gurnyx-modal {
    background: #0f172a;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 20px;
    padding: 28px 28px 24px;
    width: 100%;
    max-width: 340px;
    box-shadow: 0 24px 60px rgba(0,0,0,0.5);
    animation: modal-scale-in 0.22s cubic-bezier(.34,1.56,.64,1);
  }
  @keyframes modal-scale-in {
    from { opacity: 0; transform: scale(0.88); }
    to   { opacity: 1; transform: scale(1); }
  }
  .gurnyx-modal-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
  }
  .gurnyx-modal-header .warning-icon {
    font-size: 22px;
    line-height: 1;
  }
  .gurnyx-modal-header h3 {
    font-size: 16px;
    font-weight: 700;
    color: #f1f5f9;
    margin: 0;
  }
  .gurnyx-modal p {
    font-size: 13px;
    color: rgba(255,255,255,0.45);
    line-height: 1.5;
    margin: 0 0 22px;
  }
  .gurnyx-modal-footer {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
  }
  .g-btn-secondary {
    padding: 9px 18px;
    border-radius: 10px;
    background: transparent;
    border: 1px solid rgba(255,255,255,0.15);
    color: rgba(255,255,255,0.6);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    font-family: inherit;
  }
  .g-btn-secondary:hover {
    background: rgba(255,255,255,0.07);
    color: rgba(255,255,255,0.9);
  }
  .g-btn-danger {
    padding: 9px 18px;
    border-radius: 10px;
    background: #ef4444;
    border: none;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s, transform 0.1s;
    font-family: inherit;
  }
  .g-btn-danger:hover  { background: #dc2626; }
  .g-btn-danger:active { transform: scale(0.97); }

  /* ── Sidebar section label ── */
  .sidebar-section-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.25);
    padding: 10px 4px 5px;
    user-select: none;
  }

  /* ── Превью последнего сообщения в сайдбаре ── */
  .msg-preview-line, .card-preview {
    font-family: -apple-system, BlinkMacSystemFont, "Apple Color Emoji",
                 "Segoe UI Emoji", "Segoe UI Symbol", "Twemoji Mozilla", sans-serif;
    font-size: 13px;
    font-weight: 400;
    color: #cbd5e1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 180px;
    display: flex;
    align-items: center;
    gap: 2px;
    line-height: 1.4;
    margin-top: 1px;
  }
  /* Индикатор исходящего — тусклая стрелка, не мешает читать текст */
  .card-preview--mine {
    color: #cbd5e1; /* текст остаётся того же цвета */
  }
  .card-preview--mine::before {
    content: "›";
    display: inline-block;
    font-size: 14px;
    line-height: 1;
    color: #475569; /* Slate 600 — тихий, не кричит */
    margin-right: 3px;
    font-weight: 400;
    flex-shrink: 0;
  }
  .msg-preview-line .apple-emoji,
  .card-preview .apple-emoji {
    width: 14px !important;
    height: 14px !important;
    vertical-align: middle;
    display: inline-block;
    margin: 0 1px;
    flex-shrink: 0;
  }

  /* ── Хамелеон-ник администратора ── */
  @keyframes chameleon-flow {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
  }
  .nickname-chameleon {
    background: linear-gradient(
      90deg,
      #93c5fd,
      #c084fc,
      #f472b6,
      #a78bfa,
      #93c5fd
    );
    background-size: 300% 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: chameleon-flow 5s ease infinite;
    font-weight: 800;
    display: inline-block;
    filter: drop-shadow(0 0 7px rgba(147,197,253,0.35));
  }

  /* ── Разделитель дат в чате (sticky) ── */
  .date-divider {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 8px auto;
    width: 100%;
    pointer-events: none;
    clear: both;
    padding: 6px 0;
  }
  .date-divider span {
    background: rgba(13, 20, 36, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: #8b9bb4;
    font-size: 11px;
    font-weight: 500;
    padding: 4px 14px;
    border-radius: 20px;
    user-select: none;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    transition: background 0.3s, box-shadow 0.3s;
  }

  /* date-divider light theme — определено в gurnyx-v3 ниже */
