/* ========================================
   CrystaliaMC - Public Layout CSS
   ======================================== */

/* Content padding for fixed top nav */
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.page-content {
  flex: 1;
  padding-top: 5rem;
}

/* Background effects */
.bg-effects {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.25;
  animation: floatOrb 12s ease-in-out infinite alternate;
}

.orb-1 {
  width: 500px;
  height: 500px;
  background: var(--orb-1, #a855f7);
  top: -100px;
  left: -100px;
  animation-duration: 14s;
}

.orb-2 {
  width: 400px;
  height: 400px;
  background: var(--orb-2, #6366f1);
  bottom: 100px;
  right: -80px;
  animation-duration: 10s;
  animation-delay: -5s;
}

.orb-3 {
  width: 300px;
  height: 300px;
  background: var(--orb-3, #ec4899);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation-duration: 18s;
  animation-delay: -3s;
}

@keyframes floatOrb {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(40px, -40px) scale(1.1); }
}

/* Navigation bar */
.main-nav {
  position: fixed;
  top: 1.25rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  background: var(--nav-bg, rgba(15, 17, 26, 0.85));
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--nav-border, rgba(255, 255, 255, 0.1));
  border-radius: 50px;
  padding: 0.5rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  transition: all 0.3s ease;
  box-shadow: 0 8px 32px var(--shadow-md, rgba(0, 0, 0, 0.4));
  width: max-content;
  max-width: 95vw;
}

.nav-logo {
  font-family: 'Cinzel', serif;
  font-weight: 900;
  font-size: 1.05rem;
  background: var(--gradient-main, linear-gradient(135deg, #a855f7, #6366f1));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-right: 0.75rem;
  white-space: nowrap;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-secondary, #94a3b8);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.4rem 0.75rem;
  border-radius: 20px;
  transition: all 0.25s ease;
  letter-spacing: 0.02em;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--accent-primary, #a855f7);
  background: var(--accent-subtle, rgba(168, 85, 247, 0.12));
}

/* Dropdown System in Navbar */
.nav-dropdown {
  position: relative;
  list-style: none;
}
.nav-dropdown-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.75rem;
  border-radius: 20px;
  color: var(--text-secondary, #a89bc8);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  background: transparent;
  border: none;
  white-space: nowrap;
  font-family: inherit;
}
.nav-dropdown-trigger:hover,
.nav-dropdown:hover .nav-dropdown-trigger,
.nav-dropdown.active .nav-dropdown-trigger {
  color: #fff;
  background: rgba(168, 85, 247, 0.16);
}
.nav-dropdown-trigger .fa-chevron-down {
  font-size: 0.65rem;
  transition: transform 0.25s ease;
  opacity: 0.7;
}
.nav-dropdown:hover .nav-dropdown-trigger .fa-chevron-down,
.nav-dropdown.open .nav-dropdown-trigger .fa-chevron-down {
  transform: rotate(180deg);
  opacity: 1;
}
.nav-dropdown.highlight .nav-dropdown-trigger {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.25), rgba(234, 179, 8, 0.2));
  border: 1px solid rgba(234, 179, 8, 0.45);
  color: #ffd700;
  box-shadow: 0 0 15px rgba(234, 179, 8, 0.2);
}
.nav-dropdown.highlight:hover .nav-dropdown-trigger,
.nav-dropdown.highlight.active .nav-dropdown-trigger {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.4), rgba(234, 179, 8, 0.35));
  border-color: #ffd700;
  color: #ffffff;
  box-shadow: 0 0 20px rgba(234, 179, 8, 0.35);
}
.nav-badge-pill {
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  color: #fff;
  font-size: 0.62rem;
  font-weight: 800;
  padding: 0.15rem 0.45rem;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 0.6rem);
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  min-width: 280px;
  background: rgba(18, 15, 34, 0.95);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(168, 85, 247, 0.25);
  border-radius: 18px;
  padding: 0.5rem;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6), 0 0 20px rgba(168, 85, 247, 0.15);
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 1050;
}
.nav-dropdown-menu::before {
  content: '';
  position: absolute;
  top: -0.8rem;
  left: 0;
  right: 0;
  height: 0.8rem;
}
.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown.open .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}
.nav-dropdown-item {
  display: flex !important;
  align-items: center !important;
  gap: 0.75rem !important;
  padding: 0.6rem 0.8rem !important;
  border-radius: 12px !important;
  text-decoration: none !important;
  transition: all 0.2s ease !important;
  background: transparent !important;
}
.nav-dropdown-item:hover,
.nav-dropdown-item.active-item {
  background: rgba(168, 85, 247, 0.15) !important;
  transform: translateX(3px);
}
.dropdown-item-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
  transition: transform 0.2s ease;
}
.nav-dropdown-item:hover .dropdown-item-icon {
  transform: scale(1.1);
}
.dropdown-item-text {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  text-align: left;
}
.dropdown-item-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.dropdown-item-desc {
  font-size: 0.72rem;
  color: var(--text-muted, #94a3b8);
  line-height: 1.25;
}

/* Auth navigation buttons */
.nav-auth-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 1rem;
  border-radius: 20px;
  font-weight: 700;
  font-size: 0.82rem;
  text-decoration: none;
  transition: all 0.25s ease;
  cursor: pointer;
  border: none;
}

.nav-auth-btn.login-btn {
  background: var(--gradient-main, linear-gradient(135deg, #a855f7, #6366f1));
  color: #ffffff !important;
  box-shadow: 0 4px 14px rgba(168, 85, 247, 0.35);
}

.nav-auth-btn.login-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(168, 85, 247, 0.5);
}

.nav-auth-btn.profile-btn {
  background: var(--gradient-main, linear-gradient(135deg, #a855f7, #6366f1));
  color: #ffffff !important;
  box-shadow: 0 4px 14px rgba(168, 85, 247, 0.35);
}

.nav-auth-btn.logout-btn {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444 !important;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.nav-auth-btn.logout-btn:hover {
  background: rgba(239, 68, 68, 0.25);
}

/* Hamburger */
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 0.3rem;
  background: none;
  border: none;
  margin-left: 0.5rem;
}

.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-secondary, #94a3b8);
  border-radius: 2px;
  transition: all 0.3s ease;
}

.nav-hamburger.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-hamburger.active span:nth-child(2) {
  opacity: 0;
}

.nav-hamburger.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Theme toggle button */
.theme-toggle {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 1000;
  background: var(--nav-bg, rgba(15, 17, 26, 0.85));
  backdrop-filter: blur(20px);
  border: 1px solid var(--nav-border, rgba(255, 255, 255, 0.1));
  border-radius: 50px;
  padding: 0.6rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary, #94a3b8);
  transition: all 0.3s ease;
  box-shadow: 0 4px 20px var(--shadow-sm, rgba(0, 0, 0, 0.3));
}

.theme-toggle:hover {
  color: var(--accent-primary, #a855f7);
  border-color: var(--accent-primary, #a855f7);
  transform: translateY(-2px);
}

/* Footer */
footer.footer {
  margin-top: auto;
  padding: 3.5rem 2rem 2rem;
  background: transparent !important;
  border-top: 1px solid var(--card-border, rgba(255, 255, 255, 0.08));
  text-align: center;
  position: relative;
  z-index: 1;
}

.footer-logo {
  font-family: 'Cinzel', serif;
  font-size: 1.5rem;
  font-weight: 900;
  background: var(--gradient-main, linear-gradient(135deg, #a855f7, #6366f1));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.5rem;
}

.footer-text {
  font-size: 0.85rem;
  color: var(--text-muted, #64748b);
  margin-bottom: 1.5rem;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  list-style: none;
  margin: 0 0 1.5rem;
  padding: 0;
  flex-wrap: wrap;
}

.footer-links a {
  font-size: 0.85rem;
  color: var(--text-muted, #64748b);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: var(--accent-primary, #a855f7);
}

.footer-copy {
  font-size: 0.8rem;
  color: var(--text-muted, #64748b);
  opacity: 0.75;
}

/* Responsive Mobile Navigation */
@media (max-width: 900px) {
  .nav-hamburger {
    display: flex;
  }

  .nav-user-actions {
    margin-left: auto;
    margin-right: 0.25rem;
    display: flex;
    align-items: center;
  }

  .nav-links {
    position: absolute;
    top: 110%;
    left: 0;
    right: 0;
    background: var(--nav-bg, rgba(15, 17, 26, 0.95));
    backdrop-filter: blur(25px);
    border: 1px solid var(--nav-border, rgba(255, 255, 255, 0.1));
    border-radius: 20px;
    padding: 1rem;
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
    box-shadow: 0 10px 30px var(--shadow-md, rgba(0, 0, 0, 0.5));
    display: none;
    z-index: 1005;
  }

  .nav-links.active,
  .nav-links.open {
    display: flex !important;
  }

  .nav-links a {
    text-align: center;
    padding: 0.6rem;
  }
}

@media (max-width: 520px) {
  .profile-label,
  .login-label {
    display: none;
  }
  .nav-auth-btn.login-btn {
    padding: 0.35rem 0.6rem;
  }
  .main-nav {
    padding: 0.4rem 0.75rem;
    width: 92vw;
    justify-content: space-between;
  }
}

/* ========================================
   COMMON PUBLIC COMPONENTS
   ======================================== */

/* Loading, Empty and Error States */
.loading-state, .empty-state, .error-state {
  text-align: center;
  padding: 3.5rem 1.5rem;
  color: var(--text-muted, #94a3b8);
  width: 100%;
}
.loading-state i, .empty-state i, .error-state i {
  font-size: 2.2rem;
  margin-bottom: 1rem;
  display: block;
}
.empty-state i { color: var(--text-muted, #64748b); }
.error-state { color: var(--color-danger, #ef4444); }

/* Alert / Feature Hero Cards */
.alert-card {
  max-width: 580px;
  margin: 4rem auto;
  text-align: center;
  background: var(--card-bg, rgba(18, 20, 32, 0.9));
  border: 1px solid var(--card-border, rgba(255, 255, 255, 0.1));
  border-radius: 24px;
  padding: 3.5rem 2rem;
  box-shadow: 0 20px 50px var(--shadow-md, rgba(0, 0, 0, 0.5));
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
}
.alert-card.danger { border-color: rgba(248, 113, 113, 0.3); }
.alert-card.purple { border-color: rgba(168, 85, 247, 0.3); }
.alert-card-icon { font-size: 3.5rem; margin-bottom: 1.25rem; }
.alert-card-title {
  font-family: 'Cinzel', serif;
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: var(--text-primary, #f8fafc);
}
.alert-card.danger .alert-card-title { color: #f87171; }
.alert-card.purple .alert-card-title { color: #a855f7; }
.alert-card-desc {
  color: var(--text-secondary, #94a3b8);
  margin-bottom: 2rem;
  font-size: 0.95rem;
  line-height: 1.6;
}
.alert-card-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* Status Badges */
.status-badge { display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.25rem 0.65rem; border-radius: 20px; font-size: 0.75rem; font-weight: 700; white-space: nowrap; line-height: 1.2; box-sizing: border-box; }
.status-badge.active { background: rgba(239, 68, 68, 0.15) !important; color: #f87171 !important; border: 1px solid rgba(239, 68, 68, 0.35) !important; }
.status-badge.lifted { background: rgba(34, 197, 94, 0.15) !important; color: #4ade80 !important; border: 1px solid rgba(34, 197, 94, 0.35) !important; }
.status-badge.expired { background: rgba(245, 158, 11, 0.15) !important; color: #fbbf24 !important; border: 1px solid rgba(245, 158, 11, 0.35) !important; }
.status-badge.permanent { background: rgba(168, 85, 247, 0.15) !important; color: #c084fc !important; border: 1px solid rgba(168, 85, 247, 0.35) !important; }

/* ========================================
   PUBLIC COMPONENT STYLES CONSOLIDATED
   ======================================== */

/* ── Hero Headers & Controls ── */
.main-container {
  max-width: 1200px;
  margin: 100px auto 60px;
  padding: 0 1.5rem;
  position: relative;
  z-index: 1;
}
.hero-header { text-align: center; margin-bottom: 2.5rem; }
.hero-title {
  font-family: 'Cinzel', serif; font-size: 2.5rem; font-weight: 900; margin: 0 0 0.5rem;
  background: var(--gradient-main, linear-gradient(135deg, #ffffff, #c084fc));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.hero-subtitle { color: var(--text-secondary, #94a3b8); font-size: 1rem; max-width: 600px; margin: 0 auto 1.5rem; }

.btn-back-home {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.5rem 1.1rem; border-radius: 50px;
  background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.12);
  color: #e2e8f0; font-size: 0.82rem; font-weight: 700; text-decoration: none;
  transition: all 0.25s ease;
}
.btn-back-home:hover {
  background: rgba(168, 85, 247, 0.15); border-color: rgba(168, 85, 247, 0.4);
  color: #c084fc; transform: translateX(-2px);
}

/* ── Search Box Component ── */
.search-box { max-width: 500px; margin: 0 auto 2rem; position: relative; }
.search-input {
  width: 100%; padding: 0.85rem 1.2rem 0.85rem 2.8rem; background: rgba(15, 20, 32, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.12); border-radius: 50px; color: white;
  font-family: inherit; font-size: 0.95rem; outline: none; backdrop-filter: blur(10px);
  box-shadow: 0 4px 20px rgba(0,0,0,0.3); transition: all 0.25s;
}
.search-input:focus { border-color: #818cf8; box-shadow: 0 0 25px rgba(129, 140, 248, 0.3); }
.search-icon { position: absolute; left: 1.1rem; top: 50%; transform: translateY(-50%); color: #64748b; }

/* ── Tickets Layout & Chat Components ── */
.tickets-container {
  position: relative; z-index: 10;
  max-width: 1440px; width: 100%; margin: 5.5rem auto 2rem; padding: 0 1.5rem; box-sizing: border-box;
}
.tickets-card {
  display: flex; background: rgba(18, 20, 32, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 24px;
  overflow: hidden; min-height: 720px; height: calc(100vh - 7.5rem);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5); backdrop-filter: blur(25px); width: 100%;
}
.tickets-sidebar {
  width: 360px; flex-shrink: 0; border-right: 1px solid rgba(255, 255, 255, 0.08);
  display: flex; flex-direction: column; background: rgba(12, 14, 23, 0.6);
}
.sidebar-header {
  padding: 1.25rem 1.25rem 1rem; border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex; flex-direction: column; gap: 0.85rem;
}
.sidebar-title-row { display: flex; align-items: center; justify-content: space-between; }
.sidebar-title { font-family: 'Cinzel', serif; font-size: 1.15rem; font-weight: 800; color: #f8fafc; display: flex; align-items: center; gap: 0.5rem; }
.btn-create-ticket {
  width: 100%; padding: 0.7rem 1rem; background: linear-gradient(135deg, #a855f7 0%, #6366f1 100%);
  color: white; border: none; border-radius: 12px; font-family: 'Nunito', sans-serif; font-weight: 800; font-size: 0.88rem;
  cursor: pointer; transition: all 0.25s ease; display: flex; align-items: center; justify-content: center; gap: 0.5rem;
  box-shadow: 0 4px 15px rgba(168, 85, 247, 0.35); text-decoration: none;
}
.btn-create-ticket:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(168, 85, 247, 0.5); }
.tickets-list { flex: 1; overflow-y: auto; padding: 0.85rem; display: flex; flex-direction: column; gap: 0.65rem; }
.ticket-item {
  padding: 1rem; border-radius: 14px; background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06); cursor: pointer; transition: all 0.2s ease;
}
.ticket-item:hover { background: rgba(168, 85, 247, 0.08); border-color: rgba(168, 85, 247, 0.3); transform: translateY(-1px); }
.ticket-item.active { background: rgba(168, 85, 247, 0.15); border-color: rgba(168, 85, 247, 0.45); box-shadow: 0 4px 15px rgba(168, 85, 247, 0.15); }
.ticket-item-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.4rem; }
.ticket-cat { font-size: 0.7rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; color: #c084fc; }
.ticket-subject { font-size: 0.9rem; font-weight: 700; color: #f1f5f9; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ticket-date { font-size: 0.72rem; color: #94a3b8; margin-top: 0.3rem; }
.tickets-content { flex: 1; display: flex; flex-direction: column; background: rgba(18, 20, 32, 0.95); position: relative; }
.no-ticket-selected { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; color: #94a3b8; padding: 2rem; text-align: center; gap: 1rem; }
.no-ticket-selected i { font-size: 3.5rem; color: rgba(168, 85, 247, 0.4); }
.no-ticket-selected h3 { font-family: 'Cinzel', serif; font-size: 1.3rem; margin: 0; color: #e2e8f0; }
.chat-header { padding: 1.25rem 1.5rem; border-bottom: 1px solid rgba(255, 255, 255, 0.08); display: flex; align-items: center; justify-content: space-between; background: rgba(12, 14, 23, 0.4); }
.chat-title-group { display: flex; flex-direction: column; gap: 0.2rem; }
.chat-title { font-size: 1.1rem; font-weight: 800; color: #f8fafc; }
.chat-meta { font-size: 0.75rem; color: #94a3b8; display: flex; gap: 0.8rem; }
.btn-close-ticket { padding: 0.5rem 1.1rem; background: rgba(248, 113, 113, 0.12); color: #f87171; border: 1px solid rgba(248, 113, 113, 0.3); border-radius: 10px; font-family: 'Nunito', sans-serif; font-size: 0.8rem; font-weight: 700; cursor: pointer; transition: all 0.2s; display: inline-flex; align-items: center; gap: 0.4rem; }
.btn-close-ticket:hover { background: rgba(248, 113, 113, 0.2); }
.chat-messages { flex: 1; overflow-y: auto; padding: 1.5rem; display: flex; flex-direction: column; gap: 1.25rem; }
.msg-wrap { display: flex; flex-direction: column; max-width: 80%; }
.msg-wrap.user { align-self: flex-end; }
.msg-wrap.staff { align-self: flex-start; }
.msg-box { padding: 1rem 1.25rem; border-radius: 16px; font-size: 0.9rem; line-height: 1.55; }
.msg-wrap.user .msg-box { background: linear-gradient(135deg, rgba(168, 85, 247, 0.25), rgba(99, 102, 241, 0.25)); border: 1px solid rgba(168, 85, 247, 0.4); color: #f8fafc; border-bottom-right-radius: 4px; }
.msg-wrap.staff .msg-box { background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.1); color: #e2e8f0; border-bottom-left-radius: 4px; }
.msg-meta { display: flex; align-items: center; gap: 0.5rem; font-size: 0.72rem; margin-bottom: 0.3rem; }
.msg-wrap.user .msg-meta { justify-content: flex-end; }
.msg-sender { font-weight: 800; color: #c084fc; }
.msg-sender.staff-tag { color: #4ade80; }
.msg-time { color: #64748b; }
.chat-footer { padding: 1.25rem; border-top: 1px solid rgba(255, 255, 255, 0.08); background: rgba(12, 14, 23, 0.4); }
.chat-form { display: flex; gap: 0.75rem; }
.chat-input { flex: 1; padding: 0.75rem 1rem; background: rgba(255, 255, 255, 0.04); border: 1px solid rgba(255, 255, 255, 0.12); border-radius: 12px; color: #f8fafc; font-family: 'Nunito', sans-serif; font-size: 0.9rem; outline: none; transition: border-color 0.2s; resize: none; height: 50px; }
.chat-input:focus { border-color: #a855f7; }
.btn-send { padding: 0 1.4rem; background: linear-gradient(135deg, #a855f7, #6366f1); color: white; border: none; border-radius: 12px; font-weight: 800; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.2s; }
.btn-send:hover { opacity: 0.9; transform: translateY(-1px); }

/* ── Filters & Tabs ── */
.filters-bar {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem;
  background: rgba(15, 20, 32, 0.7); backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 16px; padding: 1rem; margin-bottom: 2rem;
}
.cat-tabs { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.cat-tab {
  background: rgba(255, 255, 255, 0.04); border: 1px solid rgba(255, 255, 255, 0.08);
  color: #94a3b8; padding: 0.45rem 0.9rem; border-radius: 30px; font-size: 0.8rem; font-weight: 700;
  cursor: pointer; transition: all 0.2s;
}
.cat-tab:hover, .cat-tab.active { background: rgba(168, 85, 247, 0.2); border-color: rgba(168, 85, 247, 0.5); color: #c084fc; }
.sort-select {
  background-color: #121422 !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  color: #f8fafc !important;
  padding: 0.5rem 2.2rem 0.5rem 1rem !important;
  border-radius: 10px !important;
  font-family: 'Nunito', sans-serif !important;
  font-size: 0.82rem !important;
  font-weight: 700 !important;
  outline: none !important;
  cursor: pointer !important;
  appearance: none !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23a855f7' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 0.8rem center !important;
  background-size: 14px 14px !important;
  color-scheme: dark !important;
  box-sizing: border-box !important;
  transition: border-color 0.2s, box-shadow 0.2s, background-color 0.2s !important;
}
.sort-select:hover {
  border-color: rgba(168, 85, 247, 0.5) !important;
  background-color: #16182a !important;
}
.sort-select:focus {
  border-color: #a855f7 !important;
  box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.22) !important;
}
.sort-select option {
  background-color: #121422 !important;
  color: #f8fafc !important;
  padding: 0.65rem 1rem !important;
  font-family: 'Nunito', sans-serif !important;
  font-size: 0.85rem !important;
  font-weight: 600 !important;
}
.sort-select option:checked,
.sort-select option:hover {
  background-color: #27214a !important;
  color: #c084fc !important;
}

[data-theme="light"] .sort-select,
body.light-theme .sort-select {
  background-color: #ffffff !important;
  color: #0f172a !important;
  border-color: #cbd5e1 !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%237c3aed' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") !important;
  color-scheme: light !important;
}
[data-theme="light"] .sort-select:focus,
body.light-theme .sort-select:focus {
  border-color: #7c3aed !important;
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.18) !important;
}
[data-theme="light"] .sort-select option,
body.light-theme .sort-select option {
  background-color: #ffffff !important;
  color: #0f172a !important;
}
[data-theme="light"] .sort-select option:checked,
body.light-theme .sort-select option:checked {
  background-color: #ede9fe !important;
  color: #6d28d9 !important;
}

/* ── Suggestions Grid & Cards ── */
.suggestions-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 1.5rem; }
.suggestion-card {
  background: rgba(15, 20, 32, 0.75); backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 18px; padding: 1.25rem;
  display: flex; gap: 1.2rem; transition: all 0.3s ease; position: relative;
}
.suggestion-card:hover { border-color: rgba(168, 85, 247, 0.3); transform: translateY(-3px); box-shadow: 0 8px 30px rgba(0,0,0,0.4); }
.vote-box {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, 0.03); border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px; padding: 0.6rem 0.5rem; min-width: 46px; height: fit-content; gap: 0.3rem;
}
.btn-vote { background: none; border: none; color: #64748b; font-size: 0.9rem; cursor: pointer; transition: all 0.2s; }
.btn-vote:hover { color: #c084fc; transform: scale(1.2); }
.btn-vote.active-up { color: #22c55e; }
.btn-vote.active-down { color: #ef4444; }
.vote-score { font-weight: 800; font-size: 0.9rem; color: #f8fafc; }
.card-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.card-header-meta { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.5rem; }
.badge-cat { font-size: 0.7rem; font-weight: 800; text-transform: uppercase; padding: 2px 8px; border-radius: 6px; background: rgba(99, 102, 241, 0.15); color: #818cf8; border: 1px solid rgba(99, 102, 241, 0.3); }
.badge-status { font-size: 0.75rem; font-weight: 800; padding: 2px 10px; border-radius: 20px; text-transform: capitalize; }
.badge-status.status-pending { background: rgba(245, 158, 11, 0.15); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.3); }
.badge-status.status-in_progress { background: rgba(59, 130, 246, 0.15); color: #60a5fa; border: 1px solid rgba(59, 130, 246, 0.3); }
.badge-status.status-approved { background: rgba(34, 197, 94, 0.15); color: #4ade80; border: 1px solid rgba(34, 197, 94, 0.3); }
.badge-status.status-rejected { background: rgba(239, 68, 68, 0.15); color: #f87171; border: 1px solid rgba(239, 68, 68, 0.3); }
.badge-status.status-completed { background: rgba(168, 85, 247, 0.15); color: #c084fc; border: 1px solid rgba(168, 85, 247, 0.3); }
.card-title { font-family: 'Cinzel', serif; font-size: 1.15rem; font-weight: 800; color: #f8fafc; margin: 0.4rem 0 0.5rem; cursor: pointer; transition: color 0.2s; }
.card-title:hover { color: #c084fc; }
.card-desc { font-size: 0.88rem; color: #94a3b8; line-height: 1.5; margin-bottom: 0.5rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card-footer-meta { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 0.8rem; border-top: 1px solid rgba(255, 255, 255, 0.06); font-size: 0.8rem; color: #64748b; }
.author-info { display: flex; align-items: center; gap: 0.5rem; color: #cbd5e1; font-weight: 700; }
.author-avatar { width: 28px; height: 28px; border-radius: 6px; object-fit: cover; border: 1px solid rgba(255, 255, 255, 0.1); flex-shrink: 0; }

.btn-primary { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; padding: 0.75rem 1.5rem; border-radius: 50px; font-family: 'Nunito', sans-serif; font-size: 0.9rem; font-weight: 800; text-decoration: none; cursor: pointer; border: none; transition: all 0.25s ease; letter-spacing: 0.02em; background: var(--gradient-main, linear-gradient(135deg, #a855f7, #6366f1)); color: white; box-shadow: 0 4px 20px var(--accent-glow, rgba(168, 85, 247, 0.4)); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 30px var(--accent-glow, rgba(168, 85, 247, 0.6)); color: white; }

/* ── Wiki Layout & Articles ── */
.wiki-layout { display: grid; grid-template-columns: 280px 1fr; gap: 2rem; }
.sidebar-cats {
  background: rgba(15, 20, 32, 0.75); backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 18px; padding: 1.2rem; height: fit-content;
}
.sidebar-title { font-family: 'Cinzel', serif; font-size: 0.95rem; font-weight: 800; color: #f1f5f9; margin-bottom: 1rem; }
.cat-list { display: flex; flex-direction: column; gap: 0.4rem; list-style: none; padding: 0; margin: 0; }
.cat-item {
  padding: 0.7rem 1rem; border-radius: 12px; font-size: 0.88rem; font-weight: 700; color: #94a3b8;
  cursor: pointer; transition: all 0.2s; display: flex; align-items: center; justify-content: space-between;
}
.cat-item:hover, .cat-item.active { background: rgba(99, 102, 241, 0.15); color: #818cf8; }
.cat-count { font-size: 0.75rem; background: rgba(255,255,255,0.06); padding: 2px 7px; border-radius: 10px; }
.articles-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.25rem; }
.article-card {
  background: rgba(15, 20, 32, 0.75); backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 16px; padding: 1.2rem;
  cursor: pointer; transition: all 0.3s ease; display: flex; flex-direction: column;
}
.article-card:hover { border-color: rgba(129, 140, 248, 0.4); transform: translateY(-3px); box-shadow: 0 8px 30px rgba(0,0,0,0.4); }
.article-title { font-size: 1.05rem; font-weight: 800; color: #f8fafc; margin: 0 0 0.5rem; line-height: 1.3; }
.article-excerpt { font-size: 0.83rem; color: #94a3b8; line-height: 1.4; margin-bottom: 1rem; flex: 1; }
.article-meta { display: flex; align-items: center; justify-content: space-between; font-size: 0.75rem; color: #64748b; }

/* Markdown Body Renderer */
.markdown-body h1, .markdown-body h2, .markdown-body h3 { font-family: 'Cinzel', serif; color: #f8fafc; margin-top: 1.5rem; margin-bottom: 0.8rem; }
.markdown-body p { line-height: 1.7; color: #cbd5e1; font-size: 0.95rem; }
.markdown-body code { background: rgba(255,255,255,0.08); padding: 2px 6px; border-radius: 4px; font-family: monospace; }
.markdown-body pre { background: #07090e; padding: 1rem; border-radius: 10px; overflow-x: auto; }

/* ── Modales Públicos ── */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.8); backdrop-filter: blur(12px);
  z-index: 500; display: none; align-items: center; justify-content: center; padding: 1.5rem;
}
.modal-overlay.open { display: flex; }
.modal-content, .modal {
  background: #0f1420; border: 1px solid rgba(255,255,255,0.12); border-radius: 20px;
  width: 100%; max-width: 650px; max-height: 88vh; overflow-y: auto; padding: 2.2rem; position: relative;
  box-shadow: 0 24px 60px rgba(0,0,0,0.6);
}
.modal-close {
  position: absolute; top: 1.2rem; right: 1.2rem; background: none; border: none; color: #64748b;
  font-size: 1.3rem; cursor: pointer; transition: color 0.2s;
}
.modal-close:hover { color: #f8fafc; }
.btn-cancel { padding: 0.65rem 1.25rem; border: 1px solid rgba(255,255,255,0.12); background: transparent; color: #94a3b8; border-radius: 10px; font-weight: 700; font-size: 0.85rem; cursor: pointer; text-decoration: none; }
.btn-cancel:hover { color: #f8fafc; background: rgba(255,255,255,0.05); }

/* Responsive Grid Rules */
@media (max-width: 850px) {
  .wiki-layout { grid-template-columns: 1fr; }
  .tickets-card { flex-direction: column; height: auto; min-height: calc(100vh - 8rem); }
  .tickets-sidebar { width: 100%; height: 260px; border-right: none; border-bottom: 1px solid rgba(255,255,255,0.08); }
  .msg-wrap { max-width: 95%; }
}

/* ── Form & Card Components ── */
.content-card {
  background: var(--card-bg, rgba(18, 20, 32, 0.88));
  border: 1px solid var(--card-border, rgba(255, 255, 255, 0.1));
  border-radius: 24px; padding: 2.5rem; margin-bottom: 4rem;
  box-shadow: 0 24px 60px var(--shadow-md, rgba(0, 0, 0, 0.5));
  position: relative; overflow: hidden; max-width: 800px;
  margin-left: auto; margin-right: auto;
}
.content-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--gradient-main, linear-gradient(135deg, #a855f7, #6366f1));
}
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; margin-top: 1.5rem; }
.form-group { margin-bottom: 0.5rem; }
.form-group.full-width { grid-column: 1 / -1; }
.form-group label { display: block; font-size: 0.82rem; font-weight: 700; color: var(--text-secondary, #94a3b8); margin-bottom: 0.45rem; }
.form-group small { display: block; font-size: 0.72rem; color: var(--text-muted, #64748b); margin-top: 0.25rem; }
.form-input {
  width: 100%; padding: 0.75rem 1rem; background: var(--hover-bg, rgba(255,255,255,0.04));
  border: 1px solid var(--card-border, rgba(255,255,255,0.12)); border-radius: 12px;
  color: var(--text-primary, #f8fafc); font-family: 'Nunito', sans-serif; font-size: 0.9rem;
  transition: border-color 0.2s; outline: none;
}
.form-input:focus { border-color: var(--accent-primary, #a855f7); }
textarea.form-input { resize: vertical; min-height: 110px; }
.btn-submit {
  width: 100%; padding: 0.9rem; background: var(--gradient-main, linear-gradient(135deg, #a855f7, #6366f1));
  color: white; border: none; border-radius: 12px; font-family: 'Nunito', sans-serif; font-size: 0.95rem;
  font-weight: 700; cursor: pointer; transition: all 0.25s ease; margin-top: 1.5rem;
  display: flex; align-items: center; justify-content: center; gap: 0.5rem;
}
.btn-submit:hover { transform: translateY(-2px); box-shadow: 0 8px 24px var(--accent-glow, rgba(168,85,247,0.3)); }
.btn-submit:disabled { opacity: 0.6; cursor: not-allowed; transform: none; box-shadow: none; }
.alert-box { padding: 1.25rem; border-radius: 16px; font-size: 0.9rem; margin-bottom: 2rem; display: flex; align-items: flex-start; gap: 0.75rem; line-height: 1.6; }
.alert-box.info { background: rgba(180, 159, 220, 0.1); border: 1px solid rgba(180, 159, 220, 0.25); color: var(--text-secondary); }
.alert-box.info i { color: var(--accent-primary); }
.app-detail-item { border-bottom: 1px solid var(--card-border, rgba(255,255,255,0.08)); padding: 1rem 0; }
.app-detail-item:last-child { border-bottom: none; }
.app-detail-label { font-size: 0.75rem; font-weight: 800; text-transform: uppercase; color: var(--text-muted); margin-bottom: 0.25rem; }
.app-detail-value { font-size: 0.9rem; color: var(--text-primary); white-space: pre-line; }

/* ── News Component Styles ── */
.news-hero { min-height: 40vh; display: flex; align-items: center; justify-content: center; text-align: center; padding-top: 8rem; padding-bottom: 3rem; }
.news-filters { display: flex; gap: 0.75rem; flex-wrap: wrap; justify-content: center; margin-bottom: 3rem; }
.filter-btn { padding: 0.5rem 1.25rem; border-radius: 50px; font-size: 0.85rem; font-weight: 600; cursor: pointer; border: 1px solid var(--card-border, rgba(255,255,255,0.1)); background: var(--card-bg, rgba(15,20,32,0.8)); color: var(--text-secondary, #94a3b8); transition: all 0.2s ease; }
.filter-btn:hover, .filter-btn.active { background: var(--accent-subtle, rgba(168,85,247,0.15)); border-color: var(--accent-border, rgba(168,85,247,0.4)); color: var(--accent-primary, #c084fc); }
.news-full-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 2rem; }
.news-article { background: var(--card-bg, rgba(15,20,32,0.8)); border: 1px solid var(--card-border, rgba(255,255,255,0.08)); border-radius: 20px; overflow: hidden; transition: all 0.3s ease; display: flex; flex-direction: column; }
.news-article:hover { transform: translateY(-4px); border-color: var(--accent-border, rgba(168,85,247,0.4)); box-shadow: 0 16px 40px var(--shadow-md, rgba(0,0,0,0.4)); }
.news-article-banner { height: 160px; display: flex; align-items: center; justify-content: center; font-size: 4rem; position: relative; overflow: hidden; }
.news-article-banner::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to bottom, transparent 50%, rgba(0,0,0,0.3)); }
.news-article-body { padding: 1.75rem; flex: 1; display: flex; flex-direction: column; }
.news-article-meta { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 1rem; flex-wrap: wrap; }
.news-article-body h2 { font-family: 'Cinzel', serif; font-size: 1.15rem; font-weight: 700; color: var(--text-primary, #f8fafc); margin-bottom: 0.75rem; line-height: 1.4; }
.news-article-body p { font-size: 0.9rem; color: var(--text-secondary, #94a3b8); line-height: 1.6; flex: 1; }
.news-article-footer { display: flex; align-items: center; justify-content: space-between; margin-top: 1.5rem; padding-top: 1rem; border-top: 1px solid var(--card-border, rgba(255,255,255,0.08)); font-size: 0.8rem; color: var(--text-muted, #64748b); }
.featured-news { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: 0; min-height: 280px; }
.featured-news .news-article-banner { height: 100%; min-height: 200px; font-size: 6rem; border-radius: 0; }
.featured-news .news-article-body { padding: 2.5rem; }
.featured-news .news-article-body h2 { font-size: 1.5rem; }
@media (max-width: 700px) {
  .featured-news { grid-template-columns: 1fr; }
  .featured-news .news-article-banner { height: 140px; }
  .news-full-grid { grid-template-columns: 1fr; }
}

/* ── Team & Hierarchy Component Styles ── */
.page-hero { display: flex; align-items: center; justify-content: center; text-align: center; padding-top: 6rem; padding-bottom: 1.5rem; }
.back-btn { position: fixed; top: 1.5rem; left: 1.5rem; z-index: 1001; background: var(--nav-bg, rgba(15,17,26,0.85)); backdrop-filter: blur(20px); border: 1px solid var(--nav-border, rgba(255,255,255,0.1)); border-radius: 50px; padding: 0.5rem 1rem; display: flex; align-items: center; gap: 0.5rem; text-decoration: none; color: var(--text-secondary, #94a3b8); font-size: 0.85rem; font-weight: 600; transition: all 0.25s ease; box-shadow: 0 4px 20px var(--nav-shadow, rgba(0,0,0,0.4)); }
.back-btn:hover { color: var(--accent-primary, #a855f7); border-color: var(--accent-border, rgba(168,85,247,0.4)); transform: translateX(-3px); }
.hierarchy-wrap { background: var(--card-bg, rgba(15,20,32,0.8)); border: 1px solid var(--card-border, rgba(255,255,255,0.08)); border-radius: 20px; padding: 1.75rem 2rem; margin-bottom: 2rem; }
.hierarchy-title { font-family: 'Cinzel', serif; font-size: 1rem; font-weight: 700; color: var(--text-primary, #f8fafc); text-align: center; margin-bottom: 1.5rem; }
.rank-line { display: flex; align-items: center; justify-content: center; gap: 0.4rem; flex-wrap: wrap; }
.rank-step { display: flex; flex-direction: column; align-items: center; gap: 0.35rem; padding: 0.8rem 1rem; background: var(--hover-bg, rgba(255,255,255,0.04)); border: 1px solid var(--card-border, rgba(255,255,255,0.08)); border-radius: 14px; min-width: 95px; text-align: center; cursor: default; transition: all 0.22s ease; }
.rank-step:hover { border-color: var(--node-color, var(--accent-primary)); background: color-mix(in srgb, var(--node-color, var(--accent-primary)) 10%, transparent); transform: translateY(-2px); }
.rank-icon { font-size: 1.4rem; line-height: 1; }
.rank-name { font-family: 'Cinzel', serif; font-size: 0.72rem; font-weight: 700; color: var(--text-primary, #f8fafc); }
.rank-label { font-size: 0.58rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.1em; color: var(--node-color, var(--text-muted)); }
.rank-arrow { color: var(--text-muted, #64748b); font-size: 0.75rem; flex-shrink: 0; }
.node-owner   { --node-color: #f59e0b; }
.node-admin   { --node-color: #b49fdc; }
.node-mod     { --node-color: #90b8e8; }
.node-helper  { --node-color: #f472b6; }
.node-builder { --node-color: #4ade80; }
#teamFiltersBar { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-start; gap: 0.65rem; padding: 0.85rem 1.25rem; margin-bottom: 2rem; background: var(--card-bg, rgba(15,20,32,0.8)); border: 1px solid var(--card-border, rgba(255,255,255,0.08)); border-radius: 16px; }
.filter-pill { display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.4rem 1rem; border-radius: 50px; font-size: 0.82rem; font-weight: 700; cursor: pointer; border: 1px solid var(--card-border, rgba(255,255,255,0.08)); background: var(--card-bg, rgba(15,20,32,0.8)); color: var(--text-secondary, #94a3b8); transition: all 0.22s ease; }
.filter-pill:hover { border-color: var(--pill-color, var(--accent-border)); color: var(--pill-color, var(--accent-primary)); }
.filter-pill.active { border-color: var(--pill-color, var(--accent-primary)); color: var(--pill-color, var(--accent-primary)); background: color-mix(in srgb, var(--pill-color, var(--accent-primary)) 12%, transparent); }
.pill-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--pill-color, var(--accent-primary)); flex-shrink: 0; }
.role-count { background: var(--hover-bg, rgba(255,255,255,0.04)); border: 1px solid var(--card-border, rgba(255,255,255,0.08)); color: var(--text-muted, #64748b); font-size: 0.7rem; font-weight: 700; padding: 0.1rem 0.45rem; border-radius: 20px; margin-left: 0.2rem; }
.pill-all    { --pill-color: var(--accent-primary, #a855f7); }
.pill-owner  { --pill-color: #f59e0b; }
.pill-admin  { --pill-color: #b49fdc; }
.pill-mod    { --pill-color: #90b8e8; }
.pill-helper { --pill-color: #f472b6; }
.pill-builder{ --pill-color: #4ade80; }

/* ── Staff Cards & Apply Section Components ── */
.rank-section { margin-bottom: 3rem; transition: opacity 0.3s ease; }
.rank-section.hidden { display: none; }
.rank-section-header { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 1.25rem; }
.rank-section-label { font-size: 0.72rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.18em; color: var(--section-color, var(--text-muted)); }
.rank-section-line { flex: 1; height: 1px; background: var(--card-border, rgba(255,255,255,0.08)); }
.staff-cards-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 1rem; }
.staff-cards-row.single-col { grid-template-columns: minmax(210px, 320px); }
.scard { background: var(--card-bg, rgba(15,20,32,0.8)); border: 1px solid var(--card-border, rgba(255,255,255,0.08)); border-radius: 16px; padding: 1.25rem; transition: all 0.25s ease; position: relative; overflow: hidden; }
.scard::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: var(--scard-color, var(--gradient-main)); transform: scaleX(0); transform-origin: left; transition: transform 0.3s ease; }
.scard:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--scard-color, var(--accent-primary)) 50%, transparent); box-shadow: 0 10px 30px var(--shadow-md, rgba(0,0,0,0.4)); }
.scard:hover::before { transform: scaleX(1); }
.scard.vacant { opacity: 0.4; border-style: dashed; }
.scard-header { display: flex; align-items: center; gap: 0.85rem; margin-bottom: 0.9rem; }
.scard-avatar { width: 44px; height: 44px; border-radius: 10px; background: color-mix(in srgb, var(--scard-color, var(--accent-primary)) 18%, transparent); border: 1.5px solid color-mix(in srgb, var(--scard-color, var(--accent-primary)) 35%, transparent); display: flex; align-items: center; justify-content: center; font-size: 1.4rem; flex-shrink: 0; position: relative; overflow: hidden; }
.scard-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; }
.scard-info { min-width: 0; }
.scard-name { font-family: 'Cinzel', serif; font-size: 0.9rem; font-weight: 700; color: var(--text-primary, #f8fafc); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.scard-role { font-size: 0.62rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.1em; color: var(--scard-color, var(--accent-primary)); }
.scard-bio { font-size: 0.8rem; color: var(--text-secondary, #94a3b8); line-height: 1.55; margin-bottom: 1rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.scard-meta { display: flex; flex-direction: column; gap: 0.3rem; margin-bottom: 0.9rem; }
.scard-meta-item { display: flex; align-items: center; gap: 0.5rem; font-size: 0.75rem; color: var(--text-muted, #64748b); }
.scard-meta-item i { width: 12px; font-size: 0.65rem; color: var(--text-muted); flex-shrink: 0; }
.scard-meta-item span { color: var(--text-secondary, #94a3b8); font-weight: 600; }
.scard-status { display: flex; align-items: center; gap: 0.45rem; font-size: 0.72rem; font-weight: 700; }
.scard-status-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.dot-online  { background: #4ade80; box-shadow: 0 0 6px #4ade8088; }
.dot-away    { background: #fbbf24; box-shadow: 0 0 6px #fbbf2488; }
.dot-offline { background: #6b7280; }
.status-online-text  { color: #4ade80; }
.status-away-text    { color: #fbbf24; }
.status-offline-text { color: #6b7280; }
.sc-owner   { --scard-color: #f59e0b; }
.sc-admin   { --scard-color: #b49fdc; }
.sc-mod     { --scard-color: #90b8e8; }
.sc-helper  { --scard-color: #f472b6; }
.sc-builder { --scard-color: #4ade80; }

.apply-section { background: var(--card-bg, rgba(15,20,32,0.8)); border: 1px solid var(--card-border, rgba(255,255,255,0.08)); border-radius: 24px; padding: 3rem 2rem; text-align: center; position: relative; overflow: hidden; margin-top: 2rem; }
.apply-section::before { content: ''; position: absolute; inset: 0; background: var(--gradient-main, linear-gradient(135deg, #a855f7, #6366f1)); opacity: 0.03; pointer-events: none; }
.apply-section h3 { font-family: 'Cinzel', serif; font-size: 1.4rem; font-weight: 700; color: var(--text-primary, #f8fafc); margin-bottom: 0.75rem; }
.apply-section > p { color: var(--text-secondary, #94a3b8); max-width: 500px; margin: 0 auto 2rem; line-height: 1.65; }
.apply-reqs { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0.9rem; margin-bottom: 2.25rem; text-align: left; }
.req-item { display: flex; align-items: flex-start; gap: 0.7rem; padding: 0.8rem 1rem; background: var(--hover-bg, rgba(255,255,255,0.04)); border-radius: 10px; font-size: 0.875rem; color: var(--text-secondary, #94a3b8); }
.req-item i { color: var(--accent-primary, #a855f7); margin-top: 0.1rem; flex-shrink: 0; }
@media (max-width: 600px) {
  .staff-cards-row { grid-template-columns: 1fr; }
  .staff-cards-row.single-col { grid-template-columns: 1fr; }
}

/* ── Notification Component Styles ── */
.page-title { font-family: 'Cinzel', serif; font-size: 2rem; font-weight: 900; margin: 0 0 0.5rem; background: var(--gradient-main, linear-gradient(135deg, #ffffff, #c084fc)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.header-box { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.5rem; flex-wrap: wrap; gap: 1rem; }
.action-group { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.btn-action { background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.12); color: #e2e8f0; padding: 0.5rem 0.9rem; border-radius: 10px; font-size: 0.8rem; font-weight: 700; cursor: pointer; transition: all 0.2s; display: inline-flex; align-items: center; gap: 0.4rem; text-decoration: none; }
.btn-action:hover { background: rgba(168, 85, 247, 0.2); color: #c084fc; border-color: rgba(168, 85, 247, 0.4); }
.btn-action.btn-danger:hover { background: rgba(239, 68, 68, 0.2); color: #f87171; border-color: rgba(239, 68, 68, 0.4); }
.notif-card { background: var(--card-bg, rgba(15, 20, 32, 0.75)); backdrop-filter: blur(15px); border: 1px solid var(--card-border, rgba(255, 255, 255, 0.08)); border-radius: 14px; padding: 1rem 1.25rem; margin-bottom: 0.8rem; display: flex; gap: 1rem; align-items: flex-start; transition: all 0.2s; position: relative; }
.notif-card.unread { background: rgba(168, 85, 247, 0.08); border-color: rgba(168, 85, 247, 0.25); }
.notif-icon { width: 38px; height: 38px; border-radius: 50%; background: rgba(168, 85, 247, 0.2); color: #c084fc; display: flex; align-items: center; justify-content: center; font-size: 0.95rem; flex-shrink: 0; }
.notif-content { flex: 1; }
.notif-title { font-weight: 800; font-size: 0.9rem; color: var(--text-primary, #f8fafc); margin-bottom: 0.2rem; }
.notif-message { font-size: 0.83rem; color: var(--text-secondary, #94a3b8); line-height: 1.4; }
.notif-date { font-size: 0.72rem; color: var(--text-muted, #64748b); margin-top: 0.4rem; }
.notif-actions { display: flex; align-items: center; gap: 0.4rem; flex-shrink: 0; }
.btn-delete-card { background: none; border: none; color: #64748b; cursor: pointer; padding: 0.4rem; font-size: 0.85rem; transition: color 0.2s; }
.btn-delete-card:hover { color: #ef4444; }

/* ── Auth Component Styles (Login & Registro) ── */
.auth-page-wrapper { flex: 1; display: flex; align-items: center; justify-content: center; padding: 7rem 1.5rem 4rem; width: 100%; box-sizing: border-box; }
.auth-card { background: var(--card-bg, rgba(15,20,32,0.8)); border: 1px solid var(--card-border, rgba(255,255,255,0.08)); border-radius: 24px; padding: 2.5rem 2rem; width: 100%; max-width: 420px; position: relative; z-index: 1; box-shadow: 0 24px 60px var(--shadow-md, rgba(0,0,0,0.5)); }
.auth-logo { font-family: 'Cinzel', serif; font-size: 1.4rem; font-weight: 900; background: var(--gradient-main, linear-gradient(135deg, #ffffff, #c084fc)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; text-align: center; margin-bottom: 0.25rem; }
.auth-sub { text-align: center; font-size: 0.85rem; color: var(--text-muted, #64748b); margin-bottom: 2rem; }
.input-icon { position: relative; }
.input-icon i { position: absolute; left: 1rem; top: 50%; transform: translateY(-50%); color: var(--text-muted, #64748b); font-size: 0.85rem; }
.input-icon .form-input { padding-left: 2.5rem; }
.auth-footer { text-align: center; margin-top: 1.5rem; font-size: 0.85rem; color: var(--text-muted, #64748b); }
.auth-footer a { color: var(--accent-primary, #a855f7); text-decoration: none; font-weight: 600; }
.alert { padding: 0.75rem 1rem; border-radius: 10px; font-size: 0.85rem; margin-bottom: 1rem; display: none; }
.alert-error { background: rgba(239,68,68,0.12); border: 1px solid rgba(239,68,68,0.3); color: #f87171; }
.alert-success { background: rgba(74,222,128,0.12); border: 1px solid rgba(74,222,128,0.3); color: #4ade80; }
.divider { display: flex; align-items: center; gap: 1rem; margin: 1.5rem 0; color: var(--text-muted, #64748b); font-size: 0.8rem; }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--card-border, rgba(255,255,255,0.08)); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.strength-bar { height: 4px; border-radius: 2px; background: var(--card-border, rgba(255,255,255,0.08)); margin-top: 0.5rem; overflow: hidden; }
.strength-fill { height: 100%; width: 0; border-radius: 2px; transition: width 0.3s, background 0.3s; }
@media (max-width: 480px) { .form-row { grid-template-columns: 1fr; } }

/* ── Sanctions Component Styles ── */
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-top: 1.8rem; margin-bottom: 0; width: 100%; box-sizing: border-box; flex-shrink: 0; }
@media (max-width: 700px) { .stats-grid { grid-template-columns: repeat(2, 1fr); } }
.stat-card { background: var(--card-bg, rgba(15, 20, 32, 0.75)); backdrop-filter: blur(15px); border: 1px solid var(--card-border, rgba(255, 255, 255, 0.08)); border-radius: 16px; padding: 1.2rem; text-align: center; transition: border-color 0.25s, transform 0.25s, box-shadow 0.25s; }
.stat-card:hover { border-color: rgba(129, 140, 248, 0.3); transform: translateY(-2px); }
.stat-icon { font-size: 1.5rem; margin-bottom: 0.5rem; }
.stat-number { font-family: 'Cinzel', serif; font-size: 1.8rem; font-weight: 900; color: #f8fafc; }
.stat-label { font-size: 0.8rem; color: #94a3b8; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; }
.stat-card.bans .stat-icon { color: #ef4444; }
.stat-card.mutes .stat-icon { color: #f59e0b; }
.stat-card.warnings .stat-icon { color: #3b82f6; }
.stat-card.kicks .stat-icon { color: #8b5cf6; }

.search-section { max-width: 600px; margin: 0 auto 2rem; position: relative; }
.search-results { position: absolute; top: 100%; left: 0; right: 0; margin-top: 0.5rem; background: rgba(15, 20, 32, 0.95); backdrop-filter: blur(15px); border: 1px solid rgba(255, 255, 255, 0.12); border-radius: 16px; max-height: 300px; overflow-y: auto; z-index: 50; display: none; }
.search-result-item { display: flex; align-items: center; gap: 0.75rem; padding: 0.75rem 1rem; cursor: pointer; transition: background 0.2s; border-bottom: 1px solid rgba(255,255,255,0.05); }
.search-result-item:hover { background: rgba(129, 140, 248, 0.1); }
.search-result-item:last-child { border-bottom: none; }
.search-result-item img { width: 32px; height: 32px; border-radius: 4px; }
.search-result-item .name { font-weight: 700; color: #f8fafc; }

.tabs-bar { display: flex; gap: 0.5rem; margin-bottom: 1.5rem; flex-wrap: wrap; background: rgba(15, 20, 32, 0.6); backdrop-filter: blur(10px); border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 14px; padding: 0.5rem; }
.tab-btn { padding: 0.6rem 1.2rem; border-radius: 10px; border: none; background: transparent; color: #94a3b8; font-family: inherit; font-size: 0.85rem; font-weight: 700; cursor: pointer; transition: all 0.2s; display: flex; align-items: center; gap: 0.4rem; }
.tab-btn:hover { background: rgba(255,255,255,0.05); color: #e2e8f0; }
.tab-btn.active { background: rgba(99, 102, 241, 0.2); color: #818cf8; }
.tab-btn .badge { font-size: 0.7rem; background: rgba(255,255,255,0.1); padding: 1px 6px; border-radius: 8px; min-width: 18px; text-align: center; }
.tab-btn.active .badge { background: rgba(129, 140, 248, 0.3); }

.punishments-table-wrap { background: rgba(15, 20, 32, 0.75); backdrop-filter: blur(15px); border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 18px; overflow-x: auto; width: 100%; box-sizing: border-box; min-height: 520px; display: flex; flex-direction: column; justify-content: space-between; }
.punishments-table { width: 100%; border-collapse: collapse; table-layout: fixed; min-width: 780px; }
.punishments-table th { font-family: 'Cinzel', serif; font-size: 0.75rem; font-weight: 800; color: #94a3b8; text-transform: uppercase; letter-spacing: 0.05em; padding: 1rem; text-align: left; border-bottom: 1px solid rgba(255,255,255,0.08); cursor: pointer; user-select: none; white-space: nowrap; }
.punishments-table th:nth-child(1) { width: 18%; padding-left: 1.5rem; }
.punishments-table th:nth-child(2) { width: 24%; }
.punishments-table th:nth-child(3) { width: 12%; }
.punishments-table th:nth-child(4) { width: 14%; }
.punishments-table th:nth-child(5) { width: 12%; }
.punishments-table th:nth-child(6) { width: 115px; }
.punishments-table th:nth-child(7) { width: 110px; text-align: right; padding-right: 1.5rem; }
.punishments-table th:hover { color: #818cf8; }
.punishments-table th .sort-icon { font-size: 0.65rem; margin-left: 0.3rem; }
.punishments-table td { padding: 0.85rem 1rem; border-bottom: 1px solid rgba(255,255,255,0.04); font-size: 0.85rem; color: #cbd5e1; vertical-align: middle; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.punishments-table td:nth-child(1) { padding-left: 1.5rem; }
.punishments-table td:nth-child(6) { overflow: visible; padding-left: 0.25rem; padding-right: 0.25rem; }
.punishments-table td:nth-child(7) { text-align: right; padding-right: 1.5rem; }
.punishments-table tr:hover td { background: rgba(129, 140, 248, 0.04); }
.punishments-table tr:last-child td { border-bottom: none; }

.player-cell { display: flex; align-items: center; gap: 0.6rem; overflow: hidden; }
.player-cell img { width: 28px; height: 28px; border-radius: 4px; flex-shrink: 0; }
.player-cell .player-name { font-weight: 700; color: #f8fafc; cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.player-cell .player-name:hover { color: #818cf8; }
.reason-cell { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.staff-name { color: #818cf8; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }

.pagination { display: flex; align-items: center; justify-content: center; gap: 0.5rem; padding: 1rem; border-top: 1px solid rgba(255,255,255,0.06); min-height: 54px; box-sizing: border-box; }
.page-btn { padding: 0.5rem 0.85rem; border-radius: 8px; border: 1px solid rgba(255,255,255,0.1); background: rgba(255,255,255,0.04); color: #94a3b8; font-family: inherit; font-size: 0.8rem; font-weight: 700; cursor: pointer; transition: all 0.2s; }
.page-btn:hover:not(:disabled) { background: rgba(129, 140, 248, 0.15); color: #818cf8; border-color: rgba(129, 140, 248, 0.3); }
.page-btn.active { background: rgba(99, 102, 241, 0.25); color: #818cf8; border-color: #818cf8; }
.page-btn:disabled { opacity: 0.3; cursor: not-allowed; }
.page-info { font-size: 0.8rem; color: #64748b; padding: 0 0.5rem; }

.player-header { display: flex; align-items: center; gap: 1.2rem; margin-bottom: 1.5rem; padding-bottom: 1.2rem; border-bottom: 1px solid rgba(255,255,255,0.08); }
.player-header img { width: 64px; height: 64px; border-radius: 8px; }
.player-header-info h2 { font-family: 'Cinzel', serif; font-size: 1.5rem; color: #f8fafc; margin: 0; }
.player-header-info .uuid { font-size: 0.75rem; color: #64748b; font-family: monospace; }
.player-stats-row { display: flex; gap: 0.75rem; margin-bottom: 1.5rem; flex-wrap: wrap; }
.player-stat { flex: 1; min-width: 80px; background: rgba(255,255,255,0.04); border-radius: 10px; padding: 0.6rem 0.8rem; text-align: center; }
.player-stat .num { font-family: 'Cinzel', serif; font-size: 1.3rem; font-weight: 900; color: #f8fafc; }
.player-stat .lbl { font-size: 0.7rem; color: #94a3b8; text-transform: uppercase; }

.punishment-item { background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.06); border-radius: 12px; padding: 1rem; margin-bottom: 0.75rem; }
.punishment-item-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.5rem; }
.punishment-type-badge { font-size: 0.7rem; font-weight: 800; text-transform: uppercase; padding: 0.2rem 0.5rem; border-radius: 6px; }
.punishment-type-badge.ban { background: rgba(239, 68, 68, 0.2); color: #ef4444; }
.punishment-type-badge.mute { background: rgba(245, 158, 11, 0.2); color: #f59e0b; }
.punishment-type-badge.warning { background: rgba(59, 130, 246, 0.2); color: #3b82f6; }
.punishment-type-badge.kick { background: rgba(139, 92, 246, 0.2); color: #8b5cf6; }
.punishment-reason { color: #e2e8f0; font-size: 0.9rem; margin: 0.3rem 0; }
.punishment-meta { font-size: 0.75rem; color: #64748b; display: flex; gap: 1rem; flex-wrap: wrap; }
.btn-appeal { display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.3rem 0.65rem; border-radius: 8px; border: 1px solid rgba(129, 140, 248, 0.3); background: rgba(99, 102, 241, 0.15); color: #818cf8; font-family: inherit; font-size: 0.75rem; font-weight: 700; cursor: pointer; transition: all 0.2s; }
.btn-appeal:hover { background: rgba(99, 102, 241, 0.3); transform: translateY(-1px); }

@media (max-width: 768px) {
  .hero-title { font-size: 1.8rem; }
  .punishments-table th:nth-child(4), .punishments-table td:nth-child(4) { display: none; }
  .punishments-table th:nth-child(5), .punishments-table td:nth-child(5) { display: none; }
}

/* ── Profile Component Styles ── */
.profile-page { max-width: 900px; margin: 0 auto; padding: 8rem 1.5rem 4rem; position: relative; z-index: 1; }
.back-btn { position: fixed; top: 1.5rem; left: 1.5rem; z-index: 1001; background: var(--nav-bg, rgba(15,20,32,0.85)); backdrop-filter: blur(20px); border: 1px solid var(--nav-border, rgba(255,255,255,0.08)); border-radius: 50px; padding: 0.5rem 1rem; display: flex; align-items: center; gap: 0.5rem; text-decoration: none; color: var(--text-secondary, #94a3b8); font-size: 0.85rem; font-weight: 600; transition: all 0.25s ease; }
.back-btn:hover { color: var(--accent-primary, #c084fc); border-color: var(--accent-border, rgba(168,85,247,0.4)); transform: translateX(-3px); }
.profile-header { background: var(--card-bg, rgba(15,20,32,0.8)); border: 1px solid var(--card-border, rgba(255,255,255,0.08)); border-radius: 24px; padding: 2.5rem; margin-bottom: 1.5rem; position: relative; overflow: hidden; }
.profile-header::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px; background: var(--gradient-main, linear-gradient(135deg, #a855f7, #6366f1)); }
.profile-header-inner { display: flex; align-items: center; gap: 2rem; flex-wrap: wrap; }
.profile-avatar-wrap { position: relative; flex-shrink: 0; }
.profile-avatar { width: 100px; height: 100px; border-radius: 50%; background: var(--gradient-main); display: flex; align-items: center; justify-content: center; font-size: 2.8rem; font-weight: 900; color: white; border: 3px solid var(--accent-border, rgba(168,85,247,0.4)); overflow: hidden; }
.profile-avatar img { width: 100%; height: 100%; object-fit: cover; }
.profile-discord-badge { position: absolute; bottom: 2px; right: 2px; width: 28px; height: 28px; border-radius: 50%; background: #5865f2; display: flex; align-items: center; justify-content: center; font-size: 0.75rem; color: white; border: 2px solid var(--bg-primary, #0c0f12); }
.profile-info { flex: 1; min-width: 200px; }
.profile-username { font-family: 'Cinzel', serif; font-size: 1.8rem; font-weight: 900; color: var(--text-primary, #f8fafc); margin-bottom: 0.3rem; }
.profile-role-badge { display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.3rem 0.85rem; border-radius: 20px; font-size: 0.75rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 0.75rem; }
.profile-meta { display: flex; flex-wrap: wrap; gap: 1.25rem; }
.profile-meta-item { display: flex; align-items: center; gap: 0.4rem; font-size: 0.82rem; color: var(--text-muted, #64748b); }
.profile-meta-item i { font-size: 0.75rem; }
.profile-meta-item span { color: var(--text-secondary, #94a3b8); font-weight: 600; }
.profile-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; margin-top: 1.25rem; }
.stats-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 1rem; margin-bottom: 1.5rem; width: 100%; }
@media (max-width: 650px) { .stats-row { grid-template-columns: 1fr 1fr; } }
@media (max-width: 400px) { .stats-row { grid-template-columns: 1fr; } }
.stat-pill { background: var(--card-bg, rgba(15,20,32,0.8)); border: 1px solid var(--card-border, rgba(255,255,255,0.08)); border-radius: 16px; padding: 1.1rem 1.3rem; display: flex; align-items: center; gap: 0.85rem; min-width: 0; flex: 1; transition: all 0.25s ease; }
.stat-pill:hover { transform: translateY(-2px); border-color: var(--accent-border, rgba(168,85,247,0.4)); box-shadow: 0 8px 24px var(--shadow-md, rgba(0,0,0,0.4)); }
.stat-pill-icon { width: 42px; height: 42px; border-radius: 12px; background: var(--accent-subtle, rgba(168,85,247,0.15)); display: flex; align-items: center; justify-content: center; font-size: 1.2rem; flex-shrink: 0; }
.stat-pill-num { font-family: 'Cinzel', serif; font-size: clamp(0.8rem, 1.4vw, 1.2rem); font-weight: 900; color: var(--text-primary, #f8fafc); line-height: 1.2; word-break: break-word; overflow-wrap: anywhere; }
.stat-pill-label { font-size: 0.75rem; color: var(--text-muted, #64748b); font-weight: 600; margin-top: 0.15rem; white-space: nowrap; }
.profile-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
@media (max-width: 650px) { .profile-grid { grid-template-columns: 1fr; } }
.panel-card { background: var(--card-bg, rgba(15,20,32,0.8)); border: 1px solid var(--card-border, rgba(255,255,255,0.08)); border-radius: 20px; padding: 1.75rem; }
.panel-title { font-family: 'Cinzel', serif; font-size: 1rem; font-weight: 700; color: var(--text-primary, #f8fafc); margin-bottom: 1.25rem; display: flex; align-items: center; gap: 0.6rem; }
.discord-connect { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 1rem 0; }
.discord-connect-icon { width: 64px; height: 64px; border-radius: 50%; background: rgba(88,101,242,0.12); border: 2px solid rgba(88,101,242,0.3); display: flex; align-items: center; justify-content: center; font-size: 1.8rem; margin-bottom: 1rem; }
.discord-connect p { font-size: 0.88rem; color: var(--text-secondary, #94a3b8); margin-bottom: 1.25rem; line-height: 1.6; }
.btn-discord { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.75rem 1.5rem; background: #5865f2; color: white; border: none; border-radius: 12px; font-family: 'Nunito', sans-serif; font-size: 0.9rem; font-weight: 700; cursor: pointer; text-decoration: none; transition: all 0.25s ease; }
.btn-discord:hover { background: #4752c4; transform: translateY(-2px); box-shadow: 0 8px 20px rgba(88,101,242,0.4); }
.discord-connected { display: flex; align-items: center; gap: 1rem; padding: 1rem; background: rgba(88,101,242,0.08); border: 1px solid rgba(88,101,242,0.2); border-radius: 14px; margin-bottom: 1.25rem; }
.discord-user-avatar { width: 48px; height: 48px; border-radius: 50%; border: 2px solid rgba(88,101,242,0.4); overflow: hidden; flex-shrink: 0; }
.discord-user-avatar img { width: 100%; height: 100%; object-fit: cover; }
.discord-user-name { font-weight: 700; color: var(--text-primary, #f8fafc); font-size: 0.95rem; }
.discord-user-id { font-size: 0.72rem; color: var(--text-muted, #64748b); font-family: monospace; }
.discord-roles { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.75rem; }
.discord-role-tag { display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.25rem 0.7rem; border-radius: 20px; font-size: 0.72rem; font-weight: 700; }
.discord-role-dot { width: 8px; height: 8px; border-radius: 50%; }
.edit-field { margin-bottom: 1rem; }
.edit-field label { display: block; font-size: 0.8rem; font-weight: 700; color: var(--text-secondary, #94a3b8); margin-bottom: 0.35rem; }
.edit-field input { width: 100%; padding: 0.65rem 1rem; background: var(--hover-bg, rgba(255,255,255,0.04)); border: 1px solid var(--card-border, rgba(255,255,255,0.08)); border-radius: 10px; color: var(--text-primary, #f8fafc); font-family: 'Nunito', sans-serif; font-size: 0.88rem; outline: none; transition: border-color 0.2s; }
.edit-field input:focus { border-color: var(--accent-primary, #a855f7); }
.btn-save { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.65rem 1.5rem; background: var(--gradient-main, linear-gradient(135deg, #a855f7, #6366f1)); color: white; border: none; border-radius: 10px; font-family: 'Nunito', sans-serif; font-size: 0.88rem; font-weight: 700; cursor: pointer; transition: all 0.25s ease; text-decoration: none; box-shadow: 0 4px 15px var(--accent-glow, rgba(168,85,247,0.3)); }
.btn-save:hover { transform: translateY(-2px); box-shadow: 0 8px 20px var(--accent-glow, rgba(168,85,247,0.5)); color: white; }
.btn-danger { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.65rem 1.5rem; background: transparent; color: #f87171; border: 1px solid rgba(248,113,113,0.3); border-radius: 10px; font-family: 'Nunito', sans-serif; font-size: 0.88rem; font-weight: 700; cursor: pointer; transition: all 0.25s ease; text-decoration: none; }
.btn-danger:hover { background: rgba(248,113,113,0.1); border-color: rgba(248,113,113,0.5); color: #f87171; }
.alert { padding: 0.75rem 1rem; border-radius: 10px; font-size: 0.85rem; margin-bottom: 1rem; display: none; }
.alert-ok { background: rgba(74,222,128,0.1); border: 1px solid rgba(74,222,128,0.3); color: #4ade80; }
.alert-err { background: rgba(248,113,113,0.1); border: 1px solid rgba(248,113,113,0.3); color: #f87171; }
.alert.show { display: block; }
.loading-state { text-align: center; padding: 4rem 2rem; color: var(--text-muted, #64748b); }
.loading-state i { font-size: 2rem; margin-bottom: 1rem; display: block; }

/* ── Desplegables Universales y Anti-Autofill Amarillo en Public Layout ── */
select,
.form-select,
.select-input,
select.form-input,
select.form-control {
  background-color: #121422 !important;
  color: #f8fafc !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-radius: 10px !important;
  font-family: 'Nunito', sans-serif !important;
  font-size: 0.88rem !important;
  font-weight: 600 !important;
  padding: 0.65rem 2.4rem 0.65rem 1rem !important;
  outline: none !important;
  cursor: pointer !important;
  appearance: none !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23a855f7' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 0.9rem center !important;
  background-size: 14px 14px !important;
  color-scheme: dark !important;
  box-sizing: border-box !important;
  transition: border-color 0.2s, box-shadow 0.2s, background-color 0.2s !important;
}

select:hover,
.form-select:hover,
.select-input:hover {
  border-color: rgba(168, 85, 247, 0.5) !important;
  background-color: #16182a !important;
}

select:focus,
.form-select:focus,
.select-input:focus {
  border-color: #a855f7 !important;
  box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.22) !important;
  background-color: #16182a !important;
}

select option,
.form-select option,
.select-input option {
  background-color: #121422 !important;
  color: #f8fafc !important;
  padding: 0.65rem 1rem !important;
  font-family: 'Nunito', sans-serif !important;
  font-size: 0.88rem !important;
  font-weight: 600 !important;
}

select option:checked,
select option:hover {
  background-color: #27214a !important;
  color: #c084fc !important;
}

/* Modo claro en desplegables públicos */
[data-theme="light"] select,
[data-theme="light"] .form-select,
[data-theme="light"] .select-input,
body.light-theme select,
body.light-theme .form-select,
body.light-theme .select-input {
  background-color: #ffffff !important;
  color: #0f172a !important;
  border-color: #cbd5e1 !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%237c3aed' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") !important;
  color-scheme: light !important;
}

[data-theme="light"] select:focus,
[data-theme="light"] .form-select:focus,
[data-theme="light"] .select-input:focus,
body.light-theme select:focus {
  border-color: #7c3aed !important;
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.18) !important;
}

[data-theme="light"] select option,
[data-theme="light"] .form-select option,
[data-theme="light"] .select-input option,
body.light-theme select option {
  background-color: #ffffff !important;
  color: #0f172a !important;
}

[data-theme="light"] select option:checked,
body.light-theme select option:checked {
  background-color: #ede9fe !important;
  color: #6d28d9 !important;
}

/* ── Sobrescribir Autofill Amarillo en Layout Público ── */
input:-webkit-autofill,
input:-webkit-autofill:hover, 
input:-webkit-autofill:focus,
input:-webkit-autofill:active,
textarea:-webkit-autofill,
textarea:-webkit-autofill:hover,
textarea:-webkit-autofill:focus,
textarea:-webkit-autofill:active,
select:-webkit-autofill,
select:-webkit-autofill:hover,
select:-webkit-autofill:focus,
select:-webkit-autofill:active {
  -webkit-box-shadow: 0 0 0 1000px #151828 inset !important;
  box-shadow: 0 0 0 1000px #151828 inset !important;
  -webkit-text-fill-color: #f8fafc !important;
  color: #f8fafc !important;
  caret-color: #a855f7 !important;
  border-color: rgba(168, 85, 247, 0.45) !important;
  color-scheme: dark !important;
  transition: background-color 50000s ease-in-out 0s !important;
}

[data-theme="light"] input:-webkit-autofill,
[data-theme="light"] input:-webkit-autofill:hover,
[data-theme="light"] input:-webkit-autofill:focus,
[data-theme="light"] input:-webkit-autofill:active,
body.light-theme input:-webkit-autofill,
body.light-theme input:-webkit-autofill:hover,
body.light-theme input:-webkit-autofill:focus,
body.light-theme input:-webkit-autofill:active {
  -webkit-box-shadow: 0 0 0 1000px #f8fafc inset !important;
  box-shadow: 0 0 0 1000px #f8fafc inset !important;
  -webkit-text-fill-color: #0f172a !important;
  color: #0f172a !important;
  caret-color: #7c3aed !important;
  border-color: rgba(124, 58, 237, 0.4) !important;
  color-scheme: light !important;
  transition: background-color 50000s ease-in-out 0s !important;
}
