/* ============================================================
   APPLE/FIGMA DARK THEME VARIABLES & RESET
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  /* Apple-like dark mode palette */
  --bg:          #000000;
  --bg2:         #1c1c1e;
  --bg3:         #2c2c2e;
  --card:        rgba(28, 28, 30, 0.7); /* Translucent cards */
  --card-hover:  rgba(44, 44, 46, 0.8);
  --border:      rgba(255, 255, 255, 0.1);
  --accent:      #0a84ff; /* iOS Blue */
  --accent-l:    #409cff;
  --accent-d:    #0060d1;
  --success:     #30d158; /* iOS Green */
  --warning:     #ff9f0a; /* iOS Orange */
  --danger:      #ff453a; /* iOS Red */
  --info:        #5e5ce6; /* iOS Indigo */
  
  --text:        #f5f5f7;
  --text-muted:  #86868b;
  --text-light:  #a1a1a6;
  
  --radius:      20px;
  --radius-sm:   12px;
  --shadow:      0 8px 32px rgba(0, 0, 0, 0.4);
  --shadow-sm:   0 4px 16px rgba(0, 0, 0, 0.2);
  --font:        -apple-system, BlinkMacSystemFont, 'Inter', system-ui, sans-serif;
  --sidebar-w:   260px;
  --transition:  0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ============================================================
   LOADING SPLASH & ANIMATIONS
   ============================================================ */
@keyframes slideUpFade {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse {
  0%,100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.7; transform: scale(0.95); }
}

.splash {
  position: fixed; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 1.5rem;
  background: var(--bg);
  z-index: 9999;
}
.splash-logo { font-size: 5rem; animation: pulse 2s cubic-bezier(0.4, 0, 0.2, 1) infinite; }
.spinner {
  width: 40px; height: 40px;
  border: 3px solid rgba(255,255,255,0.1);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 1s cubic-bezier(0.5, 0.1, 0.4, 0.9) infinite;
}

/* ============================================================
   LAYOUT
   ============================================================ */
.layout {
  display: flex;
  min-height: 100vh;
  background: radial-gradient(circle at top right, rgba(10, 132, 255, 0.08) 0%, transparent 40%),
              radial-gradient(circle at bottom left, rgba(94, 92, 230, 0.05) 0%, transparent 40%),
              var(--bg);
}

/* Sidebar */
.sidebar {
  width: var(--sidebar-w);
  background: rgba(28, 28, 30, 0.5);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  left: 0; top: 0; bottom: 0;
  z-index: 100;
  overflow-y: auto;
  transition: transform var(--transition);
}

.sidebar-logo {
  padding: 2rem 1.5rem 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  display: flex; align-items: center; gap: 1rem;
}
.sidebar-logo .emoji { font-size: 2rem; filter: drop-shadow(0 4px 8px rgba(0,0,0,0.3)); }
.sidebar-logo .title { font-size: 1.1rem; font-weight: 700; letter-spacing: -0.02em; }
.sidebar-logo .subtitle { font-size: 0.75rem; color: var(--text-muted); font-weight: 500; }

.sidebar-nav {
  padding: 1.5rem 1rem;
  flex: 1;
  display: flex; flex-direction: column; gap: 4px;
}

.nav-section-title {
  font-size: 0.7rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.1em; color: var(--text-muted);
  padding: 1rem 0.75rem 0.5rem;
}

.nav-item {
  display: flex; align-items: center; gap: 0.85rem;
  padding: 0.75rem 0.85rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.95rem; font-weight: 500;
  color: var(--text-light);
  transition: all var(--transition);
  border: none; background: transparent; width: 100%; text-align: left;
}
.nav-item:hover { background: rgba(255,255,255,0.06); color: var(--text); }
.nav-item.active { background: var(--accent); color: #fff; transform: scale(1.02); box-shadow: var(--shadow-sm); }
.nav-item .icon { font-size: 1.1rem; display: flex; align-items: center; justify-content: center; width: 24px; }
.nav-badge {
  margin-left: auto;
  background: var(--danger);
  color: white; font-size: 0.7rem; font-weight: 700;
  padding: 2px 8px; border-radius: 99px;
  box-shadow: 0 2px 4px rgba(255, 69, 58, 0.3);
}

.sidebar-user {
  padding: 1.25rem 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  display: flex; align-items: center; gap: 1rem;
  background: rgba(0,0,0,0.2);
}
.sidebar-user .avatar {
  width: 40px; height: 40px; border-radius: 50%; object-fit: cover;
  border: 2px solid rgba(255,255,255,0.1);
  box-shadow: var(--shadow-sm);
}
.sidebar-user .info { flex: 1; min-width: 0; }
.sidebar-user .name { font-size: 0.9rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.logout-btn {
  background: rgba(255,255,255,0.05); border: none; cursor: pointer;
  color: var(--text-muted); font-size: 1rem;
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  transition: all var(--transition);
}
.logout-btn:hover { color: var(--danger); background: rgba(255, 69, 58, 0.15); transform: rotate(-5deg) scale(1.1); }

/* Main content */
.main-content {
  margin-left: var(--sidebar-w);
  flex: 1; min-height: 100vh;
  padding-bottom: 3rem;
}

.page {
  max-width: 960px;
  margin: 0 auto;
  padding: 3rem;
  animation: slideUpFade 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.page-header { margin-bottom: 2.5rem; }
.page-title {
  font-size: 2.2rem; font-weight: 800; letter-spacing: -0.03em;
  background: linear-gradient(180deg, #fff 0%, #a1a1a6 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.page-subtitle { color: var(--text-light); font-size: 1.05rem; margin-top: 0.5rem; font-weight: 400; }

/* ============================================================
   LANDING PAGE (Apple / Vercel style)
   ============================================================ */
.landing {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(circle at 50% 0%, rgba(10, 132, 255, 0.15), transparent 60%), var(--bg);
  padding: 2rem;
}

.landing-card {
  background: rgba(28, 28, 30, 0.6);
  backdrop-filter: blur(40px) saturate(150%);
  -webkit-backdrop-filter: blur(40px) saturate(150%);
  border: 1px solid rgba(255,255,255,0.08);
  border-top-color: rgba(255,255,255,0.15);
  border-radius: 32px;
  padding: 4rem 3.5rem;
  max-width: 540px;
  width: 100%;
  text-align: center;
  box-shadow: 0 30px 60px rgba(0,0,0,0.6), inset 0 1px 0 rgba(255,255,255,0.1);
  animation: scaleIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.landing-emoji { font-size: 5rem; display: block; margin-bottom: 1.5rem; filter: drop-shadow(0 10px 15px rgba(0,0,0,0.5)); }
.landing-title {
  font-size: 2.5rem; font-weight: 800; letter-spacing: -0.04em; margin-bottom: 1rem;
  background: linear-gradient(180deg, #ffffff 0%, #a1a1a6 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.landing-desc { color: var(--text-light); font-size: 1.1rem; line-height: 1.6; margin-bottom: 2.5rem; }

.landing-features {
  display: flex; flex-direction: column; gap: 0.85rem;
  margin-bottom: 3rem; text-align: left;
}
.landing-feature {
  display: flex; align-items: center; gap: 1rem;
  padding: 1rem 1.25rem;
  background: rgba(0,0,0,0.2); border-radius: var(--radius-sm);
  border: 1px solid rgba(255,255,255,0.05);
  font-size: 0.95rem; color: var(--text); font-weight: 500;
  transition: transform var(--transition);
}
.landing-feature:hover { transform: translateX(4px); background: rgba(255,255,255,0.03); }
.landing-feature .fi { font-size: 1.4rem; filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3)); }

.discord-btn {
  display: inline-flex; align-items: center; gap: 0.85rem;
  background: #5865f2;
  color: white; font-size: 1.05rem; font-weight: 600; letter-spacing: 0.02em;
  padding: 1.1rem 2.5rem; border-radius: 100px; border: none;
  cursor: pointer; text-decoration: none; width: 100%; justify-content: center;
  transition: all var(--transition);
  box-shadow: 0 8px 24px rgba(88,101,242,0.3);
}
.discord-btn:hover { background: #4752c4; transform: translateY(-3px) scale(1.01); box-shadow: 0 12px 32px rgba(88,101,242,0.5); }
.discord-btn svg { width: 24px; height: 24px; fill: white; }

.landing-note { font-size: 0.8rem; color: var(--text-muted); margin-top: 1.25rem; }

/* ============================================================
   GLASS CARDS
   ============================================================ */
.card {
  background: var(--card);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition);
}

.card-title {
  font-size: 0.8rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.1em; color: var(--text-muted);
  margin-bottom: 1.25rem;
}

/* ============================================================
   STATUS CARD (Dashboard)
   ============================================================ */
.status-card {
  padding: 2rem;
  border-radius: var(--radius);
  border: 1px solid;
  display: flex; align-items: center; gap: 1.5rem;
  margin-bottom: 2rem;
  background: rgba(28, 28, 30, 0.6);
  backdrop-filter: blur(20px);
}
.status-card.ok      { border-color: rgba(48, 209, 88, 0.3); box-shadow: 0 0 30px rgba(48, 209, 88, 0.05); }
.status-card.timeout { border-color: rgba(255, 159, 10, 0.3); box-shadow: 0 0 30px rgba(255, 159, 10, 0.05); }
.status-card.banned  { border-color: rgba(255, 69, 58, 0.3); box-shadow: 0 0 30px rgba(255, 69, 58, 0.05); }
.status-card.not_member { border-color: var(--border); }

.status-icon {
  font-size: 3rem; flex-shrink: 0;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.4));
  animation: pulse 3s ease-in-out infinite;
}
.status-title { font-size: 1.2rem; font-weight: 700; letter-spacing: -0.01em; margin-bottom: 0.25rem; }
.status-desc  { font-size: 0.95rem; color: var(--text-light); line-height: 1.5; }

.status-card.ok .status-title      { color: var(--success); }
.status-card.timeout .status-title { color: var(--warning); }
.status-card.banned .status-title  { color: var(--danger); }

/* ============================================================
   BADGES & ROLES
   ============================================================ */
.badge {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 4px 12px; border-radius: 100px;
  font-size: 0.75rem; font-weight: 600; letter-spacing: 0.02em;
  backdrop-filter: blur(10px);
}
.badge-open        { background: rgba(10, 132, 255, 0.15); color: #64d2ff; border: 1px solid rgba(10, 132, 255, 0.2); }
.badge-in_progress { background: rgba(255, 159, 10, 0.15); color: #ffd60a; border: 1px solid rgba(255, 159, 10, 0.2); }
.badge-resolved    { background: rgba(48, 209, 88, 0.15);  color: #30d158; border: 1px solid rgba(48, 209, 88, 0.2); }
.badge-rejected    { background: rgba(255, 69, 58, 0.15);  color: #ff453a; border: 1px solid rgba(255, 69, 58, 0.2); }
.badge-ban         { background: rgba(255, 69, 58, 0.1);   color: #ff453a; }
.badge-timeout     { background: rgba(255, 159, 10, 0.1);  color: #ff9f0a; }
.badge-other       { background: rgba(255, 255, 255, 0.08);color: var(--text-light); }

.role-admin       { background: rgba(255, 69, 58, 0.15); color: #ff6961; border: 1px solid rgba(255, 69, 58, 0.2); }
.role-headsupport { background: rgba(255, 159, 10, 0.15); color: #ffb340; border: 1px solid rgba(255, 159, 10, 0.2); }
.role-support     { background: rgba(48, 209, 88, 0.15); color: #32d74b; border: 1px solid rgba(48, 209, 88, 0.2); }
.role-user        { background: rgba(255, 255, 255, 0.08); color: var(--text-light); }

/* ============================================================
   FORMS (Apple Style)
   ============================================================ */
.form-group { margin-bottom: 1.5rem; }
.form-label { display: block; font-size: 0.9rem; font-weight: 500; color: var(--text); margin-bottom: 0.6rem; }
.form-hint  { font-size: 0.8rem; color: var(--text-muted); margin-top: 0.4rem; }

input[type="text"],
textarea,
select {
  width: 100%; padding: 1rem 1.25rem;
  background: rgba(0, 0, 0, 0.4); 
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-sm); color: var(--text);
  font-family: var(--font); font-size: 1rem;
  transition: all var(--transition);
  outline: none;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.2);
}
input[type="text"]:focus,
textarea:focus,
select:focus { 
  border-color: var(--accent); 
  background: rgba(0,0,0,0.6);
  box-shadow: 0 0 0 4px rgba(10, 132, 255, 0.15), inset 0 2px 4px rgba(0,0,0,0.2); 
}
textarea { resize: vertical; min-height: 140px; line-height: 1.6; }
.char-counter { font-size: 0.8rem; color: var(--text-muted); text-align: right; margin-top: 0.4rem; }

.form-error {
  background: rgba(255, 69, 58, 0.1); border: 1px solid rgba(255, 69, 58, 0.2);
  color: #ff6961; border-radius: var(--radius-sm); padding: 0.85rem 1.25rem;
  font-size: 0.9rem; margin-bottom: 1.25rem; font-weight: 500;
  display: flex; align-items: center; gap: 0.5rem;
}

/* ============================================================
   BUTTONS (iOS/macOS style)
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.85rem 1.75rem; border-radius: 100px;
  font-family: var(--font); font-size: 0.95rem; font-weight: 600;
  cursor: pointer; border: none; transition: all var(--transition);
  text-decoration: none; white-space: nowrap;
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none !important; }

.btn-primary { 
  background: var(--accent); color: white; 
  box-shadow: 0 4px 12px rgba(10, 132, 255, 0.3);
}
.btn-primary:hover:not(:disabled) { 
  background: var(--accent-l); 
  transform: scale(1.02); 
  box-shadow: 0 6px 16px rgba(10, 132, 255, 0.4); 
}
.btn-primary:active:not(:disabled) { transform: scale(0.98); }

.btn-secondary { 
  background: rgba(255, 255, 255, 0.1); color: var(--text); 
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.btn-secondary:hover:not(:disabled) { background: rgba(255, 255, 255, 0.15); transform: scale(1.02); }

/* ============================================================
   LIST ITEMS (Appeals / Admin)
   ============================================================ */
.appeal-list { display: flex; flex-direction: column; gap: 1rem; }

.appeal-item {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.5rem;
  cursor: pointer; transition: all var(--transition);
  display: grid; grid-template-columns: auto 1fr auto; gap: 1.25rem; align-items: center;
  position: relative; overflow: hidden;
}
.appeal-item::after { 
  content: ''; position: absolute; inset: 0; background: rgba(255,255,255,0.03); opacity: 0; transition: opacity var(--transition); 
}
.appeal-item:hover { transform: translateY(-3px) scale(1.01); box-shadow: var(--shadow); border-color: rgba(255,255,255,0.15); }
.appeal-item:hover::after { opacity: 1; }

.appeal-item .type-icon { font-size: 2rem; filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3)); z-index: 1;}
.appeal-item .appeal-meta { min-width: 0; z-index: 1;}
.appeal-item .appeal-nick { font-weight: 600; font-size: 1.05rem; letter-spacing: -0.01em; }
.appeal-item .appeal-preview { color: var(--text-light); font-size: 0.9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 0.3rem; }
.appeal-item .appeal-date { font-size: 0.8rem; color: var(--text-muted); margin-top: 0.5rem; font-weight: 500;}
.appeal-item-right { display: flex; flex-direction: column; align-items: flex-end; gap: 0.5rem; z-index: 1;}

/* ============================================================
   CHAT / APPEAL DETAIL (iMessage Aesthetic)
   ============================================================ */
.appeal-detail { 
  display: flex; flex-direction: column; height: calc(100vh - 6rem); max-height: 800px; 
  background: rgba(28, 28, 30, 0.4);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.chat-header {
  background: rgba(28, 28, 30, 0.8);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  padding: 1.25rem 2rem;
  display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
  z-index: 10;
}
.chat-header .user-info { display: flex; align-items: center; gap: 1rem; flex: 1; }
.chat-header .avatar { width: 44px; height: 44px; border-radius: 50%; box-shadow: 0 2px 8px rgba(0,0,0,0.3); }
.chat-header .name { font-weight: 600; font-size: 1.1rem; letter-spacing: -0.01em; margin-bottom: 0.25rem; }

.chat-messages {
  flex: 1; overflow-y: auto; padding: 2rem;
  display: flex; flex-direction: column; gap: 1.25rem;
}
.chat-messages::-webkit-scrollbar { width: 8px; }
.chat-messages::-webkit-scrollbar-track { background: transparent; }
.chat-messages::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 99px; }
.chat-messages::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.25); }

.msg {
  display: flex; gap: 1rem; animation: slideUpFade 0.3s ease;
  max-width: 85%;
}
.msg.is-staff { align-self: flex-end; flex-direction: row-reverse; }

.msg-avatar { width: 32px; height: 32px; border-radius: 50%; align-self: flex-end; margin-bottom: 1.2rem;}

.msg-body { display: flex; flex-direction: column; }
.msg.is-staff .msg-body { align-items: flex-end; }

.msg-author {
  font-size: 0.75rem; font-weight: 500; margin-bottom: 0.3rem; color: var(--text-muted);
  display: flex; align-items: center; gap: 0.5rem; padding: 0 0.5rem;
}

/* Bubbles similar to iMessage */
.msg-bubble {
  background: rgba(255,255,255,0.1);
  color: var(--text);
  border-radius: 18px 18px 18px 4px;
  padding: 0.85rem 1.1rem; font-size: 0.95rem; line-height: 1.5;
  white-space: pre-wrap; word-break: break-word;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  backdrop-filter: blur(10px);
}
.msg.is-staff .msg-bubble {
  background: var(--accent); /* iMessage Blue */
  color: #fff;
  border-radius: 18px 18px 4px 18px;
  box-shadow: 0 2px 10px rgba(10, 132, 255, 0.2);
}
.msg-time { font-size: 0.7rem; color: var(--text-muted); margin-top: 0.4rem; padding: 0 0.5rem; }
.msg.initial-msg .msg-bubble { background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); }

.chat-input {
  background: rgba(28, 28, 30, 0.8);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 1.25rem 2rem;
  display: flex; gap: 1rem; align-items: flex-end;
}
.chat-input textarea {
  flex: 1; border-radius: 20px; min-height: 48px; max-height: 120px; padding: 0.8rem 1.25rem;
  background: rgba(0,0,0,0.3); border: 1px solid rgba(255,255,255,0.1);
}
.chat-input textarea:focus { background: rgba(0,0,0,0.5); }
.chat-input .btn { border-radius: 20px; padding: 0.8rem 1.5rem; }

/* ============================================================
   STATS GRID (Admin)
   ============================================================ */
.stats-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.25rem; margin-bottom: 2.5rem;
}
.stat-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.5rem;
  display: flex; flex-direction: column; justify-content: center;
  backdrop-filter: blur(20px);
}
.stat-value { font-size: 2.5rem; font-weight: 800; line-height: 1; letter-spacing: -0.03em; margin-bottom: 0.5rem;}
.stat-label { font-size: 0.85rem; font-weight: 500; color: var(--text-light); }

/* ============================================================
   USER TABLE 
   ============================================================ */
.user-table { display: flex; flex-direction: column; gap: 0.75rem; }
.user-row {
  background: rgba(255,255,255,0.03); border: 1px solid transparent; border-radius: var(--radius-sm);
  padding: 1rem 1.25rem;
  display: flex; align-items: center; gap: 1.25rem; flex-wrap: wrap;
  transition: all var(--transition);
}
.user-row:hover { background: var(--card); border-color: var(--border); transform: scale(1.01); }

/* ============================================================
   FILTER TABS (Apple segmented control style)
   ============================================================ */
.filter-tabs { 
  display: flex; gap: 0.5rem; margin-bottom: 2rem; flex-wrap: wrap; 
  background: rgba(255,255,255,0.05); padding: 0.4rem; border-radius: 100px;
  width: max-content; max-width: 100%;
}
.filter-tab {
  padding: 0.5rem 1.25rem; border-radius: 100px;
  font-size: 0.85rem; font-weight: 600; cursor: pointer;
  background: transparent; border: none;
  color: var(--text-muted); transition: all var(--transition);
}
.filter-tab:hover { color: var(--text); }
.filter-tab.active { background: rgba(255,255,255,0.15); color: var(--text); box-shadow: 0 2px 8px rgba(0,0,0,0.2); }

/* ============================================================
   MISC
   ============================================================ */
.back-btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  color: var(--accent); font-size: 0.95rem; font-weight: 600;
  cursor: pointer; border: none; background: none; margin-bottom: 1.5rem;
  transition: opacity var(--transition);
}
.back-btn:hover { opacity: 0.7; }

.empty-state { text-align: center; padding: 5rem 2rem; color: var(--text-muted); }
.empty-state .icon { font-size: 4rem; margin-bottom: 1.5rem; display: block; opacity: 0.7; filter: grayscale(0.5); }
.empty-state h3 { font-size: 1.2rem; color: var(--text); margin-bottom: 0.5rem; font-weight: 600;}

/* =========================================
   MODALS & SEARCH (Iteration 2)
========================================= */
.modal-overlay {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  z-index: 1000; display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.modal-overlay.active { opacity: 1; pointer-events: auto; }
.modal-box {
  background: rgba(40,40,42, 0.85);
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow: 0 20px 40px rgba(0,0,0,0.4);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-radius: 20px; padding: 1.5rem; max-width: 400px; width: 90%;
  transform: scale(0.9); transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  text-align: center;
}
.modal-overlay.active .modal-box { transform: scale(1); }
.modal-title { font-size: 1.25rem; font-weight: 700; margin-bottom: 0.5rem; color: #fff; }
.modal-desc { font-size: 0.95rem; color: var(--text-light); margin-bottom: 1.5rem; line-height: 1.4; }
.modal-actions { display: flex; gap: 0.8rem; justify-content: center; }
.modal-actions .btn { flex: 1; margin: 0; }

.search-container { display: flex; gap: 0.5rem; margin-bottom: 1.5rem; }
.search-container input {
  flex: 1; padding: 0.8rem 1rem; border-radius: 12px;
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1);
  color: #fff; font-family: 'Inter', sans-serif;
}
.search-container input:focus { outline: none; border-color: var(--primary); background: rgba(255,255,255,0.1); }
.search-result { margin-top: 1rem; padding: 1rem; border-radius: 12px; background: rgba(0,0,0,0.2); text-align: left; }

/* Scrollbar global */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.2); border-radius: 10px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.3); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
  :root { --sidebar-w: 0px; }
  .sidebar { transform: translateX(-100%); transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1); background: rgba(28,28,30,0.95); }
  .sidebar.open { transform: translateX(0); width: 260px; box-shadow: 10px 0 50px rgba(0,0,0,0.5); }
  .main-content { margin-left: 0; }
  .page { padding: 1.5rem; padding-top: 5rem;}
  .hamburger {
    display: flex; position: fixed; top: 1rem; left: 1rem; z-index: 200;
    background: rgba(28, 28, 30, 0.8); backdrop-filter: blur(20px); border: 1px solid rgba(255,255,255,0.1);
    border-radius: 50%; width: 44px; height: 44px; justify-content: center; align-items: center; cursor: pointer;
    flex-direction: column; gap: 4px; box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  }
  .hamburger span { display: block; width: 18px; height: 2px; background: var(--text); border-radius: 99px; transition: 0.3s; }
  .mobile-top-pad { padding-top: 5rem; }
  .msg { max-width: 100%; }
  .landing-card { padding: 2.5rem 1.5rem; border-radius: 24px;}
  .page-title { font-size: 1.8rem; }
  .stats-grid { grid-template-columns: 1fr; }
  .filter-tabs { width: 100%; }
  .filter-tab { flex: 1; text-align: center; }
}
@media (min-width: 769px) { .hamburger { display: none; } }

/* ============================================================
   USER STATUS PANEL (non-staff modal)
   ============================================================ */
.user-panel-wrapper {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(circle at 50% 30%, rgba(10, 132, 255, 0.1), transparent 60%),
              radial-gradient(circle at 80% 80%, rgba(94, 92, 230, 0.06), transparent 40%),
              var(--bg);
  padding: 2rem;
}

.user-status-modal {
  display: flex; align-items: center; justify-content: center;
  width: 100%;
  animation: scaleIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.user-status-card {
  background: rgba(28, 28, 30, 0.65);
  backdrop-filter: blur(40px) saturate(150%);
  -webkit-backdrop-filter: blur(40px) saturate(150%);
  border: 1px solid rgba(255,255,255,0.1);
  border-top-color: rgba(255,255,255,0.18);
  border-radius: 32px;
  padding: 3rem 3rem 2.5rem;
  max-width: 420px;
  width: 100%;
  text-align: center;
  box-shadow: 0 30px 60px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.08);
}

.user-avatar-wrap {
  margin-bottom: 1.5rem;
}

.user-big-avatar {
  width: 96px; height: 96px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid rgba(255,255,255,0.15);
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}

.user-big-avatar-placeholder {
  width: 96px; height: 96px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--info));
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 2.5rem; font-weight: 700; color: #fff;
  border: 3px solid rgba(255,255,255,0.15);
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}

.user-display-name {
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #fff;
  margin-bottom: 0.2rem;
}

.user-username {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-bottom: 1.8rem;
}

.user-status-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 1.2rem;
  padding: 0.75rem 1.25rem;
  background: rgba(0,0,0,0.25);
  border-radius: 100px;
}

.user-status-text {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}

/* Animated Status Lamp */
@keyframes lampPulse {
  0%, 100% { box-shadow: 0 0 4px 1px var(--lamp-glow); }
  50% { box-shadow: 0 0 10px 3px var(--lamp-glow); }
}

.status-lamp {
  display: inline-block;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--lamp-color);
  box-shadow: 0 0 6px 2px var(--lamp-glow);
  animation: lampPulse 2s ease-in-out infinite;
  flex-shrink: 0;
}

.user-penalty-details {
  text-align: left;
  background: rgba(0,0,0,0.2);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 16px;
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
}

.penalty-row {
  display: flex;
  gap: 0.5rem;
  padding: 0.4rem 0;
  font-size: 0.9rem;
  color: var(--text-light);
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.penalty-row:last-child { border-bottom: none; }
.penalty-label {
  font-weight: 600;
  color: var(--text-muted);
  min-width: 80px;
  flex-shrink: 0;
}

.user-appeal-btn {
  margin-top: 0.5rem;
  margin-bottom: 0.75rem;
}

.appeal-blocked-msg {
  font-size: 0.85rem;
  color: var(--danger);
  font-weight: 500;
  margin-bottom: 1rem;
}

.user-logout-link {
  background: none; border: none; cursor: pointer;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 500;
  font-family: var(--font);
  transition: color var(--transition);
  margin-top: 0.5rem;
}
.user-logout-link:hover { color: var(--danger); }

.user-status-not-member {
  margin-top: 0.5rem;
  margin-bottom: 1.5rem;
}

.status-info-toggle {
  background: none; border: none; cursor: pointer;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 600;
  font-family: var(--font);
  text-decoration: underline;
  transition: color var(--transition);
  padding: 0.5rem;
}
.status-info-toggle:hover { color: var(--text-light); }

.status-info-content {
  display: none;
  font-size: 0.8rem;
  color: var(--text-muted);
  background: rgba(0,0,0,0.15);
  padding: 1rem;
  border-radius: 12px;
  margin-top: 0.5rem;
  line-height: 1.4;
  text-align: left;
  border: 1px solid rgba(255,255,255,0.05);
}
.status-info-content.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

/* ============================================================
   FILE UPLOAD & ATTACHMENTS
   ============================================================ */
.file-input {
  padding: 0.75rem;
  background: rgba(0,0,0,0.3);
  border: 1px dashed rgba(255,255,255,0.15);
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--text-light);
  font-family: var(--font);
}
.file-input:hover { border-color: var(--accent); background: rgba(0,0,0,0.4); }

.file-preview-list {
  display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.75rem;
}

.file-preview-item {
  font-size: 0.8rem; color: var(--text-light);
  background: rgba(255,255,255,0.06);
  padding: 0.35rem 0.75rem;
  border-radius: 100px;
  border: 1px solid rgba(255,255,255,0.08);
}

.file-attach-btn {
  padding: 0.8rem 1rem !important;
  border-radius: 20px !important;
  font-size: 1.1rem !important;
  flex-shrink: 0;
}

.chat-file-preview {
  display: flex; flex-wrap: wrap; gap: 0.5rem;
  padding: 0 2rem;
}
.chat-file-preview:empty { display: none; }

.msg-attachment {
  margin-top: 0.5rem;
  border-radius: 12px;
  overflow: hidden;
  max-width: 300px;
}
.msg-attachment img {
  display: block;
  max-width: 100%;
  border-radius: 12px;
  cursor: pointer;
  transition: transform var(--transition);
}
.msg-attachment img:hover { transform: scale(1.02); }

/* ============================================================
   LOCKED NAV ITEM
   ============================================================ */
.nav-item.nav-locked {
  opacity: 0.45;
  cursor: not-allowed !important;
}
.nav-item.nav-locked:hover {
  background: transparent;
  transform: none;
}
.lock-icon {
  margin-left: auto;
  font-size: 0.8rem;
}

/* ============================================================
   EXTRA BUTTONS
   ============================================================ */
.btn-success {
  background: var(--success); color: #fff;
  box-shadow: 0 4px 12px rgba(48, 209, 88, 0.3);
}
.btn-success:hover:not(:disabled) { filter: brightness(1.1); transform: scale(1.02); }

.btn-danger {
  background: var(--danger); color: #fff;
  box-shadow: 0 4px 12px rgba(255, 69, 58, 0.3);
}
.btn-danger:hover:not(:disabled) { filter: brightness(1.1); transform: scale(1.02); }

.btn-danger-outline {
  background: transparent; color: var(--danger);
  border: 1px solid rgba(255, 69, 58, 0.4);
}
.btn-danger-outline:hover:not(:disabled) { background: rgba(255, 69, 58, 0.1); transform: scale(1.02); }

.btn-warning {
  background: var(--warning); color: #000;
  box-shadow: 0 4px 12px rgba(255, 159, 10, 0.3);
}
.btn-warning:hover:not(:disabled) { filter: brightness(1.1); transform: scale(1.02); }

.btn-full { width: 100%; }

.msg-closed {
  text-align: center; padding: 1.25rem; font-weight: 600;
  color: var(--text-muted); font-size: 0.95rem;
  background: rgba(0,0,0,0.2);
  border-top: 1px solid rgba(255,255,255,0.06);
}

.error-banner {
  background: rgba(255, 69, 58, 0.1); border: 1px solid rgba(255, 69, 58, 0.2);
  color: #ff6961; border-radius: var(--radius-sm); padding: 1rem 1.5rem;
  font-size: 0.95rem; font-weight: 500;
}

.msg-avatar-placeholder {
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(255,255,255,0.1), rgba(255,255,255,0.05));
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.85rem; color: var(--text-muted);
  flex-shrink: 0;
}

/* Toast */
.toast-container {
  position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 9999;
  display: flex; flex-direction: column; gap: 0.5rem;
}
.toast {
  padding: 0.85rem 1.5rem; border-radius: 12px;
  font-size: 0.9rem; font-weight: 500; font-family: var(--font);
  backdrop-filter: blur(20px);
  transition: all 0.3s ease;
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}
.toast.success { background: rgba(48, 209, 88, 0.15); color: var(--success); border: 1px solid rgba(48, 209, 88, 0.2); }
.toast.error { background: rgba(255, 69, 58, 0.15); color: var(--danger); border: 1px solid rgba(255, 69, 58, 0.2); }

@media (max-width: 768px) {
  .user-status-card { padding: 2.5rem 1.5rem 2rem; border-radius: 24px; }
  .user-big-avatar, .user-big-avatar-placeholder { width: 80px; height: 80px; }
  .user-display-name { font-size: 1.3rem; }
}
