@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

[data-lucide] {
  width: 18px;
  height: 18px;
  vertical-align: middle;
}

.nav-icon [data-lucide] {
  width: 20px;
  height: 20px;
}

.toast [data-lucide] {
  width: 20px;
  height: 20px;
}


:root {
  /* Default: Monochrome Dark */
  --bg-primary: #000000;
  --bg-secondary: #0a0a0a;
  --bg-tertiary: #111114;
  --bg-card: rgba(255, 255, 255, 0.04);
  --bg-card-hover: rgba(255, 255, 255, 0.08);
  --border: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(255, 255, 255, 0.15);
  --input-bg: rgba(255, 255, 255, 0.05);
  --input-bg-focus: rgba(255, 255, 255, 0.08);
  --overlay: rgba(0, 0, 0, 0.7);
  --overlay-strong: rgba(9, 10, 12, 0.92);

  --accent: #ffffff;
  --accent-light: #f8fafc;
  --accent-glow: rgba(255, 255, 255, 0.1);
  --cyan: #94a3b8;
  --cyan-glow: rgba(148, 163, 184, 0.1);

  --green: #10b981;
  --red: #ef4444;
  --orange: #f59e0b;

  --text-primary: #ffffff;
  --text-secondary: #e2e8f0;
  --text-muted: #94a3b8;

  --sidebar-width: 280px;
  --topbar-height: 80px;
  --radius: 20px;
  --radius-lg: 28px;
  --radius-sm: 10px;
  --shadow: 0 4px 30px rgba(0, 0, 0, 0.8);
  --shadow-glow: 0 0 50px rgba(255, 255, 255, 0.03);
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --app-padding: 16px;
  color-scheme: dark;
}

.light-mode {
  --bg-primary: #f3f6fb;
  --bg-secondary: #ffffff;
  --bg-tertiary: #eef2f7;
  --bg-card: rgba(15, 23, 42, 0.04);
  --bg-card-hover: rgba(15, 23, 42, 0.08);
  --border: rgba(15, 23, 42, 0.1);
  --border-hover: rgba(15, 23, 42, 0.16);
  --input-bg: rgba(15, 23, 42, 0.04);
  --input-bg-focus: rgba(15, 23, 42, 0.08);
  --overlay: rgba(148, 163, 184, 0.32);
  --overlay-strong: rgba(255, 255, 255, 0.88);

  --accent: #111827;
  --accent-light: #111827;
  --accent-glow: rgba(17, 24, 39, 0.12);
  --cyan: #475569;
  --cyan-glow: rgba(71, 85, 105, 0.12);

  --text-primary: #0f172a;
  --text-secondary: #334155;
  --text-muted: #64748b;

  --shadow: 0 18px 48px rgba(15, 23, 42, 0.08);
  --shadow-glow: 0 0 40px rgba(15, 23, 42, 0.04);
  color-scheme: light;
}

/* ── Layout ── */
.app-layout {
  display: grid;
  grid-template-columns: var(--sidebar-width) 1fr;
  min-height: 100vh;
  padding: var(--app-padding);
  gap: var(--app-padding);
  background: var(--bg-primary);
}

.content-wrapper {
  display: flex;
  flex-direction: column;
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

/* ── Sidebar ── */
.sidebar {
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 32px 12px;
  position: sticky;
  top: var(--app-padding);
  height: calc(100vh - (var(--app-padding) * 2));
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow);
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.sidebar::-webkit-scrollbar {
  width: 6px;
}

.sidebar::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
  background-color: var(--border);
  border-radius: 20px;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 20px 40px;
  margin-bottom: 0px;
  border-bottom: none;
}

.sidebar-logo .logo-icon {
  width: 42px;
  height: 42px;
  background: var(--accent);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sidebar-logo .logo-text {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.nav-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  text-transform: uppercase;
  padding: 24px 20px 12px;
}

/* ── Accordion Nav Groups ── */
.nav-link-home {
  margin-bottom: 2px;
}

.nav-group {
  margin-bottom: 0;
  position: static;
}

.nav-group-toggle {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 11px 20px;
  border: none;
  outline: none;
  background: none;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  text-align: left;
  border-radius: 0;
  -webkit-appearance: none;
  appearance: none;
}

.nav-group-toggle:hover {
  color: var(--text-primary);
}

.nav-group-toggle:focus-visible {
  color: var(--text-primary);
}

.nav-group.open > .nav-group-toggle {
  color: var(--text-primary);
  background: var(--bg-card);
  border-radius: 14px;
}

.nav-group-label {
  flex: 1;
}

.nav-group-chevron {
  display: flex;
  align-items: center;
  transition: transform 0.25s ease;
}

.nav-group-chevron i,
.nav-group-chevron [data-lucide] {
  width: 14px;
  height: 14px;
  opacity: 0.4;
}

.nav-group.open > .nav-group-toggle .nav-group-chevron {
  transform: rotate(90deg);
}

.nav-group-items {
  display: block;
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition:
    max-height 0.3s ease,
    opacity 0.2s ease;
}

.nav-group.open > .nav-group-items {
  max-height: 600px;
  opacity: 1;
}

.nav-group-items-inner {
  padding: 8px 0 8px 14px;
  border-left: 2px solid var(--border);
  margin: 6px 0 10px 28px;
}

.nav-submenu-header {
  display: none;
}

.nav-group-items-inner .nav-link {
  padding: 9px 16px;
  font-size: 13px;
  margin-bottom: 0;
  border-radius: 12px;
}

.nav-group-items-inner .nav-link.active::before {
  left: -16px;
}

.nav-link-placeholder {
  width: 100%;
  border: 1px dashed var(--border);
  background: transparent;
  cursor: pointer;
  text-align: left;
  justify-content: flex-start;
  opacity: 0.8;
}

.nav-link-placeholder:hover {
  border-color: var(--border-hover);
  background: var(--bg-card);
}

.nav-soon-badge {
  margin-left: auto;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.12);
  color: var(--orange);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 20px;
  border-radius: 0;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 15px;
  font-weight: 600;
  transition: var(--transition);
  margin-bottom: 4px;
  position: relative;
}

.nav-link:hover {
  color: var(--text-primary);
}

.nav-link.active {
  color: var(--text-primary);
  background: transparent;
  border: none;
}

.nav-link.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 15%;
  height: 70%;
  width: 4px;
  background: var(--accent);
  border-radius: 0 4px 4px 0;
}

.nav-link.active i,
.nav-link.active [data-lucide] {
  color: var(--accent);
}

/* Locked nav links — shown when user hasn't deposited $10 */
.nav-link-locked {
  opacity: 0.35;
  cursor: not-allowed !important;
  pointer-events: auto !important; /* allow click to show toast */
  filter: grayscale(100%);
}
.nav-link-locked::after {
  content: '';
  display: inline-block;
  width: 12px;
  height: 12px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect width='18' height='11' x='3' y='11' rx='2' ry='2'/%3E%3Cpath d='M7 11V7a5 5 0 0 1 10 0v4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: contain;
  margin-left: auto;
  flex-shrink: 0;
}
.nav-link-locked:hover {
  opacity: 0.5;
  color: var(--text-secondary);
}

.sidebar-nav-container {
  flex: 1;
  overflow-y: auto;
  padding-right: 4px;
  overflow-x: visible;
}

.sidebar-nav-container::-webkit-scrollbar {
  width: 4px;
}

.sidebar-nav-container::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 10px;
}

.sidebar-bottom-fixed {
  margin-top: auto;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

@media (min-width: 769px) {
  .nav-group-items {
    position: static;
    display: block;
    transform: none;
    pointer-events: none;
    overflow: hidden;
    width: 100%;
  }

  .nav-group.open > .nav-group-items {
    pointer-events: auto;
  }

  .nav-group-items-inner {
    padding: 8px 0 8px 14px;
    margin: 6px 0 10px 28px;
    border-left: 2px solid var(--border);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  .nav-submenu-header {
    display: none;
  }

  .nav-group-items-inner .nav-link {
    padding: 10px 14px;
    font-size: 14px;
    margin-bottom: 4px;
    border-radius: 14px;
  }

  .nav-group-items-inner .nav-link:last-child {
    margin-bottom: 0;
  }

  .nav-group-items-inner .nav-link.active::before {
    left: -16px;
  }

  .nav-group-items-inner .nav-link.active {
    background: transparent;
    border: none;
  }
}

.sidebar-promo {
  padding: 20px;
  background: #000;
  border-radius: 20px;
  margin: 10px 10px 10px;
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

.sidebar-promo::after {
  content: '';
  position: absolute;
  bottom: -20px;
  right: -20px;
  width: 80px;
  height: 80px;
  background: var(--accent-glow);
  filter: blur(30px);
  border-radius: 50%;
}

.sidebar-promo-title {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 6px;
  line-height: 1.3;
}

.sidebar-promo-text {
  font-size: 11px;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

/* ── Topbar ── */
.topbar {
  background: transparent;
  border-bottom: 1px solid var(--border);
  height: var(--topbar-height);
  display: flex;
  align-items: center;
  padding: 0 40px;
  gap: 24px;
  position: relative;
  z-index: 10;
}

.topbar-search {
  flex: 1;
  max-width: 400px;
  position: relative;
}

.topbar-search input {
  width: 100%;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 16px 10px 42px;
  color: var(--text-primary);
  font-size: 14px;
  outline: none;
  transition: var(--transition);
}

.topbar-search [data-lucide] {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}

.topbar-search .shortcut {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.05);
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid var(--border);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-left: auto;
}

.action-icon-btn {
  width: 42px;
  height: 42px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
}

.action-icon-btn:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
  border-color: var(--border-hover);
}

.theme-toggle-btn {
  gap: 10px;
  width: auto;
  min-width: 42px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.theme-toggle-label {
  white-space: nowrap;
}

/* ── Notification System ── */
.notif-wrapper {
  position: relative;
  z-index: 30;
}

.notif-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  background: var(--red);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
  line-height: 1;
  border: 2px solid var(--bg-primary);
  z-index: 1;
  animation: notifPop 0.3s ease;
}

@keyframes notifPop {
  0% { transform: scale(0); }
  60% { transform: scale(1.2); }
  100% { transform: scale(1); }
}

.notif-dropdown {
  position: fixed;
  top: 0;
  left: 0;
  width: 380px;
  max-height: 460px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02)),
    var(--bg-secondary);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(18px);
  z-index: 9999;
  display: none;
  flex-direction: column;
  overflow: hidden;
  transform-origin: top right;
}

.notif-dropdown.open {
  display: flex;
  animation: notifSlideIn 0.2s ease;
}

@keyframes notifSlideIn {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.notif-dropdown-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px 12px;
  padding: 16px 18px 14px;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
}

.notif-dropdown-title {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.01em;
  color: var(--text-primary);
}

.notif-mark-all {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--accent-light);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  border-radius: 999px;
  transition: var(--transition);
  white-space: nowrap;
}

.notif-mark-all:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255, 255, 255, 0.12);
}

.notif-mark-all:disabled {
  opacity: 0.45;
  cursor: default;
}

.notif-dropdown-list {
  overflow-y: auto;
  flex: 1;
  max-height: 400px;
  padding: 8px;
}

.notif-dropdown-list::-webkit-scrollbar {
  width: 4px;
}
.notif-dropdown-list::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.1);
  border-radius: 2px;
}

.notif-empty {
  min-height: 190px;
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--text-muted);
  gap: 10px;
}

.notif-empty-icon {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.55);
}

.notif-empty-icon svg,
.notif-empty-icon i {
  width: 22px;
  height: 22px;
}

.notif-empty-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
}

.notif-empty-copy {
  margin: 0;
  max-width: 240px;
  font-size: 12px;
  line-height: 1.5;
}

.notif-item {
  display: flex;
  gap: 12px;
  padding: 14px 18px;
  cursor: pointer;
  transition: background 0.15s ease;
  border: 1px solid transparent;
  border-radius: 14px;
}

.notif-item:hover {
  background: rgba(255,255,255,0.04);
  border-color: rgba(255, 255, 255, 0.06);
}

.notif-item.unread {
  background: rgba(255,255,255,0.04);
  border-color: rgba(99, 102, 241, 0.18);
}

.notif-item.unread::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--accent-light);
  border-radius: 0 3px 3px 0;
}

.notif-item {
  position: relative;
}

.notif-item-icon {
  width: 36px;
  height: 36px;
  min-width: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.06);
  color: var(--text-secondary);
}

.notif-item-icon svg,
.notif-item-icon i {
  width: 16px;
  height: 16px;
}

.notif-item-icon.info { background: rgba(99,102,241,0.12); color: #818cf8; }
.notif-item-icon.success { background: rgba(16,185,129,0.12); color: #10b981; }
.notif-item-icon.warning { background: rgba(245,158,11,0.12); color: #f59e0b; }
.notif-item-icon.error { background: rgba(239,68,68,0.12); color: #ef4444; }
.notif-item-icon.billing { background: rgba(16,185,129,0.12); color: #10b981; }
.notif-item-icon.message { background: rgba(99,102,241,0.12); color: #818cf8; }
.notif-item-icon.system { background: rgba(255,255,255,0.06); color: var(--text-secondary); }

.notif-item-content {
  flex: 1;
  min-width: 0;
}

.notif-item-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.notif-item-body {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.notif-item-time {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
  opacity: 0.7;
}

@media (max-width: 768px) {
  .notif-dropdown {
    width: min(360px, calc(100vw - 24px));
  }
}

.profile-chip {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-left: 16px;
  border-left: 1px solid var(--border);
}

.profile-info {
  text-align: right;
  display: flex;
  flex-direction: column;
}

.profile-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

.profile-email {
  font-size: 11px;
  color: var(--text-muted);
}

.profile-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, #fff, #444);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: #000;
  font-size: 14px;
}

/* ── Main Content ── */
.main-content {
  padding: 28px;
  overflow-y: auto;
}

.page-header {
  margin-bottom: 24px;
}

.page-header h1 {
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 4px;
}

.page-header p {
  color: var(--text-secondary);
  font-size: 14px;
}

/* Knowledge Base */
.knowledge-page .main-content {
  padding-bottom: 116px;
}

.knowledge-workspace {
  gap: 20px;
}

.knowledge-page-header {
  margin-bottom: 20px;
}

.knowledge-page-header h1 {
  display: flex;
  align-items: center;
  gap: 10px;
}

.knowledge-page-header p {
  max-width: 60ch;
  line-height: 1.65;
}

.knowledge-session-card {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at top right, rgba(16, 185, 129, 0.12), transparent 34%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.03));
}

.knowledge-session-card::after {
  content: '';
  position: absolute;
  inset: auto -44px -44px auto;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.08);
  filter: blur(20px);
  pointer-events: none;
}

.knowledge-avatar-row {
  align-items: center;
}

.knowledge-avatar-preview {
  flex-shrink: 0;
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.35);
}

.knowledge-avatar-controls,
.knowledge-toggle-copy {
  min-width: 0;
}

.knowledge-inline-actions,
.knowledge-phrase-row {
  flex-wrap: wrap;
}

.knowledge-inline-actions .btn,
.knowledge-phrase-row .btn {
  justify-content: center;
}

.knowledge-toggle-row {
  gap: 16px;
}

.knowledge-actions-bar {
  position: sticky;
  bottom: 84px;
  z-index: 25;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  background: rgba(10, 10, 10, 0.92);
  backdrop-filter: blur(18px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
}

.knowledge-actions-bar .btn {
  min-width: 0;
  justify-content: center;
}

/* Billing */
.billing-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(300px, 0.9fr);
  gap: 24px;
  padding: 28px;
  margin-bottom: 28px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 28px;
  background:
    radial-gradient(circle at top left, rgba(16, 185, 129, 0.12), transparent 34%),
    radial-gradient(circle at bottom right, rgba(245, 158, 11, 0.1), transparent 30%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02));
  overflow: hidden;
}

.billing-kicker,
.billing-card-eyebrow {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.billing-hero-copy h1 {
  margin-top: 10px;
  font-size: clamp(32px, 5vw, 48px);
  line-height: 0.98;
  letter-spacing: -0.05em;
  max-width: 11ch;
}

.billing-hero-copy p {
  max-width: 620px;
  margin-top: 14px;
  font-size: 15px;
  line-height: 1.8;
  color: var(--text-secondary);
}

.billing-hero-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.billing-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  font-size: 12px;
  font-weight: 700;
}

.billing-hero-panel {
  padding: 22px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  align-self: stretch;
}

.billing-hero-panel-label {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 18px;
}

.billing-flow-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.billing-flow-step {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 12px;
  align-items: start;
}

.billing-flow-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
}

.billing-flow-step strong {
  display: block;
  margin-bottom: 4px;
  font-size: 14px;
}

.billing-flow-step p {
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-secondary);
}

.billing-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 28px;
}

.billing-balance-card,
.billing-plan-card-shell,
.billing-guide-card,
.billing-panel,
.billing-plan-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 24px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
}

.billing-balance-card,
.billing-plan-card-shell,
.billing-guide-card,
.billing-panel {
  padding: 24px;
}

.billing-balance-card {
  background:
    radial-gradient(circle at top right, rgba(16, 185, 129, 0.18), transparent 38%),
    linear-gradient(180deg, rgba(16, 185, 129, 0.09), rgba(255, 255, 255, 0.02));
}

.billing-balance-amount {
  margin-top: 12px;
  font-size: clamp(34px, 5vw, 52px);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.06em;
  color: var(--green);
}

.billing-balance-copy {
  margin-top: 14px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--text-secondary);
}

.billing-balance-notes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.billing-note-chip {
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.billing-note-chip span,
.billing-plan-fact span,
.billing-builder-summary-row span {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.billing-note-chip strong,
.billing-plan-fact strong,
.billing-builder-summary-row strong {
  display: block;
  margin-top: 6px;
  font-size: 14px;
  color: var(--text-primary);
}

.billing-plan-topline {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
}

.billing-plan-name {
  margin-top: 10px;
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.billing-plan-state {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.billing-plan-state--active {
  background: rgba(16, 185, 129, 0.14);
  color: var(--green);
}

.billing-plan-state--warning {
  background: rgba(245, 158, 11, 0.14);
  color: var(--orange);
}

.billing-plan-state--inactive {
  background: rgba(148, 163, 184, 0.14);
  color: var(--text-muted);
}

.billing-plan-copy {
  margin-top: 14px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-secondary);
}

.billing-plan-meta {
  margin-top: 8px;
  font-size: 12px;
  line-height: 1.6;
  color: var(--text-muted);
}

.billing-plan-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.billing-plan-fact {
  padding: 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.billing-renew-wrap {
  display: none;
  flex-direction: column;
  gap: 10px;
  margin-top: 18px;
}

.billing-renew-hint {
  font-size: 12px;
  line-height: 1.6;
  color: var(--text-secondary);
}

.billing-guide-card {
  background:
    radial-gradient(circle at top left, rgba(148, 163, 184, 0.1), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02));
}

.billing-guide-list {
  display: grid;
  gap: 12px;
  margin-top: 16px;
  padding-left: 18px;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.7;
}

.billing-section {
  margin-bottom: 28px;
}

.billing-section-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: end;
  margin-bottom: 18px;
}

.billing-section-header h2 {
  margin-top: 10px;
  font-size: 28px;
  letter-spacing: -0.04em;
}

.billing-section-header p {
  max-width: 460px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--text-secondary);
}

.billing-plan-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.billing-plan-card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding: 22px;
  position: relative;
  overflow: hidden;
  transition: var(--transition);
}

.billing-plan-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-hover);
}

.billing-plan-card--starter {
  background:
    radial-gradient(circle at top left, rgba(14, 165, 233, 0.14), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02));
}

.billing-plan-card--business {
  background:
    radial-gradient(circle at top left, rgba(16, 185, 129, 0.16), transparent 36%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.02));
}

.billing-plan-card--custom {
  background:
    radial-gradient(circle at top left, rgba(245, 158, 11, 0.14), transparent 36%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02));
}

.billing-plan-badge {
  align-self: flex-start;
  margin-bottom: 16px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.24);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
}

.billing-plan-card-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
}

.billing-plan-card-head h3 {
  font-size: 24px;
  letter-spacing: -0.03em;
}

.billing-plan-card-head p {
  margin-top: 6px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--text-secondary);
}

.billing-plan-price {
  text-align: right;
}

.billing-plan-price strong {
  display: block;
  font-size: 34px;
  line-height: 0.95;
  letter-spacing: -0.05em;
}

.billing-plan-price span,
.billing-plan-subcopy,
.billing-plan-footnote {
  font-size: 12px;
  color: var(--text-muted);
}

.billing-plan-subcopy {
  margin-top: 14px;
  margin-bottom: 16px;
}

.billing-plan-feature-list {
  display: grid;
  gap: 10px;
  margin-bottom: 20px;
  list-style: none;
}

.billing-plan-feature-list li {
  display: grid;
  grid-template-columns: 16px 1fr;
  gap: 10px;
  align-items: start;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-secondary);
}

.billing-plan-feature-list i,
.billing-step-title i {
  color: var(--green);
}

.billing-plan-footer {
  margin-top: auto;
  display: grid;
  gap: 12px;
}

.billing-lower-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(340px, 0.9fr);
  gap: 18px;
  align-items: start;
}

.billing-panel-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: start;
  margin-bottom: 20px;
}

.billing-panel-head h3 {
  margin-top: 10px;
  font-size: 24px;
  letter-spacing: -0.03em;
}

.billing-panel-icon {
  width: 46px;
  height: 46px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}

.billing-ecocash-card {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 20px;
  margin-bottom: 20px;
  border-radius: 20px;
  background:
    radial-gradient(circle at top right, rgba(14, 165, 233, 0.15), transparent 34%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.03));
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.billing-ecocash-copy span {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
}

.billing-ecocash-copy strong {
  display: block;
  margin-top: 8px;
  font-size: clamp(22px, 3vw, 30px);
  letter-spacing: 0.12em;
  color: var(--cyan);
}

.billing-ecocash-copy small {
  display: block;
  margin-top: 8px;
  font-size: 13px;
  color: var(--text-secondary);
}

.billing-ecocash-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.billing-help-text {
  margin-top: 8px;
  font-size: 12px;
  line-height: 1.6;
  color: var(--text-muted);
}

.billing-step-card {
  padding: 18px;
  margin-bottom: 18px;
  border-radius: 18px;
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.18);
}

.billing-step-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  font-size: 13px;
  font-weight: 700;
  color: var(--orange);
}

.billing-step-list {
  padding-left: 18px;
  display: grid;
  gap: 8px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--text-secondary);
}

.billing-history-wrap {
  min-height: 360px;
}

.billing-history-list {
  display: grid;
  gap: 10px;
}

.billing-history-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.billing-history-main {
  min-width: 0;
}

.billing-history-amount {
  font-size: 16px;
  font-weight: 800;
}

.billing-history-date,
.billing-history-note {
  margin-top: 4px;
  font-size: 12px;
  color: var(--text-muted);
}

.billing-history-note {
  color: var(--orange);
}

.billing-empty-state {
  min-height: 260px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 12px;
  color: var(--text-muted);
}

.billing-empty-state strong {
  color: var(--text-primary);
  font-size: 16px;
}

.billing-empty-state p {
  max-width: 260px;
  font-size: 13px;
  line-height: 1.7;
}

.billing-empty-icon {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.billing-modal {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(6, 8, 12, 0.82);
  backdrop-filter: blur(10px);
}

.billing-modal-card {
  width: min(1080px, 100%);
  max-height: 90vh;
  overflow: auto;
  padding: 28px;
  border-radius: 28px;
  background: #111319;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.5);
}

.billing-modal-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: start;
  margin-bottom: 22px;
}

.billing-modal-head h2 {
  margin-top: 10px;
  font-size: 28px;
  letter-spacing: -0.04em;
}

.billing-modal-head p {
  margin-top: 10px;
  max-width: 640px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--text-secondary);
}

.billing-modal-body {
  padding-bottom: 8px;
}

.billing-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}

.billing-builder-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.billing-builder-section,
.billing-builder-summary {
  padding: 18px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.billing-builder-section--wide,
.billing-builder-summary {
  grid-column: 1 / -1;
}

.billing-builder-title {
  margin-bottom: 14px;
  font-size: 14px;
  font-weight: 800;
  color: var(--text-primary);
}

.billing-builder-stack {
  display: grid;
  gap: 10px;
}

.billing-builder-item {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 12px;
  align-items: start;
  padding: 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.billing-builder-item--locked {
  opacity: 0.72;
}

.billing-builder-item strong,
.billing-builder-quantity-card span {
  display: block;
  font-size: 14px;
}

.billing-builder-item small,
.billing-builder-quantity-card small,
.billing-builder-summary p {
  display: block;
  margin-top: 5px;
  font-size: 12px;
  line-height: 1.6;
  color: var(--text-secondary);
}

.billing-builder-item em {
  display: block;
  margin-top: 7px;
  font-style: normal;
  font-size: 12px;
  color: var(--cyan);
}

.billing-builder-item input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--green);
}

.billing-builder-quantity-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.billing-builder-quantity-card {
  display: grid;
  gap: 10px;
  padding: 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.billing-builder-summary {
  background: rgba(245, 158, 11, 0.07);
  border-color: rgba(245, 158, 11, 0.16);
}

.billing-builder-summary-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}

@media (max-width: 1200px) {
  .billing-plan-grid,
  .billing-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .billing-guide-card {
    grid-column: 1 / -1;
  }

  .billing-builder-quantity-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .billing-hero,
  .billing-summary-grid,
  .billing-plan-grid,
  .billing-lower-grid,
  .billing-builder-grid,
  .billing-builder-quantity-grid {
    grid-template-columns: 1fr;
  }

  .billing-section-header,
  .billing-modal-head,
  .billing-plan-card-head,
  .billing-ecocash-card,
  .billing-plan-topline {
    flex-direction: column;
    align-items: start;
  }

  .billing-balance-notes,
  .billing-plan-facts,
  .billing-builder-summary-row {
    grid-template-columns: 1fr;
  }

  .billing-plan-price {
    text-align: left;
  }

  .billing-ecocash-actions {
    width: 100%;
    flex-direction: row;
    flex-wrap: wrap;
  }
}

/* Dashboard Refresh */
.dashboard-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.85fr);
  gap: 20px;
  margin-bottom: 28px;
}

.dashboard-hero-copy,
.dashboard-plan-panel,
.dashboard-stat-card,
.dashboard-workspace-card,
.dashboard-actions-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 24px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
}

.dashboard-hero-copy {
  padding: 28px;
  background:
    radial-gradient(circle at top left, rgba(16, 185, 129, 0.14), transparent 34%),
    radial-gradient(circle at bottom right, rgba(245, 158, 11, 0.1), transparent 28%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02));
}

.dashboard-hero-copy h1 {
  margin-top: 10px;
  max-width: 12ch;
  font-size: clamp(34px, 5vw, 52px);
  line-height: 0.98;
  letter-spacing: -0.05em;
}

.dashboard-hero-copy p {
  max-width: 680px;
  margin-top: 14px;
  font-size: 15px;
  line-height: 1.8;
  color: var(--text-secondary);
}

.dashboard-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

.dashboard-hero-actions .btn {
  min-height: 44px;
}

.dashboard-signal-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.dashboard-signal-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  font-size: 12px;
  font-weight: 700;
}

.dashboard-signal-chip i {
  color: var(--green);
}

.dash-period-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 24px;
  padding: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.dash-period-chip {
  min-width: 62px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: var(--transition);
}

.dash-period-chip.active {
  background: rgba(16, 185, 129, 0.16);
  border-color: rgba(16, 185, 129, 0.28);
  color: var(--green);
}

.dash-period-chip:hover:not(.active) {
  border-color: rgba(255, 255, 255, 0.12);
  color: var(--text-primary);
}

.dashboard-plan-panel {
  padding: 24px;
  background:
    radial-gradient(circle at top right, rgba(14, 165, 233, 0.16), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.02));
}

.dashboard-panel-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
}

.dashboard-panel-head h2 {
  margin-top: 10px;
  font-size: 30px;
  letter-spacing: -0.04em;
}

.dashboard-plan-badge {
  max-width: 150px;
  text-align: center;
}

.dashboard-plan-detail {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--text-secondary);
}

.dashboard-plan-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.dashboard-plan-fact {
  padding: 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.dashboard-plan-fact span,
.dashboard-progress-head span,
.dashboard-stat-eyebrow,
.dashboard-quick-link-eyebrow {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.dashboard-plan-fact strong,
.dashboard-progress-head strong {
  display: block;
  margin-top: 6px;
  font-size: 15px;
  color: var(--text-primary);
}

.dashboard-plan-progress {
  margin-top: 18px;
  padding: 16px;
  border-radius: 18px;
  background: rgba(0, 0, 0, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.dashboard-progress-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: end;
  margin-bottom: 10px;
}

.dashboard-progress-head strong {
  margin-top: 0;
}

.dashboard-plan-note {
  margin-top: 12px;
  font-size: 12px;
  line-height: 1.7;
  color: var(--text-secondary);
}

.dashboard-stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 28px;
}

.dashboard-stat-card {
  position: relative;
  overflow: hidden;
  padding: 22px;
  transition: var(--transition);
}

.dashboard-stat-card:hover,
.dashboard-workspace-card:hover,
.dashboard-actions-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-hover);
}

.dashboard-stat-card--usage {
  background:
    radial-gradient(circle at top left, rgba(16, 185, 129, 0.14), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02));
}

.dashboard-stat-card--funds {
  background:
    radial-gradient(circle at top left, rgba(245, 158, 11, 0.16), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02));
}

.dashboard-stat-card--sessions {
  background:
    radial-gradient(circle at top left, rgba(59, 130, 246, 0.16), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02));
}

.dashboard-stat-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: start;
  margin-bottom: 16px;
}

.dashboard-stat-icon {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}

.dashboard-stat-card--usage .dashboard-stat-icon {
  background: linear-gradient(135deg, #10b981, #059669);
}

.dashboard-stat-card--funds .dashboard-stat-icon {
  background: linear-gradient(135deg, #f59e0b, #d97706);
}

.dashboard-stat-card--sessions .dashboard-stat-icon {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
}

.dashboard-stat-icon i {
  width: 18px;
  height: 18px;
}

.dashboard-stat-value {
  font-size: clamp(34px, 5vw, 46px);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.05em;
  color: var(--text-primary);
}

.dashboard-stat-copy {
  margin-top: 10px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--text-secondary);
}

.dash-chart-svg path {
  transition: d 0.5s ease;
}

.dashboard-stat-card .dash-chart-label {
  top: 0;
  right: 0;
}

.dashboard-workspace-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  gap: 18px;
}

.dashboard-workspace-card,
.dashboard-actions-card {
  padding: 24px;
}

.dashboard-section-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: end;
  margin-bottom: 20px;
}

.dashboard-section-header h2,
.dashboard-actions-card h2 {
  margin-top: 10px;
  font-size: 28px;
  letter-spacing: -0.04em;
}

.dashboard-section-header p,
.dashboard-actions-card p {
  max-width: 520px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--text-secondary);
}

.dashboard-inline-link {
  color: var(--text-primary);
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
}

.dashboard-inline-link:hover {
  color: var(--green);
}

.dashboard-primary-pane {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(280px, 1.05fr);
  gap: 18px;
  margin-bottom: 18px;
}

.dashboard-primary-metric {
  padding: 24px;
  border-radius: 22px;
  background:
    radial-gradient(circle at top right, rgba(16, 185, 129, 0.18), transparent 34%),
    linear-gradient(145deg, rgba(16, 185, 129, 0.08), rgba(255, 255, 255, 0.03));
  border: 1px solid rgba(16, 185, 129, 0.14);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.dashboard-primary-top {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: start;
}

.dashboard-primary-metric span {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.dashboard-primary-metric strong {
  display: block;
  margin-top: 10px;
  font-size: clamp(40px, 6vw, 64px);
  line-height: 0.92;
  letter-spacing: -0.06em;
  color: var(--text-primary);
}

.dashboard-primary-metric p {
  margin-top: 12px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--text-secondary);
}

.dashboard-primary-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}

.dashboard-mini-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  align-items: stretch;
}

.dashboard-mini-stat {
  padding: 18px;
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.02));
  border: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.dashboard-mini-stat-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
  margin-bottom: 16px;
}

.dashboard-mini-stat-icon {
  width: 38px;
  height: 38px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(16, 185, 129, 0.14);
  color: var(--green);
}

.dashboard-mini-stat-icon--blue {
  background: rgba(59, 130, 246, 0.14);
  color: #60a5fa;
}

.dashboard-mini-stat-icon--amber {
  background: rgba(245, 158, 11, 0.14);
  color: var(--orange);
}

.dashboard-mini-stat-icon i {
  width: 16px;
  height: 16px;
}

.dashboard-mini-stat-label {
  display: block;
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.dashboard-mini-stats .dashboard-mini-stat .dashboard-mini-stat-value-row {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  align-items: center !important;
  gap: 10px;
  margin-top: 10px;
}

.dashboard-mini-stats .dashboard-mini-stat strong {
  font-size: 28px;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  margin: 0;
}

.dashboard-mini-stats .dashboard-mini-stat .dashboard-mini-stat-trend {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  line-height: 1;
  font-weight: 800;
  border: 1px solid transparent;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  flex-shrink: 0;
  margin: 0 !important;
  justify-self: end;
  align-self: center;
}

.dashboard-mini-stat-trend--up {
  color: var(--green);
  background: linear-gradient(180deg, rgba(16, 185, 129, 0.18), rgba(16, 185, 129, 0.1));
  border-color: rgba(16, 185, 129, 0.22);
}

.dashboard-mini-stat-trend--down {
  color: #fb7185;
  background: linear-gradient(180deg, rgba(244, 63, 94, 0.18), rgba(244, 63, 94, 0.1));
  border-color: rgba(244, 63, 94, 0.22);
}

.dash-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  text-transform: uppercase;
}

.dash-reward-bar {
  width: 100%;
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.dash-reward-bar-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #10b981, #22c55e);
  transition: width 0.4s ease;
}

.dash-reward-bar-labels {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
  font-size: 12px;
  color: var(--text-secondary);
}

.dashboard-actions-card .dashboard-action-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 10px;
  margin-top: 20px;
}

.admin-dashboard-page .dashboard-hero-copy {
  background:
    radial-gradient(circle at top left, rgba(59, 130, 246, 0.18), transparent 34%),
    radial-gradient(circle at bottom right, rgba(139, 92, 246, 0.14), transparent 30%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02));
}

.admin-dashboard-page .admin-dashboard-plan-panel {
  background:
    radial-gradient(circle at top right, rgba(139, 92, 246, 0.18), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.02));
}

.admin-platform-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.admin-platform-card {
  padding: 20px;
  border-radius: 22px;
  background:
    radial-gradient(circle at top left, rgba(59, 130, 246, 0.12), transparent 30%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.02));
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
}

.admin-platform-card--emerald {
  background:
    radial-gradient(circle at top left, rgba(16, 185, 129, 0.14), transparent 30%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.02));
}

.admin-platform-card--amber {
  background:
    radial-gradient(circle at top left, rgba(245, 158, 11, 0.14), transparent 30%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.02));
}

.admin-platform-card--blue {
  background:
    radial-gradient(circle at top left, rgba(14, 165, 233, 0.14), transparent 30%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.02));
}

.admin-platform-card-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.admin-platform-icon {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
}

.admin-platform-icon i {
  width: 16px;
  height: 16px;
}

.admin-platform-card strong {
  display: block;
  font-size: clamp(28px, 4vw, 40px);
  line-height: 0.95;
  letter-spacing: -0.05em;
  color: var(--text-primary);
}

.admin-platform-card p {
  margin-top: 10px;
  font-size: 12px;
  line-height: 1.7;
  color: var(--text-secondary);
}

.admin-workspace-page .main-content {
  background:
    radial-gradient(circle at top left, rgba(59, 130, 246, 0.08), transparent 28%),
    radial-gradient(circle at top right, rgba(139, 92, 246, 0.08), transparent 24%);
}

.admin-workspace-page .admin-header,
.admin-workspace-page .page-header,
.admin-workspace-page .dash-header {
  margin-bottom: 26px !important;
}

.admin-workspace-page .admin-header h1,
.admin-workspace-page .page-header h1,
.admin-workspace-page .page-title,
.admin-workspace-page .gradient-text {
  font-size: clamp(28px, 4vw, 40px) !important;
  font-weight: 800 !important;
  letter-spacing: -0.05em !important;
  line-height: 0.98 !important;
  color: var(--text-primary) !important;
  background: none !important;
  -webkit-text-fill-color: currentColor !important;
}

.admin-workspace-page .admin-header p,
.admin-workspace-page .page-header p,
.admin-workspace-page .dash-header p {
  color: var(--text-secondary) !important;
}

.admin-workspace-page .admin-stats,
.admin-workspace-page .auth-stat-cards,
.admin-workspace-page .api-keys-grid {
  gap: 16px !important;
  margin-bottom: 24px !important;
}

.admin-workspace-page .admin-stat-card,
.admin-workspace-page .auth-stat-card,
.admin-workspace-page .api-key-card,
.admin-workspace-page .admin-panel,
.admin-workspace-page .admin-table-container,
.admin-workspace-page .glass-panel {
  background: var(--bg-card) !important;
  border: 1px solid var(--border) !important;
  border-radius: 24px !important;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.28) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

.admin-workspace-page .admin-stat-card,
.admin-workspace-page .auth-stat-card,
.admin-workspace-page .api-key-card {
  position: relative;
  overflow: hidden;
}

.admin-workspace-page .admin-stat-card::before {
  opacity: 0.85;
}

.admin-workspace-page .admin-tabs,
.admin-workspace-page .dash-tabs {
  background: rgba(255, 255, 255, 0.04) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 18px !important;
  padding: 6px !important;
}

.admin-workspace-page .admin-tab,
.admin-workspace-page .dash-tab {
  border-radius: 14px !important;
  min-height: 40px;
}

.admin-workspace-page .admin-panel {
  padding: 20px !important;
}

.admin-workspace-page .admin-table-container {
  padding: 10px !important;
}

.admin-workspace-page .admin-table th {
  color: var(--text-muted) !important;
  font-size: 11px !important;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.admin-workspace-page .admin-table td {
  color: var(--text-secondary) !important;
}

.admin-workspace-page .admin-table tbody tr:hover td {
  background: rgba(255, 255, 255, 0.03) !important;
}

.admin-workspace-page .auth-filter-row {
  gap: 16px !important;
  margin-bottom: 22px !important;
}

.admin-workspace-page .auth-filter-group,
.admin-workspace-page .header-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.admin-workspace-page .api-key-card .key-mask {
  background: rgba(255, 255, 255, 0.04) !important;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px !important;
}

.admin-workspace-page .api-key-card .card-footer {
  margin-top: auto;
}

.admin-workspace-page .btn-add,
.admin-workspace-page .header-actions .btn {
  min-height: 44px;
}

.dashboard-action-card {
  padding: 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  text-decoration: none;
  color: var(--text-primary);
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 56px;
}

.dashboard-action-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-hover);
}

.dashboard-action-icon {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(16, 185, 129, 0.14);
  color: var(--green);
  flex-shrink: 0;
}

.dashboard-action-icon--amber {
  background: rgba(245, 158, 11, 0.14);
  color: var(--orange);
}

.dashboard-action-icon--blue {
  background: rgba(59, 130, 246, 0.14);
  color: #60a5fa;
}

.dashboard-action-icon--violet {
  background: rgba(139, 92, 246, 0.16);
  color: #a78bfa;
}

.dashboard-action-icon--rose {
  background: rgba(244, 63, 94, 0.14);
  color: #fb7185;
}

.dashboard-action-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
}

.dashboard-action-copy {
  margin-top: 6px;
  font-size: 12px;
  line-height: 1.7;
  color: var(--text-secondary);
}

@media (max-width: 1200px) {
  .dashboard-hero,
  .dashboard-workspace-grid,
  .dashboard-primary-pane {
    grid-template-columns: 1fr;
  }

  .admin-platform-grid,
  .dashboard-stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-workspace-page .admin-stats,
  .admin-workspace-page .auth-stat-cards,
  .admin-workspace-page .api-keys-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 900px) {
  .admin-platform-grid,
  .dashboard-stat-grid,
  .dashboard-mini-stats,
  .dashboard-plan-facts {
    grid-template-columns: 1fr;
  }

  .dashboard-panel-head,
  .dashboard-section-header,
  .dashboard-progress-head,
  .dashboard-primary-top {
    flex-direction: column;
    align-items: start;
  }

  .admin-workspace-page .admin-stats,
  .admin-workspace-page .auth-stat-cards,
  .admin-workspace-page .api-keys-grid {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 560px) {
  .dashboard-actions-card .dashboard-action-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 380px) {
  .dashboard-actions-card .dashboard-action-grid {
    grid-template-columns: 1fr !important;
  }
}

.dashboard-mobile-dock {
  display: none;
}

@media (max-width: 768px) {
  .admin-workspace-page .main-content {
    padding-bottom: calc(94px + env(safe-area-inset-bottom, 0px));
  }

  .admin-workspace-page .admin-header,
  .admin-workspace-page .page-header,
  .admin-workspace-page .dash-header {
    margin-bottom: 18px !important;
  }

  .admin-workspace-page .admin-header h1,
  .admin-workspace-page .page-header h1,
  .admin-workspace-page .page-title,
  .admin-workspace-page .gradient-text {
    font-size: 28px !important;
  }

  .admin-workspace-page .admin-panel,
  .admin-workspace-page .admin-table-container,
  .admin-workspace-page .glass-panel,
  .admin-workspace-page .api-key-card,
  .admin-workspace-page .admin-stat-card,
  .admin-workspace-page .auth-stat-card {
    border-radius: 20px !important;
  }

  .admin-workspace-page .header-actions {
    width: 100%;
  }

  .admin-workspace-page .header-actions .btn,
  .admin-workspace-page .btn-add {
    width: 100%;
  }

  .admin-workspace-page .admin-tabs,
  .admin-workspace-page .dash-tabs {
    width: 100%;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .admin-workspace-page .admin-tabs::-webkit-scrollbar,
  .admin-workspace-page .dash-tabs::-webkit-scrollbar {
    display: none;
  }

  .admin-workspace-page .auth-filter-row {
    flex-direction: column;
    align-items: stretch;
  }

  .admin-workspace-page .auth-filter-group {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }

  .admin-workspace-page .admin-table-container {
    overflow-x: auto;
  }

  .dashboard-page .main-content {
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding-bottom: calc(108px + env(safe-area-inset-bottom, 0px));
  }

  .dashboard-page .dashboard-hero {
    display: block;
    margin-bottom: 0;
  }

  .dashboard-page .dashboard-hero-copy {
    display: none;
  }

  .dashboard-page .dashboard-plan-panel,
  .dashboard-page .dashboard-stat-card,
  .dashboard-page .dashboard-workspace-card,
  .dashboard-page .dashboard-actions-card {
    border-radius: 20px;
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.26);
  }

  .dashboard-page .dashboard-plan-panel,
  .dashboard-page .dashboard-workspace-card,
  .dashboard-page .dashboard-actions-card {
    padding: 18px;
  }

  .dashboard-page .dashboard-panel-head h2,
  .dashboard-page .dashboard-section-header h2,
  .dashboard-page .dashboard-actions-card h2 {
    font-size: 24px;
  }

  .dashboard-page .dashboard-plan-detail {
    font-size: 12px;
  }

  .dashboard-page .dashboard-plan-facts {
    display: flex;
    align-items: stretch;
    gap: 0;
    margin-top: 14px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    overflow: hidden;
  }

  .dashboard-page .dashboard-plan-fact {
    flex: 1;
    min-width: 0;
    padding: 14px 16px;
    border: 0;
    border-radius: 0;
    background: transparent;
  }

  .dashboard-page .dashboard-plan-fact + .dashboard-plan-fact {
    position: relative;
  }

  .dashboard-page .dashboard-plan-fact + .dashboard-plan-fact::before {
    content: '|';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translate(-50%, -50%);
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 700;
  }

  .dashboard-page .dashboard-plan-progress {
    padding: 14px;
  }

  .dashboard-page .dashboard-stat-grid {
    order: 2;
    display: flex;
    gap: 12px;
    margin-bottom: 0;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
  }

  .admin-dashboard-page .admin-platform-grid {
    order: 1;
    display: flex;
    gap: 12px;
    margin-bottom: 0;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
  }

  .admin-dashboard-page .admin-platform-grid::-webkit-scrollbar {
    display: none;
  }

  .admin-dashboard-page .admin-platform-card {
    min-width: 220px;
    flex: 0 0 220px;
    padding: 18px;
    scroll-snap-align: start;
  }

  .admin-dashboard-page .admin-platform-card strong {
    font-size: 30px;
  }

  .dashboard-page .dashboard-stat-grid::-webkit-scrollbar {
    display: none;
  }

  .dashboard-page .dashboard-stat-card {
    min-width: 220px;
    flex: 0 0 220px;
    padding: 18px;
    scroll-snap-align: start;
  }

  .dashboard-page .dashboard-stat-head {
    margin-bottom: 0;
    align-items: center;
  }

  .dashboard-page .dashboard-stat-value {
    font-size: 32px;
  }

  .dashboard-page .dashboard-stat-copy,
  .dashboard-page .dash-asset-chart {
    display: none;
  }

  .dashboard-page .dashboard-workspace-grid {
    order: 3;
    display: flex;
    flex-direction: column;
    gap: 16px;
  }

  .dashboard-page .dashboard-actions-card {
    order: 1;
  }

  .dashboard-page .dashboard-workspace-card {
    order: 2;
  }

  .dashboard-page .dashboard-actions-card .dashboard-action-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px;
    margin-top: 16px;
  }

  .dashboard-page .dashboard-action-card {
    min-height: 86px;
    padding: 14px;
    border-radius: 18px;
    align-items: flex-start;
    justify-content: space-between;
    flex-direction: column;
    gap: 12px;
  }

  .dashboard-page .dashboard-action-title {
    font-size: 12px;
    line-height: 1.35;
  }

  .dashboard-page .dashboard-action-card--messages {
    order: 1;
  }

  .admin-dashboard-page .dashboard-action-card--control {
    order: 1;
  }

  .admin-dashboard-page .dashboard-action-card--messages {
    order: 2;
  }

  .admin-dashboard-page .dashboard-action-card--sessions {
    order: 3;
  }

  .admin-dashboard-page .dashboard-action-card--access {
    order: 4;
  }

  .admin-dashboard-page .dashboard-action-card--managed {
    order: 5;
  }

  .admin-dashboard-page .dashboard-action-card--api {
    order: 6;
  }

  .admin-dashboard-page .dashboard-action-card--hosting-admin {
    order: 7;
  }

  .dashboard-page .dashboard-action-card--billing {
    order: 2;
  }

  .dashboard-page .dashboard-action-card--sessions {
    order: 3;
  }

  .dashboard-page .dashboard-action-card--knowledge {
    order: 4;
  }

  .dashboard-page .dashboard-action-card--calendar {
    order: 5;
  }

  .dashboard-page .dashboard-action-card--email {
    order: 6;
  }

  .dashboard-page .dashboard-action-card--secondary {
    order: 7;
  }

  .dashboard-page .dashboard-action-card--low-priority {
    display: none !important;
  }

  .dashboard-page .dashboard-section-header {
    margin-bottom: 14px;
    align-items: center;
  }

  .dashboard-page .dashboard-inline-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 0 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
  }

  .dashboard-page .dashboard-primary-pane {
    grid-template-columns: 1fr;
    gap: 12px;
    margin-bottom: 0;
  }

  .dashboard-page .dashboard-primary-metric {
    padding: 18px;
    border-radius: 20px;
  }

  .dashboard-page .dashboard-primary-metric strong {
    font-size: clamp(34px, 11vw, 52px);
  }

  .dashboard-page .dashboard-primary-actions {
    display: none;
  }

  .dashboard-page .dashboard-mini-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .dashboard-page .dashboard-mini-stat {
    padding: 12px;
    border-radius: 16px;
  }

  .dashboard-page .dashboard-mini-stat-head {
    margin-bottom: 10px;
  }

  .dashboard-page .dashboard-mini-stat-icon {
    width: 32px;
    height: 32px;
    border-radius: 12px;
  }

  .dashboard-page .dashboard-mini-stat-icon i {
    width: 14px;
    height: 14px;
  }

  .dashboard-page .dash-chip {
    padding: 4px 7px;
    font-size: 9px;
  }

  .dashboard-page .dashboard-mini-stat-label {
    font-size: 11px;
  }

  .dashboard-page .dashboard-mini-stats .dashboard-mini-stat strong {
    font-size: 22px;
  }

  .dashboard-page .dashboard-mini-stats .dashboard-mini-stat .dashboard-mini-stat-trend {
    width: 22px;
    height: 22px;
    font-size: 12px;
  }

  .dashboard-page .dashboard-mobile-dock {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    z-index: 200;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
    padding: 10px;
    border-radius: 22px;
    background: rgba(9, 10, 12, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 16px 34px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
  }

  .dashboard-page .dashboard-mobile-dock-link {
    min-height: 58px;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    text-decoration: none;
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.02em;
    min-width: 0;
    padding: 8px 4px;
    text-align: center;
  }

  .dashboard-page .dashboard-mobile-dock-link span {
    display: block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .dashboard-page .dashboard-mobile-dock-link--primary {
    background: linear-gradient(180deg, rgba(16, 185, 129, 0.16), rgba(16, 185, 129, 0.08));
    border-color: rgba(16, 185, 129, 0.2);
  }

  .dashboard-page .dashboard-mobile-dock-link--home {
    position: relative;
    transform: translateY(-14px);
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(16, 185, 129, 0.95), rgba(5, 150, 105, 0.94));
    border-color: rgba(16, 185, 129, 0.42);
    box-shadow: 0 14px 28px rgba(16, 185, 129, 0.3);
    color: #ffffff;
  }

  .dashboard-page .dashboard-mobile-dock-link--home span {
    font-size: 10px;
  }

  .dashboard-page .dashboard-mobile-dock-link i {
    width: 18px;
    height: 18px;
  }
}

@media (max-width: 480px) {
  .dashboard-page .dashboard-plan-facts {
    display: flex;
  }

  .dashboard-page .dashboard-mini-stats {
    grid-template-columns: 1fr;
  }

  .dashboard-page .dashboard-mobile-dock {
    left: 10px;
    right: 10px;
    padding: 8px;
    gap: 6px;
  }

  .dashboard-page .dashboard-mobile-dock-link {
    min-height: 54px;
    font-size: 9px;
  }
}

/* ── Cards ── */
.card {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  transition: var(--transition);
}

.card:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.6);
}

.card-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-primary);
}

/* ── Stat Cards ── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}

.stat-card {
  background: var(--bg-card);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  position: relative;
  overflow: hidden;
  transition: var(--transition);
}

.stat-card:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--accent-glow);
  transform: translate(30%, -30%);
}

.stat-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.stat-value {
  font-weight: 800;
  margin: 4px 0;
}

.stat-sub {
  font-size: 12px;
  color: var(--text-secondary);
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent);
  color: var(--bg-primary);
  border: 1px solid var(--accent);
}

.btn-primary:hover {
  transform: translateY(-1px);
  opacity: 0.9;
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
}

.btn-danger {
  background: rgba(239, 68, 68, 0.1);
  color: var(--red);
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.btn-danger:hover {
  background: rgba(239, 68, 68, 0.2);
}

.btn-success {
  background: rgba(16, 185, 129, 0.1);
  color: var(--green);
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.btn-success:hover {
  background: rgba(16, 185, 129, 0.2);
}

.btn-sm {
  padding: 6px 14px;
  font-size: 12px;
}

.btn-lg {
  padding: 14px 28px;
  font-size: 16px;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

/* ── Forms ── */
.form-group {
  margin-bottom: 18px;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  transition: var(--transition);
  outline: none;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  background: var(--input-bg-focus);
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-textarea {
  resize: vertical;
  min-height: 100px;
}

.form-select {
  appearance: none;
  cursor: pointer;
}

/* ── Tables ── */
.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius);
}

table {
  width: 100%;
  border-collapse: collapse;
}

th {
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}

td {
  padding: 14px 16px;
  font-size: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

tr:hover td {
  background: var(--bg-card-hover);
}

/* ── Status Badges ── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
}

.badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.badge-green {
  background: rgba(16, 185, 129, 0.12);
  color: var(--green);
}

.badge-red {
  background: rgba(239, 68, 68, 0.12);
  color: var(--red);
}

.badge-orange {
  background: rgba(245, 158, 11, 0.12);
  color: var(--orange);
}

.badge-purple {
  background: rgba(124, 58, 237, 0.12);
  color: var(--accent-light);
}

.badge-gray {
  background: rgba(148, 163, 184, 0.12);
  color: var(--text-secondary);
}

/* ── Modal ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: var(--overlay);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.modal {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 28px;
  width: min(500px, 95vw);
  max-height: 90vh;
  overflow-y: auto;
  transform: scale(0.95) translateY(20px);
  transition: transform 0.25s;
  box-shadow: var(--shadow);
}

.modal-overlay.open .modal {
  transform: scale(1) translateY(0);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.modal-title {
  font-size: 18px;
  font-weight: 800;
}

.modal-close {
  width: 32px;
  height: 32px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 16px;
  transition: var(--transition);
}

.modal-close:hover {
  color: var(--text-primary);
  border-color: var(--border-hover);
}

/* ── Toast Notifications ── */
#toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 9999;
}

.toast {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 20px;
  font-size: 14px;
  font-weight: 500;
  max-width: 340px;
  box-shadow: var(--shadow);
  display: flex;
  align-items: flex-start;
  gap: 10px;
  animation: slideInRight 0.3s ease;
}

.toast.success {
  border-left: 3px solid var(--green);
}

.toast.error {
  border-left: 3px solid var(--red);
}

.toast.info {
  border-left: 3px solid var(--accent-light);
}

@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }

  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* ── Gradient Text ── */
.gradient-text {
  background: linear-gradient(135deg, var(--accent-light), var(--cyan));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ── Divider ── */
.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 20px 0;
}

/* ── Empty State ── */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}

.empty-state .empty-icon {
  font-size: 48px;
  margin-bottom: 12px;
}

.empty-state p {
  font-size: 14px;
}

/* ── QR Code ── */
.qr-wrapper {
  background: #fff;
  border-radius: 12px;
  padding: 16px;
  display: inline-block;
}

.qr-wrapper img {
  width: 200px;
  height: 200px;
  display: block;
}

/* ── Grid Utilities ── */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.flex {
  display: flex;
}

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.gap-8 {
  gap: 8px;
}

.gap-12 {
  gap: 12px;
}

.gap-16 {
  gap: 16px;
}

.ml-auto {
  margin-left: auto;
}

.mt-16 {
  margin-top: 16px;
}

.mb-16 {
  margin-bottom: 16px;
}

.w-full {
  width: 100%;
}

.text-right {
  text-align: right;
}

/* ── Auth Pages ── */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(ellipse at 20% 50%, var(--accent-glow) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 20%, var(--cyan-glow) 0%, transparent 50%),
    var(--bg-primary);
}

.auth-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 40px;
  width: min(420px, 95vw);
  box-shadow: var(--shadow-glow);
}

.auth-logo {
  text-align: center;
  margin-bottom: 32px;
}

.auth-logo .logo-circle {
  width: 56px;
  height: 56px;
  background: var(--accent);
  color: var(--bg-primary);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  margin: 0 auto 12px;
}

.auth-logo h1 {
  font-size: 22px;
  font-weight: 800;
}

.auth-logo p {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 4px;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 4px;
  margin-bottom: 24px;
}

.auth-tab {
  padding: 8px;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  color: var(--text-secondary);
  transition: var(--transition);
  border: none;
  background: transparent;
}

.auth-tab.active {
  background: var(--accent);
  color: #fff;
}

.role-selector {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.role-btn {
  padding: 10px 6px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  color: var(--text-secondary);
  background: transparent;
  transition: var(--transition);
}

.role-btn.selected {
  border-color: var(--accent);
  background: var(--accent-glow);
  color: var(--accent-light);
}

.role-btn .role-icon {
  font-size: 18px;
  margin-bottom: 4px;
  display: block;
}

/* ── Chat ── */
.chat-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  height: calc(100vh - var(--topbar-height) - 56px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.chat-sidebar {
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
}

.chat-sidebar-header {
  padding: 16px;
  border-bottom: 1px solid var(--border);
}

.chat-list {
  overflow-y: auto;
  flex: 1;
}

.chat-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  cursor: pointer;
  transition: var(--transition);
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.chat-item:hover,
.chat-item.active {
  background: var(--bg-card-hover);
}

.chat-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--cyan));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
  flex-shrink: 0;
}

.chat-avatar.ai {
  background: var(--text-muted);
  color: var(--text-primary);
}

.chat-item-info {
  flex: 1;
  min-width: 0;
}

.chat-item-name {
  font-size: 14px;
  font-weight: 600;
}

.chat-item-preview {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-unread {
  background: var(--accent);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 20px;
}

.chat-main {
  display: flex;
  flex-direction: column;
  background: var(--bg-primary);
  min-height: 0;
  overflow: hidden;
}

.chat-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-card);
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.msg {
  max-width: 70%;
  display: flex;
  flex-direction: column;
}

.msg.sent {
  align-self: flex-end;
  align-items: flex-end;
}

.msg.received {
  align-self: flex-start;
}

.msg-bubble {
  padding: 12px 16px;
  border-radius: 16px;
  font-size: 14px;
  line-height: 1.5;
}

.msg.sent .msg-bubble {
  background: var(--accent);
  color: var(--bg-primary);
  border-bottom-right-radius: 4px;
}

.msg.received .msg-bubble {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-bottom-left-radius: 4px;
  color: var(--text-primary);
}

.msg-time {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 4px;
}

.chat-input-area {
  padding: 16px 20px;
  border-top: 1px solid var(--border);
  background: var(--bg-card);
  display: flex;
  gap: 12px;
  align-items: flex-end;
}

.chat-input {
  flex: 1;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 16px;
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  resize: none;
  height: 48px;
  max-height: 120px;
  outline: none;
  transition: var(--transition);
}

.chat-input:focus {
  border-color: var(--accent);
}

.chat-send-btn {
  width: 48px;
  height: 48px;
  background: var(--accent);
  color: var(--bg-primary);
  border: none;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 18px;
  transition: var(--transition);
  flex-shrink: 0;
}

.chat-send-btn:hover {
  transform: scale(1.05);
}

.voice-btn {
  width: 44px;
  height: 48px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-secondary);
  transition: var(--transition);
  flex-shrink: 0;
}

.voice-btn:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
  border-color: var(--border-hover);
}

.voice-btn.active {
  background: rgba(239, 68, 68, 0.1);
  color: var(--red);
  border-color: var(--red);
  animation: pulse-red 2s infinite;
}

.voice-btn.speaker-on {
  background: rgba(16, 185, 129, 0.1);
  color: var(--green);
  border-color: var(--green);
}

@keyframes pulse-red {
  0% {
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4);
  }

  70% {
    box-shadow: 0 0 0 10px rgba(239, 68, 68, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
  }
}

/* ── Responsive ── */

/* ── Mobile Menu Button ── */
.mobile-menu-btn {
  display: none;
  width: 42px;
  height: 42px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
  cursor: pointer;
  flex-shrink: 0;
  transition: var(--transition);
}

.mobile-menu-btn:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
}

/* ── Sidebar Overlay ── */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 998;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.sidebar-overlay.open {
  display: block;
  opacity: 1;
}

/* ── Body scroll lock ── */
body.sidebar-open {
  overflow: hidden;
}

/* ── Bottom Navigation (Mobile) ── */
.bottom-nav {
  display: none;
}

/* ── Tablet: 1024px ── */
@media (max-width: 1024px) {
  .topbar {
    padding: 0 24px;
  }

  .topbar-search {
    max-width: 280px;
  }
}

/* ── Mobile: 768px ── */
@media (max-width: 768px) {
  :root {
    --topbar-height: 60px;
    --app-padding: 0px;
    --radius-lg: 0px;
  }

  /* Layout */
  .app-layout {
    grid-template-columns: 1fr;
    padding: 0;
    gap: 0;
  }

  .content-wrapper {
    border-radius: 0;
    border: none;
    min-height: 100vh;
  }

  /* Sidebar as drawer */
  .mobile-menu-btn {
    display: flex;
  }

  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 280px;
    z-index: 999;
    border-radius: 0;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    height: 100vh;
    padding-top: 24px;
  }

  .sidebar.mobile-open {
    transform: translateX(0);
  }

  /* Topbar */
  .topbar {
    padding: 0 16px;
    height: 60px;
    gap: 12px;
  }

  .topbar-search {
    display: none;
  }

  .topbar-actions {
    gap: 8px;
  }

  .profile-chip {
    padding-left: 8px;
    border-left: none;
  }

  .profile-info {
    display: none;
  }

  .profile-avatar {
    width: 34px;
    height: 34px;
    font-size: 12px;
  }

  .action-icon-btn {
    width: 36px;
    height: 36px;
  }

  /* Main Content */
  .main-content {
    padding: 20px 16px;
    padding-bottom: 80px;
  }

  .page-header {
    text-align: center;
    margin-bottom: 20px;
  }

  .page-header h1 {
    font-size: 20px;
    font-weight: 800;
  }

  .page-header p {
    font-size: 13px;
  }

  .knowledge-page .main-content {
    padding-bottom: 156px;
  }

  .knowledge-page-header {
    text-align: left;
    margin-bottom: 16px;
  }

  .knowledge-page-header h1 {
    align-items: flex-start;
    gap: 10px;
    font-size: 28px;
    line-height: 1.05;
  }

  .knowledge-page-header p {
    max-width: 34ch;
    font-size: 14px;
  }

  .knowledge-workspace {
    gap: 16px;
  }

  .knowledge-session-card {
    border-radius: 20px;
  }

  .knowledge-avatar-row {
    flex-direction: column;
    align-items: flex-start !important;
    gap: 14px !important;
  }

  .knowledge-avatar-preview {
    width: 72px !important;
    height: 72px !important;
  }

  .knowledge-avatar-controls {
    width: 100%;
  }

  .knowledge-inline-actions {
    width: 100%;
    gap: 10px !important;
  }

  .knowledge-inline-actions .btn {
    flex: 1 1 180px;
  }

  .knowledge-toggle-row {
    align-items: flex-start !important;
  }

  .knowledge-phrase-row {
    flex-direction: column;
    gap: 10px !important;
  }

  .knowledge-phrase-row .form-input,
  .knowledge-phrase-row .btn {
    width: 100%;
  }

  .knowledge-page #aiPersona {
    min-height: 120px !important;
  }

  .knowledge-page #knowledgeBase {
    min-height: 240px !important;
  }

  .knowledge-actions-bar {
    bottom: 82px;
    flex-direction: column-reverse;
    gap: 10px !important;
  }

  .knowledge-actions-bar .btn {
    width: 100%;
  }

  .knowledge-page #followUpModal {
    align-items: flex-end !important;
  }

  .knowledge-page #followUpModal > div {
    width: calc(100% - 16px) !important;
    max-width: none !important;
    max-height: 88vh;
    margin: 8px !important;
    padding: 20px !important;
    overflow-y: auto;
    border-radius: 20px 20px 12px 12px !important;
  }

  .knowledge-page #followUpRulesList > div,
  .knowledge-page #followUpLogList > div {
    padding: 12px !important;
  }

  /* Cards */
  .card {
    padding: 20px;
    border-radius: 16px;
  }

  .card:hover {
    transform: none;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  }

  .card-title {
    font-size: 15px;
    margin-bottom: 16px;
  }

  .stats-grid {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 24px;
  }

  .stat-card {
    padding: 18px 16px;
    border-radius: 16px;
  }

  .stat-card:hover {
    transform: none;
    box-shadow: inherit;
  }

  .stat-label {
    font-size: 12px;
    margin-bottom: 6px;
  }

  .stat-value {
    font-size: 22px;
  }

  .stat-sub {
    font-size: 11px;
  }

  /* Dashboard top section */
  .dash-top-section,
  .dash-staking-main {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  /* ── Unified stats card — 3 columns in one card ── */
  .dash-asset-cards {
    display: flex !important;
    flex-direction: row !important;
    gap: 0 !important;
    grid-template-columns: unset !important;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    border-radius: 20px;
    overflow: hidden;
    padding: 0;
    height: auto;
    margin-bottom: 20px;
  }

  .dash-asset-card {
    flex: 1;
    background: transparent !important;
    border: none !important;
    border-right: 1px solid var(--border) !important;
    border-radius: 0 !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 20px 6px;
    gap: 0;
    transform: none !important;
    box-shadow: none !important;
  }

  .dash-asset-card:last-child {
    border-right: none !important;
  }

  .dash-asset-card-header {
    padding: 0;
    margin-bottom: 12px;
    width: 100%;
    display: flex;
    justify-content: center;
  }

  .dash-asset-type {
    display: none;
  }

  .dash-asset-name-row {
    flex-direction: column;
    align-items: center;
    gap: 6px;
  }

  .dash-asset-icon {
    width: 34px;
    height: 34px;
  }

  .dash-asset-name {
    font-size: 10px;
    font-weight: 600;
    color: var(--text-muted);
    text-align: center;
    line-height: 1.2;
  }

  .dash-asset-link {
    display: none !important;
  }

  .dash-asset-card-body {
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
  }

  .dash-reward-label {
    font-size: 10px;
    color: var(--text-muted);
    margin-bottom: 2px;
  }

  .dash-reward-value {
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 4px;
    line-height: 1;
    letter-spacing: -0.02em;
  }

  .dash-reward-change {
    font-size: 10px;
    justify-content: center;
  }

  /* Hide charts and quick access grid on mobile */
  .dash-asset-chart {
    display: none !important;
  }

  .dash-qa-grid {
    display: none !important;
  }

  /* ── Dashboard: Header & tabs ── */
  .dash-header {
    margin-bottom: 14px;
  }

  .dash-tabs {
    width: 100%;
    justify-content: center;
  }

  .dash-tab {
    flex: 1;
    text-align: center;
    padding: 8px 12px;
    font-size: 13px;
  }

  .dash-period-row {
    justify-content: center;
    margin-bottom: 16px;
  }

  /* ── Portfolio panel ── */
  .dash-portfolio-panel {
    border-radius: 16px;
    padding: 18px;
    flex-direction: row;
    align-items: center;
    gap: 16px;
  }

  .dash-portfolio-header {
    margin-bottom: 0;
  }

  .dash-portfolio-title {
    font-size: 15px;
    margin-bottom: 0;
    flex: 1;
  }

  .dash-portfolio-btn {
    padding: 10px 14px;
    font-size: 13px;
    margin-bottom: 6px;
    min-height: 44px;
  }

  /* ── Active Sessions section ── */
  .dash-staking-section {
    padding: 18px 16px;
    border-radius: 16px;
    margin-bottom: 16px;
  }

  .dash-staking-header {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 14px;
  }

  .dash-staking-header h3 {
    font-size: 15px;
    font-weight: 700;
  }

  .dash-staking-actions {
    gap: 6px;
  }

  .dash-icon-btn {
    width: 30px;
    height: 30px;
    border-radius: 8px;
  }

  /* ── Stake detail inner layout ── */
  .dash-stake-update {
    font-size: 11px;
  }

  .dash-stake-name-row {
    gap: 8px;
    margin-bottom: 10px;
    flex-wrap: wrap;
  }

  .dash-stake-name {
    font-size: 17px;
  }

  .dash-stake-balance-label {
    font-size: 11px;
  }

  .dash-stake-balance {
    font-size: 32px;
    margin-bottom: 14px;
  }

  .dash-stake-flex {
    flex-direction: column;
    gap: 14px;
  }

  .dash-stake-btns {
    display: flex;
    gap: 8px;
  }

  .dash-action-btn {
    flex: 1;
    text-align: center;
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .dash-view-profile {
    font-size: 12px;
    margin-left: auto;
  }

  /* ── Bottom stats grid ── */
  .dash-bottom-stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-top: 14px;
  }

  .dash-bstat-header {
    font-size: 11px;
  }

  .dash-bstat-value {
    font-size: 20px;
  }

  /* ── Current Plan panel ── */
  .dash-invest-panel {
    padding: 16px;
    border-radius: 14px;
    margin-top: 14px;
  }

  .dash-invest-title {
    font-size: 15px;
  }

  .dash-invest-chips {
    flex-direction: row;
    gap: 8px;
  }

  .dash-invest-chip {
    flex: 1;
    padding: 8px 10px;
    font-size: 12px;
  }

  /* ── Upgrade promo banner ── */
  .dash-activate-promo {
    margin-top: 16px;
    padding: 14px 16px;
    border-radius: 14px;
  }

  .dash-activate-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    flex-shrink: 0;
  }

  .dash-activate-title {
    font-size: 13px;
  }

  .dash-activate-sub {
    font-size: 11px;
  }

  /* ── Misc grids ── */
  .dash-stake-info {
    width: 100%;
  }

  .dash-integrated-actions {
    display: none;
  }

  .dash-metrics-row {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
  }

  /* Section headers */
  .dash-section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  /* Tables */
  .table-wrap {
    margin: 0 -16px;
    padding: 0 16px;
    border-radius: 0;
    -webkit-mask-image: linear-gradient(to right, #000 90%, transparent);
    mask-image: linear-gradient(to right, #000 90%, transparent);
  }

  th, td {
    padding: 10px 12px;
    font-size: 13px;
    white-space: nowrap;
  }

  /* Modals — bottom sheet */
  .modal-overlay {
    align-items: flex-end;
  }

  .modal {
    width: 100vw;
    max-height: 85vh;
    border-radius: 16px 16px 0 0;
    margin-top: auto;
    padding: 20px;
    transform: translateY(100%);
  }

  .modal-overlay.open .modal {
    transform: translateY(0);
  }

  /* Chat */
  .chat-layout {
    grid-template-columns: 1fr;
    height: calc(100vh - 60px - 64px);
  }

  .chat-sidebar {
    display: none;
  }

  .chat-sidebar.mobile-visible {
    display: flex;
    position: fixed;
    inset: 0;
    z-index: 900;
    width: 100%;
    border-right: none;
  }

  .chat-input-area {
    padding: 12px;
  }

  .chat-input {
    font-size: 16px;
  }

  /* Forms — prevent iOS zoom */
  .form-input,
  .form-select,
  .form-textarea {
    font-size: 16px;
    padding: 13px 14px;
  }

  /* Touch-friendly targets */
  .btn {
    min-height: 44px;
    padding: 12px 20px;
  }

  .btn-sm {
    min-height: 38px;
    padding: 8px 16px;
  }

  .nav-link {
    padding: 14px 20px;
    min-height: 48px;
  }

  .btn-primary:hover {
    transform: none;
  }

  .session-card:hover {
    transform: none;
  }

  /* Toast */
  #toast-container {
    bottom: 80px;
    right: 16px;
    left: 16px;
  }

  .toast {
    max-width: 100%;
    width: 100%;
  }

  /* AI Widget */
  .ai-widget-bubble {
    bottom: 90px;
    right: 16px;
    width: 50px;
    height: 50px;
  }

  .ai-widget-window {
    right: 8px;
    left: 8px;
    bottom: 70px;
    width: auto;
    height: 60vh;
  }

  /* Bottom Navigation */
  .bottom-nav {
    display: grid;
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    z-index: 997;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
    padding: 10px;
    border-radius: 22px;
    background: rgba(9, 10, 12, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 16px 34px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
  }

  .bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.02em;
    padding: 8px 6px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: var(--transition);
    min-height: 58px;
    min-width: 0;
    text-align: center;
  }

  .bottom-nav-item span {
    display: block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .bottom-nav-item.active {
    color: var(--text-primary);
    background: linear-gradient(180deg, rgba(16, 185, 129, 0.16), rgba(16, 185, 129, 0.08));
    border-color: rgba(16, 185, 129, 0.2);
  }

  .bottom-nav-item--home {
    position: relative;
    transform: translateY(-14px);
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(16, 185, 129, 0.95), rgba(5, 150, 105, 0.94));
    border-color: rgba(16, 185, 129, 0.42);
    box-shadow: 0 14px 28px rgba(16, 185, 129, 0.3);
    color: #ffffff;
  }

  .bottom-nav-item--home.active {
    background: linear-gradient(180deg, rgba(16, 185, 129, 1), rgba(4, 120, 87, 0.98));
    border-color: rgba(110, 231, 183, 0.4);
    color: #ffffff;
  }

  .bottom-nav-item [data-lucide] {
    width: 18px;
    height: 18px;
  }
}

/* ── Small Mobile: 480px ── */
@media (max-width: 480px) {
  .main-content {
    padding: 16px 12px;
    padding-bottom: 80px;
  }

  .bottom-nav {
    left: 10px;
    right: 10px;
    padding: 8px;
    gap: 6px;
  }

  .bottom-nav-item {
    min-height: 54px;
    font-size: 9px;
  }

  .dashboard-page .dashboard-mobile-dock-link--home,
  .bottom-nav-item--home {
    transform: translateY(-10px);
  }

  .dashboard-page .dashboard-mobile-dock-link,
  .bottom-nav-item {
    min-height: 48px;
    padding: 6px 2px;
    gap: 0;
    min-width: 0;
  }

  .dashboard-page .dashboard-mobile-dock-link span,
  .bottom-nav-item span {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  .dashboard-page .dashboard-mobile-dock-link i,
  .bottom-nav-item [data-lucide] {
    width: 17px;
    height: 17px;
  }

  .knowledge-page .main-content {
    padding: 16px 14px 158px;
  }

  .knowledge-page-header h1 {
    font-size: 26px;
  }

  .knowledge-page .card {
    padding: 16px;
    border-radius: 18px;
  }

  .knowledge-inline-actions .btn {
    flex-basis: 100%;
  }

  .knowledge-toggle-row {
    gap: 12px;
  }

  .knowledge-page #sessionSelect {
    padding: 13px 14px !important;
  }

  .knowledge-page #followUpRulesList > div {
    display: block !important;
  }

  .knowledge-page #followUpRulesList > div > div:last-child {
    margin-top: 12px;
    justify-content: flex-end;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .dash-reward-value {
    font-size: 18px;
  }

  .dash-asset-name {
    font-size: 10px;
  }

  .dash-metrics-row {
    grid-template-columns: 1fr;
  }

  .dash-bottom-stats {
    grid-template-columns: 1fr;
  }

  .dash-reward-value {
    font-size: 20px;
  }
}

/* ── WhatsApp Grid Layout ── */
.sessions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
  margin-top: 16px;
}

.session-card {
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-card);
  backdrop-filter: blur(10px);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  border-radius: 20px;
  position: relative;
}

.session-card:hover {
  border-color: var(--accent);
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5), var(--shadow-glow);
  transform: translateY(-6px);
}

.session-card-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  gap: 24px;
  flex: 1;
  text-align: center;
}

.session-icon-wrapper {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, #25d366, #128c7e);
  border-radius: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 12px 24px -8px rgba(37, 211, 102, 0.4);
  margin-bottom: 4px;
  position: relative;
}

.session-icon-wrapper::after {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 26px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), transparent);
  pointer-events: none;
}

.session-icon-wrapper [data-lucide] {
  width: 36px;
  height: 36px;
  color: white;
}

.session-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.session-label {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.session-badges {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.session-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  padding: 24px;
  background: rgba(255, 255, 255, 0.03);
  border-top: 1px solid var(--border);
}

.session-actions .btn {
  width: 46px;
  height: 46px;
  padding: 0;
  border-radius: 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-secondary);
}

.session-actions .btn:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
  border-color: var(--accent);
}

.session-actions .btn-danger:hover {
  background: rgba(239, 68, 68, 0.15);
  color: var(--red);
  border-color: var(--red);
}

.session-actions .btn [data-lucide] {
  width: 20px;
  height: 20px;
}

.status-pulse {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.status-pulse.connected {
  background: var(--green);
  box-shadow: 0 0 10px var(--green);
}

.status-pulse.disconnected {
  background: var(--red);
  box-shadow: 0 0 10px var(--red);
}

.status-pulse.pending {
  background: var(--orange);
  box-shadow: 0 0 10px var(--orange);
}

@media (max-width: 640px) {
  .sessions-grid {
    grid-template-columns: 1fr;
  }
}

/* ══════════════════════════════════════════════════════════════
   LOGIN PAGE — Dark card with lavender inputs
   ══════════════════════════════════════════════════════════════ */

.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 32px 16px;
  background:
    radial-gradient(circle at top left, rgba(16, 185, 129, 0.12), transparent 28%),
    radial-gradient(circle at bottom right, rgba(59, 130, 246, 0.1), transparent 24%),
    var(--bg-primary);
}

.login-card {
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 48px 40px 40px;
  width: min(420px, 92vw);
  box-shadow: var(--shadow);
}

.login-logo-icon {
  text-align: center;
  margin-bottom: 20px;
}

.login-logo-icon [data-lucide] {
  width: 80px;
  height: 80px;
  color: #ffffff;
  opacity: 0.9;
}

.login-logo-img {
  width: 80px;
  height: 80px;
  border-radius: 18px;
  object-fit: contain;
}

.login-title {
  text-align: center;
  font-size: 26px;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 32px;
  letter-spacing: -0.02em;
}

.login-field {
  position: relative;
  margin-bottom: 16px;
}

.login-field input {
  width: 100%;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px 14px 48px;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  outline: none;
  transition: all 0.2s ease;
}

.login-field input::placeholder {
  color: var(--text-muted);
}

.login-field input:focus {
  background: var(--bg-secondary);
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.login-field-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
}

.login-field-icon [data-lucide] {
  width: 18px;
  height: 18px;
}

.login-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  margin-top: 4px;
}

.login-remember {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-muted);
  cursor: pointer;
}

.login-remember input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: #ffffff;
  border-radius: 4px;
  cursor: pointer;
}

.login-forgot {
  font-size: 13px;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}

.login-forgot:hover {
  color: var(--text-primary);
}

.login-btn {
  width: 100%;
  padding: 14px;
  background: var(--accent);
  color: var(--bg-primary);
  border: 1px solid var(--accent);
  border-radius: 12px;
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  letter-spacing: -0.01em;
}

.login-btn:hover {
  opacity: 0.92;
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

.login-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.login-signup {
  text-align: center;
  margin-top: 24px;
  font-size: 14px;
  color: var(--text-muted);
}

.login-signup a {
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 600;
  transition: all 0.2s ease;
}

.login-signup a:hover {
  color: var(--accent);
  text-decoration: underline;
}

.login-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 24px 0;
  color: var(--text-muted);
  font-size: 13px;
}

.login-divider::before,
.login-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid var(--border);
}

.login-divider:not(:empty)::before {
  margin-right: 12px;
}

.login-divider:not(:empty)::after {
  margin-left: 12px;
}

.google-btn {
  width: 100%;
  background: var(--bg-secondary);
  color: var(--text-primary);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.google-btn img {
  width: 18px;
  height: 18px;
}

.google-btn:hover {
  background: var(--bg-card-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

.google-btn:active {
  transform: translateY(0);
}

/* Register role selector */
.login-role-group {
  margin-bottom: 20px;
}

.login-role-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.login-role-selector {
  display: flex;
  gap: 8px;
}

.login-role-btn {
  flex: 1;
  padding: 10px 8px;
  border: 1px solid var(--border);
  border-radius: 10px;
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  color: var(--text-muted);
  background: var(--bg-card);
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.login-role-btn [data-lucide] {
  width: 14px;
  height: 14px;
}

.login-role-btn.selected {
  border-color: var(--accent);
  background: var(--bg-card-hover);
  color: var(--text-primary);
}

.auth-theme-toggle {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 20;
}

/* ══════════════════════════════════════════════════════════════
   DASHBOARD — Stakent-style staking dashboard
   ══════════════════════════════════════════════════════════════ */

.dash-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.dash-tabs {
  display: flex;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 4px;
}

.dash-tab {
  padding: 8px 20px;
  font-size: 13px;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  color: var(--text-muted);
  background: transparent;
  transition: all 0.2s;
}

.dash-tab.active {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

/* Top Section Grid */
.dash-top-section {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 20px;
  margin-bottom: 28px;
  align-items: stretch;
}

@media (max-width: 1100px) {
  .dash-top-section {
    grid-template-columns: 1fr;
  }
}

/* Section Header */
.dash-section-header {
  margin-bottom: 20px;
}

.dash-section-info {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 6px;
}

.dash-section-sub {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
}

.dash-info-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0.5;
}

.dash-asset-count {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border);
  padding: 2px 10px;
  border-radius: 20px;
}

.dash-section-title {
  font-size: 24px;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 14px;
  letter-spacing: -0.02em;
}

.dash-filter-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.dash-filter-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.dash-filter-btn:hover {
  border-color: var(--border-hover);
  color: #ffffff;
}

.dash-filter-chip {
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s;
}

.dash-filter-chip.active {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

.dash-assets-area {
  display: flex;
  flex-direction: column;
}

/* Asset Cards */
.dash-asset-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  height: 100%;
}

@media (max-width: 900px) {
  .dash-asset-cards {
    grid-template-columns: 1fr;
  }
}

.dash-asset-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  transition: all 0.25s;
  display: flex;
  flex-direction: column;
}

.dash-asset-card:hover {
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
}

.dash-asset-card-header {
  padding: 16px 16px 0;
}

.dash-asset-type {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.dash-asset-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.dash-asset-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.dash-asset-icon.eth {
  background: linear-gradient(135deg, #627eea, #3b5998);
}

.dash-asset-icon.bnb {
  background: linear-gradient(135deg, #f3ba2f, #e5a800);
}

.dash-asset-icon.matic {
  background: linear-gradient(135deg, #8B5CF6, #6d28d9);
}

.dash-asset-name {
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
  flex: 1;
}

.dash-asset-link {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.dash-asset-link:hover {
  color: #ffffff;
  border-color: var(--border-hover);
}

.dash-asset-card-body {
  padding: 16px;
}

.dash-reward-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.dash-reward-value {
  font-size: 28px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}

.dash-reward-change {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
}

.dash-reward-change.positive {
  color: #10b981;
}

.dash-reward-change.negative {
  color: #ef4444;
}

.dash-change-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.dash-asset-chart {
  position: relative;
  height: 60px;
  padding: 0 16px 12px;
}

.dash-chart-svg {
  width: 100%;
  height: 100%;
}

.dash-chart-label {
  position: absolute;
  top: 4px;
  right: 20px;
  font-size: 11px;
  font-weight: 700;
  color: #10b981;
  background: rgba(16, 185, 129, 0.15);
  padding: 2px 8px;
  border-radius: 6px;
}

.dash-chart-label.negative {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.15);
}

/* Portfolio Panel */
.dash-portfolio-panel {
  background: linear-gradient(145deg, #1a1030, #12082a, #0d0520);
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: 20px;
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
}

.dash-portfolio-header {
  margin-bottom: 16px;
}

.dash-portfolio-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.dash-portfolio-logo {
  width: 28px;
  height: 28px;
  border-radius: 6px;
}

.dash-portfolio-brand-name {
  font-size: 16px;
  font-weight: 700;
  color: #ffffff;
}

.dash-portfolio-new-badge {
  font-size: 10px;
  font-weight: 700;
  color: #10b981;
  background: rgba(16, 185, 129, 0.15);
  padding: 2px 8px;
  border-radius: 10px;
  margin-left: auto;
}

.dash-portfolio-title {
  font-size: 26px;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.2;
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}

.dash-portfolio-desc {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.5);
  line-height: 1.5;
  margin-bottom: 24px;
}

.dash-portfolio-btn {
  width: 100%;
  padding: 14px 20px;
  border-radius: 12px;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 10px;
}

.dash-portfolio-btn.primary {
  background: linear-gradient(135deg, #6d28d9, #7c3aed);
  border: none;
  color: #ffffff;
}

.dash-portfolio-btn.primary:hover {
  background: linear-gradient(135deg, #7c3aed, #8b5cf6);
  transform: translateY(-1px);
}

.dash-portfolio-btn.secondary {
  background: transparent;
  border: 1px solid rgba(139, 92, 246, 0.3);
  color: rgba(255, 255, 255, 0.7);
}

.dash-portfolio-btn.secondary:hover {
  border-color: rgba(139, 92, 246, 0.5);
  color: #ffffff;
}

/* Active Stakings Section */
.dash-staking-section {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 24px;
  margin-bottom: 24px;
}

.dash-staking-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.dash-staking-header h3 {
  font-size: 18px;
  font-weight: 700;
  color: #ffffff;
}

.dash-staking-actions {
  display: flex;
  gap: 8px;
}

.dash-icon-btn {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.dash-icon-btn:hover {
  color: #ffffff;
  border-color: var(--border-hover);
}

.dash-staking-main {
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 20px;
}

@media (max-width: 900px) {
  .dash-staking-main {
    grid-template-columns: 1fr;
  }
}

/* Stake Detail */
.dash-stake-detail {
  display: flex;
  flex-direction: column;
}

.dash-stake-detail-header {
  margin-bottom: 8px;
}

.dash-stake-update {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.dash-stake-name-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.dash-stake-name {
  font-size: 22px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.02em;
}

.dash-stake-avax-icon {
  display: flex;
  align-items: center;
}

.dash-stake-mini-actions {
  display: flex;
  gap: 6px;
}

.dash-mini-btn {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.dash-mini-btn:hover {
  color: #ffffff;
  border-color: var(--border-hover);
}

.dash-view-profile {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
  transition: color 0.2s;
}

.dash-view-profile:hover {
  color: #ffffff;
}

.dash-stake-balance-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.dash-stake-balance {
  font-size: 48px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
  line-height: 1;
}


.dash-stake-flex {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 32px;
}

@media (max-width: 1200px) {
  .dash-stake-flex {
    flex-direction: column;
    gap: 24px;
  }
}

.dash-stake-info {
  flex-shrink: 0;
}

.dash-integrated-actions {
  flex: 1;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
}

.dash-qa-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 12px;
}

.dash-qa-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 12px;
  text-decoration: none;
  color: var(--text-secondary);
  transition: all 0.2s;
  text-align: center;
}

.dash-qa-card:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--border-hover);
  transform: translateY(-2px);
  color: #ffffff;
}

.dash-qa-card span {
  font-size: 13px;
  font-weight: 600;
}

.dash-qa-card .dash-qa-icon {
  width: 34px;
  height: 34px;
  background: var(--bg-card);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
}

.dash-qa-card:hover .dash-qa-icon {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.dash-stake-btns {
  display: flex;
  gap: 10px;
  margin-bottom: 0;
  /* Changed to 0 since it's now in a flex block */
}

.dash-action-btn {
  padding: 10px 24px;
  border-radius: 10px;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.dash-action-btn.primary {
  background: #10b981;
  border: none;
  color: #ffffff;
}

.dash-action-btn.primary:hover {
  background: #059669;
  transform: translateY(-1px);
}

.dash-action-btn.secondary {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-secondary);
}

.dash-action-btn.secondary:hover {
  border-color: var(--border-hover);
  color: #ffffff;
}

/* Metrics Row */
.dash-metrics-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  margin-bottom: 24px;
}

@media (max-width: 768px) {
  .dash-metrics-row {
    grid-template-columns: repeat(2, 1fr);
  }
}

.dash-metric {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.dash-metric-header {
  display: flex;
  align-items: center;
  gap: 6px;
}

.dash-metric-name {
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
}

.dash-metric-sub {
  font-size: 12px;
  color: var(--text-muted);
}

/* Bottom Stats */
.dash-bottom-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

@media (max-width: 768px) {
  .dash-bottom-stats {
    grid-template-columns: repeat(2, 1fr);
  }
}

.dash-bottom-stat {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dash-bstat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  color: var(--text-muted);
}

.dash-chip {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border);
  padding: 2px 8px;
  border-radius: 6px;
}

.dash-bstat-value {
  font-size: 24px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.02em;
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.dash-bstat-value.negative {
  color: #ef4444;
}

.dash-bstat-change {
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
}

.dash-bstat-change.negative {
  color: #ef4444;
}

.dash-bstat-change.positive {
  color: #10b981;
}

/* Reward Bar */
.dash-bstat-reward {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.dash-reward-bar {
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 3px;
  overflow: hidden;
}

.dash-reward-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #10b981, #6ee7b7);
  border-radius: 3px;
}

.dash-reward-bar-labels {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-muted);
}

.dash-reward-bar-labels small {
  font-size: 9px;
  opacity: 0.6;
}

/* Investment Period Panel */
.dash-invest-panel {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.dash-invest-title {
  font-size: 18px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 4px;
}

.dash-invest-sub {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.dash-invest-chips {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

.dash-invest-chip {
  padding: 10px 20px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: transparent;
  color: var(--text-muted);
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
}

.dash-invest-chip.active {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

.dash-invest-chip:hover {
  border-color: var(--border-hover);
  color: #ffffff;
}

/* Quick Actions inside invest panel */
.dash-quick-actions {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.dash-qa-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}

.dash-qa-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  text-decoration: none;
  transition: all 0.2s;
  cursor: pointer;
}

.dash-qa-item:hover {
  background: rgba(255, 255, 255, 0.06);
}

.dash-qa-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: rgba(16, 185, 129, 0.12);
  color: #10b981;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.dash-qa-icon.qa-brain {
  background: rgba(139, 92, 246, 0.12);
  color: #8B5CF6;
}

.dash-qa-icon.qa-wallet {
  background: rgba(245, 158, 11, 0.12);
  color: #f59e0b;
}

.dash-qa-icon.qa-cal {
  background: rgba(59, 130, 246, 0.12);
  color: #3b82f6;
}

.dash-qa-icon.qa-msg {
  background: rgba(37, 211, 102, 0.12);
  color: #25D366;
}

.dash-qa-icon.qa-email {
  background: rgba(236, 72, 153, 0.12);
  color: #ec4899;
}

@media (max-width: 380px) {
  .dashboard-page .dashboard-mobile-dock,
  .bottom-nav {
    left: 8px;
    right: 8px;
    gap: 4px;
    padding: 6px;
  }

  .dashboard-page .dashboard-mobile-dock-link,
  .bottom-nav-item {
    min-height: 44px;
    gap: 0;
    font-size: 8px;
    padding: 4px 1px;
  }

  .dashboard-page .dashboard-mobile-dock-link i,
  .bottom-nav-item [data-lucide] {
    width: 15px;
    height: 15px;
  }

  .dashboard-page .dashboard-mobile-dock-link--home,
  .bottom-nav-item--home {
    transform: translateY(-6px);
  }
}

.dash-qa-icon.qa-host {
  background: rgba(14, 165, 233, 0.12);
  color: #0ea5e9;
}

.dash-qa-icon.qa-mailhost {
  background: rgba(20, 184, 166, 0.12);
  color: #14b8a6;
}

.ads-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}

.ads-tab {
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  color: rgba(255, 255, 255, 0.72);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.ads-tab:hover {
  border-color: rgba(99, 102, 241, 0.35);
  color: #fff;
}

.ads-tab.active {
  background: rgba(99, 102, 241, 0.18);
  border-color: rgba(99, 102, 241, 0.45);
  color: #fff;
  box-shadow: 0 0 0 1px rgba(99, 102, 241, 0.12) inset;
}

.ad-source-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 2px;
}

.ad-source-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 11px;
  font-weight: 700;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.78);
}

.ad-source-pill.manual { color: #e5e7eb; }
.ad-source-pill.whatsapp { color: #4ade80; }
.ad-source-pill.facebook { color: #60a5fa; }
.ad-source-pill.instagram { color: #f472b6; }
.ad-source-pill.x { color: #f8fafc; }

.ad-source-pill.imported {
  color: #fbbf24;
  background: rgba(251, 191, 36, 0.08);
  border-color: rgba(251, 191, 36, 0.16);
}

.ad-source-note {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.46);
  line-height: 1.5;
}

.ad-card-platform {
  position: absolute;
  top: 10px;
  left: 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  z-index: 2;
}

.ad-card-platform.whatsapp { color: #4ade80; }
.ad-card-platform.facebook { color: #60a5fa; }
.ad-card-platform.instagram { color: #f472b6; }
.ad-card-platform.x { color: #f8fafc; }
.ad-card-platform.manual { color: #e5e7eb; }

.ai-caption-card {
  margin-top: 16px;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.03);
}

.ai-caption-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.ai-caption-toggle-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ai-caption-toggle-copy strong {
  color: #fff;
  font-size: 13px;
}

.ai-caption-toggle-copy span {
  color: rgba(255,255,255,0.5);
  font-size: 12px;
  line-height: 1.5;
}

.ai-caption-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: rgba(255,255,255,0.8);
  font-size: 12px;
  font-weight: 600;
}

.ai-caption-toggle input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #6366f1;
}

.ai-caption-fields {
  display: none;
  margin-top: 14px;
  gap: 12px;
}

.ai-caption-fields.open {
  display: grid;
}

.ai-caption-help {
  color: rgba(255,255,255,0.45);
  font-size: 11px;
  line-height: 1.5;
}

.dash-qa-text {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

.dash-qa-label {
  font-size: 13px;
  font-weight: 600;
  color: #ffffff;
}

.dash-qa-desc {
  font-size: 11px;
  color: var(--text-muted);
}

/* Activate Super Promo */
/* Deposit required banner — shown on home dashboard when locked */
.deposit-required-banner {
  display: flex;
  align-items: center;
  gap: 16px;
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 14px;
  padding: 16px 20px;
  margin-bottom: 20px;
  animation: bannerPulse 3s ease-in-out infinite;
}
.deposit-required-banner .deposit-icon {
  width: 44px;
  height: 44px;
  background: rgba(245, 158, 11, 0.15);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.deposit-required-banner .deposit-text { flex: 1; }
.deposit-required-banner .deposit-title {
  font-size: 14px;
  font-weight: 700;
  color: #f59e0b;
  margin-bottom: 2px;
}
.deposit-required-banner .deposit-sub {
  font-size: 12px;
  color: #888;
  line-height: 1.4;
}
.deposit-required-banner .deposit-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #f59e0b;
  color: #000;
  font-weight: 700;
  font-size: 13px;
  padding: 9px 18px;
  border-radius: 8px;
  text-decoration: none;
  white-space: nowrap;
  transition: opacity 0.2s;
}
.deposit-required-banner .deposit-btn:hover { opacity: 0.85; }
@keyframes bannerPulse {
  0%, 100% { border-color: rgba(245,158,11,0.3); }
  50%       { border-color: rgba(245,158,11,0.6); }
}

.dash-activate-promo {
  display: flex;
  align-items: center;
  gap: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px 20px;
  cursor: pointer;
  transition: all 0.2s;
  margin-top: 24px;
}

.dash-activate-promo:hover {
  border-color: var(--border-hover);
  background: rgba(255, 255, 255, 0.06);
}

.dash-activate-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: rgba(245, 158, 11, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.dash-activate-title {
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
}

.dash-activate-sub {
  font-size: 12px;
  color: var(--text-muted);
}

/* ── Talk Mode Overlay ── */
.talk-mode-overlay {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at center, #0a0a0a 0%, #000000 100%);
  z-index: 2000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  color: #fff;
  backdrop-filter: blur(20px);
}

.talk-mode-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.talk-mode-visualizer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  height: 200px;
  margin-bottom: 60px;
}

.visualizer-circle {
  width: 40px;
  height: 40px;
  background: #fff;
  border-radius: 50%;
  transition: all 0.3s ease;
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
}

.talk-mode-overlay.listening .visualizer-circle {
  animation: pulsate 1.2s infinite ease-in-out;
}

.talk-mode-overlay.listening .visualizer-circle:nth-child(2) {
  animation-delay: 0.2s;
}

.talk-mode-overlay.listening .visualizer-circle:nth-child(3) {
  animation-delay: 0.4s;
}

.talk-mode-overlay.listening .visualizer-circle:nth-child(4) {
  animation-delay: 0.6s;
}

.talk-mode-status {
  font-size: 20px;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 24px;
  min-height: 1.5em;
  text-align: center;
  letter-spacing: -0.01em;
}

.talk-mode-overlay.listening .visualizer-circle {
  animation: pulsate 1.2s infinite ease-in-out;
}

.talk-mode-overlay.listening .visualizer-circle:nth-child(2) {
  animation-delay: 0.2s;
}

.talk-mode-overlay.listening .visualizer-circle:nth-child(3) {
  animation-delay: 0.4s;
}

.talk-mode-overlay.listening .visualizer-circle:nth-child(4) {
  animation-delay: 0.6s;
}

.talk-mode-overlay.speaking .visualizer-circle {
  width: 56px;
  height: 56px;
  background: #fff;
  box-shadow: 0 0 50px rgba(255, 255, 255, 0.3);
  /* Animation removed - now handled by JS for real-time sync */
}

.talk-mode-overlay.speaking .visualizer-circle:nth-child(2) {
  animation-delay: 0.05s;
}

.talk-mode-overlay.speaking .visualizer-circle:nth-child(3) {
  animation-delay: 0.1s;
}

.talk-mode-overlay.speaking .visualizer-circle:nth-child(4) {
  animation-delay: 0.15s;
}

.talk-mode-overlay.thinking .visualizer-circle {
  opacity: 0.3;
  transform: scale(0.9);
  animation: subtle-pulse 1.5s infinite ease-in-out;
}

@keyframes pulsate {

  0%,
  100% {
    transform: scale(1);
    opacity: 0.8;
  }

  50% {
    transform: scale(1.8);
    opacity: 1;
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.4);
  }
}

@keyframes bounce {
  from {
    transform: translateY(0);
  }

  to {
    transform: translateY(-20px);
  }
}

@keyframes vibrate {
  0% {
    transform: scale(1) translateY(0);
  }

  50% {
    transform: scale(1.1) translateY(-2px);
  }

  100% {
    transform: scale(0.95) translateY(2px);
  }
}

@keyframes subtle-pulse {

  0%,
  100% {
    opacity: 0.2;
    transform: scale(0.85);
  }

  50% {
    opacity: 0.5;
    transform: scale(1);
  }
}

.talk-mode-controls {
  position: absolute;
  bottom: 60px;
  display: flex;
  gap: 40px;
  align-items: center;
}

.talk-mode-close-btn {
  width: 80px;
  height: 80px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  color: #fff;
}

.talk-mode-close-btn:hover {
  transform: scale(1.05);
  background: #fff;
  color: #000;
  box-shadow: 0 15px 50px rgba(255, 255, 255, 0.2);
}

.talk-mode-close-btn i,
.talk-mode-close-btn [data-lucide] {
  width: 32px;
  height: 32px;
}

/* ── Voice Authentication UI ── */
.voice-auth-card {
  text-align: center;
  padding: 40px 20px;
}

.voice-auth-instruction {
  font-size: 16px;
  color: var(--text-secondary);
  margin-bottom: 30px;
}

.voice-phrase-display {
  display: block;
  font-size: 24px;
  font-weight: 800;
  color: var(--accent);
  margin: 20px 0;
  padding: 15px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  border: 1px dashed var(--border);
}

.mic-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  margin: 40px 0;
}

.mic-pulse-btn {
  width: 80px;
  height: 80px;
  background: var(--accent);
  color: #000;
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  transition: var(--transition);
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
}

.mic-pulse-btn.recording {
  background: #ef4444;
  color: #fff;
  box-shadow: 0 0 30px rgba(239, 68, 68, 0.4);
}

.mic-pulse-btn.recording::before,
.mic-pulse-btn.recording::after {
  content: '';
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  border: 2px solid #ef4444;
  animation: ripple 1.5s infinite;
  opacity: 0;
}

.mic-pulse-btn.recording::after {
  animation-delay: 0.75s;
}

@keyframes ripple {
  0% {
    transform: scale(1);
    opacity: 0.8;
  }

  100% {
    transform: scale(2);
    opacity: 0;
  }
}

.voice-status {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
}

.voice-status.active {
  color: #ef4444;
}

/* ── Visualizer Waves ── */
.voice-waves {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: 30px;
  margin-top: 10px;
}

.wave-bar {
  width: 3px;
  height: 5px;
  background: var(--accent);
  border-radius: 10px;
  transition: height 0.1s ease;
}

.recording .wave-bar {
  background: #ef4444;
  animation: wave 1s ease-in-out infinite;
}

@keyframes wave {

  0%,
  100% {
    height: 5px;
  }

  50% {
    height: 25px;
  }
}

/* ── Floating AI Assistant Widget ── */
.ai-widget-bubble {
  position: fixed;
  bottom: 250px;
  right: 30px;
  width: 60px;
  height: 60px;
  background: var(--accent);
  color: var(--bg-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5), 0 0 20px var(--accent-glow);
  z-index: 10001;
  transition: var(--transition);
  animation: float-widget 3s ease-in-out infinite;
}

.ai-widget-bubble:hover {
  transform: scale(1.1) rotate(5deg);
}

.ai-widget-bubble i,
.ai-widget-bubble [data-lucide] {
  width: 28px;
  height: 28px;
}

.ai-widget-window {
  position: fixed;
  bottom: 100px;
  right: 30px;
  width: 380px;
  height: 500px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  z-index: 10000;
  overflow: hidden;
  transform: translateY(20px);
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.ai-widget-window.open {
  transform: translateY(0);
  opacity: 1;
  pointer-events: all;
}

.ai-widget-header {
  padding: 16px 20px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
}

.ai-widget-title {
  flex: 1;
  font-weight: 700;
  font-size: 14px;
}

.ai-widget-close {
  cursor: pointer;
  color: var(--text-muted);
}

.ai-widget-messages {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  scrollbar-width: thin;
}

.ai-msg {
  max-width: 85%;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 13px;
  line-height: 1.4;
  word-wrap: break-word;
}

.ai-msg.received {
  align-self: flex-start;
  background: var(--bg-card);
  color: var(--text-primary);
  border-bottom-left-radius: 4px;
}

.ai-msg.sent {
  align-self: flex-end;
  background: var(--accent);
  color: var(--bg-primary);
  border-bottom-right-radius: 4px;
}

@keyframes float-widget {
  0% {
    transform: translateY(0px);
  }

  50% {
    transform: translateY(-10px);
  }

  100% {
    transform: translateY(0px);
  }
}
