@import url('[fonts.googleapis.com](https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap)');

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg:      #070712;
  --card:    rgba(12, 12, 18, 0.94);
  --border:  rgba(167, 139, 250, 0.22);
  --accent:  #a78bfa;
  --accent2: #7c3aed;
  --muted:   #9aa3b2;
  --text:    #f8fafc;
  --danger:  #fb7185;
  --green:   #10b981;
  --red-bg:  rgba(251, 113, 133, 0.08);
}

html, body { height: 100%; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', sans-serif;
  background:
    radial-gradient(1200px 800px at 10% 10%, rgba(124,58,237,.35), transparent 55%),
    radial-gradient(900px 600px at 90% 70%, rgba(167,139,250,.25), transparent 60%),
    var(--bg);
  color: var(--text);
  line-height: 1.5;
  overflow-x: hidden;
  min-height: 100vh;
}

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(167,139,250,.3); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(167,139,250,.55); }

.neural-background {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 0;
  pointer-events: none;
}
.neural-node {
  position: absolute;
  width: 2px; height: 2px;
  background: var(--accent);
  border-radius: 50%;
  animation: neuralPulse 4s ease-in-out infinite;
}
.neural-node:nth-child(1) { top: 20%; left: 15%; animation-delay: 0s; }
.neural-node:nth-child(2) { top: 60%; left: 80%; animation-delay: 1s; }
.neural-node:nth-child(3) { top: 80%; left: 20%; animation-delay: 2s; }
.neural-node:nth-child(4) { top: 30%; left: 70%; animation-delay: 3s; }
.neural-node:nth-child(5) { top: 10%; left: 60%; animation-delay: 4s; }
@keyframes neuralPulse {
  0%, 100% { opacity: 0.3; transform: scale(1); }
  50%       { opacity: 0.85; transform: scale(1.8); }
}

.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  padding: 14px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255,255,255,.06);
  background: rgba(8,8,14,.55);
  backdrop-filter: blur(12px);
  z-index: 100;
  height: 64px;
}
.topbar-brand { display: flex; gap: 10px; align-items: center; }
.topbar-badge {
  width: 36px; height: 36px;
  display: grid; place-items: center;
  border-radius: 12px;
  border: 1px solid rgba(167,139,250,.25);
  background: linear-gradient(135deg, rgba(167,139,250,.18), rgba(124,58,237,.18));
  flex-shrink: 0;
  overflow: hidden;
}
.topbar-badge img {
  width: 22px;
  height: 22px;
  object-fit: contain;
  display: block;
}
.topbar-title  { color: var(--text); font-weight: 800; letter-spacing: -.01em; font-size: 0.9375rem; }
.topbar-sub    { color: rgba(154,163,178,.9); font-size: 12px; }
.topbar-right  { display: flex; gap: 10px; align-items: center; }

.status-pill {
  font-size: 12px;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.25);
  color: rgba(226,232,240,.85);
}
.mini-btn {
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.06);
  color: rgba(248,250,252,.9);
  padding: 6px 12px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  text-decoration: none;
  transition: border-color .2s, background .2s;
}
.mini-btn:hover { border-color: rgba(167,139,250,.45); background: rgba(167,139,250,.1); }

.page-wrap {
  position: relative;
  z-index: 1;
  margin-top: 64px;
  min-height: calc(100vh - 64px);
  padding: 24px 20px 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

body.lock-scroll { overflow: hidden; }

.inbox-wrap {
  position: relative;
  z-index: 2;
  margin-top: 64px;
  height: calc(100vh - 64px);
  padding: 18px 20px;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  overflow: hidden;
}

.inbox-inner {
  width: min(960px, 100%);
  height: 100%;
  min-height: 0;
}

.inbox-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  max-width: 100%;
}

.ticket-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
}

.chat-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
}

.ticket-scroll .ticket-table thead tr {
  position: sticky;
  top: 0;
  z-index: 2;
  background: rgba(18, 18, 28, 0.95);
  backdrop-filter: blur(8px);
}

.delete-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 8px;
  border: 1px solid rgba(251,113,133,.35);
  background: rgba(251,113,133,.08);
  color: var(--danger);
  font-size: 13px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: background .2s, border-color .2s;
}
.delete-btn:hover:not(:disabled) {
  background: rgba(251,113,133,.18);
  border-color: rgba(251,113,133,.6);
}
.delete-btn:disabled { opacity: .5; cursor: not-allowed; }

.card-header-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.cat-dropdown { position: relative; }

.cat-trigger {
  display: flex;
  align-items: center;
  gap: 7px;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 10px;
  padding: 6px 10px 6px 12px;
  color: var(--text);
  font-size: 13px;
  font-family: inherit;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color .2s, background .2s;
  outline: none;
  min-width: 152px;
}
.cat-trigger:hover,
.cat-trigger[aria-expanded="true"] {
  border-color: rgba(167,139,250,.5);
  background: rgba(167,139,250,.06);
}
.cat-trigger-icon { color: var(--muted); font-size: 13px; line-height: 1; flex-shrink: 0; }
.cat-trigger-label { flex: 1; text-align: left; }
.cat-chevron { color: var(--muted); flex-shrink: 0; transition: transform .2s; }
.cat-trigger[aria-expanded="true"] .cat-chevron { transform: rotate(180deg); }

.cat-menu {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 200px;
  background: rgba(14, 14, 22, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(167,139,250,.22);
  border-radius: 12px;
  box-shadow: 0 16px 48px rgba(0,0,0,.6), 0 0 0 1px rgba(167,139,250,.06);
  padding: 6px;
  z-index: 200;
  animation: dropIn .15s ease both;
}
.cat-menu.open { display: block; }

@keyframes dropIn {
  from { opacity: 0; transform: translateY(-6px) scale(.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.cat-divider { height: 1px; background: rgba(255,255,255,.06); margin: 4px 6px; }

.cat-option {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 10px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  color: rgba(248,250,252,.75);
  transition: background .12s, color .12s;
  user-select: none;
}
.cat-option:hover { background: rgba(167,139,250,.12); color: var(--text); }
.cat-option-active { background: rgba(167,139,250,.1); color: var(--accent); }
.cat-opt-icon { font-size: 14px; width: 18px; text-align: center; flex-shrink: 0; }
.cat-option span:nth-child(2) { flex: 1; }
.cat-opt-check { font-size: 11px; color: var(--accent); opacity: 0; transition: opacity .15s; flex-shrink: 0; }
.cat-option-active .cat-opt-check { opacity: 1; }

.category-badge {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  background: rgba(167,139,250,.12);
  border: 1px solid rgba(167,139,250,.22);
  color: var(--accent);
  white-space: nowrap;
}
.category-badge.muted {
  background: transparent;
  border-color: transparent;
  color: var(--muted);
  opacity: .5;
}

.search-wrap {
  display: flex;
  align-items: center;
  gap: 7px;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 10px;
  padding: 6px 12px;
  transition: border-color .2s;
}
.search-wrap:focus-within {
  border-color: rgba(167,139,250,.5);
  background: rgba(167,139,250,.06);
}
.search-icon { color: var(--muted); font-size: 16px; line-height: 1; user-select: none; }
.search-input {
  background: none;
  border: none;
  outline: none;
  color: var(--text);
  font-size: 13px;
  font-family: inherit;
  width: 220px;
}
.search-input::placeholder { color: rgba(154,163,178,.55); }
.opener-cell { display: flex; flex-direction: column; gap: 1px; }
.opener-name { font-size: 13px; font-weight: 600; color: rgba(248,250,252,.85); }
.opener-id { font-size: 11px; font-family: monospace; color: var(--muted); opacity: .7; }

.user-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px 4px 4px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.06);
}
.user-avatar {
  width: 28px; height: 28px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(167,139,250,.3);
  flex-shrink: 0;
}
.user-name {
  font-size: 13px;
  font-weight: 700;
  color: rgba(248,250,252,.9);
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.glass-card {
  background: var(--card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: 0 22px 70px rgba(0,0,0,.55);
  width: 100%;
  max-width: 960px;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid rgba(255,255,255,.06);
  flex-wrap: wrap;
  gap: 0.75rem;
  flex-shrink: 0;
}
.card-header-left { display: flex; align-items: center; gap: 0.6rem; }
.card-title {
  font-size: 0.9375rem;
  font-weight: 900;
  color: var(--text);
  letter-spacing: -0.02em;
  text-shadow: 0 0 18px rgba(167,139,250,.18);
}
.hash-icon { color: var(--muted); font-size: 1.1rem; font-weight: 900; }
.count-pill {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(167,139,250,.12);
  border: 1px solid rgba(167,139,250,.22);
  color: var(--accent);
}

.meta-bar {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 9px 20px;
  border-bottom: 1px solid rgba(255,255,255,.05);
  flex-wrap: wrap;
  flex-shrink: 0;
}
.meta-chip {
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}
.meta-chip .value { color: rgba(248,250,252,.85); }

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--muted);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.04);
  transition: border-color .2s, color .2s, background .2s;
}
.back-link:hover { border-color: rgba(167,139,250,.4); color: var(--accent); background: rgba(167,139,250,.08); }
.back-link::before { content: '←'; }

.chat {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 10px 0;
}

.date-divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 14px 20px 4px;
  user-select: none;
}
.date-divider::before,
.date-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(255,255,255,.06);
}
.date-divider span {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  white-space: nowrap;
  padding: 0 0.4rem;
}

.chat-message {
  display: flex;
  align-items: flex-start;
  gap: 0.875rem;
  padding: 5px 20px;
  transition: background .12s;
  animation: fadeUp .16s ease both;
}
.chat-message:hover { background: rgba(167,139,250,.04); }

.chat-message.system {
  background: var(--red-bg);
  border-left: 2px solid var(--danger);
  padding-left: 18px;
}
.chat-message.system:hover { background: rgba(251,113,133,.12); }
.chat-message.system .username { color: var(--danger) !important; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

.avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  flex-shrink: 0;
  object-fit: cover;
  margin-top: 3px;
  border: 1px solid rgba(167,139,250,.15);
  transition: opacity .2s;
}
.avatar:hover { opacity: .8; }

.message-body { flex: 1; min-width: 0; }
.message-header {
  display: flex;
  align-items: baseline;
  gap: 0.45rem;
  margin-bottom: 1px;
  flex-wrap: wrap;
}
.username { font-size: 0.875rem; font-weight: 800; }
.bot-badge {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: white;
  font-size: 0.58rem;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: 4px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  align-self: center;
}
.timestamp { font-size: 11px; color: rgba(154,163,178,.6); font-weight: 500; }

.message-content {
  font-size: 0.875rem;
  line-height: 1.5;
  color: rgba(248,250,252,.88);
  word-break: break-word;
  white-space: pre-wrap;
}

.dc-emoji {
  width: 22px;
  height: 22px;
  object-fit: contain;
  vertical-align: middle;
  display: inline-block;
  margin: -2px 1px;
}

.message-content:not(:has(> :not(.dc-emoji):not(br))) .dc-emoji {
  width: 48px;
  height: 48px;
  margin: 2px 1px;
}

.dc-mention {
  background: rgba(88, 101, 242, 0.3);
  color: #c9cdfb;
  border-radius: 3px;
  padding: 0 3px;
  font-weight: 500;
  cursor: default;
  font-size: 0.875rem;
  display: inline;
  white-space: nowrap;
  transition: background .12s, color .12s;
}
.dc-mention:hover {
  background: rgba(88, 101, 242, 0.6);
  color: #fff;
}

.dc-mention.dc-mention-role {
  background: rgba(167, 139, 250, 0.2);
  color: var(--accent);
}
.dc-mention.dc-mention-role:hover {
  background: rgba(167, 139, 250, 0.4);
  color: #fff;
}

.attachment-wrap { margin-top: 6px; }

.attachment-img {
  max-width: 400px;
  max-height: 300px;
  border-radius: 3px;
  display: block;
  cursor: zoom-in;
  object-fit: contain;
  background: rgba(0,0,0,.3);
}
.attachment-img:hover { opacity: .92; }

.attachment-file {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 3px;
  border: 1px solid rgba(255,255,255,.07);
  background: #2b2d31;
  color: #00a8fc;
  text-decoration: none;
  font-size: 13.3px;
  font-weight: 600;
  transition: background .12s;
}
.attachment-file:hover { background: #313338; text-decoration: underline; }
.attachment-icon { font-size: 18px; flex-shrink: 0; }

.dc-embed {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: auto;
  grid-template-areas: "body";

  margin-top: 4px;
  max-width: 516px;
  width: fit-content;

  background: #2b2d31;
  border-radius: 4px;
  border-left: 4px solid #1e1f22;

  overflow: hidden;
}

.dc-embed + .dc-embed { margin-top: 4px; }

.dc-embed.has-thumbnail {
  grid-template-columns: 1fr auto;
  grid-template-areas: "body thumb";
}

.dc-embed-body {
  grid-area: body;
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 8px 16px 16px 12px;
  min-width: 0;
}

.dc-embed-thumbnail {
  grid-area: thumb;
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 4px;
  align-self: start;
  margin: 8px 16px 0 0;
  flex-shrink: 0;
}

.dc-embed-author {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  margin-bottom: 8px;
}
.dc-embed-author-icon {
  width: 20px; height: 20px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.dc-embed-author-name {
  font-family: 'gg sans', 'Noto Sans', Whitney, 'Helvetica Neue', Helvetica, Roboto, Arial, sans-serif;
  font-size: 13.6px;
  font-weight: 600;
  line-height: 1.375;
  color: #f2f3f5;
}
a.dc-embed-author-name,
.dc-embed-author-name a {
  color: #f2f3f5;
  text-decoration: none;
}
a.dc-embed-author-name:hover,
.dc-embed-author-name a:hover { text-decoration: underline; }
.dc-embed-author-name .dc-emoji { width: 18px; height: 18px; margin: -2px 1px; }
.dc-embed-title {
  font-family: 'gg sans', 'Noto Sans', Whitney, 'Helvetica Neue', Helvetica, Roboto, Arial, sans-serif;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.375;
  color: #f2f3f5;
  margin-top: 8px;
  margin-bottom: 4px;
}
.dc-embed-author + .dc-embed-title { margin-top: 0; }

.dc-embed-title a,
a.dc-embed-title { color: #00a8fc; text-decoration: none; }
.dc-embed-title a:hover,
a.dc-embed-title:hover { text-decoration: underline; }
.dc-embed-title .dc-emoji { width: 20px; height: 20px; margin: -2px 1px; }
.dc-embed-desc {
  font-family: 'gg sans', 'Noto Sans', Whitney, 'Helvetica Neue', Helvetica, Roboto, Arial, sans-serif;
  font-size: 13.6px;
  font-weight: 400;
  line-height: 1.375;
  color: #dbdee1;
  white-space: pre-wrap;
  word-break: break-word;
  margin-bottom: 0;
}
.dc-embed-title + .dc-embed-desc { margin-top: 4px; }
.dc-embed-desc a { color: #00a8fc; text-decoration: none; }
.dc-embed-desc a:hover { text-decoration: underline; }
.dc-embed-desc .dc-emoji { width: 18px; height: 18px; margin: -2px 1px; }

.dc-embed-desc .dc-mention,
.dc-embed-field-value .dc-mention {
  font-size: 13.6px;
}

.dc-embed-fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 8px;
}

.dc-embed-field          { grid-column: span 3; }
.dc-embed-field.inline   { grid-column: span 1; min-width: 0; word-break: break-word; }

.dc-embed-field-name {
  font-family: 'gg sans', 'Noto Sans', Whitney, 'Helvetica Neue', Helvetica, Roboto, Arial, sans-serif;
  font-size: 13.6px;
  font-weight: 700;
  line-height: 1.375;
  color: #f2f3f5;
  margin-bottom: 2px;
}
.dc-embed-field-value {
  font-family: 'gg sans', 'Noto Sans', Whitney, 'Helvetica Neue', Helvetica, Roboto, Arial, sans-serif;
  font-size: 13.6px;
  font-weight: 400;
  line-height: 1.375;
  color: #dbdee1;
  white-space: pre-wrap;
  word-break: break-word;
}

.dc-embed-field-value a { color: #00a8fc; text-decoration: none; }
.dc-embed-field-value a:hover { text-decoration: underline; }

.dc-embed-field-name .dc-emoji  { width: 16px; height: 16px; margin: -2px 1px; }
.dc-embed-field-value .dc-emoji { width: 16px; height: 16px; margin: -2px 1px; }

.dc-embed-desc code,
.dc-embed-field-value code {
  background: rgba(0, 0, 0, 0.3);
  border-radius: 3px;
  padding: 0 4px;
  font-family: ui-monospace, 'Courier New', monospace;
  font-size: 85%;
  color: #f8f8f2;
}

.dc-embed-image {
  width: 100%;
  max-width: 100%;
  max-height: 300px;
  border-radius: 4px;
  display: block;
  object-fit: contain;
  background: #1e1f22;
  margin-top: 16px;
}

.dc-embed-footer {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 8px;
}
.dc-embed-footer-icon {
  width: 16px; height: 16px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.dc-embed-footer-text,
.dc-embed-footer-sep,
.dc-embed-footer-ts {
  font-family: 'gg sans', 'Noto Sans', Whitney, 'Helvetica Neue', Helvetica, Roboto, Arial, sans-serif;
  font-size: 12px;
  font-weight: 500;
  color: #b5bac1;
  line-height: 1.375;
}
.dc-embed-footer-sep { user-select: none; }
.dc-embed-footer-text .dc-emoji { width: 14px; height: 14px; margin: -2px 1px; }
.dc-embed-body > *:first-child { margin-top: 0 !important; }
.dc-embed-body > .dc-embed-title:first-child { margin-top: 8px; }

.tickets-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 18px;
}
.tickets-title {
  font-size: 1.0625rem;
  font-weight: 900;
  color: var(--text);
  letter-spacing: -0.02em;
  text-shadow: 0 0 18px rgba(167,139,250,.18);
}

.ticket-table { width: 100%; border-collapse: collapse; }
.ticket-table thead tr { border-bottom: 1px solid rgba(255,255,255,.07); }
.ticket-table th {
  padding: 9px 20px;
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
}
.ticket-table td {
  padding: 10px 20px;
  border-bottom: 1px solid rgba(255,255,255,.04);
  font-size: 0.875rem;
  vertical-align: middle;
}
.ticket-table tbody tr {
  transition: background .12s;
  animation: fadeUp .15s ease both;
}
.ticket-table tbody tr:hover { background: rgba(167,139,250,.06); }
.ticket-table tbody tr:last-child td { border-bottom: none; }

.ticket-id-cell { display: flex; align-items: center; gap: 0.6rem; }
.ticket-icon {
  width: 26px; height: 26px;
  background: rgba(167,139,250,.1);
  border: 1px solid rgba(167,139,250,.2);
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  flex-shrink: 0;
}
.ticket-id-text {
  font-family: ui-monospace, 'Courier New', monospace;
  font-size: 0.8125rem;
  color: var(--muted);
}
.ticket-num {
  font-size: 0.8125rem;
  color: rgba(154,163,178,.45);
  font-family: ui-monospace, monospace;
}

.button {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: white;
  padding: 5px 13px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 700;
  font-size: 12px;
  transition: filter .15s, transform .1s, box-shadow .15s;
  white-space: nowrap;
}
.button:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(124,58,237,.4);
}
.button:active { transform: translateY(0); }

.pagination {
  margin-top: 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.6rem;
}
.page-button {
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.06);
  color: rgba(248,250,252,.9);
  padding: 6px 13px;
  border-radius: 9px;
  text-decoration: none;
  font-weight: 700;
  font-size: 13px;
  transition: border-color .2s, background .2s, transform .1s;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}
.page-button:hover {
  border-color: rgba(167,139,250,.45);
  background: rgba(167,139,250,.1);
  transform: translateY(-1px);
}
.page-info {
  font-size: 13px;
  color: var(--muted);
  font-weight: 600;
  border: 1px solid rgba(255,255,255,.07);
  background: rgba(0,0,0,.2);
  padding: 6px 13px;
  border-radius: 9px;
}
.page-info strong { color: var(--text); }

.empty-state { text-align: center; padding: 4rem 2rem; color: var(--muted); }
.empty-state .empty-icon { font-size: 2.5rem; margin-bottom: 1rem; opacity: .55; }
.empty-state h2 { font-size: 1.05rem; font-weight: 800; color: var(--text); margin-bottom: 0.4rem; }
.empty-state p { font-size: 0.875rem; }

.site-footer {
  text-align: center;
  margin-top: 20px;
  color: rgba(154,163,178,.45);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
}
.site-footer a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid rgba(167,139,250,.2);
  transition: color .2s, border-color .2s;
}
.site-footer a:hover { color: var(--accent); border-color: var(--accent); }

.login-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 64px);
  padding: 2rem;
  position: relative;
  z-index: 1;
}
.login-card {
  background: var(--card);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 40px 32px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 22px 70px rgba(0,0,0,.55);
  width: 100%;
  max-width: 420px;
  animation: fadeUp .3s ease both;
}
.ai-glow {
  position: absolute;
  top: -50%; left: -50%;
  width: 200%; height: 200%;
  background: radial-gradient(circle, rgba(167,139,250,.10) 0%, transparent 70%);
  animation: aiGlow 6s ease-in-out infinite;
  pointer-events: none;
}
@keyframes aiGlow {
  0%, 100% { transform: rotate(0deg) scale(1); }
  50%       { transform: rotate(180deg) scale(1.08); }
}

.login-logo-wrap {
  position: relative;
  width: 100px; height: 100px;
  margin: 0 auto 20px;
  display: flex; align-items: center; justify-content: center;
}
.login-logo-core {
  position: relative;
  z-index: 3;
  width: 48px; height: 48px;
  display: grid;
  place-items: center;
  filter: drop-shadow(0 0 16px rgba(167,139,250,.35));
}
.login-logo-core img { width: 32px; height: 32px; object-fit: contain; }
.login-rings { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
.l-ring {
  position: absolute;
  border: 1px solid rgba(167,139,250,.28);
  border-radius: 50%;
  animation: ringPulse 3s ease-in-out infinite;
}
.l-ring-1 { width: 72px; height: 72px; top: 14px; left: 14px; animation-delay: 0s; }
.l-ring-2 { width: 88px; height: 88px; top: 6px; left: 6px; animation-delay: 1s; }
.l-ring-3 { width: 100px; height: 100px; top: 0; left: 0; animation-delay: 2s; }
@keyframes ringPulse {
  0%, 100% { opacity: .28; transform: scale(1); }
  50%       { opacity: .65; transform: scale(1.05); }
}

.ai-logo {
  position: relative;
  width: 110px; height: 110px;
  margin: 0 auto 22px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.logo-core {
  position: relative;
  z-index: 3;
  color: var(--accent);
  animation: coreRotate 8s linear infinite;
  display: flex;
  align-items: center;
  justify-content: center;
}
.logo-core img {
  width: 55px; height: 55px;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 0 16px rgba(167,139,250,.25));
}
@keyframes coreRotate {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
.logo-rings { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
.ring {
  position: absolute;
  border: 1px solid rgba(167, 139, 250, 0.30);
  border-radius: 50%;
  animation: ringPulse 3s ease-in-out infinite;
}
.ring-1 { width: 85px;  height: 85px;  top: 12.5px; left: 12.5px; animation-delay: 0s; }
.ring-2 { width: 100px; height: 100px; top: 5px;    left: 5px;    animation-delay: 1s; }
.ring-3 { width: 110px; height: 110px; top: 0;      left: 0;      animation-delay: 2s; }

.login-header { text-align: center; margin-bottom: 28px; }
.login-header h1 { font-size: 1.55rem; font-weight: 900; letter-spacing: -0.02em; color: var(--text); margin-bottom: 6px; }
.login-header p { color: var(--muted); font-size: 13px; }

.discord-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  width: 100%;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: white;
  padding: 0.8rem;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 800;
  font-size: 0.9375rem;
  transition: filter .15s, transform .1s, box-shadow .15s;
  margin-bottom: 1rem;
  position: relative;
}
.discord-btn:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(124,58,237,.45);
}

.footer-note {
  margin-top: 16px;
  text-align: center;
  color: rgba(154,163,178,.85);
  font-size: 12px;
  line-height: 1.35;
}
.footer-note a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid rgba(167,139,250,.35);
  transition: color .2s ease, border-color .2s ease;
}
.footer-note a:hover { color: var(--accent); border-color: var(--accent); }

.hero-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 64px);
  padding: 2rem;
  position: relative;
  z-index: 1;
}
.hero-card {
  background: var(--card);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 3rem 2.5rem;
  text-align: center;
  max-width: 420px;
  width: 100%;
  box-shadow: 0 22px 70px rgba(0,0,0,.55);
  position: relative;
  overflow: hidden;
  animation: fadeUp .3s ease both;
}
.hero-title {
  font-size: 1.875rem;
  font-weight: 900;
  letter-spacing: -0.03em;
  color: var(--text);
  margin-bottom: 0.5rem;
}
.hero-sub {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 2rem;
  line-height: 1.55;
}
.hero-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: white;
  padding: 0.8rem 2rem;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 800;
  font-size: 0.9375rem;
  transition: filter .15s, transform .1s, box-shadow .15s;
}
.hero-btn:hover {
  filter: brightness(1.1);
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(124,58,237,.45);
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 500;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s;
  cursor: pointer;
}
.modal-overlay.open { opacity: 1; pointer-events: auto; }

.modal-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 22px 24px;
  width: min(360px, 90%);
  box-shadow: 0 20px 60px rgba(0,0,0,.6);
  animation: fadeUp .18s ease;
  cursor: auto;
}
.modal-card h3 { font-size: 16px; font-weight: 800; margin-bottom: 6px; }
.modal-card p  { font-size: 13px; color: var(--muted); margin-bottom: 18px; }

.modal-actions { display: flex; justify-content: flex-end; gap: 8px; }

.modal-cancel {
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.06);
  color: var(--text);
  padding: 6px 14px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: border-color .2s;
}
.modal-cancel:hover { border-color: rgba(167,139,250,.4); }

.modal-delete {
  border: 1px solid rgba(251,113,133,.45);
  background: rgba(251,113,133,.1);
  color: var(--danger);
  padding: 6px 14px;
  border-radius: 8px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: background .2s;
}
.modal-delete:hover { background: rgba(251,113,133,.18); }

@media (max-width: 640px) {
  .page-wrap { padding: 14px 10px 36px; }
  .card-header, .meta-bar { padding: 10px 12px; }
  .chat-message { padding: 5px 12px; }
  .ticket-table th, .ticket-table td { padding: 9px 12px; }
  .ticket-table th:first-child, .ticket-table td:first-child { display: none; }
  .attachment-img { max-width: 100%; }
  .login-card { padding: 30px 20px; }

  .dc-embed {
    max-width: 100%;
    width: 100%;
  }
  .dc-embed-thumbnail {
    width: 60px;
    height: 60px;
  }
  .dc-embed-fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .dc-embed-field          { grid-column: span 2; }
  .dc-embed-field.inline   { grid-column: span 1; }
}

pre.dc-codeblock {
  background: #1e1f22;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 4px;
  padding: 8px 12px;
  margin-top: 6px;
  overflow-x: auto;
  max-width: 100%;
}
pre.dc-codeblock code {
  font-family: ui-monospace, 'Courier New', Consolas, monospace;
  font-size: 13px;
  color: #dbdee1;
  background: none;
  padding: 0;
  white-space: pre;
}

code.dc-code {
  background: rgba(0, 0, 0, 0.35);
  border-radius: 3px;
  padding: 1px 5px;
  font-family: ui-monospace, 'Courier New', Consolas, monospace;
  font-size: 85%;
  color: #f8f8f2;
}

.dc-embed-desc code.dc-code,
.dc-embed-field-value code.dc-code {
  background: rgba(0, 0, 0, 0.3);
}

.message-content strong,
.dc-embed-desc strong,
.dc-embed-field-value strong,
.dc-embed-field-name strong { font-weight: 700; }

.message-content em,
.dc-embed-desc em,
.dc-embed-field-value em { font-style: italic; }

.message-content u,
.dc-embed-desc u,
.dc-embed-field-value u { text-decoration: underline; }

.message-content s,
.dc-embed-desc s,
.dc-embed-field-value s { text-decoration: line-through; }

.dc-spoiler {
  background: rgba(255,255,255,.12);
  color: transparent;
  border-radius: 3px;
  padding: 0 3px;
  cursor: pointer;
  transition: background .15s, color .15s;
  user-select: none;
}
.dc-spoiler:hover,
.dc-spoiler.revealed {
  background: rgba(255,255,255,.08);
  color: inherit;
}

.message-content pre.dc-codeblock,
.dc-embed-desc pre.dc-codeblock,
.dc-embed-field-value pre.dc-codeblock {
  white-space: normal;
}
