/* ═══════════════════════════════════════════════════════════
   VOISIO — New Design System
   Active only when html[data-design="new"]
   Classic (styles.css) remains untouched as backup.
   ═══════════════════════════════════════════════════════════ */

html[data-design="new"] {
  --bg: #0a0d12;
  --panel: #12171f;
  --chat-btn-bg: #161c26;
  --chat-list-bg: #10151c;
  --channels-underlist-bg: #0a0d12;
  --accent: #1fbf9a;
  --accent-hover: #18a886;
  --accent-soft: rgba(31, 191, 154, 0.14);
  --accent2: #3dd6b0;
  --success: #2ecc71;
  --danger: #e85d5d;
  --text: #eef1f4;
  --muted: #8b93a1;
  --border: rgba(255, 255, 255, 0.07);
  --nav-bg: #07090d;
  --sidebar-bg: #0e1218;
  --surface-1: #12171f;
  --surface-2: #171d27;
  --surface-3: #1c2430;
  --ink: #05070a;
  --shadow-lg: 0 24px 64px rgba(0, 0, 0, 0.55);
  --shadow-md: 0 10px 28px rgba(0, 0, 0, 0.4);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --font-ui: "Outfit", "Inter", system-ui, sans-serif;
  --font-brand: "Syne", "Outfit", sans-serif;
  color-scheme: dark;
}

html[data-design="new"] * {
  scrollbar-color: rgba(31, 191, 154, 0.35) transparent;
}

html[data-design="new"] *::-webkit-scrollbar-thumb {
  background: rgba(31, 191, 154, 0.3);
}

html[data-design="new"] *::-webkit-scrollbar-thumb:hover {
  background: rgba(31, 191, 154, 0.55);
}

html[data-design="new"] body {
  font-family: var(--font-ui);
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(31, 191, 154, 0.08), transparent 55%),
    radial-gradient(900px 500px at 100% 0%, rgba(56, 120, 160, 0.08), transparent 50%),
    var(--bg);
  letter-spacing: 0.01em;
}

/* ── New-only chrome ── */
html[data-design="new"] .auth-tagline {
  display: block;
  text-align: center;
  margin: -10px 0 22px;
  color: rgba(238, 241, 244, 0.72);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  animation: voisio-fade-up 0.55s ease both 0.12s;
}

html[data-design="new"] .auth-bg-grid,
html[data-design="new"] .auth-bg-vignette {
  display: block;
}

/* ── Auth atmosphere ── */
html[data-design="new"] .auth-bg {
  background:
    linear-gradient(160deg, #070a0f 0%, #0c1218 45%, #0a1014 100%);
}

html[data-design="new"] .auth-bg-orb-1 {
  background: radial-gradient(circle, rgba(31, 191, 154, 0.45) 0%, transparent 70%);
  opacity: 0.55;
  filter: blur(90px);
}

html[data-design="new"] .auth-bg-orb-2 {
  background: radial-gradient(circle, rgba(40, 110, 150, 0.4) 0%, transparent 70%);
  opacity: 0.5;
  filter: blur(90px);
}

html[data-design="new"] .auth-bg-orb-3 {
  background: radial-gradient(circle, rgba(20, 160, 130, 0.28) 0%, transparent 70%);
  opacity: 0.4;
  filter: blur(80px);
}

html[data-design="new"] .auth-bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 20%, transparent 75%);
  opacity: 0.55;
  pointer-events: none;
  animation: voisio-grid-drift 28s linear infinite;
}

html[data-design="new"] .auth-bg-vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 35%, rgba(0, 0, 0, 0.55) 100%);
  pointer-events: none;
}

html[data-design="new"] #auth-panel {
  width: min(440px, 92vw);
  padding: 44px 40px 36px;
  background: rgba(12, 16, 22, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(28px) saturate(1.2);
  -webkit-backdrop-filter: blur(28px) saturate(1.2);
  animation: voisio-auth-in 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

html[data-design="new"] #auth-panel .logo {
  flex-direction: column;
  gap: 14px;
  margin-bottom: 8px;
  animation: none;
}

html[data-design="new"] #auth-panel .logo-icon,
html[data-design="new"] .loading-logo .logo-icon,
html[data-design="new"] .brand-icon {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  font-family: var(--font-brand);
  font-weight: 800;
  font-size: 30px;
  background: linear-gradient(145deg, #2dd4bf 0%, #0f8f78 55%, #146c8a 100%);
  box-shadow: 0 12px 28px rgba(31, 191, 154, 0.28);
  animation: voisio-brand-pulse 4.5s ease-in-out infinite;
}

html[data-design="new"] #auth-panel .logo-text,
html[data-design="new"] .loading-logo .logo-text,
html[data-design="new"] .brand-text {
  font-family: var(--font-brand);
  font-weight: 800;
  font-size: 34px;
  letter-spacing: -0.03em;
  background: linear-gradient(120deg, #f4f7fa 20%, #9fe8d4 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

html[data-design="new"] .auth-subtitle {
  margin-bottom: 6px;
  color: rgba(159, 232, 212, 0.7);
  font-weight: 500;
  letter-spacing: 0.02em;
}

html[data-design="new"] .auth-title {
  font-family: var(--font-brand);
  font-size: 22px;
  letter-spacing: -0.02em;
  margin-bottom: 18px;
}

html[data-design="new"] .auth-field label {
  color: #9aa3b2;
  letter-spacing: 0.06em;
}

html[data-design="new"] .auth-field input {
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 12px 14px;
}

html[data-design="new"] .auth-field input:focus {
  border-color: rgba(31, 191, 154, 0.55);
  box-shadow: 0 0 0 3px rgba(31, 191, 154, 0.12);
}

html[data-design="new"] .auth-btn {
  border-radius: 12px;
  background: linear-gradient(135deg, #25c9a3, #178f7a);
  box-shadow: 0 10px 24px rgba(31, 191, 154, 0.28);
  font-family: var(--font-ui);
  letter-spacing: 0.01em;
}

html[data-design="new"] .auth-btn:hover {
  box-shadow: 0 14px 30px rgba(31, 191, 154, 0.35);
  filter: brightness(1.05);
}

html[data-design="new"] .download-client-auth-btn,
html[data-design="new"] .download-android-auth-btn {
  margin-top: 18px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
}
html[data-design="new"] .download-android-auth-btn {
  margin-top: 8px;
  border-color: rgba(31, 191, 154, 0.28);
  background: rgba(31, 191, 154, 0.1);
  color: #9fe8d4;
}

/* ── Icons: SVG in New, emoji in Classic ── */
html[data-design="new"] .icon-emoji {
  display: none !important;
}

html[data-design="new"] .icon-svg {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  line-height: 0;
}

html[data-design="new"] .icon-svg svg {
  display: block;
}

/* ── App shell: new sizes + rearranged menus ── */
html[data-design="new"] #main {
  grid-template-columns: 88px 360px minmax(0, 1fr);
  grid-template-rows: 1fr;
  gap: 0;
  background: transparent;
}

/* Rail: brand on top, servers fill middle, add at bottom */
html[data-design="new"] .nav-sidebar {
  background: linear-gradient(180deg, #07090d 0%, #0a0e14 100%);
  border-right: 1px solid rgba(255, 255, 255, 0.05);
  padding: 12px 0 14px;
  justify-content: flex-start;
  gap: 10px;
}

html[data-design="new"] .nav-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  width: 100%;
  padding: 4px 0 8px;
  order: 0;
  cursor: pointer;
}

html[data-design="new"] .nav-brand .brand-icon {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  font-size: 22px;
  font-family: var(--font-brand);
  font-weight: 800;
  background: linear-gradient(145deg, #2dd4bf 0%, #0f8f78 55%, #146c8a 100%);
  color: #04120e;
  border: 2px solid rgba(159, 232, 212, 0.55);
  box-shadow: 0 0 0 3px rgba(31, 191, 154, 0.16), 0 8px 20px rgba(31, 191, 154, 0.28);
  display: grid;
  place-items: center;
}

html[data-design="new"] .nav-brand.active .brand-icon {
  border-color: #9fe8d4;
  box-shadow: 0 0 0 3px rgba(31, 191, 154, 0.28), 0 8px 20px rgba(31, 191, 154, 0.32);
}

html[data-design="new"] .nav-brand-version {
  display: none !important;
}

html[data-design="new"] .nav-top,
html[data-design="new"] #slot-nav-primary-classic {
  display: none !important;
}

html[data-design="new"] .nav-bottom {
  order: 1;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 0 0 4px;
}

html[data-design="new"] .nav-divider {
  display: none;
}

html[data-design="new"] .nav-section-label {
  display: block;
  width: 100%;
  text-align: center;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(159, 232, 212, 0.45);
  margin-bottom: 2px;
}

html[data-design="new"] .server-list {
  overflow-x: hidden;
  padding: 4px 8px 8px;
}

html[data-design="new"] .nav-btn {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--surface-2);
  border: 1px solid transparent;
  font-size: 0;
  color: #c9d2dc;
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

html[data-design="new"] .nav-btn:hover {
  transform: translateY(-1px);
  background: var(--surface-3);
}

html[data-design="new"] .nav-btn.active {
  background: var(--accent-soft);
  border-color: rgba(31, 191, 154, 0.35);
  color: #9fe8d4;
  box-shadow: inset 0 0 0 1px rgba(31, 191, 154, 0.15);
}

html[data-design="new"] .nav-btn::before {
  display: none;
}

html[data-design="new"] .nav-badge {
  background: var(--accent);
  color: #04120e;
  font-weight: 700;
  top: -3px;
  right: -3px;
}

html[data-design="new"] .server-btn {
  width: 50px;
  height: 50px;
  border-radius: 14px;
  background: var(--surface-2);
  overflow: visible;
  transition: border-radius 0.2s ease, transform 0.15s ease, background 0.15s ease;
}

html[data-design="new"] .server-badge {
  width: 16px;
  height: 16px;
  border-radius: 5px;
  box-shadow: 0 0 0 2px #0b0f14;
  z-index: 5;
}

html[data-design="new"] .server-badge svg {
  width: 10px;
  height: 10px;
}

html[data-design="new"] .server-badge-muted {
  background: rgba(14, 18, 24, 0.96);
  color: #9aa3b2;
}

html[data-design="new"] .server-badge-voice {
  background: #1fbf9a;
  color: #04120e;
}

html[data-design="new"] .server-badge-unread,
html[data-design="new"] .server-badge-mention {
  background: #e85d5d;
}

html[data-design="new"] .server-badge-unread {
  min-width: 16px;
  font-size: 9px;
}

html[data-design="new"] .server-btn:hover,
html[data-design="new"] .server-btn.active {
  border-radius: 12px;
  background: linear-gradient(145deg, #25c9a3, #178f7a);
  transform: translateY(-1px);
}

html[data-design="new"] .server-btn::before {
  background: var(--accent2);
  left: -14px;
  width: 3px;
  border-radius: 2px;
}

/* Sidebar: wider, tabs on top, actions moved here, brand hidden */
html[data-design="new"] .sidebar {
  background: linear-gradient(180deg, #0f141b 0%, #0c1016 100%);
  border-right: 1px solid rgba(255, 255, 255, 0.05);
  padding: 0;
  width: auto;
  min-width: 0;
  overflow-x: hidden;
}

html[data-design="new"] .sidebar-topbar {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px 12px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(0, 0, 0, 0.18);
}

html[data-design="new"] #brand-block {
  display: none !important;
}

html[data-design="new"] .sidebar-nav-tabs,
html[data-design="new"] #slot-nav-primary-new,
html[data-design="new"] #nav-chats,
html[data-design="new"] #nav-requests {
  display: none !important;
}

html[data-design="new"] .sidebar-nav-tabs .nav-btn {
  width: 100%;
  height: 42px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 650;
  background: rgba(255, 255, 255, 0.03);
}

html[data-design="new"] .sidebar-nav-tabs .nav-btn-label {
  display: inline !important;
  font-family: var(--font-ui);
  letter-spacing: 0.01em;
}

html[data-design="new"] .sidebar-nav-tabs .nav-badge {
  position: static;
  margin-left: 2px;
}

html[data-design="new"] .sidebar-actions-slot {
  display: flex !important;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-height: 0;
}

html[data-design="new"] .sidebar-actions-slot .app-actions {
  width: 100%;
  justify-content: flex-end;
}

html[data-design="new"] .sidebar-actions-slot #btn-admin-panel {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #c9d2dc;
}

html[data-design="new"] .sidebar-actions-slot .topbar-download-btn {
  height: 38px;
  padding: 0 12px;
  border-radius: 10px;
  font-size: 12px;
}

html[data-design="new"] .sidebar-header {
  font-family: var(--font-brand);
  letter-spacing: -0.01em;
  padding: 4px 2px;
}

html[data-design="new"] .sidebar-section {
  padding: 10px 12px 4px;
}

html[data-design="new"] .sidebar-tool-btn {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #c9d2dc;
  padding: 0;
}

html[data-design="new"] .sidebar-tool-btn:hover {
  background: var(--accent-soft);
  color: #9fe8d4;
  opacity: 1;
}

html[data-design="new"] .list {
  gap: 4px;
}

html[data-design="new"] .pill {
  min-height: 54px;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid transparent;
  background: transparent;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

/* Channel rows: slightly larger, no horizontal overflow */
html[data-design="new"] .pill.channel-item {
  min-height: 0;
  padding: 8px 10px;
  align-items: flex-start;
  border-radius: 10px;
  gap: 6px;
  max-width: 100%;
  overflow: hidden;
}

html[data-design="new"] .pill.channel-item .channel-name-line {
  font-size: 14px;
  font-weight: 550;
}

html[data-design="new"] .server-category-header {
  margin: 10px 4px 4px;
  padding: 7px 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  color: rgba(159, 232, 212, 0.65);
  letter-spacing: 0.08em;
  font-size: 11px;
}

html[data-design="new"] .channel-in-category {
  margin-left: 10px;
  max-width: calc(100% - 10px);
}

html[data-design="new"] #friend-list,
html[data-design="new"] .sidebar-scroll,
html[data-design="new"] .sidebar-section,
html[data-design="new"] #panel-chats {
  overflow-x: hidden;
  min-width: 0;
}

html[data-design="new"] .voice-mini-avatars {
  margin-top: 5px;
  padding: 2px 0 0;
}

html[data-design="new"] .voice-mini-avatar {
  width: 22px !important;
  height: 22px !important;
  min-width: 22px;
  border-color: rgba(31, 191, 154, 0.35);
}

html[data-design="new"] .channel-music-tag {
  color: rgba(159, 232, 212, 0.75);
}

html[data-design="new"] .channel-music-note {
  color: var(--accent2);
}

html[data-design="new"] .channel-music-tag.playing {
  color: #9fe8d4;
}

html[data-design="new"] .profile {
  min-height: 72px;
  padding: 10px 12px;
}

html[data-design="new"] .pill:hover {
  background: rgba(255, 255, 255, 0.04);
}

html[data-design="new"] .pill.friend-item:hover {
  background: rgba(255, 255, 255, 0.045);
  transform: none;
}

html[data-design="new"] .pill.friend-item.selected-chat,
html[data-design="new"] .pill.selected,
html[data-design="new"] .pill.active {
  background: var(--accent-soft);
  border-color: rgba(31, 191, 154, 0.22);
}

html[data-design="new"] .pill img {
  border-radius: 12px;
}

html[data-design="new"] .profile {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(10px);
}

html[data-design="new"] .profile-menu {
  left: 8px;
  right: 8px;
  bottom: calc(100% + 8px);
  min-width: 0;
  max-width: none;
  width: auto;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow-lg);
  background: #121821;
  overflow: hidden;
}

html[data-design="new"] .profile-menu.hidden {
  display: none !important;
}

html[data-design="new"] .pm-banner {
  height: 24px;
  border-radius: 14px 14px 0 0;
}

html[data-design="new"] .pm-avatar {
  width: 38px !important;
  height: 38px !important;
  border-radius: 11px !important;
  border-color: #121821 !important;
}

html[data-design="new"] .pm-avatar-wrap .status-dot {
  border-color: #121821 !important;
}

html[data-design="new"] .pm-settings-btn {
  margin-top: 10px;
  width: 26px;
  height: 26px;
  border-radius: 8px;
}

html[data-design="new"] .pm-nickname {
  font-size: 13px;
  margin-top: 8px;
}

html[data-design="new"] .pm-status-option.active,
html[data-design="new"] #pm-status-dropdown .pm-status-option.active {
  background: rgba(31, 191, 154, 0.16) !important;
  border-color: rgba(31, 191, 154, 0.32) !important;
  color: #9fe8d4 !important;
}

html[data-design="new"] .channel-music-tag,
html[data-design="new"] .pill .meta .info > .channel-music-tag {
  display: flex !important;
  color: rgba(159, 232, 212, 0.85);
}

html[data-design="new"] .channel-music-note {
  background: rgba(31, 191, 154, 0.16);
  color: var(--accent2);
}

html[data-design="new"] .channel-music-tag.playing {
  color: #9fe8d4;
}

html[data-design="new"] .channel-music-tag.idle .channel-music-title,
html[data-design="new"] .channel-music-title {
  display: block !important;
  color: inherit;
}

/* ── Content / chat ── */
html[data-design="new"] .content {
  background:
    radial-gradient(900px 420px at 80% -10%, rgba(31, 191, 154, 0.05), transparent 55%),
    linear-gradient(180deg, #0b0f14 0%, #0a0d12 100%);
}

/* Topbar collapsed — actions moved into sidebar */
html[data-design="new"] .topbar {
  display: none !important;
  height: 0 !important;
  min-height: 0 !important;
  padding: 0 !important;
  border: none !important;
  overflow: hidden;
}

html[data-design="new"] .topbar-download-btn {
  background: linear-gradient(135deg, #25c9a3, #178f7a);
  border-radius: 10px;
  color: #04120e;
  font-weight: 700;
}

html[data-design="new"] .content {
  min-width: 0;
}

html[data-design="new"] .content-body {
  gap: 0;
  padding: 0;
}

html[data-design="new"] .members-panel {
  width: 280px;
  min-width: 280px;
  max-width: 320px;
  margin: 0;
  border-radius: 0;
  border: none;
  border-left: 1px solid rgba(255, 255, 255, 0.06);
}

html[data-design="new"] #chat-panel.panel,
html[data-design="new"] .panel.chat {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
}

html[data-design="new"] .chat-header {
  background: rgba(14, 18, 24, 0.72);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  padding: 12px 16px;
}

html[data-design="new"] #chat-title {
  font-family: var(--font-brand);
  font-weight: 700;
  letter-spacing: -0.02em;
}

html[data-design="new"] .chat-avatar {
  border-radius: 12px;
}

html[data-design="new"] .chat-header-btn {
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

html[data-design="new"] .chat-header-btn:hover {
  background: rgba(255, 255, 255, 0.06);
  transform: translateY(-1px);
}

html[data-design="new"] .chat-header-btn.call {
  background: var(--accent-soft);
  border-color: rgba(31, 191, 154, 0.28);
  color: #9fe8d4;
}

html[data-design="new"] .chat-messages {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.01), transparent 40%),
    transparent;
  border: none;
  border-radius: 0;
  padding: 18px 18px 10px;
  gap: 6px;
}

html[data-design="new"] .msg-author {
  color: #9aa3b2;
}

html[data-design="new"] .msg-author img {
  border-radius: 8px;
}

html[data-design="new"] .bubble {
  border-radius: 16px;
  padding: 10px 14px;
}

html[data-design="new"] .bubble.me {
  background: linear-gradient(145deg, #25c9a3 0%, #178f7a 55%, #146c8a 100%);
  color: #04120e;
  border-radius: 16px 16px 6px 16px;
  box-shadow: 0 6px 18px rgba(31, 191, 154, 0.22);
}

html[data-design="new"] .bubble.me .time {
  color: rgba(4, 18, 14, 0.62);
}

html[data-design="new"] .bubble.them {
  background: var(--surface-2);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px 16px 16px 6px;
  color: var(--text);
}

html[data-design="new"] .msg-item.mentioned .bubble {
  box-shadow: inset 3px 0 0 var(--accent2);
}

html[data-design="new"] .system-message {
  color: rgba(159, 232, 212, 0.55);
}

html[data-design="new"] .chat-input {
  margin: 8px 16px 16px;
  background: rgba(22, 28, 38, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 18px;
  padding: 8px 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  display: flex;
  align-items: flex-end;
  gap: 8px;
}

html[data-design="new"] .composer-tools {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 0 0 auto;
}

html[data-design="new"] .composer-tools-left {
  order: 1;
}

html[data-design="new"] .composer-tools-left #btn-attach { order: 1; }
html[data-design="new"] .composer-tools-left #btn-format-text { order: 2; }
html[data-design="new"] .composer-tools-left #btn-voice-record { order: 3; }
html[data-design="new"] .composer-tools-left #btn-video-circle { order: 4; }

html[data-design="new"] .chat-input #message-input,
html[data-design="new"] .chat-input textarea {
  order: 2;
  flex: 1;
  min-width: 0;
  padding-right: 8px;
}

html[data-design="new"] .chat-input .char-count {
  order: 3;
  position: static;
  align-self: center;
  margin: 0 2px;
  opacity: 0.55;
}

html[data-design="new"] .composer-tools-right {
  order: 4;
}

html[data-design="new"] .composer-tools-right #btn-emoji { order: 1; }
html[data-design="new"] .composer-tools-right #btn-send { order: 2; }

html[data-design="new"] .chat-header {
  min-height: 64px;
  padding: 14px 18px;
}

html[data-design="new"] .chat-input:focus-within {
  border-color: rgba(31, 191, 154, 0.4);
  box-shadow: 0 0 0 3px rgba(31, 191, 154, 0.1), 0 8px 24px rgba(0, 0, 0, 0.25);
}

html[data-design="new"] #message-input {
  background: transparent;
  border: none;
  box-shadow: none;
  font-family: var(--font-ui);
}

html[data-design="new"] #message-input:focus {
  border: none;
  box-shadow: none;
}

html[data-design="new"] #message-input::placeholder {
  color: #5c6575;
}

html[data-design="new"] .chat-input .icon-btn {
  border-radius: 10px;
  color: #9aa3b2;
}

html[data-design="new"] .chat-input .icon-btn:hover {
  background: rgba(31, 191, 154, 0.12);
  color: #c9f5e8;
}

html[data-design="new"] #btn-send {
  background: linear-gradient(135deg, #25c9a3, #178f7a);
  color: #04120e;
  border-radius: 12px;
}

html[data-design="new"] #btn-send:hover {
  filter: brightness(1.08);
  opacity: 1;
}

/* ── Members / call ── */
html[data-design="new"] .members-panel {
  background: rgba(12, 16, 22, 0.96);
  backdrop-filter: blur(14px);
}

html[data-design="new"] .members-title {
  font-family: var(--font-brand);
  letter-spacing: -0.02em;
}

html[data-design="new"] .call-panel {
  background: linear-gradient(180deg, rgba(14, 20, 28, 0.95), rgba(10, 13, 18, 0.98));
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  margin: 10px 14px 0;
}

html[data-design="new"] .call-btn.accept {
  background: linear-gradient(135deg, #25c9a3, #178f7a);
}

html[data-design="new"] .incoming-call-popup {
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(12, 16, 22, 0.92);
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow-lg);
}

/* ── Forms / modals / buttons ── */
html[data-design="new"] input,
html[data-design="new"] textarea,
html[data-design="new"] select {
  background: var(--surface-2);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  font-family: var(--font-ui);
}

html[data-design="new"] input:focus,
html[data-design="new"] textarea:focus,
html[data-design="new"] select:focus {
  outline: none;
  border-color: rgba(31, 191, 154, 0.45);
  box-shadow: 0 0 0 3px rgba(31, 191, 154, 0.1);
}

html[data-design="new"] button {
  font-family: var(--font-ui);
  border-radius: 10px;
}

html[data-design="new"] .auth-btn {
  background: linear-gradient(135deg, #25c9a3, #178f7a);
  color: #04120e;
  font-weight: 600;
  border: none;
}

html[data-design="new"] .chip-row > button {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-weight: 600;
}

html[data-design="new"] .chip-row > button:hover {
  background: rgba(31, 191, 154, 0.14);
  border-color: rgba(31, 191, 154, 0.28);
  opacity: 1;
}

html[data-design="new"] .modal-actions button {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-weight: 600;
}

html[data-design="new"] .modal-actions button:last-child:not(#admin-close) {
  background: linear-gradient(135deg, #25c9a3, #178f7a);
  color: #04120e;
  border: none;
}

html[data-design="new"] #admin-close {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

html[data-design="new"] button.ctx-danger,
html[data-design="new"] #admin-delete-user,
html[data-design="new"] #admin-delete-user-media,
html[data-design="new"] #admin-ban-user,
html[data-design="new"] #admin-ban-ip {
  background: rgba(232, 93, 93, 0.12) !important;
  border-color: rgba(232, 93, 93, 0.28) !important;
  color: #ffb4b4 !important;
}

html[data-design="new"] .modal-card {
  background: #121821;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  box-shadow: var(--shadow-lg);
}

html[data-design="new"] .modal-card h3 {
  font-family: var(--font-brand);
  letter-spacing: -0.02em;
}

html[data-design="new"] .admin-design-section {
  background: linear-gradient(145deg, rgba(31, 191, 154, 0.08), rgba(20, 108, 138, 0.06));
  border-color: rgba(31, 191, 154, 0.2);
}

html[data-design="new"] .admin-design-btn {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}

html[data-design="new"] .admin-design-btn.active {
  background: linear-gradient(135deg, #25c9a3, #178f7a);
  color: #04120e;
}

html[data-design="new"] .admin-design-badge {
  background: rgba(31, 191, 154, 0.16);
  color: #9fe8d4;
}

html[data-design="new"] .tab.active {
  background: var(--accent-soft);
  color: #c9f5e8;
}

html[data-design="new"] .link-btn {
  background: transparent;
  color: var(--accent2);
}

html[data-design="new"] a {
  color: var(--accent2);
}

/* ── Server header / channels ── */
html[data-design="new"] .server-header-card {
  border-radius: 14px;
  overflow: hidden;
  margin: 8px 10px 4px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

html[data-design="new"] .server-header-name {
  font-family: var(--font-brand);
  letter-spacing: -0.02em;
}

html[data-design="new"] .channel-item,
html[data-design="new"] .server-channel {
  border-radius: 10px;
}

/* ── Settings ── */
html[data-design="new"] .app-settings-card {
  border-radius: 20px;
}

html[data-design="new"] .settings-tab.active,
html[data-design="new"] .app-settings-tab.active {
  background: var(--accent-soft);
  color: #c9f5e8;
}

/* ── Loading splash ── */
html[data-design="new"] .app-loading-splash {
  background:
    radial-gradient(700px 400px at 50% 30%, rgba(31, 191, 154, 0.12), transparent 60%),
    #07090d;
}

html[data-design="new"] .loading-logo {
  animation: voisio-fade-up 0.5s ease both;
}

/* ── Context menus / emoji / reply ── */
html[data-design="new"] .message-context-menu,
html[data-design="new"] .emoji-panel,
html[data-design="new"] .mention-picker {
  background: #121821;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  box-shadow: var(--shadow-md);
}

html[data-design="new"] .reply-preview {
  margin: 0 14px;
  border-radius: 12px;
  background: rgba(31, 191, 154, 0.08);
  border: 1px solid rgba(31, 191, 154, 0.18);
}

/* ── Status dots keep semantics ── */
html[data-design="new"] .status-dot.online,
html[data-design="new"] .pm-pill-dot.online {
  background: #2ecc71;
}

html[data-design="new"] .status-dot.away,
html[data-design="new"] .pm-pill-dot.away {
  background: #e6b84d;
}

html[data-design="new"] .status-dot.dnd,
html[data-design="new"] .pm-pill-dot.dnd {
  background: #e85d5d;
}

html[data-design="new"] .status-dot.mobile::after,
html[data-design="new"] .status-dot.mobile::before {
  filter: none;
}

/* ── Animations ── */
@keyframes voisio-auth-in {
  from { opacity: 0; transform: translateY(28px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes voisio-fade-up {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes voisio-brand-pulse {
  0%, 100% { transform: translateY(0); box-shadow: 0 12px 28px rgba(31, 191, 154, 0.28); }
  50% { transform: translateY(-2px); box-shadow: 0 16px 34px rgba(31, 191, 154, 0.38); }
}

@keyframes voisio-grid-drift {
  from { background-position: 0 0, 0 0; }
  to { background-position: 0 48px, 48px 0; }
}

html[data-design="new"]:not([data-mobile="1"]) #main > * {
  animation: voisio-fade-up 0.35s ease both;
}

html[data-design="new"] .nav-sidebar { animation-delay: 0.02s; }
html[data-design="new"] .sidebar { animation-delay: 0.06s; }
html[data-design="new"] .content { animation-delay: 0.1s; }

/* ── Mobile ── */
@media (max-width: 1100px) {
  html[data-design="new"] #main {
    grid-template-columns: 76px 300px minmax(0, 1fr);
  }

  html[data-design="new"] .members-panel {
    width: 240px;
    min-width: 240px;
  }
}

@media (max-width: 760px) {
  html[data-design="new"] #main {
    grid-template-columns: 1fr;
  }

  html[data-design="new"] .nav-sidebar {
    flex-direction: row;
    width: 100%;
    height: 64px;
    padding: 8px 10px;
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  }

  html[data-design="new"] .nav-bottom {
    flex-direction: row;
    overflow-x: auto;
  }

  html[data-design="new"] .server-list {
    flex-direction: row;
    max-height: none;
  }

  html[data-design="new"] #auth-panel {
    padding: 32px 22px 28px;
    border-radius: 20px;
  }

  html[data-design="new"] #auth-panel .logo-text,
  html[data-design="new"] .brand-text {
    font-size: 28px;
  }

  html[data-design="new"] .chat-input {
    margin: 6px 8px 10px;
    border-radius: 14px;
  }

  html[data-design="new"] .chat-messages {
    padding: 12px 10px 8px;
  }

  html[data-design="new"]:not([data-mobile="1"]) .composer-tools-left .icon-btn:nth-child(n+3) {
    display: none;
  }
}

/* ── Server create modal (New) ── */
html[data-design="new"] .server-create-card {
  width: min(460px, 94vw);
  border-radius: 22px;
  background:
    radial-gradient(700px 240px at 50% 0%, rgba(31, 191, 154, 0.16), transparent 60%),
    linear-gradient(170deg, #121821 0%, #0d1218 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow-lg);
}

html[data-design="new"] .server-create-header {
  padding: 36px 48px 0;
}

html[data-design="new"] .server-create-header::before {
  height: 110px;
  background: linear-gradient(135deg, rgba(31, 191, 154, 0.18), rgba(20, 108, 138, 0.12));
  border-radius: 22px 22px 0 0;
}

html[data-design="new"] .server-create-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 10px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: rgba(31, 191, 154, 0.12);
  border: 1px solid rgba(31, 191, 154, 0.28);
  color: #9fe8d4;
  font-size: 0;
  animation: none;
}

html[data-design="new"] .server-create-header h3 {
  font-family: var(--font-brand);
  letter-spacing: -0.02em;
  font-size: 24px;
}

html[data-design="new"] .server-create-header p {
  max-width: 34ch;
  margin: 0 auto;
  color: rgba(238, 241, 244, 0.62);
}

html[data-design="new"] .server-create-avatar-circle {
  width: 88px;
  height: 88px;
  border-radius: 22px;
  border: 2px dashed rgba(31, 191, 154, 0.45);
  background: rgba(31, 191, 154, 0.06);
  color: #9fe8d4;
}

html[data-design="new"] .server-create-avatar-circle:hover {
  border-color: var(--accent);
  background: rgba(31, 191, 154, 0.12);
}

html[data-design="new"] .server-create-avatar-circle img {
  border-radius: 20px;
}

html[data-design="new"] .server-create-card > input,
html[data-design="new"] .server-create-fields input {
  background: rgba(255, 255, 255, 0.035);
  border-radius: 12px;
  border-color: rgba(255, 255, 255, 0.08);
}

html[data-design="new"] .server-create-card > input:focus,
html[data-design="new"] .server-create-fields input:focus {
  border-color: rgba(31, 191, 154, 0.5);
  box-shadow: 0 0 0 3px rgba(31, 191, 154, 0.1);
}

html[data-design="new"] .server-create-btn.primary {
  background: linear-gradient(135deg, #25c9a3, #178f7a) !important;
  color: #04120e !important;
  box-shadow: 0 10px 24px rgba(31, 191, 154, 0.28) !important;
}

html[data-design="new"] .server-create-btn.primary:hover {
  background: linear-gradient(135deg, #2dd4bf, #1aa888) !important;
  box-shadow: 0 12px 28px rgba(31, 191, 154, 0.35) !important;
}

html[data-design="new"] .server-create-btn.secondary {
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
}

html[data-design="new"] .server-create-close {
  position: absolute !important;
  top: 14px !important;
  right: 14px !important;
  bottom: auto !important;
  left: auto !important;
  z-index: 30;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--muted);
}

/* ── Server settings modal (New) ── */
html[data-design="new"] .server-settings-card {
  border-radius: 22px;
  background:
    radial-gradient(900px 280px at 0% 0%, rgba(31, 191, 154, 0.1), transparent 55%),
    linear-gradient(170deg, #121821 0%, #0d1218 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow-lg);
}

html[data-design="new"] .server-settings-layout {
  grid-template-columns: 230px minmax(0, 1fr);
}

html[data-design="new"] .server-settings-sidebar {
  padding: 22px 14px;
  gap: 6px;
  background: rgba(0, 0, 0, 0.22);
  border-right-color: rgba(255, 255, 255, 0.06);
  border-radius: 22px 0 0 22px;
}

html[data-design="new"] .server-settings-sidebar-title {
  display: block;
  margin: 0 8px 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(159, 232, 212, 0.5);
}

html[data-design="new"] .server-settings-sidebar .settings-tab-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: 12px;
  padding: 11px 12px;
  color: #9aa3b2;
}

html[data-design="new"] .ss-tab-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  color: inherit;
  flex-shrink: 0;
}

html[data-design="new"] .server-settings-sidebar .settings-tab-btn.active {
  background: var(--accent-soft);
  color: #c9f5e8;
}

html[data-design="new"] .server-settings-sidebar .settings-tab-btn.active .ss-tab-ico {
  background: rgba(31, 191, 154, 0.18);
  color: #9fe8d4;
}

html[data-design="new"] .server-settings-content {
  padding: 28px 30px;
}

html[data-design="new"] .server-settings-content h3 {
  font-family: var(--font-brand);
  letter-spacing: -0.02em;
}

html[data-design="new"] .server-settings-content input[type="text"],
html[data-design="new"] .server-settings-content input:not([type]) {
  background: rgba(255, 255, 255, 0.035);
  border-radius: 12px;
  border-color: rgba(255, 255, 255, 0.08);
}

html[data-design="new"] .server-settings-content input:focus {
  border-color: rgba(31, 191, 154, 0.5);
  box-shadow: 0 0 0 3px rgba(31, 191, 154, 0.1);
}

html[data-design="new"] .server-settings-content button:not(.app-settings-close):not(.settings-tab-btn) {
  border-radius: 10px;
}

html[data-design="new"] .server-settings-content .modal-actions button:last-child {
  background: linear-gradient(135deg, #25c9a3, #178f7a);
  color: #04120e;
  border: none;
}

/* ── Channel create/edit modal (New) ── */
html[data-design="new"] .channel-editor-card {
  width: min(860px, 94vw);
  min-width: 0;
  border-radius: 22px;
  background:
    radial-gradient(900px 260px at 0% 0%, rgba(31, 191, 154, 0.1), transparent 55%),
    linear-gradient(170deg, #121821 0%, #0d1218 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow-lg);
}

html[data-design="new"] .channel-editor-header {
  padding: 20px 56px 16px 22px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

html[data-design="new"] .channel-editor-header::before {
  height: 100%;
  background: linear-gradient(135deg, rgba(31, 191, 154, 0.14), rgba(20, 108, 138, 0.08));
  border-radius: 22px 22px 0 0;
}

html[data-design="new"] .channel-editor-header-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: rgba(31, 191, 154, 0.12);
  border: 1px solid rgba(31, 191, 154, 0.28);
  color: #9fe8d4;
  font-size: 0;
}

html[data-design="new"] .channel-editor-header h3 {
  font-family: var(--font-brand);
  letter-spacing: -0.02em;
  font-size: 22px;
}

html[data-design="new"] .channel-editor-close {
  position: absolute;
  top: 16px;
  right: 16px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--muted);
}

html[data-design="new"] .ch-editor-layout {
  grid-template-columns: 210px minmax(0, 1fr);
  min-height: 480px;
}

html[data-design="new"] .ch-editor-sidebar {
  padding: 18px 12px;
  gap: 6px;
  background: rgba(0, 0, 0, 0.22);
  border-right-color: rgba(255, 255, 255, 0.06);
  border-radius: 0 0 0 22px;
}

html[data-design="new"] .ch-editor-sidebar-title {
  color: rgba(159, 232, 212, 0.5);
}

html[data-design="new"] .ch-editor-tab {
  border-radius: 12px;
  padding: 11px 12px;
  color: #9aa3b2;
}

html[data-design="new"] .ch-editor-tab-ico {
  background: rgba(255, 255, 255, 0.04);
}

html[data-design="new"] .ch-editor-tab.active {
  background: var(--accent-soft);
  color: #c9f5e8;
}

html[data-design="new"] .ch-editor-tab.active .ch-editor-tab-ico {
  background: rgba(31, 191, 154, 0.18);
  color: #9fe8d4;
}

html[data-design="new"] .ch-editor-content {
  padding: 22px 26px;
}

html[data-design="new"] .channel-editor-label {
  color: rgba(159, 232, 212, 0.62);
  letter-spacing: 0.08em;
}

html[data-design="new"] .channel-editor-type-btn {
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.07);
}

html[data-design="new"] .channel-editor-type-btn:hover {
  background: rgba(31, 191, 154, 0.08);
  border-color: rgba(31, 191, 154, 0.28);
}

html[data-design="new"] .channel-editor-type-btn.active {
  background: rgba(31, 191, 154, 0.12);
  border-color: rgba(31, 191, 154, 0.5);
  box-shadow: 0 0 14px rgba(31, 191, 154, 0.12);
}

html[data-design="new"] .channel-editor-type-icon {
  background: rgba(31, 191, 154, 0.1);
  color: #9fe8d4;
}

html[data-design="new"] .channel-editor-type-btn.active .channel-editor-type-icon {
  background: rgba(31, 191, 154, 0.2);
}

html[data-design="new"] .channel-editor-emoji-btn {
  border-color: rgba(31, 191, 154, 0.4);
  border-radius: 12px;
}

html[data-design="new"] .channel-editor-emoji-btn:hover {
  border-color: var(--accent);
  background: rgba(31, 191, 154, 0.1);
}

html[data-design="new"] .channel-editor-name-wrap input,
html[data-design="new"] #channel-editor-name {
  background: rgba(255, 255, 255, 0.035);
  border-radius: 12px;
  border-color: rgba(255, 255, 255, 0.08);
}

html[data-design="new"] .channel-editor-name-wrap input:focus,
html[data-design="new"] #channel-editor-name:focus {
  border-color: rgba(31, 191, 154, 0.5);
  box-shadow: 0 0 0 3px rgba(31, 191, 154, 0.1);
}

html[data-design="new"] .ch-color-item.ch-color-active {
  border-color: rgba(31, 191, 154, 0.5);
  background: rgba(31, 191, 154, 0.1);
}

html[data-design="new"] .ch-font-btn.active {
  border-color: rgba(31, 191, 154, 0.55);
  background: rgba(31, 191, 154, 0.12);
}

html[data-design="new"] .ch-voice-limit-display {
  color: #9fe8d4;
}

html[data-design="new"] .channel-sync-category-btn {
  border-color: rgba(31, 191, 154, 0.25);
  background: rgba(31, 191, 154, 0.1);
  color: #9fe8d4;
}

html[data-design="new"] .channel-sync-category-btn:hover {
  background: rgba(31, 191, 154, 0.18);
}

html[data-design="new"] .channel-editor-actions {
  padding: 16px 24px 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

html[data-design="new"] .channel-editor-save-btn {
  background: linear-gradient(135deg, #25c9a3, #178f7a) !important;
  color: #04120e !important;
  box-shadow: 0 10px 24px rgba(31, 191, 154, 0.28) !important;
  border-radius: 12px;
}

html[data-design="new"] .channel-editor-save-btn:hover {
  background: linear-gradient(135deg, #2dd4bf, #1aa888) !important;
  box-shadow: 0 12px 28px rgba(31, 191, 154, 0.35) !important;
}

html[data-design="new"] #server-join-modal .modal-card {
  border-radius: 22px;
}

html[data-design="new"] #server-join-modal h3 {
  font-family: var(--font-brand);
}

/* Prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
  html[data-design="new"] *,
  html[data-design="new"] *::before,
  html[data-design="new"] *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
