  * {
      margin: 0;
      padding: 0;
      box-sizing: border-box;
  }

  body {
      font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
      overflow-x: hidden;
  }

  ::-webkit-scrollbar {
      width: 5px;
      height: 5px;
  }

  ::-webkit-scrollbar-track {
      background: transparent;
  }

  ::-webkit-scrollbar-thumb {
      background: #cbd5e1;
      border-radius: 10px;
  }

  .dark ::-webkit-scrollbar-thumb {
      background: #475569;
  }

  .sidebar-link {
      transition: all .25s cubic-bezier(.4, 0, .2, 1);
      position: relative;
      overflow: hidden;
  }

  .sidebar-link::before {
      content: '';
      position: absolute;
      left: 0;
      top: 0;
      bottom: 0;
      width: 0;
      background: linear-gradient(135deg, rgba(99, 102, 241, .12), rgba(129, 140, 248, .08));
      border-radius: 12px;
      transition: width .25s ease;
      z-index: 0;
  }

  .sidebar-link:hover::before,
  .sidebar-link.active::before {
      width: 100%;
  }

  .sidebar-link::after {
      content: '';
      position: absolute;
      left: 0;
      top: 50%;
      transform: translateY(-50%);
      width: 3px;
      height: 0;
      background: linear-gradient(180deg, #6366f1, #818cf8);
      border-radius: 0 6px 6px 0;
      transition: height .25s ease;
  }

  .sidebar-link:hover::after,
  .sidebar-link.active::after {
      height: 55%;
  }

  .sidebar-link.active {
      color: #6366f1;
      font-weight: 600;
  }

  .sidebar-link:hover {
      color: #6366f1;
  }

  .dark .sidebar-link.active {
      color: #818cf8;
  }

  .dark .sidebar-link:hover {
      color: #818cf8;
  }

  .notification-panel,
  .messenger-panel {
      max-width: calc(100vw - 1rem);
  }

  @keyframes fadeInUp {
      from {
          opacity: 0;
          transform: translateY(20px);
      }

      to {
          opacity: 1;
          transform: translateY(0);
      }
  }

  @keyframes fadeIn {
      from {
          opacity: 0;
      }

      to {
          opacity: 1;
      }
  }

  @keyframes slideInRight {
      from {
          transform: translateX(100%);
          opacity: 0;
      }

      to {
          transform: translateX(0);
          opacity: 1;
      }
  }

  @keyframes slideInLeft {
      from {
          transform: translateX(-20px);
          opacity: 0;
      }

      to {
          transform: translateX(0);
          opacity: 1;
      }
  }

  @keyframes slideInBubble {
      from {
          opacity: 0;
          transform: translateY(8px);
      }

      to {
          opacity: 1;
          transform: translateY(0);
      }
  }

  @keyframes scaleIn {
      from {
          transform: scale(.92);
          opacity: 0;
      }

      to {
          transform: scale(1);
          opacity: 1;
      }
  }

  @keyframes float {

      0%,
      100% {
          transform: translateY(0);
      }

      50% {
          transform: translateY(-6px);
      }
  }

  @keyframes blob {

      0%,
      100% {
          border-radius: 60% 40% 30% 70%/60% 30% 70% 40%;
      }

      50% {
          border-radius: 30% 60% 70% 40%/50% 60% 30% 60%;
      }
  }

  @keyframes pulse-ring {
      0% {
          transform: scale(.95);
          opacity: 1;
      }

      100% {
          transform: scale(1.5);
          opacity: 0;
      }
  }

  @keyframes typing {

      0%,
      60%,
      100% {
          transform: translateY(0);
          opacity: .4;
      }

      30% {
          transform: translateY(-4px);
          opacity: 1;
      }
  }

  .animate-fadeInUp {
      animation: fadeInUp .6s cubic-bezier(.4, 0, .2, 1) both;
  }

  .animate-scaleIn {
      animation: scaleIn .25s ease both;
  }

  .animate-float {
      animation: float 3s ease-in-out infinite;
  }

  .animate-blob {
      animation: blob 8s ease-in-out infinite;
  }

  .animate-slideInLeft {
      animation: slideInLeft .3s ease both;
  }

  .animate-bubble {
      animation: slideInBubble .3s ease both;
  }

  .badge-dot {
      width: 8px;
      height: 8px;
      border-radius: 50%;
      display: inline-block;
  }

  .badge-dot.online {
      background: #22c55e;
      box-shadow: 0 0 0 3px rgba(34, 197, 94, .2);
  }

  .badge-dot.offline {
      background: #94a3b8;
  }

  .badge-dot.away {
      background: #f59e0b;
      box-shadow: 0 0 0 3px rgba(245, 158, 11, .2);
  }

  .sidebar-overlay {
      display: none;
      position: fixed;
      inset: 0;
      background: rgba(0, 0, 0, .5);
      z-index: 40;
      backdrop-filter: blur(4px);
  }

  .sidebar-overlay.active {
      display: block;
  }

  @media(max-width:1023px) {
      .sidebar-desktop {
          transform: translateX(-100%);
          position: fixed;
          z-index: 50;
      }

      .sidebar-desktop.open {
          transform: translateX(0);
      }
  }

  .tooltip-trigger {
      position: relative;
  }

  .tooltip-trigger .tooltip-text {
      visibility: hidden;
      opacity: 0;
      position: absolute;
      bottom: calc(100% + 8px);
      left: 50%;
      transform: translateX(-50%);
      background: #1e293b;
      color: #fff;
      padding: 4px 12px;
      border-radius: 8px;
      font-size: 11px;
      white-space: nowrap;
      transition: all .2s;
      z-index: 100;
      pointer-events: none;
  }

  .dark .tooltip-trigger .tooltip-text {
      background: #e2e8f0;
      color: #1e293b;
  }

  .tooltip-trigger:hover .tooltip-text {
      visibility: visible;
      opacity: 1;
  }

  .toast-container {
      position: fixed;
      top: 1rem;
      right: 1rem;
      z-index: 9999;
      display: flex;
      flex-direction: column;
      gap: .5rem;
      pointer-events: none;
  }

  .toast {
      pointer-events: auto;
      animation: slideInRight .3s ease, fadeIn .3s ease;
  }

  .live-dot {
      width: 8px;
      height: 8px;
      background: #22c55e;
      border-radius: 50%;
      position: relative;
  }

  .live-dot::before {
      content: '';
      position: absolute;
      inset: -3px;
      border: 2px solid #22c55e;
      border-radius: 50%;
      animation: pulse-ring 1.5s ease-out infinite;
  }

  .chat-container {
      height: calc(100vh - 100px);
      min-height: 600px;
  }

  @media(max-width:1023px) {
      .chat-container {
          height: calc(100vh - 84px);
      }
  }

  .conv-item {
      transition: all .2s ease;
      cursor: pointer;
  }

  .conv-item:hover {
      background: rgba(99, 102, 241, .06);
  }

  .dark .conv-item:hover {
      background: rgba(99, 102, 241, .12);
  }

  .conv-item.active {
      background: linear-gradient(90deg, rgba(99, 102, 241, .12), rgba(99, 102, 241, .04));
      border-left: 3px solid #6366f1;
  }

  .dark .conv-item.active {
      background: linear-gradient(90deg, rgba(99, 102, 241, .2), rgba(99, 102, 241, .08));
  }

  .msg-sent {
      background: linear-gradient(135deg, #6366f1, #4f46e5);
      color: #fff;
      border-radius: 18px 18px 4px 18px;
  }

  .msg-received {
      background: #f1f5f9;
      color: #1e293b;
      border-radius: 18px 18px 18px 4px;
  }

  .dark .msg-received {
      background: #334155;
      color: #f1f5f9;
  }

  .msg-bubble {
      max-width: 75%;
      padding: 10px 14px;
      font-size: 13px;
      line-height: 1.5;
      box-shadow: 0 1px 2px rgba(0, 0, 0, .05);
      animation: slideInBubble .3s ease;
  }

  .typing-dot {
      width: 6px;
      height: 6px;
      background: #94a3b8;
      border-radius: 50%;
      display: inline-block;
      margin: 0 1px;
      animation: typing 1.4s infinite;
  }

  .typing-dot:nth-child(2) {
      animation-delay: .2s;
  }

  .typing-dot:nth-child(3) {
      animation-delay: .4s;
  }

  .date-divider {
      display: flex;
      align-items: center;
      gap: 12px;
      margin: 16px 0;
  }

  .date-divider::before,
  .date-divider::after {
      content: '';
      flex: 1;
      height: 1px;
      background: #e2e8f0;
  }

  .dark .date-divider::before,
  .dark .date-divider::after {
      background: #334155;
  }

  .date-divider span {
      font-size: 10px;
      font-weight: 700;
      color: #94a3b8;
      text-transform: uppercase;
      letter-spacing: .05em;
  }

  .attachment-preview {
      border: 1px dashed #cbd5e1;
      border-radius: 12px;
      padding: 8px;
      transition: all .2s;
  }

  .dark .attachment-preview {
      border-color: #475569;
  }

  .attachment-preview:hover {
      border-color: #6366f1;
      background: rgba(99, 102, 241, .05);
  }

  .emoji-picker {
      max-width: 280px;
  }

  .emoji-btn {
      padding: 6px;
      border-radius: 8px;
      font-size: 20px;
      transition: all .15s;
      cursor: pointer;
  }

  .emoji-btn:hover {
      background: rgba(99, 102, 241, .1);
      transform: scale(1.2);
  }

  .hero-avatar {
      position: relative;
  }

  .hero-avatar::after {
      content: '';
      position: absolute;
      bottom: 2px;
      right: 2px;
      width: 10px;
      height: 10px;
      background: #22c55e;
      border: 2px solid #fff;
      border-radius: 50%;
  }

  .dark .hero-avatar::after {
      border-color: #1e293b;
  }

  .compose-fab {
      position: fixed;
      bottom: 1.5rem;
      right: 1.5rem;
      z-index: 40;
      box-shadow: 0 8px 24px rgba(99, 102, 241, .35);
      transition: all .25s ease;
  }

  .compose-fab:hover {
      transform: scale(1.1) rotate(90deg);
  }

  @media(min-width:1024px) {
      .compose-fab {
          display: none;
      }
  }

  .msg-status {
      color: #22c55e;
  }

  .checkbox-custom {
      appearance: none;
      width: 18px;
      height: 18px;
      border: 2px solid #cbd5e1;
      border-radius: 5px;
      cursor: pointer;
      transition: all .2s;
      position: relative;
  }

  .checkbox-custom:checked {
      background: linear-gradient(135deg, #6366f1, #4f46e5);
      border-color: #6366f1;
  }

  .checkbox-custom:checked::after {
      content: '✓';
      position: absolute;
      color: #fff;
      font-size: 11px;
      font-weight: bold;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%);
  }

  .dark .checkbox-custom {
      border-color: #475569;
  }