@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap");

:root {
  --bg: #0b1020;
  --bg-2: #0d1224;
  --panel: #0f152b;
  --panel-2: #121a33;
  --text: #e8ecff;
  --muted: #9ba3c0;
  --accent: #f6c344;
  --accent-2: #6aa5ff;
  --danger: #ff6b6b;
  --border: rgba(255, 255, 255, 0.08);
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.4);
  --taskbar-height: 72px;
  --app-max-width: 1600px;
  --app-padding: 16px;
  --server-sidebar-width: 72px;
  --channel-sidebar-width: 260px;
  --member-sidebar-width: 240px;
  --dm-sidebar-width: 260px;
  --dm-member-width: 240px;
  font-family: "Inter", "Segoe UI", "Segoe UI Emoji", "Apple Color Emoji", "Noto Color Emoji", "Segoe UI Symbol", sans-serif;
  line-height: 1.5;
  font-weight: 400;
  color: var(--text);
  background-color: var(--bg);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

* {
  box-sizing: border-box;
  scrollbar-width: thin;
  scrollbar-color: rgba(246, 195, 68, 0.75) rgba(15, 21, 43, 0.35);
}

*::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

*::-webkit-scrollbar-track {
  background: rgba(15, 21, 43, 0.35);
  border-radius: 999px;
}

*::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(246, 195, 68, 0.75), rgba(106, 165, 255, 0.7));
  border-radius: 999px;
  border: 2px solid rgba(15, 21, 43, 0.35);
}

*::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(246, 195, 68, 0.95), rgba(106, 165, 255, 0.9));
}

html,
body,
#root {
  height: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at 20% 20%, rgba(96, 139, 255, 0.3), transparent 35%),
    radial-gradient(circle at 80% 12%, rgba(246, 195, 68, 0.25), transparent 30%),
    linear-gradient(160deg, #0b0f1e 0%, #0c1024 40%, #0b0f1e 100%);
  color: var(--text);
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  border: none;
  border-radius: 10px;
  padding: 10px 14px;
  background: var(--accent);
  color: #0b0c11;
  font-weight: 700;
  cursor: pointer;
  transition: transform 120ms ease, box-shadow 120ms ease, opacity 120ms ease;
  box-shadow: 0 10px 30px rgba(246, 195, 68, 0.35);
}

button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  box-shadow: none;
}

button:hover:enabled {
  transform: translateY(-1px);
}

input,
textarea {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  color: var(--text);
  width: 100%;
  font-family: inherit;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-weight: 700;
}

.page-shell {
  padding: var(--app-padding);
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.card,
.panel,
.panel-soft {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px;
  box-shadow: var(--shadow);
}

.panel-soft {
  background: var(--panel-2);
}

.muted {
  color: var(--muted);
}

.btn-ghost {
  background: var(--panel);
  color: var(--text);
  border: 1px solid var(--border);
  box-shadow: none;
}

.btn-danger {
  background: #201216;
  color: var(--danger);
  border: 1px solid rgba(255, 107, 107, 0.55);
  box-shadow: none;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--panel-2);
  border: 1px solid var(--border);
  font-size: 13px;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  border-radius: 8px;
  background: rgba(92, 240, 211, 0.08);
  color: var(--accent);
  font-weight: 600;
  font-size: 12px;
}

.grid {
  display: grid;
  gap: 14px;
}

.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.input-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.input-row > input {
  flex: 1;
  min-width: 240px;
}

.server-sidebar {
  width: var(--server-sidebar-width);
  height: 100%;
  min-height: 0;
  padding: 12px 8px;
  padding-bottom: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  border-right: 1px solid var(--border);
  background: rgba(10, 14, 28, 0.92);
}

.server-item {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 120ms ease, background 120ms ease;
}

.server-item.active {
  background: rgba(255, 255, 255, 0.08);
}

.server-item:hover {
  transform: translateY(-1px);
}

.channel-sidebar {
  width: var(--channel-sidebar-width);
  height: 100%;
  min-height: 0;
  padding: 14px;
  padding-bottom: 12px;
  border-right: 1px solid var(--border);
  background: var(--panel);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.channel-header {
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.channel-header h2 {
  font-size: 16px;
}

.channel-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.channel-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--text);
  background: transparent;
  border: 1px solid transparent;
  transition: background 120ms ease, border 120ms ease;
  cursor: pointer;
}

.channel-item.active {
  background: var(--panel-2);
  border: 1px solid var(--border);
}

.channel-icon {
  color: var(--muted);
}

.member-sidebar {
  width: var(--member-sidebar-width);
  height: 100%;
  min-height: 0;
  padding: 14px;
  padding-bottom: 12px;
  border-left: 1px solid var(--border);
  background: var(--panel);
  display: flex;
  flex-direction: column;
  gap: 12px;
  border-radius: 18px;
  overflow: hidden;
}

.member-header h3 {
  font-weight: 700;
}

.member-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding-right: 4px;
}

.member-section {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.member-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  background: var(--panel-2);
  border: 1px solid var(--border);
}

.member-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  color: white;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
  position: relative;
}

.member-status {
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid var(--panel-2);
}

.member-status.online {
  background: #22c55e;
}

.member-status.idle {
  background: #f59e0b;
}

.member-status.dnd {
  background: #ef4444;
}

.member-status.offline {
  background: #6b7280;
}

.taskbar {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  height: var(--taskbar-height);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: rgba(15, 21, 43, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(12px);
  z-index: 1000;
}

.taskbar-left {
  display: flex;
  gap: 10px;
  align-items: center;
}

.taskbar-center {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
}

.taskbar-call {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  border-radius: 14px;
  background: rgba(8, 12, 26, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.1);
  width: clamp(320px, 48vw, 620px);
  min-width: 320px;
}

.taskbar-call-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 2px;
}

.taskbar-call-title {
  font-weight: 700;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.taskbar-call-subtitle {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.taskbar-call-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  flex-shrink: 0;
}

.taskbar-call-actions button {
  width: 36px;
  height: 36px;
  padding: 0;
  display: grid;
  place-items: center;
  border-radius: 12px;
  box-shadow: none;
}

.taskbar-call-actions .is-on {
  background: rgba(106, 165, 255, 0.2);
  border: 1px solid rgba(106, 165, 255, 0.45);
  color: #e9f0ff;
}

.taskbar-call-actions .is-off {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: var(--muted);
}

.taskbar-call-slider {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--muted);
  width: 170px;
}

.taskbar-call-slider span {
  width: 44px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.taskbar-call-slider input {
  width: 100px;
}

.taskbar-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid transparent;
  transition: transform 120ms ease, border 120ms ease, color 120ms ease;
}

.taskbar-icon:hover {
  transform: translateY(-1px);
  color: var(--text);
}

.taskbar-icon.active {
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.08);
}

.taskbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.taskbar-notifications {
  position: relative;
}

.notification-button {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: none;
  padding: 0;
  position: relative;
}

.notification-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  display: grid;
  place-items: center;
  padding: 0 5px;
  border: 2px solid rgba(15, 21, 43, 0.95);
}

.notification-menu {
  position: absolute;
  right: 0;
  bottom: calc(100% + 12px);
  width: 320px;
  max-height: 420px;
  background: rgba(15, 21, 43, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(12px);
  z-index: 5;
}

.notification-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 700;
}

.notification-clear {
  background: transparent;
  color: var(--muted);
  border: 1px solid transparent;
  box-shadow: none;
  padding: 4px 8px;
  font-size: 12px;
}

.notification-clear:hover {
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.notification-list {
  display: grid;
  gap: 8px;
  overflow-y: auto;
  max-height: 320px;
  padding-right: 2px;
}

.notification-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text);
  text-align: left;
  box-shadow: none;
  cursor: pointer;
}

.notification-item.read {
  opacity: 0.7;
}

.notification-avatar {
  width: 32px;
  height: 32px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #0b0c11;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 13px;
}

.notification-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.notification-title {
  font-weight: 700;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.notification-text {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.notification-actions {
  display: flex;
  gap: 6px;
}

.notification-action {
  width: 28px;
  height: 28px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid transparent;
  display: grid;
  place-items: center;
  color: var(--text);
  box-shadow: none;
  padding: 0;
}

.notification-action.accept {
  color: #22c55e;
  border-color: rgba(34, 197, 94, 0.4);
}

.notification-action.reject {
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.4);
}

.notification-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ef4444;
}

.notification-empty {
  text-align: center;
  color: var(--muted);
  padding: 10px 0 6px;
  font-size: 13px;
}

.toast-stack {
  position: fixed;
  right: 24px;
  bottom: calc(var(--taskbar-height) + 32px);
  display: grid;
  gap: 10px;
  z-index: 1200;
}

.toast-item {
  width: 320px;
  padding: 10px;
  border-radius: 14px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: center;
  background: rgba(15, 21, 43, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.4);
  color: var(--text);
  text-align: left;
  backdrop-filter: blur(12px);
}

.toast-avatar {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #0b0c11;
  display: grid;
  place-items: center;
  font-weight: 800;
}

.toast-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.toast-title {
  font-weight: 700;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.toast-text {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.message-bubble {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.message-bubble img {
  max-width: 220px;
  border-radius: 10px;
  margin-top: 8px;
}

.attachments-list {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.attachment-item {
  text-decoration: none;
  color: inherit;
}

.attachment-image {
  width: 100%;
  max-width: 260px;
  border-radius: 10px;
  border: 1px solid var(--border);
}

.attachment-file {
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.05);
}

.attachment-name {
  font-weight: 700;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.attachment-meta {
  font-size: 11px;
  color: var(--muted);
}

.pending-attachments {
  padding: 0 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pending-attachment {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  font-size: 12px;
}

.pending-attachment button {
  background: transparent;
  color: var(--text);
  border: none;
  padding: 0;
  box-shadow: none;
}

.picker-panel {
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(15, 21, 43, 0.9);
  padding: 10px;
}

.emoji-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(32px, 1fr));
  gap: 6px;
}

.emoji-grid button {
  background: transparent;
  box-shadow: none;
  padding: 6px;
  border-radius: 8px;
  font-family: "Segoe UI Emoji", "Apple Color Emoji", "Noto Color Emoji", "Segoe UI Symbol", sans-serif;
}

.sticker-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sticker-grid button {
  background: transparent;
  box-shadow: none;
  padding: 6px;
  border-radius: 10px;
  border: 1px solid var(--border);
}

.sticker-grid img {
  width: 100%;
  height: 56px;
  -o-object-fit: contain;
     object-fit: contain;
}

.sticker-preview {
  width: 140px;
  height: 140px;
  -o-object-fit: contain;
     object-fit: contain;
  border-radius: 12px;
  border: 1px solid var(--border);
  margin-top: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.taskbar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  position: relative;
  overflow: visible;
  width: 280px;
}

.taskbar-avatar {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #0b0c11;
  display: grid;
  place-items: center;
  font-weight: 800;
  position: relative;
  overflow: visible;
  z-index: 2;
}

.taskbar-status-button {
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid rgba(15, 21, 43, 0.95);
  background: rgba(15, 21, 43, 0.95);
  padding: 0;
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: none;
  z-index: 5;
}

.taskbar-status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.taskbar-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}

.taskbar-name {
  font-weight: 700;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.taskbar-status-text {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.taskbar-power {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: rgba(255, 107, 107, 0.12);
  color: #ff6b6b;
  border: 1px solid rgba(255, 107, 107, 0.35);
  display: grid;
  place-items: center;
  box-shadow: none;
  padding: 0;
}

.taskbar-power:hover {
  transform: translateY(-1px);
}

.taskbar-status-menu {
  position: absolute;
  right: 0;
  bottom: calc(100% + 12px);
  background: rgba(15, 21, 43, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 8px;
  display: grid;
  gap: 6px;
  min-width: 180px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(10px);
  z-index: 3;
}

.taskbar-status-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 10px;
  background: transparent;
  color: var(--text);
  border: 1px solid transparent;
  font-weight: 600;
  cursor: pointer;
  box-shadow: none;
}

.taskbar-status-item:hover {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.news-scroll {
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.25) rgba(15, 21, 43, 0.2);
}

.news-scroll::-webkit-scrollbar {
  width: 8px;
}

.news-scroll::-webkit-scrollbar-track {
  background: rgba(15, 21, 43, 0.35);
  border-radius: 999px;
}

.news-scroll::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(246, 195, 68, 0.7), rgba(106, 165, 255, 0.6));
  border-radius: 999px;
  border: 2px solid rgba(15, 21, 43, 0.3);
}

.news-scroll::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(246, 195, 68, 0.9), rgba(106, 165, 255, 0.85));
}

.action-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  min-width: 180px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text);
  font-weight: 700;
  box-shadow: none;
  transition: transform 120ms ease, border 120ms ease, background 120ms ease;
}

.action-button:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.app-logo {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  -o-object-fit: contain;
     object-fit: contain;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 4px;
  display: block;
}

.app-logo.small {
  width: 34px;
  height: 34px;
  border-radius: 10px;
}

.app-logo.tiny {
  width: 24px;
  height: 24px;
  border-radius: 8px;
  padding: 3px;
}

.taskbar-logo {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0;
}

.taskbar-logo img {
  width: 28px;
  height: 28px;
  -o-object-fit: contain;
     object-fit: contain;
}

.message-meta {
  margin-top: 6px;
  font-size: 12px;
  color: var(--meta-color, var(--muted));
  opacity: 0.9;
}

.message-checks {
  display: inline-flex;
  align-items: center;
  font-size: 12px;
  line-height: 1;
}

.message-checks span + span {
  margin-left: -4px;
}

.message-edit {
  display: flex;
  gap: 8px;
  align-items: center;
}

.message-deleted {
  margin-top: 4px;
  color: var(--meta-color, rgba(232, 236, 255, 0.82));
  font-weight: 700;
  opacity: 0.9;
}

.news-body {
  white-space: pre-line;
}

.server-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(5, minmax(220px, 1fr));
}

.friends-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  flex: 1;
  min-height: 0;
}

.friends-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 0;
}

.friends-section-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 0;
  overflow-y: auto;
  padding-right: 4px;
}

.scroll-to-bottom {
  position: absolute;
  right: 16px;
  bottom: 88px;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: rgba(15, 21, 43, 0.9);
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
  display: grid;
  place-items: center;
  cursor: pointer;
  padding: 0;
}

.scroll-to-bottom:hover {
  transform: translateY(-1px);
}

.scroll-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  display: grid;
  place-items: center;
  padding: 0 5px;
  border: 2px solid rgba(15, 21, 43, 0.95);
}

.message-edit input {
  flex: 1;
}

.context-menu {
  position: fixed;
  z-index: 50;
  min-width: 180px;
  background: rgba(15, 21, 43, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
  display: flex;
  flex-direction: column;
  padding: 6px;
  gap: 4px;
}

.context-menu button {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text);
  font-weight: 600;
  box-shadow: none;
  white-space: nowrap;
}

.context-menu button:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.08);
  transform: none;
}

.image-placeholder {
  width: 100%;
  height: 100%;
  min-height: 56px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px dashed rgba(255, 255, 255, 0.12);
}

.admin-shell {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 16px;
  height: 100%;
  min-height: 0;
}

.admin-sidebar {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
  border-radius: 18px;
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.admin-brand {
  font-size: 18px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 6px;
}

.admin-tab {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text);
  font-weight: 600;
  box-shadow: none;
}

.admin-tab.active {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.18);
}

.admin-tab-icon {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.admin-tab-label {
  flex: 1;
  text-align: left;
}

.admin-badge {
  min-width: 18px;
  height: 18px;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
}

.admin-stats {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  display: grid;
  gap: 8px;
}

@keyframes voicePulse {
  0% {
    box-shadow: 0 0 10px rgba(240, 170, 60, 0.2);
  }
  50% {
    box-shadow: 0 0 20px rgba(240, 170, 60, 0.45);
  }
  100% {
    box-shadow: 0 0 10px rgba(240, 170, 60, 0.2);
  }
}

.admin-stat-label {
  font-size: 12px;
  color: rgba(210, 224, 255, 0.7);
}

.admin-stat-value {
  font-size: 16px;
  font-weight: 700;
}

.admin-content {
  min-height: 0;
}

.admin-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.section-title {
  font-size: 20px;
  font-weight: 800;
}

.section-grid {
  display: grid;
  grid-template-columns: minmax(240px, 0.45fr) minmax(320px, 0.55fr);
  gap: 16px;
}

.admin-block {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.block-title {
  font-weight: 700;
}

.admin-list,
.admin-grid {
  display: grid;
  gap: 10px;
}

.admin-grid {
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
}

.admin-pack-list {
  display: grid;
  gap: 16px;
  max-height: 540px;
  overflow-y: auto;
  padding-right: 6px;
}

.admin-pack {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.admin-pack-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(15, 21, 43, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.admin-pack-title {
  font-weight: 700;
}

.admin-card {
  padding: 12px;
  border-radius: 12px;
  background: rgba(15, 21, 43, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.admin-card img,
.admin-sticker-image {
  width: 56px;
  height: 56px;
  -o-object-fit: contain;
     object-fit: contain;
  align-self: center;
}

.sticker-pack {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sticker-pack-title {
  font-size: 12px;
  font-weight: 700;
  color: rgba(210, 224, 255, 0.7);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.sticker-pack-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(56px, 1fr));
  gap: 8px;
}

.admin-title {
  font-weight: 700;
}

.admin-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.admin-actions select,
.support-actions select {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text);
  border-radius: 10px;
  padding: 8px 10px;
  -webkit-appearance: none;
     -moz-appearance: none;
          appearance: none;
  cursor: pointer;
  box-shadow: none;
}

.sticker-actions {
  flex-direction: column;
  align-items: center;
}

.sticker-actions button {
  width: 100%;
}

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

.support-shell {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 16px;
}

.support-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.support-item {
  text-align: left;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(15, 21, 43, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--text);
  box-shadow: none;
}

.support-item.active {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
}

.support-title {
  font-weight: 700;
}

.support-chat {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 0;
}

.support-messages {
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}

.support-message {
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(15, 21, 43, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.support-author {
  font-weight: 700;
  margin-bottom: 4px;
}

.support-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.support-actions input {
  flex: 1;
}

.support-page {
  display: flex;
  flex-direction: column;
  gap: 16px;
  height: 100%;
  min-height: 0;
}

.support-user-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.support-page-grid {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 16px;
  min-height: 0;
  flex: 1;
  height: 100%;
}

.support-left,
.support-right {
  min-height: 0;
}

.support-page .panel,
.support-page .panel-soft {
  box-shadow: none;
}

.support-left {
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow: hidden;
}

.support-right {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 12px;
}

.support-ticket-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}

.support-block {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
}

.support-thread {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
  flex: 1;
}

.support-thread-messages {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(5, 7, 14, 0.65);
  display: grid;
  place-items: center;
  z-index: 1200;
  padding: 16px;
}

.modal {
  background: rgba(15, 21, 43, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 16px;
  width: 100%;
  max-width: 520px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  color: var(--text);
}

.modal-label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: var(--muted);
  margin: 10px 0;
}

.modal-label select,
.modal-label textarea {
  width: 100%;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 12px;
}

select {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text);
  border-radius: 10px;
  padding: 8px 10px;
}

select:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.2);
}

@media (min-width: 1680px) {
  .page-shell {
    max-width: var(--app-max-width);
    margin: 0 auto;
  }

  .taskbar {
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    width: min(var(--app-max-width), calc(100% - 32px));
  }
}

@media (max-width: 1280px) {
  :root {
    --channel-sidebar-width: 230px;
    --member-sidebar-width: 210px;
    --dm-sidebar-width: 230px;
    --dm-member-width: 210px;
  }

  .server-grid {
    grid-template-columns: repeat(4, minmax(220px, 1fr));
  }
}

@media (max-width: 1024px) {
  :root {
    --app-padding: 12px;
    --taskbar-height: 88px;
  }

  .taskbar-call {
    width: clamp(240px, 50vw, 420px);
    min-width: 240px;
  }

  .server-grid {
    grid-template-columns: repeat(3, minmax(220px, 1fr));
  }
}

@media (max-width: 900px) {
  :root {
    --channel-sidebar-width: 220px;
    --dm-sidebar-width: 220px;
  }

  .server-grid {
    grid-template-columns: repeat(2, minmax(220px, 1fr));
  }

  .member-sidebar {
    display: none;
  }

  .page-shell.guild-shell {
    grid-template-columns: var(--channel-sidebar-width) 1fr !important;
  }

  .guild-grid {
    grid-template-columns: var(--channel-sidebar-width) 1fr !important;
  }

  .page-shell.dm-shell {
    grid-template-columns: var(--dm-sidebar-width) 1fr !important;
  }

  .page-shell.groups-shell {
    grid-template-columns: 1fr !important;
  }

  .home-grid {
    grid-template-columns: 1fr !important;
  }

  .support-page-grid,
  .support-shell,
  .admin-shell {
    grid-template-columns: 1fr !important;
  }

  .notification-menu {
    width: min(90vw, 320px);
  }

  .toast-item {
    width: min(90vw, 320px);
  }
}

@media (max-width: 720px) {
  :root {
    --app-padding: 10px;
    --taskbar-height: 120px;
  }

  body {
    overflow: auto;
  }

  .page-shell {
    overflow: visible !important;
    height: auto !important;
  }

  .page-shell.guild-shell,
  .page-shell.dm-shell,
  .page-shell.groups-shell {
    grid-template-columns: 1fr !important;
  }

  .guild-grid {
    grid-template-columns: 1fr !important;
  }

  .channel-sidebar {
    width: 100%;
    height: auto;
    max-height: 280px;
  }

  .channel-sidebar .channel-list {
    max-height: 200px;
    overflow-y: auto;
  }

  .dm-shell .channel-sidebar {
    max-height: 260px;
  }

  .member-sidebar {
    display: none;
  }

  .server-sidebar {
    display: none;
  }

  .taskbar {
    height: auto;
    padding: 8px 10px;
    gap: 8px;
    flex-wrap: wrap;
  }

  .taskbar-left,
  .taskbar-right,
  .taskbar-center {
    width: 100%;
    justify-content: space-between;
  }

  .taskbar-center {
    order: 3;
  }

  .taskbar-call {
    width: 100%;
    min-width: 0;
  }

  .taskbar-user {
    width: 100%;
    max-width: none;
  }

  .notification-menu {
    width: min(90vw, 340px);
  }

  .toast-stack {
    right: 12px;
    left: 12px;
    bottom: calc(var(--taskbar-height) + 16px);
  }

  .toast-item {
    width: 100%;
  }

  .server-grid {
    grid-template-columns: 1fr;
  }
}

.support-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.toggle input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-track {
  width: 46px;
  height: 26px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  display: inline-flex;
  align-items: center;
  padding: 3px;
  transition: background 160ms ease, border 160ms ease;
}

.toggle-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  transform: translateX(0);
  transition: transform 160ms ease, background 160ms ease;
}

.toggle input:checked + .toggle-track {
  background: rgba(246, 195, 68, 0.45);
  border-color: rgba(246, 195, 68, 0.65);
}

.toggle input:checked + .toggle-track .toggle-thumb {
  transform: translateX(20px);
  background: rgba(246, 195, 68, 0.95);
}

.select-dark {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text, #e9ecf5);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 8px 10px;
  outline: none;
}

.select-dark option {
  background: #0e1122;
  color: #e9ecf5;
}
