:root {
  --kx-bg: #0a0a0f;
  --kx-panel: rgba(18, 18, 32, 0.88);
  --kx-panel-strong: rgba(26, 26, 46, 0.94);
  --kx-border: rgba(0, 217, 255, 0.14);
  --kx-border-strong: rgba(0, 217, 255, 0.34);
  --kx-text: #f8fafc;
  --kx-muted: #9ca3af;
  --kx-cyan: #00d9ff;
  --kx-cyan-dark: #0099cc;
}

body.dashboard-body,
body.user-panel-body {
  min-height: 100vh;
  background:
    radial-gradient(circle at 14% 0%, rgba(0, 217, 255, 0.16), transparent 30rem),
    radial-gradient(circle at 90% 8%, rgba(0, 153, 204, 0.12), transparent 28rem),
    linear-gradient(180deg, #06070b 0%, var(--kx-bg) 58%, #050508 100%);
  color: var(--kx-text);
}

body.dashboard-body::before,
body.user-panel-body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.024) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.024) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.82), transparent 78%);
}

.user-sidebar {
  background: rgba(5, 7, 13, 0.9);
  border-right: 1px solid var(--kx-border);
  box-shadow: 18px 0 46px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(18px);
}

.user-sidebar .brand,
.user-panel-shell .brand {
  color: #fff;
  text-shadow: 0 0 24px rgba(0, 217, 255, 0.34);
}

.user-sidebar nav a {
  border: 1px solid transparent;
  color: #b8c1cc;
  border-radius: 12px;
  transition: border-color 0.25s ease, background 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.user-sidebar nav a:hover,
.user-sidebar nav a.active {
  background: rgba(0, 217, 255, 0.1);
  border-color: var(--kx-border-strong);
  color: #fff;
  transform: translateX(3px);
}

.user-main {
  position: relative;
  z-index: 1;
}

.user-topbar,
.panel-hero,
.premium-card,
.admin-panel,
.auth-card.settings-card,
.message-thread,
.conversation-list {
  background:
    linear-gradient(180deg, rgba(26, 26, 46, 0.92), rgba(11, 12, 22, 0.88)),
    radial-gradient(circle at top, rgba(0, 217, 255, 0.08), transparent 70%);
  border: 1px solid var(--kx-border);
  border-radius: 18px;
  box-shadow: 0 18px 52px rgba(0, 0, 0, 0.24);
}

.user-topbar {
  padding: 22px;
  margin-bottom: 24px;
  backdrop-filter: blur(14px);
}

.user-topbar h1,
.panel-hero h2,
.premium-card h2,
.premium-card h3,
.admin-panel h2,
.settings-card h1 {
  color: #fff;
  letter-spacing: 0;
}

.user-topbar h1 {
  font-size: clamp(1.9rem, 3vw, 3.35rem);
  text-shadow: 0 0 30px rgba(0, 217, 255, 0.26);
}

.eyebrow {
  color: var(--kx-cyan);
  letter-spacing: 0.08em;
}

.muted,
.premium-card p,
.admin-panel p,
.settings-card p,
td,
.thread-bubble span {
  color: var(--kx-muted);
}

.dashboard-hero,
.panel-hero {
  padding: clamp(24px, 4vw, 44px);
  overflow: hidden;
}

.dashboard-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 210px;
  gap: 28px;
  align-items: center;
}

.dashboard-hero h2,
.panel-hero h2 {
  margin: 10px 0 12px;
  font-size: clamp(2rem, 4vw, 4.4rem);
  line-height: 1.02;
}

.hero-actions,
.panel-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

.quick-grid {
  gap: 18px;
}

.quick-grid .premium-card,
.dashboard-columns .premium-card,
.notification-list-page .premium-card {
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.quick-grid .premium-card:hover,
.dashboard-columns .premium-card:hover,
.notification-list-page .premium-card:hover {
  transform: translateY(-4px);
  border-color: var(--kx-border-strong);
  box-shadow: 0 22px 58px rgba(0, 217, 255, 0.08);
}

.visual-placeholder {
  width: 190px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border: 1px solid rgba(0, 217, 255, 0.18);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 217, 255, 0.18), rgba(0, 153, 204, 0.05) 58%, transparent 70%);
  color: #fff;
}

.visual-placeholder span {
  display: block;
  font-size: 3.8rem;
  font-weight: 800;
  text-shadow: 0 0 26px rgba(0, 217, 255, 0.45);
}

.visual-placeholder small {
  color: #9eefff;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.btn-primary,
.message-compose button[type="submit"],
.auth-form button[type="submit"] {
  background: linear-gradient(135deg, var(--kx-cyan), var(--kx-cyan-dark));
  color: #001119;
  border: 0;
  box-shadow: 0 14px 34px rgba(0, 217, 255, 0.18);
}

.btn-primary:hover,
.message-compose button[type="submit"]:hover,
.auth-form button[type="submit"]:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 40px rgba(0, 217, 255, 0.3);
}

.btn-ghost,
.btn-small,
a.btn {
  border: 1px solid rgba(0, 217, 255, 0.18);
  background: rgba(255, 255, 255, 0.04);
  color: #e5edf5;
}

.btn-ghost:hover,
.btn-small:hover,
a.btn:hover {
  border-color: var(--kx-border-strong);
  background: rgba(0, 217, 255, 0.1);
  color: #fff;
}

.notification-bell,
.status-badge {
  border: 1px solid rgba(0, 217, 255, 0.24);
  background: rgba(0, 217, 255, 0.1);
  color: var(--kx-cyan);
}

.table-wrap {
  border: 1px solid rgba(0, 217, 255, 0.12);
  border-radius: 16px;
  overflow: auto;
  background: rgba(5, 7, 13, 0.42);
}

thead {
  background: rgba(0, 217, 255, 0.08);
}

th {
  color: #fff;
}

td,
th {
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.auth-form input,
.auth-form select,
.auth-form textarea,
.message-compose textarea,
.mini-form input {
  background: rgba(5, 7, 13, 0.72);
  border: 1px solid rgba(0, 217, 255, 0.16);
  color: #fff;
  border-radius: 12px;
}

.auth-form input:focus,
.auth-form select:focus,
.auth-form textarea:focus,
.message-compose textarea:focus,
.mini-form input:focus {
  outline: none;
  border-color: var(--kx-cyan);
  box-shadow: 0 0 0 3px rgba(0, 217, 255, 0.12);
}

.message-layout {
  gap: 20px;
}

.conversation-list a {
  border-radius: 12px;
  border: 1px solid rgba(0, 217, 255, 0.1);
  background: rgba(255, 255, 255, 0.035);
}

.conversation-list a.active,
.conversation-list a:hover {
  border-color: var(--kx-border-strong);
  background: rgba(0, 217, 255, 0.1);
}

.thread-bubble {
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
}

.thread-bubble.mine {
  border-color: rgba(0, 217, 255, 0.2);
  background: rgba(0, 217, 255, 0.1);
}

.user-panel-shell {
  max-width: 1180px;
  margin: 0 auto;
  padding: 34px 22px 70px;
  position: relative;
  z-index: 1;
}

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

.panel-nav nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.panel-nav nav a {
  padding: 10px 14px;
  border: 1px solid rgba(0, 217, 255, 0.14);
  border-radius: 999px;
  color: #dbeafe;
  background: rgba(255, 255, 255, 0.04);
}

.settings-shell {
  max-width: 1180px;
}

.settings-card {
  width: min(100%, 980px);
}

@media (max-width: 900px) {
  .dashboard-hero {
    grid-template-columns: 1fr;
  }

  .visual-placeholder {
    display: none;
  }
}

@media (max-width: 760px) {
  body.dashboard-body {
    display: block;
  }

  .user-sidebar {
    position: static;
    width: auto;
    border-right: 0;
    border-bottom: 1px solid var(--kx-border);
  }

  .user-sidebar nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .user-main {
    margin: 0;
    padding: 18px;
  }

  .user-topbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .panel-nav {
    align-items: flex-start;
    flex-direction: column;
  }
}
