/* ── Design tokens ── */
:root {
  --bg-base: #0c0f1a;
  --bg-elevated: rgba(22, 27, 45, 0.72);
  --glass: rgba(255, 255, 255, 0.04);
  --glass-border: rgba(255, 255, 255, 0.08);
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --accent: #818cf8;
  --accent-soft: rgba(129, 140, 248, 0.15);
  --accent-glow: rgba(99, 102, 241, 0.35);
  --positive: #34d399;
  --negative: #f87171;
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.28), 0 1px 0 rgba(255, 255, 255, 0.04) inset;
  --nav-height: 72px;
  --transition: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 15px; scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', 'Segoe UI', system-ui, sans-serif;
  background: var(--bg-base);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Ambient background */
.ambient {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.ambient__orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.45;
  animation: float 18s ease-in-out infinite;
}
.ambient__orb--1 {
  width: 520px; height: 520px;
  background: radial-gradient(circle, #4338ca 0%, transparent 70%);
  top: -120px; left: -80px;
}
.ambient__orb--2 {
  width: 400px; height: 400px;
  background: radial-gradient(circle, #0e7490 0%, transparent 70%);
  bottom: -100px; right: -60px;
  animation-delay: -6s;
}
.ambient__orb--3 {
  width: 300px; height: 300px;
  background: radial-gradient(circle, #7c3aed 0%, transparent 70%);
  top: 40%; left: 55%;
  animation-delay: -12s;
  opacity: 0.25;
}
@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -20px) scale(1.05); }
  66% { transform: translate(-20px, 15px) scale(0.95); }
}

/* ── Login ── */
.login-view {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
}
.login-card {
  width: 100%;
  max-width: 420px;
  padding: 48px 40px;
  background: var(--bg-elevated);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  animation: fadeUp 0.6s ease;
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}
.login-card__brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 36px;
}
.login-card__logo {
  width: 44px; height: 44px;
  border-radius: 12px;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: 0 4px 20px var(--accent-glow);
}
.login-card__logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.login-card__title { font-size: 1.5rem; font-weight: 600; letter-spacing: -0.02em; }
.login-card__subtitle { font-size: 0.85rem; color: var(--text-muted); margin-top: 2px; }

.form-group { margin-bottom: 22px; }
.form-group label {
  display: block;
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 8px;
  font-weight: 500;
}
.form-group input {
  width: 100%;
  padding: 14px 16px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.95rem;
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}
.form-group input:focus {
  border-color: rgba(129, 140, 248, 0.5);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.form-group input::placeholder { color: var(--text-muted); }

.btn-primary {
  width: 100%;
  padding: 15px 24px;
  margin-top: 8px;
  border: none;
  border-radius: 999px;
  background: linear-gradient(135deg, #6366f1 0%, #7c3aed 100%);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 24px var(--accent-glow);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 8px 32px var(--accent-glow); }
.btn-primary:active { transform: translateY(0); }

.login-hint {
  margin-top: 28px;
  padding: 14px 16px;
  background: var(--glass);
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.6;
}
.login-hint code {
  color: var(--accent);
  background: var(--accent-soft);
  padding: 2px 6px;
  border-radius: 4px;
}
.login-error {
  margin-top: 14px;
  padding: 10px 14px;
  background: rgba(248, 113, 113, 0.12);
  border: 1px solid rgba(248, 113, 113, 0.25);
  border-radius: var(--radius-sm);
  color: #fca5a5;
  font-size: 0.82rem;
  display: none;
}
.login-error.visible { display: block; animation: fadeUp 0.3s ease; }

/* ── App shell ── */
.app-view { display: none; position: relative; z-index: 1; min-height: 100vh; }
.app-view.active { display: block; }

/* Top nav */
.topnav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  padding: 0 clamp(20px, 4vw, 48px);
  gap: 24px;
  background: rgba(12, 15, 26, 0.75);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--glass-border);
}

.topnav__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  margin-right: auto;
}
.topnav__logo {
  width: 36px; height: 36px;
  border-radius: 10px;
  overflow: hidden;
  flex-shrink: 0;
}
.topnav__logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.topnav__title {
  display: flex;
  align-items: baseline;
  gap: 6px;
}
.topnav__name { font-weight: 600; font-size: 1.05rem; letter-spacing: -0.02em; }
.topnav__version {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.02em;
  line-height: 1;
}

/* Nav tabs with pill slide */
.nav-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  position: relative;
  padding: 4px;
  background: var(--glass);
  border-radius: 999px;
  border: 1px solid var(--glass-border);
}
.nav-tabs__pill {
  position: absolute;
  top: 4px; bottom: 4px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(99,102,241,0.35), rgba(124,58,237,0.25));
  border: 1px solid rgba(129, 140, 248, 0.3);
  transition: left var(--transition), width var(--transition);
  pointer-events: none;
  z-index: 0;
}
.nav-tabs__item {
  position: relative;
  z-index: 1;
  padding: 10px 18px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  border-radius: 999px;
  transition: color 0.25s;
  white-space: nowrap;
}
.nav-tabs__item:hover { color: var(--text-primary); }
.nav-tabs__item.active { color: var(--text-primary); }

/* Search */
.search-wrap {
  position: relative;
  flex: 0 1 280px;
  min-width: 200px;
}
.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  min-width: 200px;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.search-box:focus-within {
  border-color: rgba(129, 140, 248, 0.35);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.search-box svg { flex-shrink: 0; opacity: 0.5; }
.search-box input {
  flex: 1;
  border: none;
  background: transparent;
  color: var(--text-primary);
  font-size: 0.85rem;
  outline: none;
  min-width: 0;
}
.search-box input::placeholder { color: var(--text-muted); }
.search-box kbd {
  font-size: 0.7rem;
  padding: 3px 7px;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--glass-border);
  border-radius: 6px;
  color: var(--text-muted);
  font-family: inherit;
}

.search-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  max-height: min(420px, 60vh);
  overflow-y: auto;
  background: rgba(18, 20, 32, 0.98);
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.45);
  z-index: 200;
  padding: 6px;
}
.search-dropdown.hidden { display: none; }
.search-dropdown__empty {
  padding: 14px 12px;
  font-size: 0.82rem;
  color: var(--text-muted);
  text-align: center;
}
.search-dropdown__item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: var(--text-primary);
  text-align: left;
  cursor: pointer;
  transition: background var(--transition);
}
.search-dropdown__item:hover,
.search-dropdown__item:focus-visible {
  background: rgba(129, 140, 248, 0.12);
  outline: none;
}
.search-dropdown__badge {
  flex-shrink: 0;
  margin-top: 2px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #c7d2fe;
  background: rgba(99, 102, 241, 0.18);
  border: 1px solid rgba(129, 140, 248, 0.22);
  white-space: nowrap;
}
.search-dropdown__main {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.search-dropdown__title {
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.3;
  word-break: break-word;
}
.search-dropdown__meta {
  font-size: 0.76rem;
  color: var(--text-muted);
  line-height: 1.35;
  word-break: break-word;
}

.account-card--highlight {
  animation: account-card-highlight 2.2s ease;
}
@keyframes account-card-highlight {
  0%, 100% { box-shadow: none; }
  15%, 55% {
    box-shadow: 0 0 0 2px rgba(129, 140, 248, 0.55), 0 0 24px rgba(99, 102, 241, 0.18);
  }
}

/* User area */
.topnav__actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.btn-capsule {
  padding: 10px 20px;
  border: 1px solid rgba(129, 140, 248, 0.35);
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}
.btn-capsule:hover { background: rgba(129, 140, 248, 0.25); transform: translateY(-1px); }

.btn-capsule--charts-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.btn-capsule--charts-toggle .global-charts-toggle__icon {
  transition: transform 0.3s;
}
.btn-capsule--charts-toggle.expanded .global-charts-toggle__icon {
  transform: rotate(180deg);
}
.btn-capsule--sync.is-running {
  opacity: 1;
  cursor: pointer;
  border-color: rgba(129, 140, 248, 0.55);
  background: rgba(129, 140, 248, 0.22);
}

/* Manual sync modal */
body.sync-modal-open { overflow: hidden; }
.sync-modal {
  position: fixed;
  inset: 0;
  z-index: 1300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.22s, visibility 0.22s;
}
.sync-modal.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.sync-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 23, 0.72);
  backdrop-filter: blur(6px);
}
.sync-modal__panel {
  position: relative;
  width: min(720px, 100%);
  max-height: min(88vh, 820px);
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.98) 0%, rgba(15, 23, 42, 0.94) 100%);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
  overflow: hidden;
}
.sync-modal__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px 16px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  flex-shrink: 0;
}
.sync-modal__title {
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.sync-modal__subtitle {
  margin-top: 6px;
  font-size: 0.82rem;
  color: var(--text-muted);
}
.sync-modal__close {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 10px;
  background: transparent;
  color: var(--text-secondary);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}
.sync-modal__close:hover {
  background: rgba(148, 163, 184, 0.08);
  color: var(--text);
}
.sync-modal__body {
  flex: 1 1 auto;
  min-height: 0;
  padding: 18px 22px 22px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.sync-confirm__text {
  font-size: 0.98rem;
  font-weight: 500;
  margin-bottom: 10px;
}
.sync-confirm__hint {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: 22px;
}
.sync-confirm__hint code {
  font-size: 0.78rem;
  padding: 1px 6px;
  border-radius: 6px;
  background: rgba(129, 140, 248, 0.12);
  color: var(--accent);
}
.sync-confirm__actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}
.sync-confirm__run {
  width: auto;
  padding: 10px 22px;
  border-radius: 999px;
  font-size: 0.85rem;
}
.sync-progress {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 0;
  flex: 1;
}
.sync-progress.hidden,
.sync-confirm.hidden { display: none; }
.sync-progress__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
}
.sync-status-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  background: rgba(148, 163, 184, 0.15);
  color: var(--text-secondary);
}
.sync-status-badge--running {
  background: rgba(129, 140, 248, 0.2);
  color: var(--accent);
}
.sync-status-badge--ok {
  background: rgba(34, 197, 94, 0.18);
  color: #4ade80;
}
.sync-status-badge--fail {
  background: rgba(239, 68, 68, 0.18);
  color: #f87171;
}
.sync-stat-text {
  font-size: 0.8rem;
  color: var(--text-muted);
}
.sync-progress__bar {
  height: 6px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.15);
  overflow: hidden;
}
.sync-progress__bar-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, #6366f1, #818cf8);
  transition: width 0.4s ease;
}
.sync-progress__bar-fill.is-indeterminate {
  animation: sync-bar-pulse 1.4s ease-in-out infinite;
}
@keyframes sync-bar-pulse {
  0%, 100% { opacity: 0.65; }
  50% { opacity: 1; }
}
.sync-log {
  flex: 1 1 auto;
  min-height: 280px;
  max-height: min(52vh, 480px);
  margin: 0;
  padding: 12px 14px;
  overflow: auto;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 12px;
  background: rgba(2, 6, 23, 0.55);
  color: #cbd5e1;
  font-size: 0.72rem;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.group-filter {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px 6px 16px;
  border: 1px solid rgba(129, 140, 248, 0.35);
  border-radius: 999px;
  background: var(--accent-soft);
  transition: background 0.2s, border-color 0.2s;
}
.group-filter:focus-within {
  background: rgba(129, 140, 248, 0.25);
  border-color: rgba(129, 140, 248, 0.5);
}
.group-filter__label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent);
  white-space: nowrap;
}
.group-filter__select {
  border: none;
  background: transparent;
  color: var(--text-primary);
  font-size: 0.82rem;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  outline: none;
  max-width: 140px;
  padding-right: 4px;
}
.group-filter__select option {
  background: #1e293b;
  color: var(--text-primary);
}

.user-avatar {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, #475569, #334155);
  border: 2px solid var(--glass-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.2s;
}
.user-avatar:hover { border-color: rgba(129, 140, 248, 0.5); }

/* Burger */
.burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px; height: 40px;
  padding: 8px;
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  background: var(--glass);
  cursor: pointer;
}
.burger span {
  display: block;
  height: 2px;
  background: var(--text-secondary);
  border-radius: 2px;
  transition: transform 0.35s, opacity 0.35s;
}
.burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger.open span:nth-child(2) { opacity: 0; }
.burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-menu {
  display: none;
  position: fixed;
  top: var(--nav-height);
  left: 0; right: 0;
  z-index: 99;
  padding: 20px 24px 28px;
  background: rgba(12, 15, 26, 0.95);
  backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--glass-border);
  transform: translateY(-12px);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s;
}
.mobile-menu.open {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}
.mobile-menu__item {
  display: block;
  width: 100%;
  padding: 14px 16px;
  margin-bottom: 6px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.95rem;
  text-align: left;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.mobile-menu__item:hover,
.mobile-menu__item.active {
  background: var(--accent-soft);
  color: var(--text-primary);
}

/* Main content */
.main-content {
  padding: clamp(28px, 5vw, 56px) clamp(20px, 4vw, 48px) 80px;
  max-width: 1680px;
  margin: 0 auto;
}

.page-header {
  margin-bottom: 40px;
  animation: fadeUp 0.5s ease;
}
.page-header h1 {
  font-size: clamp(1.6rem, 3vw, 2rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  margin-bottom: 8px;
}
.page-header p { color: var(--text-muted); font-size: 0.9rem; }

/* Group section */
.group-section {
  margin-bottom: 52px;
  animation: fadeUp 0.5s ease backwards;
}
.group-section:nth-child(2) { animation-delay: 0.08s; }
.group-section:nth-child(3) { animation-delay: 0.16s; }
.group-section:nth-child(4) { animation-delay: 0.24s; }

.group-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
}
.group-header__line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--glass-border), transparent);
}
.group-header h2 {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  white-space: nowrap;
}
.group-header__count {
  font-size: 0.75rem;
  padding: 4px 10px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  color: var(--text-secondary);
}

/* Account card */
.account-card {
  position: relative;
  margin-bottom: 32px;
  padding: 28px 32px;
  /* Apply background + blur directly on the element so that all children
     (including ECharts SVG/canvas) render inside ONE compositing layer.
     The previous ::before approach created a sibling compositing layer whose
     backdrop-filter caused macOS Metal to silently drop nested SVG/canvas
     rendering in Chrome and Safari. */
  background: var(--bg-elevated);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  transition: border-color 0.3s, transform 0.3s;
}
.account-card:hover {
  border-color: rgba(129, 140, 248, 0.2);
  transform: translateY(-2px);
}

.account-card__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}
.account-card__identity {
  display: flex;
  align-items: center;
  gap: 14px;
}
.account-card__logo {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
}
.account-card__identity h3 {
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.account-card__identity span,
.account-card__meta {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 4px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.account-card__code {
  color: var(--accent);
  font-weight: 600;
  letter-spacing: 0.02em;
}
.account-card__business-line {
  color: var(--text);
  font-weight: 500;
}
.account-card__sep {
  color: rgba(148, 163, 184, 0.45);
}
.account-card__badge {
  padding: 6px 14px;
  background: var(--accent-soft);
  border: 1px solid rgba(129, 140, 248, 0.25);
  border-radius: 999px;
  font-size: 0.75rem;
  color: var(--accent);
  font-weight: 500;
}
.account-card__online {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
}
.account-card__online--on {
  color: #34d399;
  background: rgba(52, 211, 153, 0.12);
}
.account-card__online--off {
  color: #94a3b8;
  background: rgba(148, 163, 184, 0.12);
}
.positions-table--orders th,
.positions-table--orders td {
  font-size: 0.78rem;
}
.chart-toolbar {
  display: flex;
  justify-content: flex-end;
  margin: 0 0 12px;
}
.chart-toolbar__actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.account-card__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.history-periods-btn {
  padding: 6px 12px;
  border: 1px solid rgba(129, 140, 248, 0.28);
  border-radius: 999px;
  background: rgba(99, 102, 241, 0.08);
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, transform 0.2s;
}
.history-periods-btn:hover:not(:disabled) {
  background: rgba(99, 102, 241, 0.16);
  border-color: rgba(129, 140, 248, 0.45);
  transform: translateY(-1px);
}
.history-periods-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* Metrics — 首行重点指标 + 次行其余指标 */
.metrics-grid-wrap {
  margin-bottom: 28px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.metrics-rows {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}
.metrics-row {
  display: grid;
  gap: 6px;
  min-width: 0;
}
.metrics-row--featured {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.metrics-row--featured-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.metrics-row--featured-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.metrics-row--featured-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.metrics-row--featured-5 {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}
.metrics-row--featured-6 {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}
.metrics-row--secondary {
  grid-template-columns: repeat(10, minmax(0, 1fr));
}
.metrics-row--compact {
  grid-template-columns: repeat(9, minmax(0, 1fr));
}
.metric-cell {
  padding: 10px 6px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  min-width: 0;
  white-space: nowrap;
}
.metric-cell--featured {
  padding: 14px 10px;
}
.metric-cell--featured .metric-cell__label {
  font-size: 0.82rem;
  margin-bottom: 6px;
}
.metric-cell--featured .metric-cell__value {
  font-size: 1.2rem;
}
.metric-cell--featured .metric-cell__hint {
  font-size: 0.65rem;
  margin-top: 4px;
}
.metric-cell--secondary .metric-cell__label {
  font-size: 0.7rem;
}
.metric-cell--secondary .metric-cell__value {
  font-size: 0.92rem;
}
.metric-cell--trade-highlight {
  background: rgba(99, 102, 241, 0.1);
  border-color: rgba(129, 140, 248, 0.22);
}
.metric-cell__label {
  font-size: 0.62rem;
  color: var(--text-muted);
  margin-bottom: 4px;
  font-weight: 500;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.metric-cell__label--split {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  overflow: visible;
  white-space: normal;
}
.metric-cell__label-extra {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 500;
  white-space: nowrap;
  flex-shrink: 0;
  opacity: 0.95;
}
.metric-cell__value {
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.metric-cell__value.positive { color: var(--positive); }
.metric-cell__value.negative { color: var(--negative); }
.metric-cell__value--sm { font-size: 0.88rem; }
.metric-cell--secondary .metric-cell__value--sm { font-size: 0.92rem; }
.metric-cell__hint {
  font-size: 0.58rem;
  color: var(--text-muted);
  margin-top: 2px;
  line-height: 1.2;
  opacity: 0.85;
}
.monthly-target-editor {
  margin-top: 2px;
}
.monthly-target-editor__display {
  display: flex;
  align-items: center;
  gap: 6px;
}
.monthly-target-editor__empty {
  font-size: 0.95rem;
  color: var(--text-muted);
  font-weight: 500;
}
.monthly-target-editor__edit-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.monthly-target-editor__edit-btn:hover {
  color: var(--text-primary);
  border-color: rgba(96, 165, 250, 0.45);
  background: rgba(96, 165, 250, 0.08);
}
.monthly-target-editor__form {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.monthly-target-editor__input {
  width: 72px;
  padding: 4px 8px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.25);
  color: var(--text-primary);
  font-size: 0.82rem;
}
.monthly-target-editor__input:focus {
  outline: none;
  border-color: rgba(96, 165, 250, 0.55);
}
.monthly-target-editor__save,
.monthly-target-editor__cancel {
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  font-size: 0.72rem;
  cursor: pointer;
}
.monthly-target-editor__save {
  border-color: rgba(96, 165, 250, 0.45);
  background: rgba(96, 165, 250, 0.15);
}
.monthly-target-editor__save:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.monthly-target-editor__status {
  margin-top: 4px;
  font-size: 0.62rem;
  color: var(--text-muted);
}
.monthly-target-editor__status--error {
  color: var(--negative);
}
.metric-cell--has-period,
.metric-cell--period {
  white-space: normal;
}
.metric-cell__value--period-countdown {
  font-size: 1.05rem;
}
.period-progress--cell {
  margin-top: 6px;
}
.period-progress--cell .period-progress__bar {
  height: 6px;
}
.period-progress__bar-wrap {
  position: relative;
  cursor: default;
}
.period-progress__bar {
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}
.period-progress__fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(96, 165, 250, 0.75), rgba(59, 130, 246, 0.95));
  transition: width 0.3s ease;
}
.period-progress__tooltip {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  transform: translateX(-50%) translateY(4px);
  padding: 6px 10px;
  font-size: 0.68rem;
  line-height: 1.35;
  color: var(--text-primary, #e2e8f0);
  background: rgba(15, 23, 42, 0.96);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
  z-index: 5;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}
.period-progress__bar-wrap:hover .period-progress__tooltip,
.period-progress__bar-wrap:focus-visible .period-progress__tooltip {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}
.metric-sync-warn {
  margin-bottom: 10px;
  font-size: 0.75rem;
  color: #fbbf24;
  padding: 8px 12px;
  background: rgba(251, 191, 36, 0.08);
  border: 1px solid rgba(251, 191, 36, 0.2);
  border-radius: var(--radius-sm);
}

/* Open positions */
.positions-panel {
  margin-bottom: 24px;
  padding: 18px 20px;
  background: rgba(0, 0, 0, 0.18);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
}
.positions-panel--empty .positions-panel__head {
  margin-bottom: 0;
}
.positions-panel--empty .positions-panel__empty {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-top: 8px;
}
.positions-panel__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}
.positions-panel__actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
  margin-left: auto;
}
.positions-panel__title {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
}
.positions-panel__total {
  font-size: 0.9rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.positions-panel__total.positive { color: var(--positive); }
.positions-panel__total.negative { color: var(--negative); }
.positions-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}
.positions-table th,
.positions-table td {
  padding: 8px 10px;
  text-align: left;
  border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}
.positions-table th {
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.72rem;
}
.positions-table td.positive { color: var(--positive); }
.positions-table td.negative { color: var(--negative); }

.loading-state,
.empty-state {
  padding: 48px 24px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.95rem;
}
.empty-state.error { color: var(--negative); }

/* Charts toggle & row */
.charts-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  background: var(--glass);
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.charts-toggle-btn:hover {
  color: var(--text-primary);
  border-color: rgba(129, 140, 248, 0.35);
  background: var(--accent-soft);
}
.charts-toggle-btn__icon {
  transition: transform 0.3s;
}
.charts-toggle-btn.expanded .charts-toggle-btn__icon {
  transform: rotate(180deg);
}

.charts-row {
  display: none;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-top: 16px;
}
.charts-row.expanded {
  display: grid;
}
.chart-panel {
  min-width: 0;
  padding: 20px 16px 12px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
}
.chart-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  padding: 0 8px;
}
.chart-panel__lead {
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-width: 0;
  flex: 1;
}
.chart-panel__title {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
  flex-shrink: 0;
}
.chart-panel__summary {
  font-size: 0.68rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.chart-panel__summary-label {
  font-weight: 500;
  color: var(--text-muted);
}
.chart-panel__summary-value {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.chart-panel__summary-value--positive { color: var(--positive); }
.chart-panel__summary-value--negative { color: var(--negative); }
.chart-panel__summary-value--commission { color: #f59e0b; }
.chart-panel__summary--empty { color: var(--text-muted); }
.chart-range-group {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}
.chart-range-btn {
  padding: 4px 10px;
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.68rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.chart-range-btn:hover {
  color: var(--text-secondary);
  border-color: rgba(129, 140, 248, 0.35);
}
.chart-range-btn.active {
  background: var(--accent-soft);
  border-color: rgba(129, 140, 248, 0.45);
  color: var(--accent);
}
.fallback-chart__plot--scrollable {
  overflow-x: auto;
  overflow-y: hidden;
  flex: 1 1 auto;
}
.fallback-chart__plot--scrollable::-webkit-scrollbar {
  height: 6px;
}
.fallback-chart__plot--scrollable::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.35);
  border-radius: 999px;
}
.chart-panel__canvas {
  width: 100%;
  height: 240px;
  position: relative;
  overflow: hidden;
}
.fallback-chart {
  width: 100%;
  height: 100%;
  color: var(--text-muted);
  display: flex;
  align-items: stretch;
  overflow: visible;
}
.fallback-chart--empty {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
}
.fallback-chart__axis {
  width: 38px;
  flex: 0 0 38px;
  padding: 22px 5px 24px 0;
  border-right: 1px solid rgba(148, 163, 184, 0.18);
}
.fallback-chart--dual-axis .fallback-chart__axis:last-child {
  padding-right: 0;
  padding-left: 5px;
  border-right: 0;
  border-left: 1px solid rgba(148, 163, 184, 0.18);
}
.fallback-chart__axis-inner {
  position: relative;
  height: 100%;
}
.fallback-chart__axis-label {
  position: absolute;
  right: 0;
  max-width: 34px;
  transform: translateY(-50%);
  color: #64748b;
  font-size: 9px;
  line-height: 1;
  text-align: right;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.fallback-chart--dual-axis .fallback-chart__axis:last-child .fallback-chart__axis-label {
  left: 0;
  right: auto;
  text-align: left;
}
.fallback-chart__plot {
  --zero-top: 100%;
  position: relative;
  height: 100%;
  display: flex;
  align-items: stretch;
  flex: 1;
  min-width: 0;
  gap: 4px;
  padding: 22px 4px 24px;
}
.fallback-chart__plot--positive-only {
  align-items: flex-end;
}
.fallback-chart__zero {
  position: absolute;
  left: 0;
  right: 0;
  top: var(--zero-top);
  height: 1px;
  background: rgba(148, 163, 184, 0.18);
}
.fallback-chart__grid {
  position: absolute;
  left: 0;
  right: 0;
  height: 1px;
  background: rgba(148, 163, 184, 0.08);
  pointer-events: none;
}
.fallback-chart__grid--top { top: 22px; }
.fallback-chart__grid--middle { top: 50%; }
.fallback-chart__grid--bottom { bottom: 24px; }
.fallback-chart__slot {
  position: relative;
  flex: 1;
  height: 100%;
  min-width: 4px;
}
.fallback-chart__slot--dual {
  display: flex;
  align-items: flex-end;
}
.fallback-chart__bar {
  position: absolute;
  left: 22%;
  right: 22%;
  min-height: 2px;
  border-radius: 4px 4px 0 0;
}
.fallback-chart__bar--positive {
  background: linear-gradient(180deg, #6366f1 0%, rgba(99, 102, 241, 0.35) 100%);
}
.fallback-chart__bar--negative {
  background: linear-gradient(180deg, rgba(248, 113, 113, 0.9) 0%, rgba(248, 113, 113, 0.3) 100%);
  border-radius: 0 0 4px 4px;
}
.fallback-chart__bar--income,
.fallback-chart__bar--income-positive {
  background: linear-gradient(180deg, #10b981 0%, rgba(16, 185, 129, 0.35) 100%);
}
.fallback-chart__dual-bars {
  position: absolute;
  left: 14%;
  right: 14%;
  bottom: 0;
  top: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 2px;
}
.fallback-chart__value-label,
.fallback-chart__dual-label {
  position: absolute;
  z-index: 1;
  color: #94a3b8;
  font-size: 9px;
  line-height: 1;
  white-space: nowrap;
  pointer-events: none;
}
.fallback-chart__value-label {
  left: 50%;
  transform: translate(-50%, -100%);
}
.fallback-chart__dual-label {
  transform: translateY(-4px);
}
.fallback-chart__dual-label--orders {
  right: 52%;
  color: #67e8f9;
}
.fallback-chart__dual-label--commission {
  left: 52%;
  color: #fbbf24;
}
.fallback-chart__tooltip {
  position: absolute;
  left: 50%;
  bottom: calc(100% - 16px);
  z-index: 5;
  min-width: max-content;
  padding: 7px 9px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.94);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
  color: #e2e8f0;
  font-size: 11px;
  line-height: 1.5;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 6px);
  transition: opacity 0.12s ease, transform 0.12s ease;
}
.fallback-chart__slot:hover .fallback-chart__tooltip {
  opacity: 1;
  transform: translate(-50%, 0);
}
.fallback-chart__dual-bars .fallback-chart__bar {
  position: static;
  flex: 1;
  min-width: 2px;
}
.fallback-chart__bar--orders {
  background: linear-gradient(180deg, #06b6d4 0%, rgba(6, 182, 212, 0.35) 100%);
}
.fallback-chart__bar--commission {
  background: linear-gradient(180deg, #f59e0b 0%, rgba(245, 158, 11, 0.35) 100%);
}
.fallback-chart__x-label {
  position: absolute;
  left: 50%;
  bottom: -20px;
  max-width: 42px;
  transform: translateX(-50%);
  color: #64748b;
  font-size: 9px;
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* History periods modal */
body.history-modal-open { overflow: hidden; }
.history-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.22s, visibility 0.22s;
}
.history-modal.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.history-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 23, 0.72);
  backdrop-filter: blur(6px);
}
.history-modal__panel {
  position: relative;
  width: min(960px, 100%);
  max-height: min(88vh, 920px);
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.98) 0%, rgba(15, 23, 42, 0.94) 100%);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
  overflow: hidden;
}
.history-modal__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px 16px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  flex-shrink: 0;
}
.history-modal__title {
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.history-modal__subtitle {
  margin-top: 6px;
  font-size: 0.82rem;
  color: var(--text-muted);
}
.history-modal__close {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 10px;
  background: transparent;
  color: var(--text-secondary);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}
.history-modal__close:hover {
  background: rgba(148, 163, 184, 0.08);
  color: var(--text);
}
.history-modal__body {
  flex: 1 1 auto;
  min-height: 0;
  padding: 14px 22px 22px;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
.history-modal__body > .history-period + .history-period {
  margin-top: 10px;
}
.history-modal__body::-webkit-scrollbar,
.history-period__detail::-webkit-scrollbar {
  width: 8px;
}
.history-modal__body::-webkit-scrollbar-thumb,
.history-period__detail::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.35);
  border-radius: 999px;
}
.history-period {
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.55);
  overflow: hidden;
}
.history-period.expanded {
  border-color: rgba(129, 140, 248, 0.28);
  background: rgba(99, 102, 241, 0.05);
}
.history-period__toggle {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}
.history-period__lead {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.history-period__tag {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.02em;
}
.history-period__dates {
  font-size: 0.8rem;
  color: var(--text-secondary);
}
.history-period__quick {
  display: flex;
  flex-direction: row;
  align-items: flex-end;
  gap: 14px;
  font-size: 0.78rem;
  font-weight: 600;
}
.history-period__quick-group {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}
.history-period__quick-row {
  display: flex;
  align-items: baseline;
  gap: 6px;
}
.history-period__quick-label {
  font-size: 0.62rem;
  font-weight: 500;
  color: var(--text-muted);
  white-space: nowrap;
}
.history-period__chevron {
  transition: transform 0.2s;
  color: var(--text-muted);
}
.history-period.expanded .history-period__chevron {
  transform: rotate(180deg);
}
.history-period__detail {
  padding: 0 16px 16px;
  border-top: 1px solid rgba(148, 163, 184, 0.1);
}
.history-period.expanded .history-period__detail {
  max-height: min(58vh, 660px);
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
.history-period__summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 14px 0 12px;
}
.history-period__metric-label {
  font-size: 0.68rem;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.history-period__metric-value {
  font-size: 0.92rem;
  font-weight: 600;
}
.history-period__empty-hint {
  font-size: 0.78rem;
  color: var(--text-muted);
  padding-bottom: 8px;
}
.history-period__charts {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.chart-panel--compact {
  padding: 12px 12px 10px;
}
.chart-panel--compact .chart-panel__title {
  margin-bottom: 8px;
}
.chart-panel--compact .chart-panel__canvas {
  height: 200px;
}

/* Search highlight */
.account-card.hidden { display: none; }
.group-section.all-hidden { display: none; }

/* Responsive */
@media (max-width: 1100px) {
  .nav-tabs { display: none; }
  .search-wrap { display: none; }
  .burger { display: flex; }
  .mobile-menu { display: block; }
}

@media (max-width: 768px) {
  .topnav__title { display: none; }
  .btn-capsule { display: none; }
  .btn-capsule--sync { display: inline-flex; }
  .btn-capsule--charts-toggle { display: inline-flex; }
  .group-filter { display: inline-flex; }
  .group-filter__select { max-width: 100px; }
  .charts-row.expanded { grid-template-columns: 1fr; }
  .history-period__charts { grid-template-columns: 1fr; }
  .account-card { padding: 22px 20px; }
  .metrics-row--featured {
    grid-template-columns: repeat(3, minmax(100px, 1fr));
    min-width: 320px;
  }
  .metrics-row--featured-2 {
    grid-template-columns: repeat(2, minmax(120px, 1fr));
    min-width: 260px;
  }
  .metrics-row--featured-3 {
    grid-template-columns: repeat(3, minmax(100px, 1fr));
    min-width: 320px;
  }
  .metrics-row--featured-4 {
    grid-template-columns: repeat(4, minmax(90px, 1fr));
    min-width: 380px;
  }
  .metrics-row--featured-5 {
    grid-template-columns: repeat(5, minmax(82px, 1fr));
    min-width: 460px;
  }
  .metrics-row--featured-6 {
    grid-template-columns: repeat(6, minmax(78px, 1fr));
    min-width: 540px;
  }
  .metrics-row--secondary {
    grid-template-columns: repeat(10, minmax(82px, 1fr));
    min-width: 820px;
  }
  .metrics-row--compact {
    grid-template-columns: repeat(9, minmax(82px, 1fr));
    min-width: 738px;
  }
}

@media (max-width: 480px) {
  .login-card { padding: 36px 28px; }
}
