/* ============================================================
   BonDay Admin Dashboard — Premium Styles
   ============================================================ */

/* ---------- CSS Custom Properties (Design Tokens) ---------- */
:root {
  /* Light theme */
  --color-bg:              #f0f2f7;
  --color-surface:         #ffffff;
  --color-sidebar:         #ffffff;
  --color-sidebar-border:  #e8eaf0;
  --color-sidebar-text:    #64748b;
  --color-sidebar-hover:   #f1f5f9;
  --color-sidebar-active-bg: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  --color-sidebar-active-text: #ffffff;
  --color-sidebar-brand:   #1e293b;
  --color-text:            #0f172a;
  --color-text-secondary:  #64748b;
  --color-text-tertiary:   #94a3b8;
  --color-border:          #e2e8f0;
  --color-border-light:    #f1f5f9;
  --color-accent:          #6366f1;
  --color-accent-light:    rgba(99, 102, 241, 0.08);
  --color-accent-hover:    #4f46e5;
  --color-card:            #ffffff;
  --color-card-hover:      #fafbff;
  --color-topbar:          rgba(255, 255, 255, 0.82);
  --color-topbar-blur:     saturate(180%) blur(20px);
  --color-badge-ok:        #10b981;
  --color-badge-ok-bg:     rgba(16, 185, 129, 0.1);
  --color-shadow-sm:       0 1px 3px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.02);
  --color-shadow-md:       0 4px 16px rgba(0, 0, 0, 0.06), 0 1px 3px rgba(0, 0, 0, 0.04);
  --color-shadow-lg:       0 12px 40px rgba(0, 0, 0, 0.08), 0 4px 12px rgba(0, 0, 0, 0.04);
  --color-shadow-card:     0 1px 3px rgba(0, 0, 0, 0.04);
  --color-shadow-card-hover: 0 12px 32px rgba(99, 102, 241, 0.12), 0 4px 12px rgba(0, 0, 0, 0.06);
  --color-overlay:         rgba(15, 23, 42, 0.4);
  --color-input-bg:        #f1f5f9;
  --color-input-border:    #e2e8f0;
  --color-divider:         #f1f5f9;

  /* Gradients */
  --gradient-brand:        linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a78bfa 100%);
  --gradient-card-1:       linear-gradient(135deg, #6366f1 0%, #818cf8 100%);
  --gradient-card-2:       linear-gradient(135deg, #8b5cf6 0%, #a78bfa 100%);
  --gradient-card-3:       linear-gradient(135deg, #3b82f6 0%, #60a5fa 100%);
  --gradient-card-4:       linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%);
  --gradient-card-5:       linear-gradient(135deg, #ef4444 0%, #f87171 100%);
  --gradient-card-6:       linear-gradient(135deg, #10b981 0%, #34d399 100%);
  --gradient-glow-1:       rgba(99, 102, 241, 0.12);
  --gradient-glow-2:       rgba(139, 92, 246, 0.12);
  --gradient-glow-3:       rgba(59, 130, 246, 0.12);
  --gradient-glow-4:       rgba(245, 158, 11, 0.12);
  --gradient-glow-5:       rgba(239, 68, 68, 0.12);
  --gradient-glow-6:       rgba(16, 185, 129, 0.12);

  /* Status */
  --color-status-info:     #3b82f6;
  --color-status-info-bg:  rgba(59, 130, 246, 0.1);
  --color-status-warn:     #f59e0b;
  --color-status-warn-bg:  rgba(245, 158, 11, 0.1);
  --color-status-success:  #10b981;
  --color-status-success-bg: rgba(16, 185, 129, 0.1);

  /* Sizing */
  --radius-xs:             6px;
  --radius-sm:             8px;
  --radius-md:             12px;
  --radius-lg:             16px;
  --radius-xl:             20px;
  --radius-full:           9999px;
  --sidebar-width:         272px;
  --topbar-height:         68px;
  --transition-fast:       0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal:     0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-spring:     0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ---- DARK THEME ---- */
[data-theme="dark"] {
  --color-bg:              #0c0e16;
  --color-surface:         #141622;
  --color-sidebar:         #111320;
  --color-sidebar-border:  #1e2035;
  --color-sidebar-text:    #7c82a1;
  --color-sidebar-hover:   #1a1d30;
  --color-sidebar-active-bg: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  --color-sidebar-active-text: #ffffff;
  --color-sidebar-brand:   #e2e8f0;
  --color-text:            #f1f5f9;
  --color-text-secondary:  #94a3b8;
  --color-text-tertiary:   #64748b;
  --color-border:          #1e2035;
  --color-border-light:    #1a1d30;
  --color-accent:          #818cf8;
  --color-accent-light:    rgba(129, 140, 248, 0.1);
  --color-accent-hover:    #6366f1;
  --color-card:            #141622;
  --color-card-hover:      #1a1d30;
  --color-topbar:          rgba(17, 19, 32, 0.82);
  --color-topbar-blur:     saturate(180%) blur(20px);
  --color-badge-ok:        #34d399;
  --color-badge-ok-bg:     rgba(52, 211, 153, 0.1);
  --color-shadow-sm:       0 1px 3px rgba(0, 0, 0, 0.2);
  --color-shadow-md:       0 4px 16px rgba(0, 0, 0, 0.25);
  --color-shadow-lg:       0 12px 40px rgba(0, 0, 0, 0.35);
  --color-shadow-card:     0 1px 3px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(255,255,255,0.03);
  --color-shadow-card-hover: 0 12px 32px rgba(99, 102, 241, 0.15), 0 4px 12px rgba(0, 0, 0, 0.2);
  --color-overlay:         rgba(0, 0, 0, 0.6);
  --color-input-bg:        #1a1d30;
  --color-input-border:    #252840;
  --color-divider:         #1e2035;

  --gradient-glow-1:       rgba(99, 102, 241, 0.08);
  --gradient-glow-2:       rgba(139, 92, 246, 0.08);
  --gradient-glow-3:       rgba(59, 130, 246, 0.08);
  --gradient-glow-4:       rgba(245, 158, 11, 0.08);
  --gradient-glow-5:       rgba(239, 68, 68, 0.08);
  --gradient-glow-6:       rgba(16, 185, 129, 0.08);

  --color-status-info-bg:  rgba(59, 130, 246, 0.12);
  --color-status-warn-bg:  rgba(245, 158, 11, 0.12);
  --color-status-success-bg: rgba(16, 185, 129, 0.12);
}

/* ---------- Reset & Base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
  overflow-x: hidden;
  width: 100%;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  transition: background var(--transition-normal), color var(--transition-normal);
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }

button {
  border: none;
  background: none;
  cursor: pointer;
  font-family: inherit;
  color: inherit;
}

img { display: block; max-width: 100%; }

/* ---------- Layout ---------- */
.layout {
  display: flex;
  min-height: 100vh;
}

/* ---------- Sidebar ---------- */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-width);
  height: 100vh;
  background: var(--color-sidebar);
  border-right: 1px solid var(--color-sidebar-border);
  display: flex;
  flex-direction: column;
  z-index: 100;
  transition: transform var(--transition-normal), background var(--transition-normal), border-color var(--transition-normal);
  overflow-y: auto;
  overflow-x: hidden;
}

.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-track { background: transparent; }
.sidebar::-webkit-scrollbar-thumb { background: var(--color-border); border-radius: 4px; }

.sidebar__brand {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 28px 24px 24px;
  position: relative;
}

.sidebar__brand::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 24px;
  right: 24px;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, var(--color-border) 50%, transparent 100%);
}

.sidebar__logo-img {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  transition: transform var(--transition-normal);
}

.sidebar__title-img {
  height: 42px;
  width: auto;
  transition: opacity var(--transition-normal);
}

.sidebar__title-img--light {
  display: block;
}

.sidebar__title-img--dark {
  display: none;
}

[data-theme="dark"] .sidebar__title-img--light {
  display: none;
}

[data-theme="dark"] .sidebar__title-img--dark {
  display: block;
}

.sidebar__brand:hover .sidebar__logo-img {
  transform: scale(1.05) rotate(-5deg);
}

.sidebar__title {
  font-size: 22px;
  font-weight: 900;
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #ec4899 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.03em;
  transition: all var(--transition-normal);
}

.sidebar__section-label {
  padding: 20px 24px 8px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-tertiary);
  transition: color var(--transition-normal);
  display: none;
}

.sidebar__nav {
  flex: 1;
  padding: 12px 16px;
}

.sidebar__nav-item {
  margin-bottom: 4px;
}

.sidebar__nav-link {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  color: var(--color-sidebar-text);
  font-size: 14px;
  font-weight: 500;
  transition: all var(--transition-normal);
  position: relative;
  width: 100%;
  text-align: left;
  border: none;
  background: transparent;
  cursor: pointer;
  overflow: hidden;
}

.sidebar__nav-link::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #ec4899 100%);
  transform: scaleY(0);
  transition: transform var(--transition-normal);
  box-shadow: 0 0 12px rgba(99, 102, 241, 0.6);
}

.sidebar__nav-link:hover {
  background: var(--color-sidebar-hover);
  color: var(--color-text);
  transform: translateX(4px);
}

.sidebar__nav-link:hover::before {
  transform: scaleY(1);
}

.sidebar__nav-link:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: -2px;
}

.sidebar__nav-link--active {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.15) 0%, rgba(139, 92, 246, 0.15) 100%);
  color: var(--color-text);
  font-weight: 600;
}

.sidebar__nav-link--active::before {
  transform: scaleY(1);
  box-shadow: 0 0 16px rgba(99, 102, 241, 0.8), 0 0 24px rgba(139, 92, 246, 0.6);
}

.sidebar__nav-link--active:hover {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.2) 0%, rgba(139, 92, 246, 0.2) 100%);
  transform: translateX(4px);
}

.sidebar__nav-link--active .sidebar__nav-icon {
  color: var(--color-accent);
}

.sidebar__nav-icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  transition: all var(--transition-fast);
}

.sidebar__nav-link:hover .sidebar__nav-icon {
  transform: scale(1.1);
}

.sidebar__nav-arrow {
  width: 16px;
  height: 16px;
  margin-left: auto;
  transition: transform var(--transition-fast);
}

.sidebar__nav-item--expandable.sidebar__nav-item--expanded .sidebar__nav-arrow {
  transform: rotate(180deg);
}

.sidebar__nav-badge {
  margin-left: auto;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  background: var(--color-accent-light);
  color: var(--color-accent);
  transition: all var(--transition-normal);
}

.sidebar__nav-link--active .sidebar__nav-badge {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

/* Submenu styles */
.sidebar__submenu {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition-normal);
  padding-left: 46px;
}

.sidebar__nav-item--expanded .sidebar__submenu {
  max-height: 300px;
}

.sidebar__submenu-link {
  display: block;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 500;
  color: var(--color-sidebar-text);
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
  margin-bottom: 1px;
}

.sidebar__submenu-link:hover {
  background: var(--color-sidebar-hover);
  color: var(--color-text);
}

.sidebar__divider {
  height: 1px;
  margin: 8px 24px;
  background: var(--color-divider);
  transition: background var(--transition-normal);
  display: none;
}

.sidebar__footer {
  padding: 16px 16px;
  border-top: 1px solid var(--color-divider);
  transition: border-color var(--transition-normal);
}

.sidebar__user {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--transition-fast);
}

.sidebar__user:hover {
  background: var(--color-sidebar-hover);
}

.sidebar__user-avatar {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: var(--gradient-brand);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

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

.sidebar__user-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text);
  transition: color var(--transition-normal);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar__user-role {
  font-size: 12px;
  color: var(--color-text-tertiary);
  transition: color var(--transition-normal);
}

.sidebar__user-role.online-user__plan {
  font-size: 9px;
  margin-top: 4px;
}

.sidebar__user-more {
  color: var(--color-text-tertiary);
  flex-shrink: 0;
  transition: color var(--transition-fast);
}

.sidebar__user:hover .sidebar__user-more {
  color: var(--color-text-secondary);
}

/* ---------- Main wrapper ---------- */
.layout {
  display: flex;
  min-height: 100vh;
  flex: 1;
}

.main-wrapper {
  flex: 1;
  margin-left: var(--sidebar-width);
  display: flex;
  flex-direction: column;
  transition: margin-left var(--transition-normal);
  overflow-x: hidden;
  width: 100%;
  box-sizing: border-box;
}

/* ---------- Topbar ---------- */
.topbar {
  position: sticky;
  top: 0;
  height: var(--topbar-height);
  background: var(--color-topbar);
  -webkit-backdrop-filter: var(--color-topbar-blur);
  backdrop-filter: var(--color-topbar-blur);
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  z-index: 50;
  gap: 16px;
  transition: background var(--transition-normal), border-color var(--transition-normal);
}

.topbar__left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.topbar__menu-btn {
  display: none;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  transition: background var(--transition-fast);
}

.topbar__menu-btn:hover { background: var(--color-input-bg); }
.topbar__menu-btn:focus-visible { outline: 2px solid var(--color-accent); outline-offset: -2px; }

.topbar__activity {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 16px;
  background: var(--color-input-bg);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

.topbar__activity-icon {
  width: 20px;
  height: 20px;
  color: var(--color-accent);
  flex-shrink: 0;
}

.topbar__activity-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.topbar__activity-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--color-text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.topbar__activity-value {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text);
  transition: color var(--transition-normal);
}

.topbar__right {
  display: flex;
  align-items: center;
  gap: 4px;
}

.topbar__icon-btn {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
  color: var(--color-text-secondary);
  position: relative;
}

.topbar__icon-btn:hover {
  background: var(--color-input-bg);
  color: var(--color-text);
}

.topbar__icon-btn:focus-visible { outline: 2px solid var(--color-accent); outline-offset: -2px; }

.topbar__icon-btn .icon { width: 20px; height: 20px; }

.topbar__notification-dot {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 8px;
  height: 8px;
  background: #ef4444;
  border-radius: 50%;
  border: 2px solid var(--color-topbar);
  transition: border-color var(--transition-normal);
}

.topbar__divider {
  width: 1px;
  height: 24px;
  background: var(--color-border);
  margin: 0 8px;
  transition: background var(--transition-normal);
}

.topbar__avatar {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  background: var(--gradient-brand);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  margin-left: 4px;
  cursor: pointer;
  transition: box-shadow var(--transition-fast), transform var(--transition-fast);
}

.topbar__avatar:hover {
  box-shadow: 0 0 0 3px var(--color-accent-light);
  transform: scale(1.05);
}

/* ---------- Main Content ---------- */
.content {
  flex: 1;
  padding: 32px;
  transition: padding var(--transition-normal);
  overflow-x: hidden;
  width: 100%;
  box-sizing: border-box;
}

.content--auth {
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - var(--topbar-height));
  overflow: hidden;
}

.content__header {
  margin-bottom: 32px;
}

.content__breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--color-text-tertiary);
  margin-bottom: 8px;
  transition: color var(--transition-normal);
}

.content__breadcrumb-sep { font-size: 10px; }

.content__breadcrumb-current {
  color: var(--color-accent);
  font-weight: 500;
}

.content__header-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.content__title {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--color-text);
  transition: color var(--transition-normal);
}

.content__subtitle {
  font-size: 15px;
  color: var(--color-text-secondary);
  margin-top: 4px;
  transition: color var(--transition-normal);
}

.content__header-actions {
  display: flex;
  gap: 10px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all var(--transition-fast);
  border: none;
}

.btn--primary {
  background: var(--gradient-brand);
  color: #fff;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.25);
}

.btn--primary:hover {
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.35);
  transform: translateY(-1px);
}

.btn--ghost {
  background: var(--color-input-bg);
  color: var(--color-text-secondary);
  border: 1px solid var(--color-border);
}

.btn--ghost:hover {
  background: var(--color-card-hover);
  color: var(--color-text);
  border-color: var(--color-accent);
}

.btn .icon { width: 16px; height: 16px; }

/* ---------- Stats Row ---------- */
.stats-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.stat-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  font-size: 13px;
  color: var(--color-text-secondary);
  transition: all var(--transition-normal);
}

.stat-pill__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.stat-pill__dot--green  { background: #10b981; }
.stat-pill__dot--blue   { background: #6366f1; }
.stat-pill__dot--amber  { background: #f59e0b; }

.stat-pill__value {
  font-weight: 700;
  color: var(--color-text);
  transition: color var(--transition-normal);
}

/* ---------- Metrics Grid ---------- */
.metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 32px;
}

.metric-card {
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  transition: all var(--transition-normal);
  cursor: default;
  position: relative;
  overflow: hidden;
  box-shadow: var(--color-shadow-card);
}

.metric-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  opacity: 0;
  transition: opacity var(--transition-normal);
}

.metric-card:nth-child(1)::before { background: var(--gradient-card-1); }
.metric-card:nth-child(2)::before { background: var(--gradient-card-2); }
.metric-card:nth-child(3)::before { background: var(--gradient-card-3); }
.metric-card:nth-child(4)::before { background: var(--gradient-card-4); }
.metric-card:nth-child(5)::before { background: var(--gradient-card-5); }
.metric-card:nth-child(6)::before { background: var(--gradient-card-6); }

.metric-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--color-shadow-card-hover);
  border-color: transparent;
}

.metric-card:hover::before { opacity: 1; }

.metric-card:focus-within {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

.metric-card__icon-wrap {
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all var(--transition-normal);
  margin-left: auto;
}

.metric-card__icon-wrap img {
  width: 48px;
  height: 48px;
  image-rendering: pixelated;
  opacity: 0.35;
  transition: opacity var(--transition-normal);
}

.metric-card:hover .metric-card__icon-wrap img {
  opacity: 1;
}

.metric-card__info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}

.metric-card__label {
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text-secondary);
  transition: color var(--transition-normal);
}

.metric-card__value {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--color-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color var(--transition-normal);
  line-height: 1.2;
}

.metric-card__trend {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
  margin-top: 6px;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  width: fit-content;
}

.metric-card__trend--up {
  background: var(--color-status-success-bg);
  color: var(--color-status-success);
}

.metric-card__trend--down {
  background: var(--color-status-warn-bg);
  color: var(--color-status-warn);
}

.metric-card__trend .icon { width: 12px; height: 12px; }

/* ---------- Activity + Gallery Row ---------- */
.activity-gallery-row {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 20px;
  margin-bottom: 32px;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

@media (max-width: 1024px) {
  .activity-gallery-row {
    grid-template-columns: 1fr;
  }
}

/* ---------- Chart Section ---------- */
.chart-section {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 20px;
  margin-bottom: 32px;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

.chart-card {
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--color-shadow-card);
  transition: all var(--transition-normal);
}

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

.chart-card__title {
  font-size: 16px;
  font-weight: 700;
  color: var(--color-text);
  transition: color var(--transition-normal);
}

.chart-card__tabs {
  display: flex;
  gap: 2px;
  background: var(--color-input-bg);
  border-radius: var(--radius-xs);
  padding: 2px;
  transition: background var(--transition-normal);
}

.chart-card__tab {
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  border-radius: calc(var(--radius-xs) - 1px);
  color: var(--color-text-secondary);
  transition: all var(--transition-fast);
}

.chart-card__tab:hover { color: var(--color-text); }

.chart-card__tab--active {
  background: var(--color-surface);
  color: var(--color-text);
  box-shadow: var(--color-shadow-sm);
}

/* Bar chart placeholder */
.chart-placeholder {
  height: 220px;
  display: flex;
  align-items: flex-end;
  gap: 10px;
  padding: 0 4px;
}

.chart-bar-group {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.chart-bar {
  width: 100%;
  max-width: 36px;
  border-radius: var(--radius-xs) var(--radius-xs) 0 0;
  transition: height 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.chart-bar--primary { background: var(--gradient-card-1); }
.chart-bar--secondary {
  background: var(--color-input-bg);
  transition: background var(--transition-normal);
}

.chart-bar-label {
  font-size: 11px;
  color: var(--color-text-tertiary);
  font-weight: 500;
  transition: color var(--transition-normal);
}

/* Donut chart */
.donut-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  height: 100%;
}

.donut-chart {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: conic-gradient(
    #6366f1 0% 42%,
    #8b5cf6 42% 67%,
    #3b82f6 67% 82%,
    #10b981 82% 93%,
    var(--color-input-bg) 93% 100%
  );
  position: relative;
  transition: transform var(--transition-normal);
}

.donut-chart:hover { transform: scale(1.03); }

.donut-chart::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: var(--color-card);
  transition: background var(--transition-normal);
}

.donut-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1;
  text-align: center;
}

.donut-center__value {
  font-size: 28px;
  font-weight: 800;
  color: var(--color-text);
  letter-spacing: -0.03em;
  line-height: 1;
  transition: color var(--transition-normal);
}

.donut-center__label {
  font-size: 12px;
  color: var(--color-text-secondary);
  margin-top: 2px;
  transition: color var(--transition-normal);
}

.donut-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
}

.donut-legend__item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 500;
  color: var(--color-text-secondary);
  transition: color var(--transition-normal);
}

.donut-legend__dot {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  flex-shrink: 0;
}

/* ---------- Bottom Sections ---------- */
.bottom-sections {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 20px;
}

.section-card {
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--color-shadow-card);
  transition: all var(--transition-normal);
}

.section-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.section-card__title {
  font-size: 16px;
  font-weight: 700;
  color: var(--color-text);
  transition: color var(--transition-normal);
}

.section-card__badge {
  font-size: 12px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  background: var(--color-accent-light);
  color: var(--color-accent);
  transition: all var(--transition-normal);
}

.section-card__link {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-accent);
  display: flex;
  align-items: center;
  gap: 4px;
  transition: color var(--transition-fast);
}

.section-card__link:hover { color: var(--color-accent-hover); }
.section-card__link .icon { width: 14px; height: 14px; }

/* ---------- Updates Table ---------- */
.updates-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0 -24px;
  padding: 0 24px;
}

.updates-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.updates-table th {
  text-align: left;
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-tertiary);
  padding: 10px 16px;
  border-bottom: 1px solid var(--color-border);
  white-space: nowrap;
  transition: color var(--transition-normal), border-color var(--transition-normal);
}

.updates-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--color-divider);
  color: var(--color-text);
  white-space: nowrap;
  transition: all var(--transition-normal);
  font-size: 13.5px;
}

.updates-table tbody tr {
  transition: background var(--transition-fast);
}

.updates-table tbody tr:hover { background: var(--color-card-hover); }
.updates-table tbody tr:last-child td { border-bottom: none; }

.updates-table__name { font-weight: 500; }
.updates-table__date { color: var(--color-text-secondary); transition: color var(--transition-normal); }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-full);
}

.badge--ok {
  background: var(--color-badge-ok-bg);
  color: var(--color-badge-ok);
}

.badge__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

/* ---------- Notifications ---------- */
.notification-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.notification-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  transition: background var(--transition-fast);
  cursor: default;
}

.notification-item:hover { background: var(--color-card-hover); }

.notification-item__icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background var(--transition-normal);
}

.notification-item__icon .icon { width: 18px; height: 18px; }

.notification-item__icon--info    { background: var(--color-status-info-bg);    color: var(--color-status-info); }
.notification-item__icon--success { background: var(--color-status-success-bg); color: var(--color-status-success); }
.notification-item__icon--warn    { background: var(--color-status-warn-bg);    color: var(--color-status-warn); }

.notification-item__content { flex: 1; min-width: 0; }

.notification-item__title {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--color-text);
  margin-bottom: 2px;
  transition: color var(--transition-normal);
}

.notification-item__time {
  font-size: 12px;
  color: var(--color-text-tertiary);
  transition: color var(--transition-normal);
}

/* ---------- Sidebar Overlay ---------- */
.sidebar-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--color-overlay);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition-normal), visibility var(--transition-normal);
  z-index: 9998;
}

.sidebar-overlay--visible {
  opacity: 1;
  visibility: visible;
}

/* ---------- Before/After Comparison Slider (Clip-Path) ---------- */
.comparison-slider {
  position: relative;
  width: 100%;
  max-width: 100%;
  height: 320px;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--color-shadow-sm);
  cursor: ew-resize;
  user-select: none;
}

.comparison-slider__img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.comparison-slider__img img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

/* Bottom layer (After) */
.comparison-slider__img--after {
  z-index: 1;
}

/* Top layer (Before) using clip-path */
.comparison-slider__img--before {
  z-index: 2;
  width: 50%;
  overflow: hidden;
}

.comparison-slider__label {
  position: absolute;
  top: 16px;
  padding: 6px 14px;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  border-radius: var(--radius-full);
  backdrop-filter: blur(4px);
  z-index: 3;
}

.comparison-slider__label--after { right: 16px; }
.comparison-slider__label--before { left: 16px; }

.comparison-slider__handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 4px;
  margin-left: -2px;
  background: #fff;
  z-index: 4;
  pointer-events: none;
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.3);
}

.comparison-slider__circle {
  display: none; /* Removed circle as requested */
}

/* ---------- Auto Gallery (Single Slide) ---------- */
.mini-gallery {
  position: relative;
  width: 100%;
  height: 320px;
  background: #000;
  border-radius: var(--radius-md);
  overflow: hidden;
}

.mini-gallery__slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.8s ease-in-out;
  z-index: 1;
}

.mini-gallery__slide--active {
  opacity: 1;
  z-index: 2;
}

.mini-gallery__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mini-gallery__text {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 20px 24px;
  background: linear-gradient(to top, rgba(0,0,0,0.85), transparent);
  color: #fff;
  z-index: 3;
}

.mini-gallery__title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 6px;
}

.mini-gallery__desc {
  font-size: 14px;
  opacity: 0.9;
  line-height: 1.4;
}

/* Gallery Nav */
.mini-gallery__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  cursor: pointer;
  z-index: 10;
  transition: all var(--transition-fast);
}

.mini-gallery__nav:hover {
  background: rgba(255, 255, 255, 0.4);
}

.mini-gallery__nav--prev { left: 16px; }
.mini-gallery__nav--next { right: 16px; }

/* Video Placeholder */
.video-placeholder {
  position: relative;
  width: 100%;
  height: 320px;
  background: #000;
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
}

.video-placeholder__poster {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.6;
}

.video-placeholder__overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  z-index: 2;
}

.video-placeholder__play {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(99, 102, 241, 0.9); /* Accent color */
  box-shadow: 0 0 20px rgba(99, 102, 241, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.video-placeholder:hover .video-placeholder__play {
  transform: scale(1.15);
}

.video-placeholder__text {
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

/* ---------- Social Links Section (Full Width) ---------- */
.social-links-section {
  margin-bottom: 32px;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

.social-links-wrapper {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  width: 100%;
  max-width: 100%;
  margin-bottom: 32px;
}

.social-link-item {
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: all var(--transition-normal);
  box-shadow: var(--color-shadow-card);
  position: relative;
  min-height: 160px;
}

.social-link-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  border-color: var(--color-accent);
}

.social-link-item__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.social-link-item__icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.social-link-item__icon--telegram {
  background: rgba(0, 136, 204, 0.1);
  color: #0088cc;
}

.social-link-item__icon--vk {
  background: rgba(0, 119, 255, 0.1);
  color: #0077ff;
}

.social-link-item__icon--support {
  background: rgba(16, 185, 129, 0.1);
  color: #10b981;
}

.social-link-item__stats {
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text-tertiary);
  text-align: right;
  white-space: nowrap;
}

.social-link-item__content {
  flex: 1;
}

.social-link-item__title {
  font-size: 16px;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 4px;
}

.social-link-item__desc {
  font-size: 13px;
  color: var(--color-text-secondary);
  margin-bottom: 4px;
}

.social-link-item__handle {
  font-size: 12px;
  color: var(--color-accent);
  font-family: 'Courier New', monospace;
  font-weight: 600;
}

.social-link-item__footer {
  display: flex;
  justify-content: flex-end;
  margin-top: auto;
  font-weight: 600;
  white-space: nowrap;
}

.social-link-item__btn {
  padding: 10px 20px;
  background: var(--gradient-brand);
  color: #fff;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: all var(--transition-fast);
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.25);
}

.social-link-item__btn:hover {
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.35);
  transform: translateY(-1px);
}

/* ---------- Stats Grid ---------- */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.stat-item {
  text-align: center;
  padding: 20px;
  background: var(--color-input-bg);
  border-radius: var(--radius-md);
  transition: all var(--transition-normal);
}

.stat-item:hover {
  background: var(--color-card-hover);
  transform: translateY(-2px);
}

.stat-item__value {
  font-size: 32px;
  font-weight: 800;
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.2;
  margin-bottom: 8px;
}

.stat-item__label {
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text-secondary);
}

/* ---------- Video Preview ---------- */
.video-section--compact {
  margin-bottom: 32px;
}

.video-preview {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 24px;
  align-items: center;
}

.video-preview__thumbnail {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: transform var(--transition-normal);
  aspect-ratio: 16 / 9;
}

.video-preview__thumbnail:hover {
  transform: scale(1.02);
}

.video-preview__thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.video-preview__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition-normal);
}

.video-preview__thumbnail:hover .video-preview__overlay {
  background: rgba(0, 0, 0, 0.5);
}

.video-preview__play-icon {
  width: 64px;
  height: 64px;
  color: #fff;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.4));
  transition: transform var(--transition-normal);
}

.video-preview__thumbnail:hover .video-preview__play-icon {
  transform: scale(1.1);
}

.video-preview__info {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.video-preview__title {
  font-size: 20px;
  font-weight: 700;
  color: var(--color-text);
  line-height: 1.3;
}

.video-preview__desc {
  font-size: 14px;
  color: var(--color-text-secondary);
  line-height: 1.5;
}

.video-preview__btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: #ff0000;
  color: #fff;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  transition: all var(--transition-normal);
  align-self: flex-start;
  box-shadow: 0 2px 8px rgba(255, 0, 0, 0.2);
}

.video-preview__btn:hover {
  background: #cc0000;
  box-shadow: 0 4px 12px rgba(255, 0, 0, 0.3);
  transform: translateY(-1px);
}

.video-preview__btn .icon {
  width: 18px;
  height: 18px;
}

/* ---------- Features Section ---------- */
.features-section {
  margin-bottom: 48px;
  position: relative;
}

.features-grid-new {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 24px;
}

.feature-intro-card {
  grid-column: span 5;
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  border-radius: var(--radius-xl);
  padding: 48px 40px;
  color: #fff;
  position: relative;
  overflow: hidden;
}

.feature-intro-card::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
  border-radius: 50%;
}

.feature-intro-badge {
  display: inline-block;
  padding: 6px 16px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 24px;
  backdrop-filter: blur(10px);
}

.feature-intro-title {
  font-size: 36px;
  font-weight: 900;
  line-height: 1.2;
  margin-bottom: 16px;
  color: #fff;
}

.feature-intro-desc {
  font-size: 16px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 32px;
}

.feature-intro-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.feature-stat {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  border-radius: var(--radius-lg);
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.feature-stat__value {
  font-size: 32px;
  font-weight: 900;
  color: #fff;
  margin-bottom: 4px;
  background: linear-gradient(135deg, #fff 0%, rgba(255, 255, 255, 0.8) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.feature-stat__label {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.8);
  font-weight: 500;
}

.features-grid-new .feature-card {
  grid-column: span 7;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.features-grid-new .feature-card > div {
  grid-column: span 1;
}

.features-header {
  text-align: center;
  margin-bottom: 56px;
  position: relative;
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: 48px 40px;
  box-shadow: var(--color-shadow-card);
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 56px;
}

.features-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-brand);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

.features-title {
  font-size: 42px;
  font-weight: 800;
  letter-spacing: -0.03em;
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 16px;
  line-height: 1.2;
}

.features-subtitle {
  font-size: 17px;
  color: var(--color-text-secondary);
  max-width: 660px;
  margin: 0 auto;
  line-height: 1.7;
  font-weight: 500;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.feature-card {
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: 32px 28px;
  position: relative;
  overflow: hidden;
  transition: all var(--transition-normal);
  cursor: default;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--gradient-brand);
  transform: scaleX(0);
  transition: transform var(--transition-normal);
  transform-origin: left;
}

.feature-card:hover::before {
  transform: scaleX(1);
}

.feature-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
  border-color: transparent;
}

.feature-card__icon {
  width: 72px;
  height: 72px;
  margin-bottom: 24px;
  background: var(--gradient-brand);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 12px 32px rgba(99, 102, 241, 0.35);
  transition: all var(--transition-normal);
  position: relative;
}

.feature-card__icon::after {
  content: '';
  position: absolute;
  inset: -4px;
  background: var(--gradient-brand);
  border-radius: var(--radius-lg);
  opacity: 0;
  filter: blur(12px);
  transition: opacity var(--transition-normal);
  z-index: -1;
}

.feature-card:hover .feature-card__icon {
  transform: scale(1.05) rotate(-5deg);
}

.feature-card:hover .feature-card__icon::after {
  opacity: 0.6;
}

.feature-card__icon .icon {
  width: 36px;
  height: 36px;
}

.feature-card__title {
  font-size: 20px;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 14px;
  line-height: 1.3;
}

.feature-card__desc {
  font-size: 15px;
  color: var(--color-text-secondary);
  line-height: 1.7;
  font-weight: 400;
}

/* ---------- CTA Section ---------- */
.cta-section {
  position: relative;
  height: 500px;
  border-radius: var(--radius-xl);
  overflow: hidden;
  margin-bottom: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cta-bg {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.cta-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.95) 0%, rgba(139, 92, 246, 0.95) 100%);
  z-index: 1;
}

.cta-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.3;
}

.cta-content {
  position: relative;
  z-index: 2;
  text-align: center;
  color: #fff;
  max-width: 800px;
  padding: 40px;
}

.cta-title {
  font-size: 48px;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 16px;
  text-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  line-height: 1.2;
}

.cta-subtitle {
  font-size: 18px;
  margin-bottom: 32px;
  opacity: 0.95;
  line-height: 1.6;
}

.cta-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.cta-btn {
  padding: 14px 32px;
  font-size: 15px;
  font-weight: 700;
  border-radius: var(--radius-full);
  transition: all var(--transition-fast);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.cta-btn--primary {
  background: #fff;
  color: var(--color-accent);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.cta-btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);
}

.cta-btn--secondary {
  background: transparent;
  color: #fff;
  border: 2px solid rgba(255, 255, 255, 0.5);
}

.cta-btn--secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: #fff;
  transform: translateY(-2px);
}

/* ---------- Online Counter ---------- */
.topbar__online-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: var(--color-input-bg);
  border-radius: var(--radius-full);
  transition: all var(--transition-fast);
  cursor: pointer;
  color: var(--color-text-secondary);
  margin-right: 8px;
}

.topbar__online-btn:hover {
  background: var(--color-card-hover);
  color: var(--color-text);
}

.topbar__online-btn .icon {
  width: 18px;
  height: 18px;
}

.topbar__online-count {
  font-size: 13px;
  font-weight: 700;
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.dropdown--online {
  width: 320px;
  top: calc(100% + 8px);
  right: 0;
}

.online-user {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: var(--radius-xs);
  transition: background var(--transition-fast);
  cursor: pointer;
}

.online-user:hover {
  background: var(--color-card-hover);
}

.online-user__avatar {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  flex-shrink: 0;
}

.online-user__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.online-user__info {
  flex: 1;
  min-width: 0;
}

.online-user__name {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 4px;
}

.online-user__plan {
  font-size: 10px;
  font-weight: 700;
  font-family: 'Press Start 2P', 'Courier New', monospace;
  padding: 3px 8px;
  border-radius: 4px;
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  image-rendering: pixelated;
}

.plan-vip {
  background: linear-gradient(135deg, #10b981 0%, #34d399 100%);
  color: #fff;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.plan-premium {
  background: linear-gradient(135deg, #3b82f6 0%, #60a5fa 100%);
  color: #fff;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.plan-bon {
  background: linear-gradient(135deg, #8b5cf6 0%, #a78bfa 100%);
  color: #fff;
  box-shadow: 0 2px 8px rgba(139, 92, 246, 0.3);
}

.plan-day {
  background: linear-gradient(135deg, #ec4899 0%, #f472b6 100%);
  color: #fff;
  box-shadow: 0 2px 8px rgba(236, 72, 153, 0.3);
}

.plan-enterprise {
  background: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%);
  color: #fff;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
}

.plan-bonlogger {
  background: linear-gradient(135deg, #ef4444 0%, #f87171 100%);
  color: #fff;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
  animation: glow-pulse 2s ease-in-out infinite;
}

.plan-free {
  background: linear-gradient(135deg, #6b7280 0%, #9ca3af 100%);
  color: #fff;
  box-shadow: 0 2px 8px rgba(107, 114, 128, 0.3);
}

.plan-admin {
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
  color: #000;
  box-shadow: 0 2px 8px rgba(251, 191, 36, 0.5);
  animation: admin-glow 2s ease-in-out infinite;
  font-weight: 900;
  position: relative;
  overflow: hidden;
}

.plan-admin::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  animation: admin-shine 3s ease-in-out infinite;
}

@keyframes glow-pulse {
  0%, 100% {
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3), 0 0 20px rgba(239, 68, 68, 0.2);
  }
  50% {
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.5), 0 0 30px rgba(239, 68, 68, 0.4);
  }
}

@keyframes admin-glow {
  0%, 100% {
    box-shadow: 0 2px 8px rgba(251, 191, 36, 0.5), 0 0 20px rgba(251, 191, 36, 0.3);
  }
  50% {
    box-shadow: 0 2px 12px rgba(251, 191, 36, 0.8), 0 0 30px rgba(251, 191, 36, 0.6), 0 0 40px rgba(251, 191, 36, 0.3);
  }
}

@keyframes admin-shine {
  0% {
    transform: translateX(-100%) translateY(-100%) rotate(45deg);
  }
  100% {
    transform: translateX(100%) translateY(100%) rotate(45deg);
  }
}

/* Helpers */
.mb-20 { margin-bottom: 20px; }

/* ---------- Video Section (Full Width) ---------- */
.video-section {
  margin-bottom: 32px;
}

.video-embed-container {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: var(--radius-md);
  background: #000;
}

.video-embed-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* ---------- Footer ---------- */
.footer {
  background: var(--color-card);
  border-top: 1px solid var(--color-border);
  margin-top: auto;
}

.footer-content {
  max-width: 1400px;
  margin: 0 auto;
  padding: 56px 40px 32px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: 48px;
  margin-bottom: 48px;
}

.footer-section {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 4px;
}

.footer-logo-img {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
}

.footer-title-img {
  height: 36px;
  width: auto;
}

.footer-title-img--light {
  display: block;
}

.footer-title-img--dark {
  display: none;
}

[data-theme="dark"] .footer-title-img--light {
  display: none;
}

[data-theme="dark"] .footer-title-img--dark {
  display: block;
}

.footer-title {
  font-size: 20px;
  font-weight: 900;
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #ec4899 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.footer-desc {
  font-size: 14px;
  line-height: 1.7;
  color: var(--color-text-secondary);
  margin-bottom: 12px;
}

.footer-disclaimer {
  padding: 16px;
  background: var(--color-surface);
  border-radius: var(--radius-md);
  border-left: 3px solid var(--color-accent);
}

.footer-disclaimer p {
  font-size: 12px;
  color: var(--color-text-tertiary);
  line-height: 1.6;
  margin-bottom: 4px;
}

.footer-disclaimer p:last-child {
  margin-bottom: 0;
}

.footer-heading {
  font-size: 14px;
  font-weight: 700;
  color: var(--color-text);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}

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

.footer-links a {
  font-size: 14px;
  color: var(--color-text-secondary);
  transition: color var(--transition-fast);
  display: inline-block;
}

.footer-links a:hover {
  color: var(--color-accent);
  transform: translateX(4px);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 32px;
  border-top: 1px solid var(--color-border);
  flex-wrap: wrap;
  gap: 16px;
}

.footer-copyright {
  font-size: 13px;
  color: var(--color-text-tertiary);
}

.footer-socials {
  display: flex;
  gap: 12px;
}

.footer-social-link {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-surface);
  border-radius: var(--radius-md);
  color: var(--color-text-secondary);
  transition: all var(--transition-fast);
  border: 1px solid var(--color-border);
}

.footer-social-link:hover {
  background: var(--gradient-brand);
  color: #fff;
  border-color: transparent;
  transform: translateY(-2px);
}

.footer-social-link .icon {
  width: 20px;
  height: 20px;
}

/* ---------- Responsive ---------- */
@media (max-width: 1200px) {
  .chart-section { grid-template-columns: 1fr; }
}

@media (max-width: 1024px) {
  .metrics { grid-template-columns: repeat(2, 1fr); }
  .bottom-sections { grid-template-columns: 1fr; }
  .topbar__search-input { width: 200px; }
  .content__header-actions { display: none; }
  .features-grid { grid-template-columns: 1fr; }
  .features-grid-new { grid-template-columns: 1fr; }
  .feature-intro-card { grid-column: span 1; }
  .features-grid-new .feature-card { grid-column: span 1; grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr; }
  .social-links-wrapper { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
  .cta-title { font-size: 36px; }
}

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    box-shadow: none;
    z-index: 999; 
  }
  .sidebar--open {
    transform: translateX(0);
    box-shadow: var(--color-shadow-lg);
    z-index: 9999;
  }
  
  .main-wrapper { 
    margin-left: 0; 
    width: 100%;
    overflow-x: hidden;
  }
  
  .topbar__menu-btn { display: flex; }
  .topbar__activity { display: none; }
  .topbar__online-btn span { display: none; }
  .metrics { grid-template-columns: 1fr; }
  .content { padding: 20px 16px; overflow-x: hidden; }
  .topbar { padding: 0 16px; }
  .metric-card__value { font-size: 22px; }
  .stats-row { gap: 10px; }
  .chart-section { grid-template-columns: 1fr; }
  .features-title { font-size: 28px; }
  .features-grid-new { grid-template-columns: 1fr; }
  .features-grid-new .feature-card { grid-template-columns: 1fr; }
  .feature-intro-title { font-size: 28px; }
  .feature-intro-stats { grid-template-columns: 1fr; }
  .feature-stat__value { font-size: 24px; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-content { padding: 40px 20px 24px; }
  .footer-bottom { justify-content: center; text-align: center; }
  .features-grid {
    grid-template-columns: 1fr;
  }
  .feature-card {
    grid-column: span 1 !important;
  }
  .cta-section { height: 400px; }
  .cta-title { font-size: 32px; }
  .cta-subtitle { font-size: 16px; }

  .comparison-slider { height: 260px; }
  .mini-gallery, .video-placeholder { height: 260px; }
  
  .video-preview {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .video-preview__thumbnail {
    max-width: 100%;
  }
  
  
  .social-card {
    padding: 20px;
    gap: 16px;
  }
  
  .social-card__avatar { width: 56px; height: 56px; }
  .social-card__platform-name { font-size: 12px; }
  .social-card__name { font-size: 14px; }
  .social-card__handle { font-size: 12px; }
  .social-card__subs { font-size: 13px; }
  .social-card__btn { padding: 10px; font-size: 13px; }
}

@media (max-width: 480px) {
  .topbar__search { display: none; }
  .content__title { font-size: 22px; }
  .stat-pill { font-size: 12px; padding: 6px 12px; }
  
  .features-title { font-size: 24px; }
  .features-subtitle { font-size: 14px; }
  .feature-card { 
    padding: 24px 20px;
    grid-column: span 1 !important;
  }
  .feature-card__icon {
    width: 56px;
    height: 56px;
  }
  .feature-card__icon .icon {
    width: 28px;
    height: 28px;
  }
  
  .cta-section { height: 320px; }
  .cta-title { font-size: 24px; }
  .cta-subtitle { font-size: 14px; }
  .cta-buttons { flex-direction: column; }
  .cta-btn { width: 100%; }
  
  .online-user__plan { font-size: 8px; padding: 2px 6px; }
  .metric-card__value { font-size: 20px; }
  .section-card { padding: 14px; }
  
  .comparison-slider { height: 220px; }
  .mini-gallery, .video-placeholder { height: 220px; }
  
  .social-card {
    padding: 16px;
  }
  
  .social-card__content {
    gap: 12px;
  }
  
  .social-card__avatar { width: 48px; height: 48px; }
  .cta-subtitle { font-size: 14px; }
  .cta-buttons { flex-direction: column; }
  .cta-btn { width: 100%; }
  
  .online-user__plan { font-size: 8px; padding: 2px 6px; }
  .metric-card__value { font-size: 20px; }
  .section-card { padding: 14px; }
  
  .comparison-slider { height: 220px; }
  .mini-gallery, .video-placeholder { height: 220px; }
  
  /* On very small screens, maybe stack socials? No, user requested side-by-side */
}

@media (max-width: 360px) {
  .content { padding: 14px 12px; }
  .topbar { padding: 0 12px; }
  .content__title { font-size: 20px; }
  .metric-card__value { font-size: 18px; }
  .stat-pill { padding: 5px 10px; font-size: 11px; }
  
  .social-stats-row { grid-template-columns: 1fr; }
  
  .cta-title { font-size: 20px; }
}

/* ---------- Utility ---------- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* ---------- Animations ---------- */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.content > * {
  animation: fadeInUp 0.5s cubic-bezier(0.4, 0, 0.2, 1) both;
}

.content > *:nth-child(1) { animation-delay: 0s; }
.content > *:nth-child(2) { animation-delay: 0.05s; }
.content > *:nth-child(3) { animation-delay: 0.1s; }
.content > *:nth-child(4) { animation-delay: 0.15s; }
.content > *:nth-child(5) { animation-delay: 0.2s; }

.metric-card {
  animation: fadeInUp 0.5s cubic-bezier(0.4, 0, 0.2, 1) both;
}

.metric-card:nth-child(1) { animation-delay: 0.08s; }
.metric-card:nth-child(2) { animation-delay: 0.13s; }
.metric-card:nth-child(3) { animation-delay: 0.18s; }
.metric-card:nth-child(4) { animation-delay: 0.23s; }
.metric-card:nth-child(5) { animation-delay: 0.28s; }
.metric-card:nth-child(6) { animation-delay: 0.33s; }

/* ============================================================
   DROPDOWN SYSTEM
   ============================================================ */

/* Wrapper for positioning */
.sidebar__user-wrap {
  position: relative;
}

.topbar__dropdown-wrap {
  position: relative;
}

/* Shared dropdown base */
.dropdown {
  position: absolute;
  z-index: 200;
  min-width: 240px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--color-shadow-lg);
  padding: 6px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px) scale(0.96);
  transition:
    opacity var(--transition-fast),
    visibility var(--transition-fast),
    transform var(--transition-fast);
  pointer-events: none;
}

.dropdown--open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

/* Opens upward (sidebar user) */
.dropdown--up {
  bottom: calc(100% + 8px);
  left: 0;
  right: 0;
  transform: translateY(-8px) scale(0.96);
}

.dropdown--up.dropdown--open {
  transform: translateY(0) scale(1);
}

/* Opens downward-right (topbar) */
.dropdown--notif,
.dropdown--avatar {
  top: calc(100% + 8px);
  right: 0;
}

.dropdown--notif {
  width: 340px;
}

/* Dropdown header (user info) */
.dropdown__header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 10px;
}

.dropdown__avatar {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: var(--gradient-brand);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

.dropdown__name {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text);
  transition: color var(--transition-normal);
}

.dropdown__email {
  font-size: 12px;
  color: var(--color-text-secondary);
  transition: color var(--transition-normal);
}

/* Dropdown items */
.dropdown__item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: var(--radius-xs);
  font-size: 13.5px;
  font-weight: 500;
  color: var(--color-text-secondary);
  transition: all var(--transition-fast);
  cursor: pointer;
}

.dropdown__item:hover {
  background: var(--color-card-hover);
  color: var(--color-text);
}

.dropdown__item:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: -2px;
}

.dropdown__item--danger {
  color: #ef4444;
}

.dropdown__item--danger:hover {
  background: rgba(239, 68, 68, 0.08);
  color: #dc2626;
}

.dropdown__item-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.dropdown__divider {
  height: 1px;
  background: var(--color-divider);
  margin: 4px 0;
  transition: background var(--transition-normal);
}

/* Notification dropdown specific */
.dropdown__title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 10px 8px;
}

.dropdown__title {
  font-size: 14px;
  font-weight: 700;
  color: var(--color-text);
  transition: color var(--transition-normal);
}

.dropdown__count {
  font-size: 12px;
  font-weight: 600;
  color: var(--color-accent);
  background: var(--color-accent-light);
  padding: 2px 8px;
  border-radius: var(--radius-full);
  transition: all var(--transition-normal);
}

.dropdown__scroll {
  max-height: 280px;
  overflow-y: auto;
}

.dropdown__scroll::-webkit-scrollbar { width: 4px; }
.dropdown__scroll::-webkit-scrollbar-track { background: transparent; }
.dropdown__scroll::-webkit-scrollbar-thumb { background: var(--color-border); border-radius: 4px; }

.dropdown__notif-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px;
  border-radius: var(--radius-xs);
  transition: background var(--transition-fast);
  cursor: pointer;
}

.dropdown__notif-item:hover {
  background: var(--color-card-hover);
}

.dropdown__notif-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 6px;
}

.dropdown__notif-dot--blue  { background: var(--color-status-info); }
.dropdown__notif-dot--green { background: var(--color-status-success); }
.dropdown__notif-dot--amber { background: var(--color-status-warn); }

.dropdown__notif-body {
  flex: 1;
  min-width: 0;
}

.dropdown__notif-text {
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text);
  line-height: 1.4;
  transition: color var(--transition-normal);
}

.dropdown__notif-time {
  font-size: 12px;
  color: var(--color-text-tertiary);
  margin-top: 2px;
  transition: color var(--transition-normal);
}

.dropdown__footer-link {
  display: block;
  text-align: center;
  padding: 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-accent);
  border-radius: var(--radius-xs);
  transition: background var(--transition-fast);
}

.dropdown__footer-link:hover {
  background: var(--color-accent-light);
}

/* ============================================================
   GUEST STATE  —  body.is-guest
   ============================================================ */

/* Hide auth-only elements */
.is-guest .sidebar__footer:not(.sidebar__footer--guest) { display: none; }
.is-guest .topbar__dropdown-wrap:has(.topbar__avatar) { display: none; }
.is-guest .topbar__dropdown-wrap:has(#notif-btn) .topbar__notification-dot { display: none; }

/* Show guest-only elements */
.sidebar__footer--guest {
  display: block;
  padding: 16px;
  border-top: 1px solid var(--color-divider);
  transition: border-color var(--transition-normal);
}

.sidebar__guest-login {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 11px 16px;
  background: var(--gradient-brand);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  transition: box-shadow var(--transition-fast), transform var(--transition-fast);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.25);
}

.sidebar__guest-login:hover {
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.35);
  transform: translateY(-1px);
}

.topbar__guest-btn {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  background: var(--gradient-brand);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  margin-left: 8px;
  transition: box-shadow var(--transition-fast), transform var(--transition-fast);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.25);
}

.is-guest .topbar__guest-btn {
  display: inline-flex;
}

.topbar__guest-btn:hover {
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.35);
  transform: translateY(-1px);
}

.is-guest .topbar__avatar { display: none; }
.is-guest .topbar__divider:last-of-type { display: none; }

/* ============================================================
   ENHANCED MOBILE  
   ============================================================ */

@media (max-width: 768px) {
  /* Dropdowns become full-width bottom sheets on mobile */
  .dropdown--notif,
  .dropdown--avatar {
    position: fixed;
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    max-height: 70vh;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    transform: translateY(100%);
    box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.15);
    z-index: 300;
  }

  .dropdown--notif.dropdown--open,
  .dropdown--avatar.dropdown--open {
    transform: translateY(0);
  }

  .dropdown--notif {
    width: 100%;
  }

  /* Sidebar user dropdown stays normal on mobile */
  .dropdown--up {
    left: 12px;
    right: 12px;
  }

  /* Smaller metric values */
  .metric-card {
    padding: 18px;
  }

  .metric-card__icon-wrap {
    width: 44px;
    height: 44px;
  }

  .metric-card__icon-wrap img {
    width: 36px;
    height: 36px;
  }

  /* Stats pills horizontal scroll */
  .stats-row {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
    scrollbar-width: none;
  }

  .stats-row::-webkit-scrollbar { display: none; }

  .stat-pill {
    flex-shrink: 0;
  }

  /* Table touch scroll hint */
  .updates-table-wrap {
    position: relative;
  }

  /* Topbar compact */
  .topbar__divider { display: none; }

  /* Bottom sections */
  .bottom-sections { gap: 16px; }
  .section-card { padding: 18px; }

  /* Donut chart smaller */
  .donut-chart {
    width: 150px;
    height: 150px;
  }

  .donut-chart::after {
    width: 92px;
    height: 92px;
  }

  .donut-center__value { font-size: 22px; }

  .chart-placeholder { height: 180px; }
}

@media (max-width: 480px) {
  .topbar { height: 56px; }
  .topbar__icon-btn { width: 36px; height: 36px; }
  .topbar__avatar { width: 32px; height: 32px; font-size: 11px; }

  .content__header-row { flex-direction: column; align-items: flex-start; }
  .content__subtitle { font-size: 13px; }

  .metric-card { padding: 16px; gap: 12px; }
  .metric-card__value { font-size: 20px; }
  .metric-card__label { font-size: 12px; }
  .metric-card__trend { font-size: 11px; }

  .metric-card__icon-wrap {
    width: 38px;
    height: 38px;
  }

  .metric-card__icon-wrap img {
    width: 32px;
    height: 32px;
  }

  .section-card { padding: 14px; }
  .section-card__header { margin-bottom: 14px; }
  .section-card__title { font-size: 15px; }

  .updates-table td { padding: 10px 12px; font-size: 13px; }
  .updates-table th { padding: 8px 12px; }

  .notification-item { padding: 10px 12px; gap: 10px; }
  .notification-item__icon { width: 32px; height: 32px; }
  .notification-item__title { font-size: 13px; }

  .chart-card { padding: 16px; }
  .chart-placeholder { height: 160px; gap: 6px; }
  .chart-bar { max-width: 28px; }
  .chart-bar-label { font-size: 10px; }

  .donut-legend { gap: 10px; }
  .donut-legend__item { font-size: 11px; }
}

@media (max-width: 360px) {
  .content { padding: 14px 12px; }
  .topbar { padding: 0 12px; }
  .content__title { font-size: 20px; }
  .metric-card__value { font-size: 18px; }
  .stat-pill { padding: 5px 10px; font-size: 11px; }
}

/* ============================================================
   AUTH PAGE STYLES
   ============================================================ */

.auth-page {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  overflow: hidden;
  position: relative;
  padding: 20px 0;
  width: 100%;
}

.auth-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  overflow: hidden;
  background: var(--color-bg);
}

.auth-wrapper {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 480px 1fr;
  width: 100%;
  max-width: 1400px;
  height: 90vh;
  max-height: 900px;
  margin: 0 auto;
  background: var(--color-card);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.auth-left {
  padding: 48px;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  background: var(--color-card);
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.auth-left::-webkit-scrollbar {
  display: none;
}

.auth-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  margin-bottom: 24px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  color: var(--color-text-secondary);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
}

.animated-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.particle {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle, var(--color-accent) 0%, transparent 70%);
  opacity: 0.15;
  animation: float linear infinite;
  will-change: transform;
}

.particle:nth-child(1) {
  width: 80px;
  height: 80px;
  left: 10%;
  top: 20%;
  animation-duration: 25s;
  animation-delay: 0s;
}

.particle:nth-child(2) {
  width: 60px;
  height: 60px;
  left: 70%;
  top: 60%;
  animation-duration: 30s;
  animation-delay: -5s;
  background: radial-gradient(circle, #8b5cf6 0%, transparent 70%);
}

.particle:nth-child(3) {
  width: 100px;
  height: 100px;
  left: 50%;
  top: 80%;
  animation-duration: 35s;
  animation-delay: -10s;
}

.particle:nth-child(4) {
  width: 70px;
  height: 70px;
  left: 85%;
  top: 30%;
  animation-duration: 28s;
  animation-delay: -15s;
  background: radial-gradient(circle, #a78bfa 0%, transparent 70%);
}

.particle:nth-child(5) {
  width: 90px;
  height: 90px;
  left: 25%;
  top: 50%;
  animation-duration: 32s;
  animation-delay: -20s;
}

.particle:nth-child(6) {
  width: 50px;
  height: 50px;
  left: 60%;
  top: 10%;
  animation-duration: 26s;
  animation-delay: -8s;
  background: radial-gradient(circle, #6366f1 0%, transparent 70%);
}

.particle:nth-child(7) {
  width: 75px;
  height: 75px;
  left: 15%;
  top: 70%;
  animation-duration: 29s;
  animation-delay: -12s;
}

.particle:nth-child(8) {
  width: 85px;
  height: 85px;
  left: 80%;
  top: 85%;
  animation-duration: 33s;
  animation-delay: -18s;
  background: radial-gradient(circle, #8b5cf6 0%, transparent 70%);
}

.particle:nth-child(9) {
  width: 65px;
  height: 65px;
  left: 40%;
  top: 25%;
  animation-duration: 27s;
  animation-delay: -6s;
}

.particle:nth-child(10) {
  width: 95px;
  height: 95px;
  left: 90%;
  top: 55%;
  animation-duration: 31s;
  animation-delay: -22s;
  background: radial-gradient(circle, #a78bfa 0%, transparent 70%);
}

@keyframes float {
  0% {
    transform: translate(0, 0) scale(1);
  }
  25% {
    transform: translate(30px, -50px) scale(1.1);
  }
  50% {
    transform: translate(-20px, -100px) scale(0.9);
  }
  75% {
    transform: translate(40px, -150px) scale(1.05);
  }
  100% {
    transform: translate(0, -200px) scale(1);
    opacity: 0;
  }
}

/* Dark theme adjustments */
[data-theme="dark"] .particle {
  opacity: 0.08;
}

/* Ensure layout is above background */
.layout {
  position: relative;
  z-index: 1;
}

.auth-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  margin-bottom: 24px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  color: var(--color-text-secondary);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: all var(--transition-fast);
}

.auth-back-btn:hover {
  background: var(--color-card);
  color: var(--color-text);
  border-color: var(--color-accent);
  transform: translateX(-2px);
}

.auth-back-btn i {
  width: 16px;
  height: 16px;
}

.auth-switcher {
  position: relative;
  display: flex;
  gap: 12px;
  margin-bottom: 48px;
  padding: 6px;
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  border: 2px solid var(--color-accent);
}

.auth-switcher__indicator {
  position: absolute;
  top: 6px;
  left: 6px;
  width: calc(50% - 12px);
  height: calc(100% - 12px);
  background: var(--gradient-brand);
  border-radius: var(--radius-md);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.auth-switcher__btn {
  flex: 1;
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 20px;
  background: transparent;
  border: none;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: color 0.3s ease;
}

.auth-switcher__btn i {
  width: 18px;
  height: 18px;
}

.auth-switcher__btn--active {
  color: #fff;
}

.auth-switcher__btn:nth-child(2).auth-switcher__btn--active ~ .auth-switcher__indicator {
  transform: translateX(0);
}

.auth-switcher__btn:nth-child(3).auth-switcher__btn--active ~ .auth-switcher__indicator {
  transform: translateX(calc(100% + 12px));
}

.auth-forms {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.auth-form {
  display: none;
}

.auth-form--active {
  display: block;
}

.auth-form__header {
  margin-bottom: 24px;
  text-align: center;
}

.auth-form__title {
  font-size: 24px;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 8px;
}

.auth-form__subtitle {
  font-size: 14px;
  color: var(--color-text-secondary);
}

.auth-form__group {
  margin-bottom: 20px;
}

.auth-form__label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text-secondary);
  margin-bottom: 8px;
}

.auth-form__input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.auth-form__icon {
  position: absolute;
  left: 14px;
  width: 18px;
  height: 18px;
  color: var(--color-text-tertiary);
  pointer-events: none;
}

.auth-form__input {
  width: 100%;
  padding: 12px 14px 12px 44px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: 14px;
  color: var(--color-text);
  transition: all var(--transition-fast);
}

.auth-form__input:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.auth-form__input::placeholder {
  color: var(--color-text-tertiary);
}

.auth-form__toggle-password {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  padding: 4px;
  cursor: pointer;
  color: var(--color-text-tertiary);
  transition: color var(--transition-fast);
}

.auth-form__toggle-password:hover {
  color: var(--color-text-secondary);
}

.auth-form__toggle-icon {
  width: 18px;
  height: 18px;
}

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

.auth-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
}

.auth-checkbox input[type="checkbox"] {
  display: none;
}

.auth-checkbox__checkmark {
  width: 18px;
  height: 18px;
  border: 2px solid var(--color-border);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
  flex-shrink: 0;
}

.auth-checkbox input[type="checkbox"]:checked + .auth-checkbox__checkmark {
  background: var(--color-accent);
  border-color: var(--color-accent);
}

.auth-checkbox input[type="checkbox"]:checked + .auth-checkbox__checkmark::after {
  content: '✓';
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}

.auth-checkbox__label {
  font-size: 13px;
  color: var(--color-text-secondary);
}

.auth-link {
  font-size: 13px;
  color: var(--color-accent);
  text-decoration: none;
  font-weight: 600;
  transition: opacity var(--transition-fast);
}

.auth-link:hover {
  opacity: 0.8;
}

.auth-btn {
  width: 100%;
  padding: 14px 20px;
  border: none;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 24px;
}

.auth-btn--primary {
  background: var(--gradient-brand);
  color: #fff;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.auth-btn--primary:hover:not(:disabled) {
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
  transform: translateY(-1px);
}

.auth-btn--primary:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.auth-btn__icon {
  width: 18px;
  height: 18px;
}

.auth-btn__icon--spinning {
  animation: spin 1s linear infinite;
}

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

.auth-divider {
  position: relative;
  text-align: center;
  margin: 24px 0;
}

.auth-divider::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--color-border);
}

.auth-divider__text {
  position: relative;
  display: inline-block;
  padding: 0 16px;
  background: var(--color-card);
  font-size: 12px;
  color: var(--color-text-tertiary);
  font-weight: 500;
}

.auth-social {
  display: flex;
  gap: 12px;
}

.auth-social__btn {
  flex: 1;
  padding: 14px 20px;
  border: 2px solid transparent;
  border-radius: var(--radius-md);
  background: var(--color-surface);
  color: var(--color-text);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  position: relative;
  overflow: hidden;
}

.auth-social__btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 100%);
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.auth-social__btn:hover::before {
  opacity: 1;
}

.auth-social__btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.auth-social__btn--vk {
  background: transparent;
  color: var(--color-text);
  border-color: var(--color-accent);
}

.auth-social__btn--vk:hover {
  background: rgba(99, 102, 241, 0.1);
  box-shadow: 0 8px 20px rgba(99, 102, 241, 0.3);
}

.auth-social__btn--vk svg {
  color: var(--color-text);
}

.auth-social__btn--tg {
  background: transparent;
  color: var(--color-text);
  border-color: var(--color-accent);
}

.auth-social__btn--tg:hover {
  background: rgba(99, 102, 241, 0.1);
  box-shadow: 0 8px 20px rgba(99, 102, 241, 0.3);
}

.auth-social__btn--tg svg {
  color: var(--color-text);
}

.auth-social__btn img {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

#tg-widget-login,
#tg-widget-register {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

#tg-widget-login iframe,
#tg-widget-register iframe {
  max-width: 100%;
}

.auth-footer {
  margin-top: auto;
  padding-top: 24px;
  text-align: center;
}

.auth-footer p {
  font-size: 11px;
  color: var(--color-text-tertiary);
}

.auth-alert {
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.auth-alert--success {
  background: rgba(16, 185, 129, 0.1);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.auth-alert--error {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.auth-alert--info {
  background: rgba(59, 130, 246, 0.1);
  color: #3b82f6;
  border: 1px solid rgba(59, 130, 246, 0.2);
}

.h-captcha {
  margin: 20px 0;
  display: flex;
  justify-content: center;
}

.auth-slider {
  position: relative;
  width: 100%;
  height: 100%;
}

.auth-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.6s ease;
  display: flex;
  align-items: flex-end;
}

.auth-slide--active {
  opacity: 1;
}

.auth-slide__img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.auth-slide__content {
  position: relative;
  z-index: 1;
  padding: 48px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.4) 50%, transparent 100%);
  width: 100%;
}

.auth-slide__title {
  font-size: 32px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 12px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.auth-slide__text {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.6;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

.auth-slider__dots {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 12px;
  z-index: 2;
}

.auth-slider__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  padding: 0;
}

.auth-slider__dot:hover {
  background: rgba(255, 255, 255, 0.6);
  transform: scale(1.2);
}

.auth-slider__dot--active {
  background: #fff;
  width: 32px;
  border-radius: 5px;
}

@media (max-width: 1200px) {
  .auth-wrapper {
    grid-template-columns: 1fr;
    max-width: 480px;
    height: auto;
    max-height: none;
  }

  .auth-right {
    display: none;
  }

  .auth-left {
    padding: 32px;
  }
}

@media (max-width: 768px) {
  .auth-wrapper {
    height: 100vh;
    max-height: 100vh;
  }

  .auth-left {
    padding: 20px;
  }

  .auth-switcher {
    margin-bottom: 24px;
  }

  .auth-form__header {
    margin-bottom: 16px;
  }

  .auth-form__title {
    font-size: 20px;
    margin-bottom: 4px;
  }

  .auth-form__subtitle {
    font-size: 13px;
  }

  .auth-form__group {
    margin-bottom: 14px;
  }

  .auth-form__input {
    padding: 10px 12px 10px 40px;
    font-size: 14px;
  }

  .auth-form__options {
    margin-bottom: 14px;
  }

  .auth-checkbox__label {
    font-size: 12px;
  }

  .auth-link {
    font-size: 12px;
  }

  .h-captcha {
    margin: 14px 0;
    transform: scale(0.9);
    transform-origin: center;
  }

  .auth-btn {
    padding: 12px 20px;
    font-size: 14px;
  }

  .auth-divider {
    margin: 14px 0;
  }

  .auth-divider__text {
    font-size: 11px;
  }

  .auth-social {
    gap: 10px;
  }

  .auth-social__btn {
    padding: 10px;
    font-size: 13px;
  }

  .auth-social__btn span {
    font-size: 13px;
  }

  .auth-switcher__btn span {
    display: none;
  }

  .auth-switcher__btn i {
    width: 20px;
    height: 20px;
  }

  .auth-alert {
    padding: 10px 12px;
    font-size: 12px;
    margin-bottom: 14px;
  }
}
