/* Antiplague Design System
   Palette: Black (#0a0b0d / #000000), White (#ffffff), and Dark Grays featuring #2a2b2c
*/

:root {
  --bg-deep: #08090a;
  --bg-black: #0d0e11;
  --bg-card: #141518;
  --bg-surface: #1b1c20;
  --bg-hover: #222328;
  
  --border-dark: #2a2b2c;
  --border-light: #3d3e42;
  --border-subtle: rgba(255, 255, 255, 0.08);

  --text-white: #ffffff;
  --text-primary: #f0f2f5;
  --text-secondary: #9ca3af;
  --text-muted: #64748b;

  --accent-shield: #ffffff;
  --accent-success: #00e676;
  --accent-danger: #ff0055;
  --accent-warning: #ffb800;

  --radius-capsule: 9999px;
  --radius-card: 16px;
  --radius-sm: 8px;

  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  scrollbar-width: thin;
  scrollbar-color: #2a2b2c transparent;
}

::-webkit-scrollbar,
*::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}

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

::-webkit-scrollbar-thumb,
*::-webkit-scrollbar-thumb {
  background: #2a2b2c;
  border-radius: 9999px;
}

::-webkit-scrollbar-thumb:hover,
*::-webkit-scrollbar-thumb:hover {
  background: #3d3e42;
}

html, body {
  background-color: var(--bg-black);
  color: var(--text-primary);
  font-family: var(--font-family);
  min-height: 100vh;
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
  line-height: 1.5;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ==========================================================================
   FLOATING CAPSULE NAVBAR (Matches Screenshots 1, 2, 4)
   ========================================================================== */

.nav-wrapper {
  position: fixed;
  top: 24px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  z-index: 1000;
  padding: 0 16px;
}

.capsule-nav {
  display: flex;
  align-items: center;
  background-color: rgba(42, 43, 44, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-capsule);
  padding: 6px 14px;
  gap: 16px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.6);
  transition: all 0.25s ease;
}

.capsule-nav:hover {
  border-color: rgba(255, 255, 255, 0.22);
}

.nav-link {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 8px 14px;
  border-radius: var(--radius-capsule);
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  position: relative;
}

.nav-link:hover {
  color: var(--text-white);
}

.nav-link.active {
  background-color: var(--text-white);
  color: #000000;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(255, 255, 255, 0.2);
}

.nav-divider {
  width: 1px;
  height: 20px;
  background-color: rgba(255, 255, 255, 0.18);
}

.nav-user {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 0, 0, 0.25);
  padding: 4px 10px 4px 6px;
  border-radius: var(--radius-capsule);
  border: 1px solid var(--border-dark);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.nav-user:hover {
  background: rgba(0, 0, 0, 0.45);
  border-color: var(--border-light);
}

.nav-user img {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
}

.nav-icon-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 6px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  position: relative;
}

.nav-icon-btn:hover {
  color: var(--text-white);
  background: rgba(255, 255, 255, 0.08);
}

.nav-icon-btn .badge-dot {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 6px;
  height: 6px;
  background-color: var(--accent-danger);
  border-radius: 50%;
}

/* Dropdown Menu (Screenshot 4) */
.nav-dropdown {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 12px);
  left: 0;
  background-color: #141518;
  border: 1px solid var(--border-dark);
  border-radius: 12px;
  padding: 8px;
  min-width: 170px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.8);
  display: none;
  flex-direction: column;
  gap: 4px;
  z-index: 1010;
}

.dropdown-menu.show {
  display: flex;
  animation: fadeInDown 0.15s ease-out;
}

.dropdown-item {
  padding: 8px 12px;
  font-size: 13px;
  color: var(--text-secondary);
  border-radius: 6px;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.dropdown-item:hover {
  background-color: var(--bg-hover);
  color: var(--text-white);
}

/* ==========================================================================
   MOBILE CAPSULE NAVBAR & DRAWER
   ========================================================================== */

.mobile-nav-only {
  display: none !important;
}

.nav-brand-mobile {
  display: none;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 14px;
  color: var(--text-white);
  text-decoration: none;
  letter-spacing: -0.2px;
}

.nav-brand-mobile svg {
  flex-shrink: 0;
}

.nav-mobile-actions {
  display: none;
  align-items: center;
  gap: 8px;
}

.nav-user-mobile {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(0, 0, 0, 0.35);
  padding: 4px 8px 4px 4px;
  border-radius: var(--radius-capsule);
  border: 1px solid var(--border-dark);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-white);
  text-decoration: none;
  max-width: 130px;
}

.nav-user-mobile img {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.nav-user-mobile span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-mobile-toggle {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-white);
  width: 32px;
  height: 32px;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.nav-mobile-toggle:hover,
.nav-mobile-toggle:active {
  background: rgba(255, 255, 255, 0.15);
  border-color: var(--accent-success);
}

/* Floating Mobile Drawer */
.mobile-nav-drawer {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 12px;
  right: 12px;
  max-width: 480px;
  margin: 0 auto;
  box-sizing: border-box;
  background: rgba(18, 19, 22, 0.98);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 18px;
  padding: 14px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.85);
  z-index: 1001;
  flex-direction: column;
  gap: 12px;
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
}

.mobile-nav-drawer.show {
  display: flex;
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.mobile-nav-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.mobile-nav-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-dark);
  border-radius: 10px;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s ease;
}

.mobile-nav-link:hover,
.mobile-nav-link.active {
  background: var(--bg-hover);
  color: var(--text-white);
  border-color: var(--accent-success);
}

.mobile-nav-link.active svg {
  stroke: var(--accent-success);
}

.mobile-nav-subgroup {
  padding-top: 10px;
  border-top: 1px solid var(--border-dark);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mobile-nav-subgroup-title {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.8px;
  color: var(--text-muted);
  margin-bottom: 2px;
  padding: 0 4px;
}

.mobile-nav-sublink {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 7px 8px;
  border-radius: 6px;
  color: var(--text-secondary);
  font-size: 12px;
  text-decoration: none;
  transition: color 0.15s ease;
}

.mobile-nav-sublink:hover {
  color: var(--accent-success);
  background: rgba(255, 255, 255, 0.03);
}

.mobile-nav-drawer-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 10px;
  border-top: 1px solid var(--border-dark);
}

.mobile-lang-tag {
  font-size: 12px;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.05);
  padding: 4px 8px;
  border-radius: 9999px;
  border: 1px solid var(--border-dark);
}

.mobile-action-pill {
  background: var(--accent-success);
  color: #08090a;
  font-weight: 700;
  font-size: 12px;
  padding: 6px 14px;
  border-radius: 9999px;
  text-decoration: none;
}

/* ==========================================================================
   LANDING HERO SECTION (Matches Screenshot 2)
   ========================================================================== */

.hero-section {
  position: relative;
  min-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 140px 20px 80px;
  background: radial-gradient(circle at 50% 30%, #1e1f23 0%, var(--bg-black) 70%);
  overflow: hidden;
}

/* Massive Background Typography */
.hero-bg-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: clamp(80px, 18vw, 240px);
  font-weight: 900;
  color: rgba(255, 255, 255, 0.03);
  letter-spacing: 8px;
  user-select: none;
  pointer-events: none;
  white-space: nowrap;
  z-index: 1;
}

.hero-shield-emblem {
  position: relative;
  z-index: 2;
  margin-bottom: 24px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.shield-glow-card {
  width: 120px;
  height: 120px;
  background: linear-gradient(145deg, #1f2024, #121316);
  border: 2px solid var(--border-dark);
  border-radius: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 50px rgba(255, 255, 255, 0.08), inset 0 0 20px rgba(255, 255, 255, 0.03);
  position: relative;
}

.shield-glow-card svg {
  width: 60px;
  height: 60px;
  fill: var(--text-white);
  filter: drop-shadow(0 4px 12px rgba(255, 255, 255, 0.3));
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 780px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background-color: rgba(42, 43, 44, 0.6);
  border: 1px solid var(--border-dark);
  padding: 6px 16px;
  border-radius: var(--radius-capsule);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 24px;
}

.hero-badge .status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--accent-success);
  box-shadow: 0 0 8px var(--accent-success);
}

.hero-title {
  font-size: clamp(38px, 6vw, 68px);
  font-weight: 800;
  letter-spacing: -1.5px;
  line-height: 1.1;
  color: var(--text-white);
  margin-bottom: 20px;
}

.hero-description {
  font-size: clamp(16px, 2vw, 19px);
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 36px;
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 600;
  padding: 14px 28px;
  border-radius: var(--radius-capsule);
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
}

.btn-primary {
  background-color: var(--text-white);
  color: #000000;
  box-shadow: 0 4px 16px rgba(255, 255, 255, 0.15);
}

.btn-primary:hover {
  background-color: #e5e7eb;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 255, 255, 0.25);
}

.btn-secondary {
  background-color: #1a1b1d;
  color: var(--text-primary);
  border: 1px solid var(--border-dark);
}

.btn-secondary:hover {
  background-color: var(--bg-hover);
  border-color: var(--border-light);
  transform: translateY(-2px);
}

/* ==========================================================================
   COMMUNITIES GRID SECTION (Matches Screenshot 1)
   ========================================================================== */

.section {
  padding: 100px 24px;
  max-width: 1200px;
  margin: 0 auto;
}

.section-header {
  text-align: center;
  margin-bottom: 48px;
}

.section-title {
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 800;
  color: var(--text-white);
  letter-spacing: -0.5px;
  margin-bottom: 12px;
}

.section-subtitle {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* Infinite Marquee Carousel for Protected Communities */
.community-marquee-wrapper {
  overflow: hidden;
  width: 100vw;
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  padding: 16px 0;
  mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

.community-marquee-track {
  display: flex;
  width: max-content;
  gap: 16px;
  animation: marqueeGlide 35s linear infinite;
  will-change: transform;
}

.community-marquee-track:hover {
  animation-play-state: paused;
}

@keyframes marqueeGlide {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

.community-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-dark);
  border-radius: var(--radius-card);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  width: 270px;
  flex-shrink: 0;
  text-decoration: none;
  box-sizing: border-box;
  transition: all 0.25s ease;
  user-select: none;
}

.community-card:hover {
  background-color: var(--bg-surface);
  border-color: var(--border-light);
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.5);
}

.community-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  object-fit: cover;
  background-color: var(--border-dark);
  flex-shrink: 0;
}

.community-info {
  overflow: hidden;
  min-width: 0;
}

.community-info h4 {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-white);
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.community-info h4 span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.verified-badge {
  display: inline-flex;
  color: var(--accent-success);
  flex-shrink: 0;
}

.community-info p {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ==========================================================================
   FAQ SECTION (Clean Modern Accordion)
   ========================================================================== */

.faq-container {
  max-width: 860px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.faq-item {
  background-color: #141518;
  border: 1px solid var(--border-dark);
  border-radius: 16px;
  overflow: hidden;
  transition: all 0.2s ease;
  cursor: pointer;
}

.faq-item:hover {
  background-color: #1a1b1f;
  border-color: var(--border-light);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.faq-item.open {
  background-color: #16171b;
  border-color: rgba(255, 255, 255, 0.25);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
}

.faq-question {
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.faq-question-text {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 16px;
  font-weight: 600;
  color: var(--text-white);
  line-height: 1.4;
}

.faq-question-text .q-icon {
  width: 28px;
  height: 28px;
  min-width: 28px;
  border: 1px solid var(--border-dark);
  background-color: #1e1f23;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-white);
}

.faq-arrow {
  color: var(--text-secondary);
  font-size: 18px;
  font-weight: 700;
  transition: transform 0.25s ease;
  user-select: none;
}

.faq-item.open .faq-arrow {
  transform: rotate(90deg);
  color: var(--text-white);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s cubic-bezier(0, 1, 0, 1), padding 0.3s ease;
  padding: 0 24px;
  color: var(--text-secondary);
  font-size: 14.5px;
  line-height: 1.7;
}

.faq-item.open .faq-answer {
  max-height: 500px;
  padding: 0 24px 24px 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 16px;
  transition: max-height 0.3s ease-in-out, padding 0.3s ease;
}

/* ==========================================================================
   FOOTER (Matches Screenshot 3)
   ========================================================================== */

.footer {
  border-top: 1px solid var(--border-dark);
  padding: 80px 24px 40px;
  background-color: var(--bg-deep);
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 60px;
}

.footer-brand h2 {
  font-size: 28px;
  font-weight: 900;
  letter-spacing: -0.5px;
  color: var(--text-white);
  margin-bottom: 12px;
}

.footer-brand p {
  font-size: 14px;
  color: var(--text-muted);
  max-width: 320px;
  line-height: 1.6;
}

.footer-col h5 {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 18px;
}

.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-col a {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  transition: color 0.2s ease;
}

.footer-col a:hover {
  color: var(--text-white);
}

.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--text-muted);
}

/* ==========================================================================
   DASHBOARD VIEW (Matches Screenshot 5)
   ========================================================================== */

.dashboard-layout {
  display: flex;
  width: 100vw;
  max-width: 100vw;
  height: 100vh;
  max-height: 100vh;
  overflow: hidden;
  background-color: var(--bg-black);
  box-sizing: border-box;
  position: relative;
}

/* Left Rail (Server icons strip) */
.left-rail {
  width: 72px;
  height: 100vh;
  background-color: #08090a;
  border-right: 1px solid var(--border-dark);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px 0;
  gap: 12px;
  z-index: 100;
  overflow-y: auto;
  overflow-x: hidden;
  flex-shrink: 0;
}

.rail-server-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background-color: var(--border-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  overflow: hidden;
  border: 2px solid transparent;
  color: var(--text-white);
  font-weight: 700;
}

.rail-server-icon:hover {
  border-radius: 16px;
  background-color: var(--border-light);
}

.rail-server-icon.active {
  border-radius: 16px;
  border-color: var(--text-white);
  box-shadow: 0 0 16px rgba(255, 255, 255, 0.2);
}

.rail-add-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.05);
  border: 1px dashed var(--border-light);
  color: var(--accent-success);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  line-height: 0;
  padding: 0;
  margin: 0;
  text-decoration: none;
  box-sizing: border-box;
}

.rail-add-btn svg {
  display: block;
  width: 20px;
  height: 20px;
  stroke: currentColor;
  margin: 0;
}

.rail-add-btn:hover {
  background-color: var(--accent-success);
  border-color: var(--accent-success);
  color: #08090a;
  border-radius: 16px;
  box-shadow: 0 0 12px rgba(0, 230, 118, 0.4);
}

/* Sub-Sidebar */
.sub-sidebar {
  width: 250px;
  height: 100vh;
  background-color: #101114;
  border-right: 1px solid var(--border-dark);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 24px 16px;
  overflow-y: auto;
  overflow-x: hidden;
  flex-shrink: 0;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 90;
}

.sidebar-backdrop {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 150;
}

.sidebar-backdrop.show {
  display: block;
}

.btn-mobile-sidebar {
  display: none;
  background: var(--bg-surface);
  border: 1px solid var(--border-dark);
  color: var(--text-white);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  align-items: center;
  gap: 6px;
  margin-right: 10px;
  transition: all 0.2s ease;
}

.btn-mobile-sidebar:hover {
  background: var(--bg-hover);
  border-color: var(--border-light);
}

.sidebar-profile {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border-dark);
  margin-bottom: 20px;
}

.profile-avatar-wrapper {
  position: relative;
  margin-bottom: 12px;
}

.profile-avatar {
  width: 68px;
  height: 68px;
  border-radius: 20px;
  border: 2px solid var(--border-dark);
  background: #1b1c20;
  object-fit: cover;
}

.profile-status-indicator {
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background-color: var(--accent-danger); /* DND status requested by user */
  border: 2px solid #101114;
}

.profile-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-white);
}

.profile-role {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Sidebar Nav Items */
.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.side-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  transition: all 0.15s ease;
  cursor: pointer;
  border: 1px solid transparent;
}

.side-item:hover {
  background-color: var(--bg-hover);
  color: var(--text-white);
}

.side-item.active {
  background-color: #24252a;
  color: var(--text-white);
  border-color: rgba(255, 255, 255, 0.08);
}

.side-badge {
  margin-left: auto;
  background-color: var(--border-dark);
  font-size: 11px;
  padding: 2px 8px;
  border-radius: var(--radius-capsule);
  color: var(--text-muted);
}

.side-badge.danger {
  background-color: rgba(255, 0, 85, 0.2);
  color: var(--accent-danger);
}

/* Main Dashboard Content Area */
.dashboard-main {
  flex: 1 1 0%;
  min-width: 0;
  width: 100%;
  height: 100vh;
  padding: 24px clamp(16px, 2.5vw, 36px) 100px clamp(16px, 2.5vw, 36px);
  overflow-y: auto;
  overflow-x: hidden;
  box-sizing: border-box;
  scroll-behavior: smooth;
}

/* Custom Sleek Dark Scrollbars */
.dashboard-main::-webkit-scrollbar,
.sub-sidebar::-webkit-scrollbar,
.left-rail::-webkit-scrollbar,
.table-responsive::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

.dashboard-main::-webkit-scrollbar-track,
.sub-sidebar::-webkit-scrollbar-track,
.left-rail::-webkit-scrollbar-track,
.table-responsive::-webkit-scrollbar-track {
  background: transparent;
}

.dashboard-main::-webkit-scrollbar-thumb,
.sub-sidebar::-webkit-scrollbar-thumb,
.left-rail::-webkit-scrollbar-thumb,
.table-responsive::-webkit-scrollbar-thumb {
  background: var(--border-dark);
  border-radius: 9999px;
}

.dashboard-main::-webkit-scrollbar-thumb:hover,
.sub-sidebar::-webkit-scrollbar-thumb:hover,
.left-rail::-webkit-scrollbar-thumb:hover,
.table-responsive::-webkit-scrollbar-thumb:hover {
  background: var(--border-light);
}

.dashboard-breadcrumbs {
  font-size: 13px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.dashboard-breadcrumbs span {
  color: var(--text-white);
  font-weight: 600;
}

/* Top 4 Stat Metric Cards (Screenshot 5) */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr));
  gap: 16px;
  margin-bottom: 24px;
  width: 100%;
  box-sizing: border-box;
}

.metric-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-dark);
  border-radius: var(--radius-card);
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 110px;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  transition: all 0.2s ease;
}

.metric-card:hover {
  border-color: var(--border-light);
  transform: translateY(-2px);
}

.metric-card .metric-val {
  font-size: 28px;
  font-weight: 800;
  color: var(--text-white);
  line-height: 1;
}

.metric-card .metric-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 8px;
}

/* Large Main Activity Chart Card */
.dashboard-chart-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-dark);
  border-radius: var(--radius-card);
  padding: 24px;
  margin-bottom: 24px;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.chart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}

.chart-header h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-white);
}

.chart-range-picker {
  display: flex;
  background-color: #0b0d10;
  border: 1px solid var(--border-dark);
  border-radius: var(--radius-capsule);
  padding: 4px;
  gap: 4px;
}

.range-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: var(--radius-capsule);
  cursor: pointer;
  transition: all 0.15s ease;
}

.range-btn.active {
  background-color: var(--border-dark);
  color: var(--text-white);
}

/* Canvas chart */
.canvas-wrapper {
  width: 100%;
  max-width: 100%;
  height: 220px;
  position: relative;
  overflow: hidden;
}

canvas {
  width: 100% !important;
  max-width: 100% !important;
  height: 100% !important;
}

/* Controls Grid (Toggles & Action cards) */
.controls-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(0, 1.2fr);
  gap: 20px;
  width: 100%;
  box-sizing: border-box;
}

@media (max-width: 1180px) {
  .controls-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

.control-panel-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-dark);
  border-radius: var(--radius-card);
  padding: 24px;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.panel-header {
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.panel-header h4 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-white);
}

.shield-toggles-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-dark);
  border-radius: 12px;
  gap: 16px;
  min-width: 0;
  box-sizing: border-box;
}

.toggle-info {
  flex: 1 1 auto;
  min-width: 0;
}

.toggle-info h5 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-white);
  word-break: break-word;
}

.toggle-info p {
  font-size: 12px;
  color: var(--text-muted);
  word-break: break-word;
  line-height: 1.4;
  margin-top: 2px;
}

/* Switch UI */
.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: var(--border-dark);
  transition: .3s;
  border-radius: 24px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .3s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: var(--accent-success);
}

input:checked + .slider:before {
  transform: translateX(20px);
}

/* Emergency Lockdown Card */
.lockdown-action-card {
  background: linear-gradient(180deg, #18191c 0%, #121316 100%);
  border: 1px solid rgba(255, 0, 85, 0.3);
  border-radius: var(--radius-card);
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.lockdown-action-card p {
  word-break: break-word;
  overflow-wrap: break-word;
}

.btn-lockdown {
  background-color: rgba(255, 0, 85, 0.15);
  color: var(--accent-danger);
  border: 1px solid var(--accent-danger);
  width: 100%;
  padding: 12px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-top: 16px;
}

.btn-lockdown:hover {
  background-color: var(--accent-danger);
  color: white;
  box-shadow: 0 0 20px rgba(255, 0, 85, 0.4);
}

/* Whitelist Form Grid */
.form-whitelist-grid {
  display: grid;
  grid-template-columns: minmax(110px, 1.2fr) minmax(130px, 1.6fr) minmax(140px, 1.8fr) minmax(110px, 1.2fr) auto;
  gap: 12px;
  align-items: end;
  width: 100%;
  box-sizing: border-box;
}

@media (max-width: 1280px) {
  .form-whitelist-grid {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }
  .form-whitelist-grid .btn-submit-whitelist {
    grid-column: 1 / -1;
    width: 100%;
  }
}

@media (max-width: 680px) {
  .form-whitelist-grid {
    grid-template-columns: 1fr;
  }
  .form-whitelist-grid .btn-submit-whitelist {
    grid-column: 1;
  }
}

/* Form Grid 2 columns */
.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  width: 100%;
  box-sizing: border-box;
}

@media (max-width: 1050px) {
  .form-grid-2 {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

/* Responsive Table Wrapper */
.table-responsive {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-bottom: 16px;
  border-radius: 8px;
  box-sizing: border-box;
  display: block;
}

.table-responsive table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
}

.table-responsive th,
.table-responsive td {
  white-space: nowrap;
}

.table-responsive td.cell-wrap,
.table-responsive td:nth-child(4) {
  white-space: normal;
  min-width: 160px;
  max-width: 320px;
  word-break: break-word;
}

/* Responsive adjustments */
@media (max-width: 900px) {
  .footer-content { grid-template-columns: 1fr; }
  .metrics-grid { grid-template-columns: repeat(2, 1fr); }
  .controls-grid { grid-template-columns: 1fr; }
  
  .btn-mobile-sidebar {
    display: inline-flex;
  }

  .sub-sidebar {
    position: fixed;
    left: 72px;
    top: 0;
    bottom: 0;
    z-index: 200;
    transform: translateX(-160%);
    box-shadow: 12px 0 36px rgba(0, 0, 0, 0.85);
  }

  .sub-sidebar.show-mobile {
    transform: translateX(0);
  }
}

@media (max-width: 768px) {
  .nav-wrapper {
    top: 10px;
    padding: 0 12px;
    width: 100%;
    box-sizing: border-box;
  }

  .capsule-nav {
    width: 100%;
    max-width: 100%;
    justify-content: space-between;
    padding: 6px 12px;
    gap: 8px;
    border-radius: 18px;
  }

  .desktop-nav-only {
    display: none !important;
  }

  .mobile-nav-only {
    display: flex !important;
  }

  .nav-brand-mobile {
    display: flex !important;
  }

  .nav-mobile-actions {
    display: flex !important;
  }

  /* --- DASHBOARD MOBILE FULL-WIDTH & SLIDE-OUT DRAWERS --- */

  /* Left-rail hidden offscreen on mobile by default */
  .left-rail {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    width: 72px;
    height: 100vh;
    z-index: 300;
    transform: translateX(-100%);
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.85);
    background-color: #08090a;
  }

  .left-rail.show-mobile {
    transform: translateX(0);
  }

  /* Sub-sidebar slides out right next to left-rail */
  .sub-sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 72px;
    width: 260px;
    max-width: calc(100vw - 72px);
    height: 100vh;
    z-index: 290;
    transform: translateX(calc(-100% - 72px));
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 8px 0 32px rgba(0, 0, 0, 0.9);
    background-color: #101114;
  }

  .sub-sidebar.show-mobile {
    transform: translateX(0);
  }

  /* Dashboard main takes 100% FULL SCREEN WIDTH on mobile */
  .dashboard-main {
    width: 100vw !important;
    max-width: 100vw !important;
    flex: 1 1 100% !important;
    padding: 14px 14px calc(80px + env(safe-area-inset-bottom, 0px)) 14px !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
  }

  /* Mobile Breadcrumbs */
  .dashboard-breadcrumbs {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    margin-bottom: 16px;
    flex-wrap: wrap;
    background: rgba(255, 255, 255, 0.03);
    padding: 8px 12px;
    border-radius: 12px;
    border: 1px solid var(--border-dark);
    width: 100%;
    box-sizing: border-box;
  }

  .btn-mobile-sidebar {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    color: var(--text-white);
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
  }

  .mobile-server-crumb {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(0, 230, 118, 0.1);
    color: var(--accent-success);
    border: 1px solid rgba(0, 230, 118, 0.25);
    padding: 4px 10px;
    border-radius: 9999px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
  }

  /* Control Panel Cards on mobile */
  .control-panel-card {
    padding: 16px 12px !important;
    border-radius: 14px !important;
    margin-bottom: 16px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }

  .control-panel-card form {
    padding: 12px 10px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  /* Whitelist Form Grid */
  .form-whitelist-grid {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .form-whitelist-grid .btn-submit-whitelist {
    grid-column: 1 !important;
    width: 100% !important;
    justify-content: center !important;
    box-sizing: border-box !important;
  }

  /* Ensure inputs and selects fit within card on mobile */
  .form-input,
  .form-select,
  select,
  input[type="text"],
  input[type="password"],
  input[type="number"] {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    font-size: 14px !important;
  }

  /* Buttons inside cards take full width */
  .control-panel-card .btn,
  .control-panel-card button[type="submit"] {
    width: 100% !important;
    justify-content: center !important;
    box-sizing: border-box !important;
  }

  /* Metrics Grid (2 columns on mobile) */
  .metrics-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 10px !important;
    margin-bottom: 16px !important;
  }

  .metric-card {
    padding: 14px 12px !important;
  }

  .metric-val {
    font-size: 20px !important;
  }

  .metric-label {
    font-size: 11px !important;
  }

  /* Toggle rows */
  .toggle-row {
    padding: 12px 14px !important;
    gap: 12px !important;
  }

  .toggle-info h5 {
    font-size: 13px !important;
  }

  .toggle-info p {
    font-size: 11px !important;
  }

  /* Controls grid 1 column */
  .controls-grid {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }

  /* Table Responsive horizontal swiping */
  .table-responsive {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    border: 1px solid var(--border-dark);
    border-radius: 8px;
    margin-top: 10px;
    display: block !important;
  }

  .table-responsive table {
    min-width: 580px !important;
  }

  /* Sidebar backdrop */
  .sidebar-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 280;
    display: none;
  }

  .sidebar-backdrop.show {
    display: block !important;
  }
}

/* ==========================================================================
   PWA & MOBILE DASHBOARD BOTTOM NAVIGATION
   ========================================================================== */

.mobile-bottom-bar {
  display: none;
}

@media (max-width: 768px) {
  .mobile-bottom-bar {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: calc(56px + env(safe-area-inset-bottom, 0px));
    padding-bottom: env(safe-area-inset-bottom, 0px);
    background: rgba(13, 14, 17, 0.96);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--border-dark);
    z-index: 270;
    align-items: center;
    justify-content: space-around;
  }

  .mobile-nav-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    font-size: 11px;
    font-weight: 500;
    padding: 6px 4px;
    cursor: pointer;
    transition: all 0.15s ease;
    flex: 1;
    height: 100%;
    -webkit-tap-highlight-color: transparent;
  }

  .mobile-nav-btn svg {
    transition: transform 0.15s ease, stroke 0.15s ease;
  }

  .mobile-nav-btn.active {
    color: var(--accent-success);
  }

  .mobile-nav-btn.active svg {
    stroke: var(--accent-success);
    transform: translateY(-2px);
  }
}

/* ==========================================================================
   DOCUMENTATION & COMMANDS & LEGAL STYLES
   ========================================================================== */

.docs-body {
  background-color: var(--bg-black);
  min-height: 100vh;
}

.docs-container {
  display: flex;
  max-width: 1400px;
  margin: 0 auto;
  padding-top: 90px;
  min-height: calc(100vh - 90px);
}

.docs-sidebar {
  width: 280px;
  position: sticky;
  top: 86px;
  height: calc(100vh - 86px);
  overflow-y: auto;
  padding: 16px 14px 40px 18px;
  border-right: 1px solid var(--border-dark);
  flex-shrink: 0;
  scrollbar-width: thin;
  scrollbar-color: #23252b transparent;
}

.docs-sidebar::-webkit-scrollbar {
  width: 4px;
}

.docs-sidebar::-webkit-scrollbar-track {
  background: transparent;
}

.docs-sidebar::-webkit-scrollbar-thumb {
  background: #23252b;
  border-radius: 9999px;
}

.docs-sidebar::-webkit-scrollbar-thumb:hover {
  background: #363840;
}

.docs-article {
  display: none;
  animation: fadeInArticle 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.docs-article.active {
  display: block;
}

@keyframes fadeInArticle {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.docs-breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.docs-breadcrumbs a {
  color: var(--text-muted);
  transition: color 0.15s ease;
}

.docs-breadcrumbs a:hover {
  color: var(--text-white);
}

.docs-breadcrumbs span.active {
  color: var(--accent-success);
  font-weight: 500;
}

.article-nav-footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 50px;
  padding-top: 24px;
  border-top: 1px solid var(--border-dark);
}

.article-nav-btn {
  display: flex;
  flex-direction: column;
  padding: 14px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-dark);
  border-radius: var(--radius-card);
  flex: 1;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  box-sizing: border-box;
}

.article-nav-btn:hover {
  border-color: var(--accent-success);
  transform: translateY(-2px);
  background: var(--bg-surface);
}

.article-nav-btn .nav-direction {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 4px;
  font-weight: 600;
}

.article-nav-btn .nav-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-white);
}

.article-nav-btn.next {
  text-align: right;
}

.docs-back-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: rgba(30, 32, 38, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text-white);
  padding: 8px 16px;
  border-radius: var(--radius-capsule);
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
  transition: all 0.2s ease;
  z-index: 99;
}

.docs-back-top:hover {
  background: var(--bg-hover);
  border-color: var(--accent-success);
  color: var(--accent-success);
  transform: translateY(-2px);
}

.docs-search-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-dark);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  margin-bottom: 24px;
  color: var(--text-muted);
}

.docs-search-wrapper input {
  background: none;
  border: none;
  outline: none;
  color: var(--text-white);
  font-size: 13px;
  width: 100%;
}

.docs-nav-group {
  margin-bottom: 24px;
}

.docs-nav-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 10px;
  padding-left: 10px;
  text-transform: uppercase;
}

.docs-nav-link {
  display: block;
  font-size: 13px;
  color: var(--text-secondary);
  padding: 8px 12px;
  border-radius: 6px;
  transition: all 0.15s ease;
  margin-bottom: 2px;
}

.docs-nav-link:hover {
  background-color: var(--bg-surface);
  color: var(--text-white);
}

.docs-nav-link.active {
  background-color: rgba(0, 230, 118, 0.1);
  color: var(--accent-success);
  font-weight: 600;
}

.docs-content {
  flex: 1;
  padding: 32px 48px 100px 48px;
  max-width: 900px;
}

.docs-section {
  scroll-margin-top: 110px;
}

.docs-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--accent-success);
  background-color: rgba(0, 230, 118, 0.1);
  border: 1px solid rgba(0, 230, 118, 0.2);
  padding: 4px 10px;
  border-radius: 9999px;
  margin-bottom: 12px;
  text-transform: uppercase;
}

.docs-content h1 {
  font-size: 36px;
  font-weight: 800;
  color: var(--text-white);
  margin-bottom: 16px;
  line-height: 1.2;
}

.docs-content h2 {
  font-size: 26px;
  font-weight: 700;
  color: var(--text-white);
  margin-top: 12px;
  margin-bottom: 14px;
}

.docs-content h3 {
  font-size: 19px;
  font-weight: 600;
  color: var(--text-white);
  margin-top: 24px;
  margin-bottom: 12px;
}

.docs-lead {
  font-size: 17px;
  line-height: 1.6;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.docs-divider {
  border: none;
  border-top: 1px solid var(--border-dark);
  margin: 40px 0;
}

.callout-box {
  background: var(--bg-surface);
  border-left: 4px solid var(--accent-success);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 16px 20px;
  margin: 20px 0;
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.callout-box.warning {
  border-left-color: var(--accent-warning);
}

.callout-box.danger {
  border-left-color: var(--accent-danger);
}

.callout-icon {
  font-size: 20px;
  flex-shrink: 0;
}

.callout-body {
  font-size: 14px;
  line-height: 1.55;
  color: var(--text-primary);
}

.docs-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 24px 0;
}

.docs-feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border-dark);
  border-radius: var(--radius-card);
  padding: 20px;
}

.docs-feature-card h4 {
  font-size: 15px;
  color: var(--text-white);
  margin-bottom: 8px;
}

.docs-feature-card p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.code-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #060708;
  border: 1px solid var(--border-dark);
  border-radius: 8px;
  padding: 10px 16px;
  margin: 10px 0;
  font-family: monospace;
}

.code-box code {
  color: var(--accent-success);
  font-size: 14px;
}

.copy-btn {
  background: var(--bg-surface);
  border: 1px solid var(--border-dark);
  color: var(--text-secondary);
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.copy-btn:hover {
  background: var(--bg-hover);
  color: var(--text-white);
}

.step-card {
  display: flex;
  gap: 18px;
  background: var(--bg-card);
  border: 1px solid var(--border-dark);
  border-radius: var(--radius-card);
  padding: 20px;
  margin-bottom: 16px;
}

.step-num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent-success);
  color: #08090a;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.step-content h4 {
  color: var(--text-white);
  font-size: 16px;
  margin-bottom: 6px;
}

.step-content p {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.5;
}

.docs-list {
  margin: 16px 0 24px 20px;
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.7;
}

.docs-table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  background: var(--bg-card);
  border-radius: var(--radius-card);
  overflow: hidden;
  border: 1px solid var(--border-dark);
}

.docs-table th, .docs-table td {
  padding: 12px 16px;
  text-align: left;
  font-size: 13px;
  border-bottom: 1px solid var(--border-dark);
}

.docs-table th {
  background: var(--bg-surface);
  color: var(--text-muted);
  text-transform: uppercase;
  font-size: 11px;
}

.docs-table td code {
  color: var(--accent-success);
}

.docs-alert-preview {
  background: #0f111a;
  border: 1px solid #1a1c2e;
  border-left: 4px solid var(--accent-danger);
  border-radius: 8px;
  padding: 16px 20px;
  font-family: var(--font-family);
  margin: 20px 0;
}

.alert-preview-header {
  color: #ffffff;
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 10px;
  letter-spacing: 0.05em;
}

.alert-preview-body {
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.6;
}

.docs-footer-nav {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-top: 60px;
  padding-top: 30px;
  border-top: 1px solid var(--border-dark);
}

.docs-footer-btn {
  display: flex;
  flex-direction: column;
  padding: 16px 24px;
  background: var(--bg-card);
  border: 1px solid var(--border-dark);
  border-radius: var(--radius-card);
  flex: 1;
  transition: all 0.2s ease;
}

.docs-footer-btn:hover {
  border-color: var(--accent-success);
  transform: translateY(-2px);
}

.docs-footer-btn span {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.docs-footer-btn strong {
  font-size: 15px;
  color: var(--text-white);
}

.docs-footer-btn.next {
  text-align: right;
}

/* Commands Page */
.commands-page-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 120px 24px 60px 24px;
}

.commands-hero {
  text-align: center;
  margin-bottom: 40px;
}

.commands-hero h1 {
  font-size: 42px;
  font-weight: 800;
  color: var(--text-white);
  margin-bottom: 12px;
}

.commands-search-box {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 580px;
  margin: 28px auto 20px auto;
  background: var(--bg-surface);
  border: 1px solid var(--border-dark);
  border-radius: var(--radius-capsule);
  padding: 12px 20px;
  color: var(--text-muted);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.commands-search-box input {
  background: none;
  border: none;
  outline: none;
  color: var(--text-white);
  font-size: 15px;
  width: 100%;
}

.commands-filter-pills {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 30px;
}

.filter-pill {
  background: var(--bg-card);
  border: 1px solid var(--border-dark);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: var(--radius-capsule);
  cursor: pointer;
  transition: all 0.15s ease;
}

.filter-pill:hover {
  background: var(--bg-surface);
  color: var(--text-white);
}

.filter-pill.active {
  background: var(--accent-success);
  color: #08090a;
  border-color: var(--accent-success);
  font-weight: 700;
}

.commands-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 20px;
}

.command-card {
  background: var(--bg-card);
  border: 1px solid var(--border-dark);
  border-radius: var(--radius-card);
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.2s ease;
}

.command-card:hover {
  border-color: var(--border-light);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.cmd-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}

.cmd-slash {
  font-family: monospace;
  font-size: 20px;
  font-weight: 700;
  color: var(--accent-success);
}

.cmd-prefix {
  display: block;
  font-family: monospace;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.cmd-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 6px;
  text-transform: uppercase;
}

.badge-owner {
  background: rgba(255, 184, 0, 0.15);
  color: #ffb800;
  border: 1px solid rgba(255, 184, 0, 0.3);
}

.badge-admin {
  background: rgba(0, 230, 118, 0.15);
  color: var(--accent-success);
  border: 1px solid rgba(0, 230, 118, 0.3);
}

.badge-mod {
  background: rgba(255, 0, 85, 0.15);
  color: #ff3377;
  border: 1px solid rgba(255, 0, 85, 0.3);
}

.badge-everyone {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  border: 1px solid var(--border-dark);
}

.cmd-desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 16px;
  flex: 1;
}

.cmd-options {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}

.option-tag {
  background: #08090a;
  border: 1px solid var(--border-dark);
  font-family: monospace;
  font-size: 11px;
  color: var(--text-muted);
  padding: 3px 8px;
  border-radius: 4px;
}

.cmd-syntax {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #060708;
  border: 1px solid var(--border-dark);
  border-radius: 8px;
  padding: 8px 12px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.cmd-syntax:hover {
  border-color: var(--accent-success);
}

.cmd-syntax code {
  color: var(--text-white);
  font-size: 13px;
}

.copy-hint {
  font-size: 11px;
  color: var(--text-muted);
}

/* Legal Pages */
.legal-page-container {
  max-width: 860px;
  margin: 0 auto;
  padding: 120px 24px 80px 24px;
}

.legal-card {
  background: var(--bg-card);
  border: 1px solid var(--border-dark);
  border-radius: var(--radius-card);
  padding: 48px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.4);
}

.legal-card h1 {
  font-size: 32px;
  font-weight: 800;
  color: var(--text-white);
  margin-bottom: 6px;
}

.legal-updated {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 36px;
}

.legal-section {
  margin-bottom: 32px;
}

.legal-section h3 {
  font-size: 18px;
  color: var(--text-white);
  margin-bottom: 12px;
}

.legal-section p {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 12px;
}

@media (max-width: 900px) {
  .docs-container { flex-direction: column; }
  .docs-sidebar {
    width: 100%;
    position: static;
    height: auto;
    border-right: none;
    border-bottom: 1px solid var(--border-dark);
    padding: 20px;
  }
  .docs-content { padding: 24px 20px; }
  .docs-grid-3 { grid-template-columns: 1fr; }
  .commands-grid { grid-template-columns: 1fr; }
  .legal-card { padding: 24px 20px; }
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==========================================
   Invitable Guilds Onboarding Selector
   ========================================== */
.invitable-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.invitable-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-dark);
  border-radius: 12px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}

.invitable-card:hover {
  border-color: rgba(34, 197, 94, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.invitable-card-top {
  display: flex;
  align-items: center;
  gap: 14px;
}

.invitable-card-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: #2a2b2e;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 700;
  color: var(--text-white);
  flex-shrink: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.invitable-card-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.invitable-card-info {
  flex: 1;
  min-width: 0;
}

.invitable-card-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-white);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 4px;
}

.invitable-card-role {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 9999px;
}

.invitable-role-owner {
  background: rgba(234, 179, 8, 0.15);
  color: #facc15;
  border: 1px solid rgba(234, 179, 8, 0.3);
}

.invitable-role-admin {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.invitable-card-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 10px 16px;
  background: #ffffff;
  color: #08090a;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.invitable-card-btn:hover {
  background: var(--accent-success);
  color: #08090a;
  box-shadow: 0 0 14px rgba(34, 197, 94, 0.4);
}

@media (max-width: 768px) {
  .invitable-grid {
    grid-template-columns: 1fr;
  }
}


