@import url('styles-vpn.css');

body {
  display: block;
  min-height: 100vh;
  padding: 0 0 80px;
}

.container.dashboard-container {
  width: 100%;
  max-width: 1120px;
  padding: 0 24px;
  margin: 108px auto 48px;
  position: relative;
  z-index: 1;
}

/* Dashboard Hero & Top Navigation Pills */
.dash-hero-bar {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 18px;
  margin-bottom: 24px;
}

.dash-hero-title {
  font-family: var(--font-display);
  font-size: clamp(26px, 3.6vw, 38px);
  font-weight: 900;
  line-height: 1.1;
  margin: 0;
  text-align: left;
  background: linear-gradient(180deg, #ffffff 0%, #e2e8f0 52%, #64748b 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.02em;
}

.dash-top-tabs-wrapper {
  position: relative;
  max-width: 100%;
  display: block;
}

.dash-top-tabs {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px;
  background: rgba(12, 13, 19, 0.78);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 999px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  flex-wrap: nowrap;
  white-space: nowrap;
}

.dash-tab-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: 999px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.28s cubic-bezier(0.22, 0.8, 0.32, 1);
  white-space: nowrap;
}

.dash-tab-pill svg {
  width: 16px;
  height: 16px;
  opacity: 0.8;
  transition: transform 0.28s cubic-bezier(0.22, 0.8, 0.32, 1), opacity 0.28s ease;
}

.dash-tab-pill:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.06);
}

.dash-tab-pill.active {
  color: #050507;
  background: linear-gradient(135deg, #ffffff 0%, #cbd5e1 100%);
  box-shadow: 0 6px 20px rgba(255, 255, 255, 0.2);
}

.dash-tab-pill.active svg {
  opacity: 1;
  transform: scale(1.08);
}

/* Collapsible & Compact KPI Strip */
.dash-kpi-container {
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.22, 0.8, 0.32, 1), opacity 0.32s ease, margin 0.32s ease;
  max-height: 1000px;
  opacity: 1;
  margin-bottom: 22px;
}
.dash-kpi-container.kpi-collapsed,
.dash-kpi-container.collapsed {
  max-height: 0 !important;
  opacity: 0 !important;
  margin-bottom: 0 !important;
  pointer-events: none !important;
}

.dash-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.dash-kpi-card {
  position: relative;
  overflow: hidden;
  background: rgba(13, 14, 20, 0.72);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 4px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transition: transform 0.24s cubic-bezier(0.22, 0.8, 0.32, 1), border-color 0.24s ease, box-shadow 0.24s ease;
}

.dash-kpi-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.16);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.dash-kpi-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(
    240px circle at var(--mouse-x, 50%) var(--mouse-y, 0%),
    rgba(255, 255, 255, 0.06),
    transparent 60%
  );
  pointer-events: none;
}

.dash-kpi-label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
  line-height: 1.2;
}

.dash-kpi-value {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.dash-kpi-foot {
  font-size: 11.5px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-top: 2px;
}

@media (max-width: 768px) {
  .dash-kpi-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
  }
  .dash-kpi-card {
    padding: 10px 12px !important;
    border-radius: 12px !important;
  }
  .dash-kpi-value {
    font-size: 16.5px !important;
  }
  .dash-kpi-label {
    font-size: 10px !important;
  }
}

.glass-card {
  margin-bottom: 28px;
  padding: 32px;
}

.section-subtitle {
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 800;
  margin-bottom: 14px;
  color: #ffffff;
  letter-spacing: -0.01em;
}

.user-info-text {
  font-size: 14.5px;
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 18px 22px;
  border-radius: 18px;
  line-height: 1.65;
}

/* Tab Views with Smooth Transitions */
.tab-view {
  display: none;
  animation: fadeInTab 0.38s cubic-bezier(0.22, 0.8, 0.32, 1);
}

.tab-view.active {
  display: block;
}

@keyframes fadeInTab {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.992);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Multi-Column Desktop Grids for Keys, Servers, Friends & Profile */
.keys-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(440px, 1fr));
  gap: 18px;
}

.servers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 18px;
}

.dash-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  align-items: start;
}

.item-card {
  position: relative;
  overflow: hidden;
  background: rgba(16, 18, 26, 0.68);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
  transition: transform 0.32s cubic-bezier(0.22, 0.8, 0.32, 1), border-color 0.32s ease, box-shadow 0.32s ease;
}

.item-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.5);
}

.item-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(
    380px circle at var(--mouse-x, 50%) var(--mouse-y, 0%),
    rgba(158, 245, 154, 0.055),
    transparent 60%
  );
  pointer-events: none;
}

.item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  font-size: 16.5px;
  font-weight: 700;
  color: #ffffff;
}

.item-badge {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  padding: 4px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #e2e8f0;
  white-space: nowrap;
}

.item-details {
  font-size: 13.5px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.card-actions {
  display: flex;
  gap: 10px;
  margin-top: 4px;
}

.card-actions .btn {
  margin: 0 !important;
  padding: 11px 16px;
  font-size: 13.5px;
}

.loading-text {
  grid-column: 1 / -1;
  text-align: center;
  padding: 32px 16px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-secondary);
}

.text-center {
  text-align: center;
}

/* Select Wrapper */
.select-wrapper {
  position: relative;
  width: 100%;
  margin-bottom: 18px;
}

.select-wrapper select {
  margin-bottom: 0;
  background: rgba(12, 13, 19, 0.92);
}

.select-wrapper::after {
  content: '';
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid var(--text-secondary);
  pointer-events: none;
}

.logout-btn {
  border-color: rgba(239, 68, 68, 0.22) !important;
  color: #fca5a5 !important;
  background: rgba(239, 68, 68, 0.06) !important;
}

.logout-btn:hover {
  background: rgba(239, 68, 68, 0.14) !important;
  border-color: rgba(239, 68, 68, 0.4) !important;
}

/* Bottom Navigation Dock — ONLY visible on mobile screens! */
.bottom-nav-wrapper {
  display: none;
  position: fixed;
  bottom: max(12px, env(safe-area-inset-bottom, 12px));
  left: 0;
  right: 0;
  z-index: 900;
  padding: 0 14px;
  pointer-events: none;
}

.bottom-tab-bar {
  pointer-events: auto;
  max-width: 480px;
  margin: 0 auto;
  display: flex;
  justify-content: space-around;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  background: rgba(10, 11, 16, 0.92);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.tab-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 7px 8px;
  border-radius: 999px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.22s ease;
  -webkit-tap-highlight-color: transparent;
}

.tab-btn svg {
  width: 18px;
  height: 18px;
  transition: transform 0.22s ease;
}

.tab-btn:hover {
  color: #ffffff;
}

.tab-btn.active {
  color: #050507;
  background: linear-gradient(135deg, #ffffff 0%, #cbd5e1 100%);
  box-shadow: 0 6px 18px rgba(255, 255, 255, 0.18);
}

/* Telegram Mini App Mode (.is-twa) */
body.is-twa {
  padding-top: max(6px, env(safe-area-inset-top, 6px));
  padding-bottom: max(88px, calc(72px + env(safe-area-inset-bottom, 16px)));
}

body.is-twa .site-header {
  top: max(6px, env(safe-area-inset-top, 6px));
  padding: 0 10px;
}

body.is-twa .header-inner {
  height: 44px;
  max-height: 44px;
  padding: 0 12px;
  flex-wrap: nowrap !important;
  overflow: hidden !important;
}

body.is-twa .hide-in-twa,
body.is-twa .brand-divider,
body.is-twa .brand-highlight,
body.is-twa #role-badge-pill {
  display: none !important;
}

body.is-twa .container.dashboard-container {
  margin-top: calc(54px + max(16px, env(safe-area-inset-top, 16px))) !important;
}

/* Modal Overlays */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9500;
  background: rgba(3, 4, 7, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal-overlay.active {
  display: flex;
  animation: fadeInTab 0.24s cubic-bezier(0.22, 0.8, 0.32, 1);
}

.modal-overlay .modal-content {
  width: 100%;
  max-width: 460px;
  max-height: calc(100vh - 36px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  margin-bottom: 0 !important;
  padding: 26px 22px;
  border: 1px solid rgba(255, 255, 255, 0.14);
}

/* Sticky Navigation Pill Header */
.site-header {
  position: fixed;
  top: 14px;
  left: 0;
  right: 0;
  z-index: 120;
  padding: 0 16px;
  pointer-events: none;
}

.header-inner {
  pointer-events: auto;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 18px;
  height: 48px !important;
  max-height: 48px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 10px !important;
  flex-wrap: nowrap !important;
  white-space: nowrap !important;
  background: rgba(10, 11, 16, 0.84);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px !important;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  overflow: hidden !important;
}

.site-header .nav {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  flex-wrap: nowrap !important;
  flex-shrink: 0 !important;
}

.site-header a,
.site-header .brand,
.site-header .nav a,
.pill-badge {
  border-bottom: none !important;
  text-decoration: none !important;
}

@media (max-width: 1100px) {
  .site-header .hide-in-twa,
  .site-header .nav > a:not(#admin-link-btn) {
    display: none !important;
  }
}
@media (max-width: 980px) {
  .dash-kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .dash-two-col {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  body {
    padding-bottom: max(96px, calc(80px + env(safe-area-inset-bottom, 16px)));
  }
  .site-header {
    top: max(6px, env(safe-area-inset-top, 6px)) !important;
    padding: 0 10px !important;
  }
  .header-inner {
    height: 44px !important;
    max-height: 44px !important;
    padding: 0 12px !important;
    gap: 8px !important;
    flex-wrap: nowrap !important;
    overflow: hidden !important;
  }
  .site-header .brand {
    font-size: 15px !important;
    gap: 6px !important;
    flex-shrink: 0 !important;
  }
  .site-header .brand-mark {
    padding: 2px 5px !important;
    font-size: 11px !important;
  }
  .site-header .brand-name {
    font-size: 14px !important;
  }
  .site-header .brand-divider,
  .site-header .brand-highlight {
    display: none !important;
  }
  .site-header .nav {
    gap: 6px !important;
    flex-wrap: nowrap !important;
    flex-shrink: 0 !important;
  }
  .site-header .nav a.hide-in-twa,
  .site-header .nav .hide-in-twa,
  .site-header .nav .hide-on-tablet,
  .site-header .nav > a:not(#admin-link-btn) {
    display: none !important;
  }
  /* On mobile header, hide the text role pill so header stays single-line (44px) */
  .site-header #role-badge-pill {
    display: none !important;
  }
  .site-header #admin-link-btn {
    padding: 4px 8px !important;
    font-size: 11px !important;
    white-space: nowrap !important;
    border-radius: 999px !important;
    display: inline-flex !important;
    align-items: center !important;
    flex-shrink: 0 !important;
  }
  .site-header #admin-link-btn .admin-link-text {
    display: none !important;
  }
  .site-header .pill-badge {
    padding: 4px 8px !important;
    font-size: 11.5px !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
  }
  .container.dashboard-container {
    margin-top: calc(52px + max(14px, env(safe-area-inset-top, 14px))) !important;
    padding: 0 14px !important;
  }
  .dash-hero-bar {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 12px !important;
    margin-bottom: 16px !important;
  }
  .dash-hero-title {
    font-size: 24px;
  }
  /* На мобильных скрываем верхние вкладки, так как активна нижняя панель */
  .dash-top-tabs-wrapper {
    display: none !important;
  }
  .bottom-nav-wrapper {
    display: block !important;
  }
  .keys-grid,
  .servers-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .glass-card {
    padding: 20px 16px;
    border-radius: 18px;
  }
  .item-card {
    padding: 16px 14px;
    border-radius: 16px;
  }
  .card-actions {
    flex-wrap: wrap;
  }
  .card-actions .btn {
    flex: 1 1 45%;
  }
  .floating-anim-btn {
    display: none !important;
  }
}

@media (max-width: 480px) {
  .dash-kpi-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
    margin-bottom: 14px !important;
  }
  .dash-kpi-card {
    padding: 10px 12px !important;
    border-radius: 12px !important;
  }
  .dash-kpi-label {
    font-size: 10px !important;
  }
  .dash-kpi-value {
    font-size: 16.5px !important;
  }
  .dash-kpi-foot {
    font-size: 11px !important;
  }
  .item-header {
    font-size: 14px;
  }
}

.toggle-kpi-btn {
  cursor: pointer;
  user-select: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.toggle-kpi-btn:hover {
  border-color: rgba(255, 255, 255, 0.28);
}

/* Burger Menu Button (3 stripes) */
.burger-menu-btn {
  display: none;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  width: 36px;
  height: 36px;
  padding: 0;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
  flex-shrink: 0;
}
.burger-menu-btn:hover,
.burger-menu-btn:active {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.25);
}
.burger-menu-btn .burger-line {
  display: block;
  width: 16px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

@media (max-width: 860px) {
  .burger-menu-btn {
    display: flex !important;
  }
}

/* Slide-out Mobile Drawer */
.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 9998;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.drawer-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.mobile-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(340px, 86vw);
  background: rgba(12, 14, 20, 0.96);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border-left: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: -12px 0 40px rgba(0, 0, 0, 0.7);
  z-index: 9999;
  transform: translateX(100%);
  transition: transform 0.32s cubic-bezier(0.22, 0.8, 0.32, 1);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}
.mobile-drawer.active {
  transform: translateX(0);
}

.drawer-header {
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.drawer-close-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.drawer-body {
  padding: 18px 16px 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.drawer-user-card {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(158, 245, 154, 0.04) 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}
.drawer-section-title {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
  margin-top: 6px;
  margin-bottom: -6px;
}
.drawer-nav-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.drawer-nav-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 14px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 12px;
  color: #e2e8f0;
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  text-align: left;
  width: 100%;
  transition: all 0.22s cubic-bezier(0.22, 0.8, 0.32, 1);
}
.drawer-nav-item:hover,
.drawer-nav-item:active {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
  color: #fff;
  transform: translateX(3px);
}
.drawer-nav-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.drawer-nav-icon {
  flex-shrink: 0;
  opacity: 0.85;
}
.drawer-nav-arrow {
  color: var(--text-secondary);
  font-size: 14px;
  transition: transform 0.2s ease, color 0.2s ease;
}
.drawer-nav-item:hover .drawer-nav-arrow {
  transform: translateX(2px);
  color: #fff;
}
.drawer-admin-item {
  color: #fde047 !important;
  border-color: rgba(253, 224, 71, 0.28) !important;
  background: rgba(253, 224, 71, 0.05) !important;
}
.drawer-admin-item:hover {
  background: rgba(253, 224, 71, 0.12) !important;
  border-color: rgba(253, 224, 71, 0.45) !important;
}
.drawer-logout-item {
  color: #fca5a5 !important;
  border-color: rgba(248, 113, 113, 0.25) !important;
  background: rgba(248, 113, 113, 0.04) !important;
}
.drawer-logout-item:hover {
  background: rgba(248, 113, 113, 0.12) !important;
  border-color: rgba(248, 113, 113, 0.45) !important;
  color: #ef4444 !important;
}

/* Modern iOS / Cyberpunk Glass Toggle Switches */
.drawer-switch-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.drawer-switch-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  transition: all 0.24s cubic-bezier(0.22, 0.8, 0.32, 1);
}
.drawer-switch-card:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.16);
}
.drawer-switch-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.drawer-switch-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 600;
  color: #fff;
}
.drawer-switch-icon {
  font-size: 14px;
}
.drawer-switch-desc {
  font-size: 11.5px;
  color: var(--text-secondary, #94a3b8);
  line-height: 1.3;
}

.toggle-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: 48px;
  height: 26px;
  flex-shrink: 0;
  cursor: pointer;
  user-select: none;
}
.toggle-switch input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  margin: 0;
  pointer-events: none;
}
.toggle-slider {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  transition: all 0.28s cubic-bezier(0.22, 0.8, 0.32, 1);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.35);
}
.toggle-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background: #ffffff;
  border-radius: 50%;
  transition: transform 0.28s cubic-bezier(0.22, 0.8, 0.32, 1), background 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}
.toggle-switch input:checked + .toggle-slider {
  background: #9ef59a;
  border-color: #9ef59a;
  box-shadow: 0 0 14px rgba(158, 245, 154, 0.35), inset 0 1px 2px rgba(0, 0, 0, 0.15);
}
.toggle-switch input:checked + .toggle-slider:before {
  transform: translateX(22px);
  background: #0b0d13;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}
.toggle-switch:hover .toggle-slider {
  border-color: rgba(255, 255, 255, 0.3);
}
.toggle-switch input:checked:hover + .toggle-slider {
  box-shadow: 0 0 18px rgba(158, 245, 154, 0.5), inset 0 1px 2px rgba(0, 0, 0, 0.15);
}

/* Floating Animation Toggle Button */
.floating-anim-btn {
  position: fixed;
  bottom: 22px;
  right: 22px;
  z-index: 100;
  background: rgba(13, 15, 22, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  padding: 8px 16px;
  font-family: var(--font-mono, monospace);
  font-size: 12px;
  color: #cbd5e1;
  cursor: pointer;
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.5);
  transition: all 0.22s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  user-select: none;
}
.floating-anim-btn .anim-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #9ef59a;
  box-shadow: 0 0 8px rgba(158, 245, 154, 0.7);
  transition: background 0.2s, box-shadow 0.2s;
}
.floating-anim-btn.anim-disabled .anim-status-dot {
  background: #ef4444;
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.5);
}
.floating-anim-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.28);
  color: #fff;
  transform: translateY(-2px);
}
.floating-anim-btn.anim-disabled {
  border-color: rgba(239, 68, 68, 0.35);
  color: #fca5a5;
}
@media (max-width: 768px) {
  .floating-anim-btn {
    bottom: 84px; /* above bottom navigation bar */
    right: 14px;
    padding: 6px 12px;
    font-size: 11px;
  }
}
