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

/* ============================================================
   DESIGN TOKENS — CHARCOAL WARM PALETTE
   #222831  darkest bg
   #393E46  card/surface bg
   #948979  muted text & borders
   #DFD0B8  primary text & highlights
   ============================================================ */
:root {
  --bg-deep: #222831;
  --bg-surface: #393E46;
  --accent-muted: #948979;
  --text-primary: #DFD0B8;
  --text-secondary: #948979;
  --text-muted: #6b6358;
  --border-muted: rgba(148, 137, 121, 0.22);
  --border-strong: rgba(148, 137, 121, 0.4);
  --shadow-premium: 0 12px 40px rgba(0, 0, 0, 0.4);
  --radius-card: 28px;
  --accent-gold: #DFD0B8;
  --bg-darker: #1a1f26;
}

/* ============================================================
   ANIMATED BACKGROUND
   ============================================================ */
@keyframes meshShift {
  0% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }

  100% {
    background-position: 0% 50%;
  }
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  background: linear-gradient(135deg,
      #222831, #2b3040, #222831, #1e2530, #222831);
  background-size: 400% 400%;
  animation: meshShift 14s ease infinite alternate;
  color: var(--text-primary);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* SVG noise texture */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='1'/%3E%3C/svg%3E");
  opacity: 0.035;
  pointer-events: none;
  z-index: 0;
}

* {
  position: relative;
  z-index: 1;
}

body::before {
  z-index: 0;
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Inter', system-ui, sans-serif;
}

/* ============================================================
   GLASSMORPHISM — CHARCOAL WARM
   ============================================================ */
.glass-ultra {
  background: linear-gradient(135deg,
      rgba(57, 62, 70, 0.85) 0%,
      rgba(34, 40, 49, 0.75) 100%);
  backdrop-filter: blur(32px) saturate(150%);
  -webkit-backdrop-filter: blur(32px) saturate(150%);
  border-top: 1px solid rgba(223, 208, 184, 0.12);
  border-left: 1px solid rgba(223, 208, 184, 0.08);
  border-right: 1px solid rgba(148, 137, 121, 0.06);
  border-bottom: 1px solid rgba(148, 137, 121, 0.06);
  box-shadow:
    0 32px 64px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(223, 208, 184, 0.04),
    inset 0 1px 0 rgba(223, 208, 184, 0.08);
}

/* ============================================================
   TYPOGRAPHY
   ============================================================ */
h1,
.text-gradient {
  letter-spacing: -0.04em;
  font-weight: 900;
}

h2,
h3 {
  letter-spacing: -0.02em;
}

.text-gradient {
  background: linear-gradient(130deg, #DFD0B8 0%, #948979 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-label {
  letter-spacing: 0.12em;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
}

#totalEmails,
#highUrgency,
#actionRequired,
#aiProcessed,
#processedCount {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
  color: var(--text-primary);
}

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes float {

  0%,
  100% {
    transform: translateY(0px);
  }

  50% {
    transform: translateY(-10px);
  }
}

.float-animation {
  animation: float 7s ease-in-out infinite;
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(32px) scale(0.98);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

.slide-in-up {
  animation: slideInUp 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

/* ============================================================
   SKELETON LOADING
   ============================================================ */
@keyframes shimmer {
  0% {
    background-position: 200% 0;
  }

  100% {
    background-position: -200% 0;
  }
}

.skeleton-line {
  background: linear-gradient(90deg,
      rgba(148, 137, 121, 0.08) 25%,
      rgba(148, 137, 121, 0.18) 50%,
      rgba(148, 137, 121, 0.08) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.morph-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(148, 137, 121, 0.15);
  color: var(--text-primary);
  border: 1px solid var(--border-muted);
  border-radius: 14px;
  padding: 10px 22px;
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.25s ease;
  white-space: nowrap;
}

.morph-btn:hover {
  transform: translateY(-2px);
  background: rgba(148, 137, 121, 0.25);
  border-color: var(--border-strong);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.morph-btn:active {
  transform: translateY(0);
}

.action-pill {
  cursor: pointer;
  transition: all 0.25s ease;
}

.action-pill:hover {
  background: rgba(148, 137, 121, 0.18) !important;
  border-color: var(--border-strong) !important;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

/* ============================================================
   AI BADGE
   ============================================================ */
.ai-badge {
  display: inline-block;
  background: rgba(148, 137, 121, 0.15);
  border: 1px solid var(--border-muted);
  color: var(--text-secondary);
  padding: 5px 14px;
  border-radius: 100px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  margin-top: 12px;
}

/* ============================================================
   BADGES
   ============================================================ */
.badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 8px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

/* ============================================================
   EMAIL LIST
   ============================================================ */
.email-item {
  padding: 20px 28px;
  border-bottom: 1px solid rgba(148, 137, 121, 0.1);
  border-left: 3px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  color: var(--text-primary);
}

.email-item * {
  color: var(--text-primary) !important;
}

.email-item:hover {
  background: rgba(148, 137, 121, 0.1);
  border-left-color: var(--accent-muted);
}

.email-item.selected {
  border-left-color: #DFD0B8;
  background: rgba(148, 137, 121, 0.18);
}

/* ============================================================
   FILTER BUTTONS + SLIDING INDICATOR
   ============================================================ */
.filter-btn-wrapper {
  position: relative;
  display: flex;
  gap: 8px;
  overflow-x: auto;
}

#filterIndicator {
  position: absolute;
  bottom: 0;
  height: 2px;
  background: linear-gradient(90deg, #DFD0B8, #948979);
  border-radius: 2px;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: none;
}

.filter-btn {
  background: rgba(148, 137, 121, 0.08);
  border: 1px solid var(--border-muted);
  border-bottom: none;
  color: var(--text-secondary);
  transition: all 0.2s ease;
  cursor: pointer;
  padding-bottom: 10px;
}

.filter-btn.active {
  background: rgba(148, 137, 121, 0.2) !important;
  color: var(--text-primary) !important;
  border-color: var(--border-strong) !important;
  font-weight: 700;
}

.filter-btn:hover:not(.active) {
  background: rgba(148, 137, 121, 0.12);
  color: var(--text-primary);
}

/* ============================================================
   LOADER
   ============================================================ */
.loader {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(148, 137, 121, 0.15);
  border-top-color: #DFD0B8;
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}

/* ============================================================
   SCROLLBARS
   ============================================================ */
::-webkit-scrollbar {
  width: 4px;
  height: 4px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(148, 137, 121, 0.25);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(148, 137, 121, 0.5);
}

* {
  scrollbar-width: thin;
  scrollbar-color: rgba(148, 137, 121, 0.25) transparent;
}

.custom-scroll::-webkit-scrollbar {
  width: 4px;
}

.custom-scroll::-webkit-scrollbar-thumb {
  background: rgba(148, 137, 121, 0.2);
  border-radius: 10px;
}

.custom-scroll::-webkit-scrollbar-track {
  background: transparent;
}

/* ============================================================
   EMAIL CONTENT
   ============================================================ */
.email-content {
  white-space: pre-wrap;
  line-height: 1.75;
  font-size: 14px;
  max-height: 420px;
  overflow-y: auto;
  color: var(--text-primary) !important;
}

.email-html-wrapper {
  all: initial;
  font-family: 'Inter', sans-serif !important;
  color: var(--text-primary) !important;
  line-height: 1.6;
  display: block;
  background: transparent !important;
}

.email-html-wrapper * {
  font-family: 'Inter', sans-serif !important;
  color: var(--text-primary) !important;
  background: transparent !important;
}

.email-html-wrapper a {
  color: #DFD0B8 !important;
  text-decoration: underline;
}

/* ============================================================
   REPLY CARDS
   ============================================================ */
.reply-card {
  position: relative;
  overflow: hidden;
  background: rgba(57, 62, 70, 0.5);
  border: 1px solid var(--border-muted);
  border-radius: 16px;
  padding: 20px;
  cursor: pointer;
  transition: all 0.25s ease;
}

.reply-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  width: 3px;
  height: 100%;
  border-radius: 3px 0 0 3px;
  background: #948979;
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform 0.25s ease;
}

.reply-card:hover::before {
  transform: scaleY(1);
}

.reply-card:hover {
  background: rgba(57, 62, 70, 0.8);
  transform: translateY(-3px);
  border-color: var(--border-strong);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

@keyframes shimmerSweep {
  from {
    background-position: -200% center;
  }

  to {
    background-position: 200% center;
  }
}

.reply-card.selected {
  border: 2px solid #DFD0B8;
  background: rgba(57, 62, 70, 0.8);
}

.reply-card.selected::before {
  transform: scaleY(1);
}

.reply-card.selected::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg,
      transparent 40%, rgba(223, 208, 184, 0.05) 50%, transparent 60%);
  background-size: 200% 100%;
  animation: shimmerSweep 0.6s ease forwards;
  pointer-events: none;
  border-radius: 14px;
}

/* ============================================================
   STAT CARDS
   ============================================================ */
.stat-mini {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-mini:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

/* ============================================================
   SCROLL PROGRESS BAR
   ============================================================ */
#scrollProgressBar {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 0%;
  background: linear-gradient(90deg, #DFD0B8, #948979, #DFD0B8);
  z-index: 999;
  transition: width 0.1s ease;
}

/* ============================================================
   STAGGER REVEAL
   ============================================================ */
.stagger-reveal {
  opacity: 0;
  transform: translateY(24px);
}

.stagger-reveal.visible {
  opacity: 1;
  transform: none;
  transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

/* ============================================================
   ID OVERRIDES
   ============================================================ */
#emailDetailContainer,
#emailDetailContainer * {
  color: var(--text-primary);
}

#emailListContainer,
#emailListContainer * {
  color: var(--text-primary);
}

.email-subject,
.email-body,
.email-preview {
  color: var(--text-primary) !important;
}

/* ============================================================
   TOAST
   ============================================================ */
#toastContainer {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 99999;
  display: flex;
  flex-direction: column-reverse;
  gap: 12px;
  pointer-events: none;
}

.mm-toast {
  pointer-events: all;
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: rgba(34, 40, 49, 0.97);
  border: 1px solid rgba(148, 137, 121, 0.3);
  border-radius: 16px;
  padding: 16px 20px 20px 20px;
  min-width: 320px;
  max-width: 380px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(223, 208, 184, 0.05);
  backdrop-filter: blur(20px);
  overflow: hidden;
  transform: translateX(120%);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.mm-toast.show {
  transform: translateX(0);
}

.mm-toast.hide {
  transform: translateX(120%);
  opacity: 0;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.mm-toast-bar {
  position: absolute;
  left: 0;
  top: 0;
  width: 4px;
  height: 100%;
  border-radius: 16px 0 0 16px;
}

.mm-toast-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 2px;
  width: 100%;
  border-radius: 0 0 16px 16px;
  transition: width linear;
}

/* ============================================================
   HEADER
   ============================================================ */
header.glass-ultra {
  box-shadow: 0 2px 32px rgba(0, 0, 0, 0.4);
  position: sticky;
  top: 0;
  z-index: 50;
  border-radius: 0 !important;
  border-left: none !important;
  border-right: none !important;
  border-top: none !important;
}

/* ============================================================
   AI CHATBOT WIDGET
   ============================================================ */
#chatbot-toggle {
  position: fixed;
  bottom: 32px;
  left: 32px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #DFD0B8, #948979);
  border: none;
  cursor: pointer;
  z-index: 1000;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

#chatbot-toggle:hover {
  transform: scale(1.1);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}

#chatbot-panel {
  position: fixed;
  bottom: 100px;
  left: 32px;
  width: 380px;
  height: 560px;
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(57, 62, 70, 0.97), rgba(34, 40, 49, 0.97));
  border: 1px solid rgba(148, 137, 121, 0.3);
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(32px);
  display: flex;
  flex-direction: column;
  z-index: 1000;
  overflow: hidden;
  transform: translateY(20px) scale(0.95);
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

#chatbot-panel.open {
  transform: translateY(0) scale(1);
  opacity: 1;
  pointer-events: all;
}

#chatbot-header {
  padding: 20px 24px;
  border-bottom: 1px solid rgba(148, 137, 121, 0.2);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

#chatbot-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  scrollbar-width: thin;
  scrollbar-color: rgba(148, 137, 121, 0.2) transparent;
}

.chat-msg {
  max-width: 85%;
  padding: 12px 16px;
  border-radius: 16px;
  font-size: 0.85rem;
  line-height: 1.5;
  animation: fadeIn 0.2s ease;
}

.chat-msg.bot {
  background: rgba(148, 137, 121, 0.15);
  border: 1px solid rgba(148, 137, 121, 0.2);
  color: #DFD0B8;
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}

.chat-msg.user {
  background: rgba(223, 208, 184, 0.15);
  border: 1px solid rgba(223, 208, 184, 0.3);
  color: #DFD0B8;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}

.chat-msg.typing {
  background: rgba(148, 137, 121, 0.08);
  border: 1px solid rgba(148, 137, 121, 0.15);
  color: #948979;
  align-self: flex-start;
  font-style: italic;
}

.chat-email-result {
  background: rgba(34, 40, 49, 0.8);
  border: 1px solid rgba(148, 137, 121, 0.2);
  border-radius: 12px;
  padding: 10px 14px;
  margin-top: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.78rem;
}

.chat-email-result:hover {
  background: rgba(57, 62, 70, 0.9);
  border-color: rgba(223, 208, 184, 0.3);
  transform: translateX(4px);
}

#chatbot-input-row {
  padding: 16px 20px;
  border-top: 1px solid rgba(148, 137, 121, 0.2);
  display: flex;
  gap: 10px;
  flex-shrink: 0;
  background: rgba(34, 40, 49, 0.5);
}

#chatbot-input {
  flex: 1;
  background: rgba(148, 137, 121, 0.1);
  border: 1px solid rgba(148, 137, 121, 0.25);
  border-radius: 12px;
  padding: 10px 14px;
  color: #DFD0B8;
  font-size: 0.85rem;
  outline: none;
  transition: border-color 0.2s ease;
}

#chatbot-input::placeholder {
  color: #6b6358;
}

#chatbot-input:focus {
  border-color: rgba(223, 208, 184, 0.5);
}

#chatbot-send {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, #DFD0B8, #948979);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

#chatbot-send:hover {
  transform: scale(1.08);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

/* ============================================================ */
/*  AI ONBOARDING MODAL                                         */
/* ============================================================ */
#onboardingModal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.9);
  backdrop-filter: blur(20px);
  z-index: 20000;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

#onboardingModal.hidden {
  opacity: 0;
  pointer-events: none;
  transform: scale(1.1);
}

.onboarding-card {
  background: linear-gradient(135deg, rgba(57, 62, 70, 0.95) 0%, rgba(34, 40, 49, 0.95) 100%);
  border: 1px solid rgba(148, 137, 121, 0.2);
  border-radius: 32px;
  padding: 48px;
  max-width: 540px;
  width: 90%;
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.6);
  text-align: center;
}

.onboarding-input-group {
  background: rgba(34, 40, 49, 0.5);
  border: 1px solid rgba(148, 137, 121, 0.15);
  border-radius: 20px;
  padding: 24px;
  margin-bottom: 24px;
  text-align: left;
}

.onboarding-label {
  display: block;
  color: var(--accent-muted);
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 12px;
}

.onboarding-input {
  width: 100%;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(148, 137, 121, 0.2);
  border-radius: 12px;
  padding: 14px 20px;
  color: var(--text-primary);
  font-size: 0.95rem;
  outline: none;
  transition: all 0.3s ease;
}

.onboarding-input:focus {
  border-color: var(--text-primary);
  background: rgba(15, 23, 42, 0.8);
  box-shadow: 0 0 20px rgba(223, 208, 184, 0.1);
}

.onboarding-btn {
  width: 100%;
  padding: 18px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent-muted) 100%);
  color: var(--bg-deep);
  font-weight: 800;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
  margin-top: 12px;
}

.onboarding-btn:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.3);
  filter: brightness(1.1);
}

/* ============================================================ */
/*  PREMIUM UI POLISH ("STYLIST")                               */
/* ============================================================ */

/* High-Priority Pulse Glow */
.badge[style*="background:#dc2626"],
.badge[style*="background:#9f1239"] {
  animation: priority-pulse 2s infinite ease-in-out;
  box-shadow: 0 0 12px rgba(220, 38, 38, 0.4);
}

@keyframes priority-pulse {
  0% {
    box-shadow: 0 0 8px rgba(220, 38, 38, 0.4);
  }

  50% {
    box-shadow: 0 0 20px rgba(220, 38, 38, 0.7);
    transform: scale(1.02);
  }

  100% {
    box-shadow: 0 0 8px rgba(220, 38, 38, 0.4);
  }
}

/* Premium Reply Cards */
.reply-card {
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
  border: 1px solid rgba(148, 137, 121, 0.1) !important;
  background: rgba(57, 62, 70, 0.3) !important;
  position: relative;
  overflow: hidden;
}

.reply-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(223, 208, 184, 0.05), transparent);
  transition: 0.5s;
}

.reply-card:hover::before {
  left: 100%;
}

.reply-card:hover {
  transform: translateY(-5px) scale(1.01);
  background: rgba(57, 62, 70, 0.5) !important;
  border-color: rgba(223, 208, 184, 0.3) !important;
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
}

.reply-card.selected {
  border-color: #26de81 !important;
  background: rgba(38, 222, 129, 0.1) !important;
  box-shadow: 0 0 25px rgba(38, 222, 129, 0.2);
}

/* Glass Shine Animation */
@keyframes glass-shine {
  from {
    left: -100%;
  }

  to {
    left: 100%;
  }
}

.reply-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(90deg,
      transparent,
      rgba(255, 255, 255, 0.03),
      transparent);
  transform: skewX(-25deg);
  transition: none;
}

.reply-card:hover::after {
  animation: glass-shine 1s ease-in-out forwards;
}

/* Premium Scrollbar Enhancement */
.custom-scroll::-webkit-scrollbar {
  width: 6px;
}

.custom-scroll::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(148, 137, 121, 0.1), rgba(148, 137, 121, 0.3));
  border-radius: 10px;
  border: 1px solid rgba(223, 208, 184, 0.05);
}

.custom-scroll::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(148, 137, 121, 0.2), rgba(148, 137, 121, 0.5));
}

/* Overscroll Behavior */
.custom-scroll {
  overscroll-behavior: contain;
}

/* Elite Glassmorphism for Detail Box */
.custom-scroll {
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* Staggered entrance for items */
.stagger-item {
  animation: stagger-fade-in 0.5s ease-out forwards;
  opacity: 0;
}

@keyframes stagger-fade-in {
  from {
    opacity: 0;
    transform: translateY(15px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Morphing button enhancement */
.morph-btn {
  background: linear-gradient(135deg, #393E46 0%, #222831 100%);
  border: 1px solid rgba(148, 137, 121, 0.3);
  box-shadow: 5px 5px 15px rgba(0, 0, 0, 0.3), -5px -5px 15px rgba(255, 255, 255, 0.02);
}

.morph-btn:hover {
  box-shadow: inset 5px 5px 10px rgba(0, 0, 0, 0.4), inset -5px -5px 10px rgba(255, 255, 255, 0.02);
  transform: translateY(2px);
}

/* Onboarding Modal Styles */
#onboardingModal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(10, 10, 25, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

#onboardingModal.hidden {
  opacity: 0 !important;
  pointer-events: none !important;
  display: none !important;
}

.onboarding-card {
  background: linear-gradient(135deg, rgba(34, 40, 49, 0.95) 0%, rgba(20, 20, 35, 0.98) 100%);
  border: 1px solid rgba(148, 137, 121, 0.25);
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.7), inset 0 0 40px rgba(223, 208, 184, 0.05);
  border-radius: 32px;
  width: 100%;
  max-width: 500px;
  padding: 50px;
  text-align: center;
  transform: scale(0.95);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

#onboardingModal:not(.hidden) .onboarding-card {
  transform: scale(1);
}

.onboarding-input-group {
  text-align: left;
  margin-bottom: 24px;
}

.onboarding-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 800;
  color: #948979;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 10px;
  padding-left: 12px;
}

.onboarding-input {
  width: 100%;
  background: rgba(148, 137, 121, 0.08);
  border: 1px solid rgba(148, 137, 121, 0.25);
  border-radius: 16px;
  padding: 16px 20px;
  color: #DFD0B8;
  font-size: 0.95rem;
  outline: none;
  transition: all 0.3s ease;
}

.onboarding-input:focus {
  border-color: #DFD0B8;
  background: rgba(148, 137, 121, 0.12);
  box-shadow: 0 0 20px rgba(223, 208, 184, 0.1);
}

.onboarding-btn {
  width: 100%;
  padding: 18px;
  border-radius: 18px;
  background: linear-gradient(135deg, #DFD0B8 0%, #948979 100%);
  color: #222831;
  font-weight: 900;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  border: none;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  margin-top: 10px;
}

.onboarding-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 30px rgba(148, 137, 121, 0.3);
  filter: brightness(1.1);
}

/* ============================================================ */
/*  DONUT CHART WRAPPER                                         */
/* ============================================================ */
.donut-wrapper {
  position: relative;
  width: 200px;
  height: 200px;
  flex-shrink: 0;
}

.donut-wrapper canvas {
  width: 200px !important;
  height: 200px !important;
}

.donut-center-label {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  text-align: center;
  line-height: 1;
}

.donut-total {
  font-size: 2.4rem;
  font-weight: 900;
  color: var(--text-primary);
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
}