/* ========================================
   POKEMON STATS PAGE — DASHBOARD REVAMP
   ======================================== */

/* ── Sidebar + main flex row ── */
.dashboard-layout {
  display: flex;
  padding: var(--space-32);
  align-items: stretch;
  box-sizing: border-box;
  max-width: 100vw;
  overflow-x: hidden;
}

/* ── Main content (everything right of sidebar) ── */
.dashboard-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-16);
}

/* ========================================
   NAMED-AREA DASHBOARD GRID
   ======================================== */

.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  grid-template-rows: auto auto auto auto auto;
  gap: var(--space-16);
  grid-template-areas:
    "overview   overview   overall"
    "unique     total      activity"
    "started    rarity     activity"
    "type       variant    activity"
    "breakdown  breakdown  activity";
}

/* Grid area assignments */
.overview-panel  { grid-area: overview;   }
.overall-panel   { grid-area: overall;    }
.tile-unique     { grid-area: unique;     }
.tile-rarity     { grid-area: rarity;     }
.tile-type       { grid-area: type;       }
.tile-total      { grid-area: total;      }
.tile-variant    { grid-area: variant;    }
.tile-started    { grid-area: started;    }
.activity-panel  { grid-area: activity;   }
.breakdown-panel {
  grid-area: breakdown;
  border-left: 3px solid transparent;
}

/* ========================================
   COLLAPSIBLE SHORTCUTS SIDEBAR
   ======================================== */

.nav-sidebar {
  width: var(--nav-sidebar-width);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-16);
  transition:
    width 0.28s ease,
    padding-right 0.28s ease;
  overflow-x: clip;
  border-right: 1px solid var(--bar-track);
  padding-right: var(--space-16);
  margin-right: var(--space-16);
  will-change: width;
}

.nav-sidebar:not(.is-ready),
.nav-sidebar:not(.is-ready) * {
  transition: none !important;
}

.nav-sidebar.collapsed {
  width: var(--nav-sidebar-collapsed-width);
  padding-right: 0;
}

/* ── Header: "Shortcuts »" ── */
.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: nowrap;
  gap: var(--space-8);
  padding-bottom: var(--space-12);
  flex-shrink: 0;
  min-height: 32px;
  transition: padding-bottom 0.28s ease;
}

.sidebar-title {
  font-family: var(--font-header);
  font-weight: var(--font-weight-md);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--colour-text-muted);
  white-space: nowrap;
  max-width: 120px;
  max-height: 20px;
  overflow: hidden;
  transform-origin: left center;
  transition:
    opacity 0.18s ease,
    max-width 0.28s ease,
    max-height 0.28s ease,
    transform 0.28s ease;
}

.sidebar-toggle {
  position: relative;
  z-index: 2;
  width: 32px;
  height: 32px;
  background: transparent;
  border: 1px solid var(--bar-track);
  border-radius: var(--radius-xs);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--colour-text-muted);
  font-size: 14px;
  flex-shrink: 0;
  transition: background 0.2s, color 0.2s;
}

.sidebar-toggle:hover {
  background: var(--tile-tint-blue);
  color: var(--colour-secondary);
}

.sidebar-toggle-icon {
  display: inline-block;
  transition: transform 0.3s ease;
}

.nav-sidebar.collapsed .sidebar-toggle-icon {
  transform: rotate(180deg);
}

/* ── Nav cards stack ── */
.nav-cards {
  display: flex;
  flex-direction: column;
  gap: var(--space-16);
  flex: 1;
}

.nav-card {
  width: var(--card-width-xs);
  height: var(--card-hight-xs);
  background: var(--welcome-gradient);
  border-radius: var(--radius-sm);
  padding: var(--space-16);
  color: #FAFAFA;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-12);
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  overflow: hidden;
  transition:
    width 0.28s ease,
    height 0.28s ease,
    padding 0.28s ease,
    gap 0.28s ease,
    border-radius 0.28s ease,
    transform 0.15s ease,
    box-shadow 0.15s ease;
  box-shadow:
    0 2px 1px -1px var(--shadow-key-umbra),
    0 1px 1px 0    var(--shadow-key-penumbra),
    0 1px 3px 0    var(--shadow-key-ambient);
}

.nav-card:hover {
  transform: translateY(-2px);
  box-shadow:
    0 6px 16px 0 var(--shadow-key-umbra),
    0 2px 6px 0  var(--shadow-key-penumbra);
}

.nav-card:focus-visible {
  outline: 3px solid var(--colour-accent);
  outline-offset: 4px;
}

.nav-card-icon {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  transition:
    width 0.28s ease,
    height 0.28s ease;
}

.nav-card-label {
  font-family: var(--font-header);
  font-weight: var(--font-weight-lg);
  font-size: var(--text-sm);
  white-space: nowrap;
  max-height: 24px;
  transform-origin: top center;
  transition:
    opacity 0.18s ease,
    max-height 0.28s ease,
    transform 0.28s ease;
  overflow: hidden;
}

/* ── Collapsed: labels hidden, icon-only ── */
.nav-sidebar.collapsed .nav-card-label,
.nav-sidebar.collapsed .sidebar-title {
  opacity: 0;
  max-height: 0;
  margin: 0;
  transform: translateY(-4px) scale(0.96);
}

.nav-sidebar.collapsed .sidebar-title {
  max-width: 0;
  transform: translateX(-6px) scale(0.96);
}

.nav-sidebar.collapsed .sidebar-header {
  justify-content: center;
  padding-bottom: 0;
}

.nav-sidebar.collapsed .nav-cards {
  align-items: center;
}

.nav-sidebar.collapsed .nav-card {
  width: 48px;
  height: 67px;
  padding: 0;
  gap: 0;
  border-radius: var(--radius-xs);
}

.nav-sidebar.collapsed .nav-card-icon {
  width: 28px;
  height: 28px;
}

/* ── Holo placeholder nav card ── */
.nav-card--holo {
  background: var(--colour-paper);
  border: 2px dashed var(--colour-border);
  color: var(--colour-text-muted);
  cursor: default;
  position: relative;
  overflow: hidden;
  opacity: 0.7;
}

.nav-card--holo:hover {
  transform: none;
  box-shadow:
    0 2px 1px -1px var(--shadow-key-umbra),
    0 1px 1px 0    var(--shadow-key-penumbra),
    0 1px 3px 0    var(--shadow-key-ambient);
}

.nav-card--holo::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--holo-gradient);
  background-size: 200% 200%;
  animation: holo-shimmer 4s ease-in-out infinite;
  border-radius: inherit;
  pointer-events: none;
}

@keyframes holo-shimmer {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.nav-card--holo .nav-card-label,
.nav-card--holo .nav-card-icon {
  position: relative;
  z-index: 1;
}

.nav-card--holo .nav-card-label {
  font-weight: var(--font-weight-md);
  font-size: var(--text-xs);
}

/* ========================================
   WELCOME HERO
   ======================================== */

.welcome-hero {
  background: var(--welcome-gradient);
  border-radius: var(--radius-sm);
  padding: var(--space-32);
  color: #FAFAFA;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-32);
  position: relative;
  overflow: hidden;
}

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

.welcome-sub {
  font-family: var(--font-header);
  font-size: var(--text-sm);
  font-weight: var(--font-weight-md);
  opacity: 0.7;
}

.welcome-heading {
  font-family: var(--font-header);
  font-size: var(--text-md);
  font-weight: var(--font-weight-lg);
}

.welcome-search {
  display: flex;
  gap: var(--space-8);
}

.welcome-search input {
  background: rgba(255, 255, 255, 0.1);
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  color: #FAFAFA;
  border-radius: var(--radius-xs);
  padding: var(--space-8) var(--space-16);
  font-family: var(--font-paragraph);
  font-size: var(--text-sm);
  min-width: 200px;
}

.welcome-search input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.welcome-search input:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.15);
}

.welcome-search button {
  background: rgba(255, 255, 255, 0.15);
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  color: #FAFAFA;
  border-radius: var(--radius-xs);
  padding: var(--space-8) var(--space-16);
  font-family: var(--font-header);
  font-size: var(--text-xs);
  font-weight: var(--font-weight-md);
  cursor: pointer;
  transition: background 0.2s;
}

.welcome-search button:hover {
  background: rgba(255, 255, 255, 0.25);
}

/* ========================================
   PANELS (shared base for grid panels)
   ======================================== */

.panel {
  background: var(--colour-paper);
  border-radius: var(--radius-sm);
  padding: var(--space-32);
  box-shadow:
    0 2px 1px -1px var(--shadow-key-umbra),
    0 1px 1px 0    var(--shadow-key-penumbra),
    0 1px 3px 0    var(--shadow-key-ambient);
}

.panel-title {
  font-family: var(--font-header);
  font-size: var(--text-sm);
  font-weight: var(--font-weight-lg);
  color: var(--colour-text);
  margin: 0 0 var(--space-16);
}

/* ── Overview panel ── */
.overview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-16);
}

.overview-title {
  font-family: var(--font-header);
  font-weight: var(--font-weight-lg);
  font-size: var(--text-md);
  color: var(--colour-text);
  margin: 0;
}

/* ── Overall Completion panel ── */
.overall-panel {
  display: flex;
  flex-direction: column;
  gap: var(--space-12);
  height: var(--card-hight-sm);
  overflow-y: auto;
  scrollbar-width: none;
}

.overall-panel::-webkit-scrollbar {
  display: none;
}

.completion-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-12);
}

.completion-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.completion-label {
  font-family: var(--font-header);
  font-size: var(--text-xs);
  font-weight: var(--font-weight-md);
  color: var(--colour-text);
}

.completion-track {
  position: relative;
  width: 100%;
  height: 18px;
  background: var(--bar-track);
  border-radius: 9px;
  overflow: hidden;
  outline: 1px solid var(--colour-bg);
}

.completion-fill {
  height: 100%;
  border-radius: 9px;
  transition: width 0.6s ease;
}

.completion-fill--base   { background: var(--colour-chart-1); }
.completion-fill--master { background: var(--colour-chart-2); }
.completion-fill--grand  { background: var(--colour-chart-3); }

.completion-track:has(.completion-fill--base) {
    background: color-mix(in srgb, var(--colour-chart-1) 50%, transparent);
}
.completion-track:has(.completion-fill--master) {
    background: color-mix(in srgb, var(--colour-chart-2) 50%, transparent);
}
.completion-track:has(.completion-fill--grand) {
    background: color-mix(in srgb, var(--colour-chart-3) 50%, transparent);
}

.completion-track .progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--colour-text);
    font-weight: bold;
    font-size: var(--text-xs);
    pointer-events: none;
    user-select: none;
    text-shadow:
        0.1em 0 var(--colour-bg),
        0 0.1em var(--colour-bg),
       -0.1em 0 var(--colour-bg),
        0 -0.1em var(--colour-bg),
       -0.1em -0.1em var(--colour-bg),
       -0.1em 0.1em var(--colour-bg),
        0.1em -0.1em var(--colour-bg),
        0.1em 0.1em var(--colour-bg);
}

.completion-legend {
  display: flex;
  gap: var(--space-16);
  flex-wrap: wrap;
  margin-top: var(--space-4);
}

.completion-legend-item {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  font-family: var(--font-paragraph);
  font-size: 11px;
  color: var(--colour-text-muted);
}

.completion-legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

/* Top illustrator callout */
.top-illustrator-callout {
  margin-top: auto;
  padding-top: var(--space-12);
  border-top: 1px solid var(--bar-track);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.top-illustrator-label {
  font-family: var(--font-paragraph);
  font-size: 11px;
  color: var(--colour-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.top-illustrator-name {
  font-family: var(--font-header);
  font-size: var(--text-sm);
  font-weight: var(--font-weight-lg);
  color: var(--colour-text);
}

.top-illustrator-count {
  font-family: var(--font-paragraph);
  font-size: var(--text-xs);
  color: var(--colour-text-muted);
}

/* ── Activity panel ── */
.activity-panel {
  overflow-y: auto;
  scrollbar-width: none;
}

.activity-panel::-webkit-scrollbar {
  display: none;
}

.activity-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.activity-row {
  display: flex;
  align-items: center;
  gap: var(--space-8);
  padding: var(--space-4) 0;
  border-bottom: 1px solid var(--bar-track);
}

.activity-row:last-child {
  border-bottom: none;
}

.activity-thumb {
  width: 36px;
  height: 50px;
  border-radius: 4px;
  object-fit: cover;
  flex-shrink: 0;
}

.activity-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.activity-card-name {
  font-family: var(--font-paragraph);
  font-size: var(--text-xs);
  font-weight: var(--font-weight-md);
  color: var(--colour-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.activity-variant {
  font-family: var(--font-paragraph);
  font-size: 11px;
  color: var(--colour-text-muted);
}

.activity-delta {
  font-family: var(--font-header);
  font-size: var(--text-xs);
  font-weight: var(--font-weight-lg);
  flex-shrink: 0;
  padding: 2px 8px;
  border-radius: 4px;
}

.activity-delta--added {
  color: var(--colour-success);
  background: rgba(16, 185, 129, 0.1);
}

.activity-delta--removed {
  color: var(--colour-error);
  background: rgba(239, 68, 68, 0.1);
}

.activity-delta--changed {
  color: var(--colour-warning);
  background: rgba(245, 158, 11, 0.1);
}

.activity-new-badge {
  display: inline-block;
  padding: 1px 4px;
  background: var(--colour-success);
  color: #fff;
  font-family: var(--font-header);
  font-size: 9px;
  font-weight: var(--font-weight-lg);
  border-radius: 3px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  line-height: 1;
  margin-left: var(--space-4);
}

/* ========================================
   STAT TILES
   ======================================== */

.stat-tile {
  background: var(--colour-paper);
  border-radius: var(--radius-sm);
  padding: var(--space-32);
  border-left: 3px solid transparent;
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
  transition: background 0.3s, transform 0.15s, box-shadow 0.15s;
  box-shadow:
    0 2px 1px -1px var(--shadow-key-umbra),
    0 1px 1px 0    var(--shadow-key-penumbra),
    0 1px 3px 0    var(--shadow-key-ambient);
}

.stat-tile:hover {
  transform: translateY(-2px);
  box-shadow:
    0 4px 12px 0 var(--shadow-key-umbra),
    0 2px 4px 0  var(--shadow-key-penumbra);
}

.stat-tile--blue   { border-left-color: var(--colour-chart-1); background: var(--tile-tint-blue);   }
.stat-tile--teal   { border-left-color: var(--colour-chart-2); background: var(--tile-tint-teal);   }
.stat-tile--gold   { border-left-color: var(--colour-chart-3); background: var(--tile-tint-gold);   }
.stat-tile--violet { border-left-color: var(--colour-chart-4); background: var(--tile-tint-violet); }
.stat-tile--coral  { border-left-color: var(--colour-chart-5); background: var(--tile-tint-coral);  }

.stat-tile-title {
  font-family: var(--font-header);
  font-size: var(--text-xs);
  font-weight: var(--font-weight-md);
  color: var(--colour-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 0;
}

.stat-value {
  font-family: var(--font-header);
  font-size: var(--text-md);
  font-weight: var(--font-weight-lg);
  line-height: 1;
}

.stat-value--blue   { color: var(--colour-chart-1); }
.stat-value--teal   { color: var(--colour-chart-2); }
.stat-value--gold   { color: var(--colour-chart-3); }

.stat-label {
  font-family: var(--font-paragraph);
  font-size: var(--text-xs);
  font-weight: var(--font-weight-md);
  color: var(--colour-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Breakdown list inside tiles */
.stat-breakdown {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.stat-breakdown li {
  display: flex;
  align-items: center;
  gap: var(--space-8);
  padding: 4px 0;
  border-bottom: 1px solid var(--bar-track);
  font-family: var(--font-paragraph);
  font-size: var(--text-xs);
}

.stat-breakdown li:last-child {
  border-bottom: none;
}

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

.stat-breakdown .name {
  flex: 1;
  color: var(--colour-text);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stat-breakdown .count {
  font-family: var(--font-header);
  font-weight: var(--font-weight-md);
  color: var(--colour-text);
  flex-shrink: 0;
}

.stat-breakdown .more-indicator {
  color: var(--colour-text-muted);
  font-size: var(--text-xs);
  padding: 4px 0;
}

/* ========================================
   PER-EXPANSION TABLE (inside breakdown panel)
   ======================================== */

.stats-table-wrapper {
  overflow: hidden;
}

.stats-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-paragraph);
  font-size: var(--text-sm);
}

.stats-table th {
  font-family: var(--font-header);
  font-size: var(--text-xs);
  font-weight: var(--font-weight-md);
  color: var(--colour-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-align: left;
  padding: var(--space-8) var(--space-16);
  border-bottom: 2px solid var(--colour-border);
}

.stats-table td {
  padding: var(--space-8) var(--space-16);
  border-bottom: 1px solid var(--bar-track);
  vertical-align: middle;
}

.stats-table a {
  color: var(--colour-secondary);
  text-decoration: none;
  font-weight: var(--font-weight-md);
}

.stats-table a:hover {
  text-decoration: underline;
}

.stats-table-cell {
  display: flex;
  align-items: center;
  gap: var(--space-8);
}

.stats-mini-progress {
  position: relative;
  background-color: var(--bar-track);
  width: 80px;
  height: 8px;
  border-radius: 4px;
  overflow: hidden;
  flex-shrink: 0;
}

.stats-mini-fill {
  height: 100%;
  border-radius: 4px;
}

.stats-mini-fill--base   { background-color: var(--colour-chart-1); }
.stats-mini-fill--master { background-color: var(--colour-chart-2); }
.stats-mini-fill--grand  { background-color: var(--colour-chart-3); }

.stats-mini-fill:not([class*="--"]) {
  background-color: var(--colour-primary);
}

.stats-table-percent {
  font-size: var(--text-xs);
  color: var(--colour-text-muted);
  min-width: 36px;
}

/* ========================================
   SHARE FEATURE
   ======================================== */

.stats-share-wrapper {
  position: relative;
}

.stats-share-btn {
  display: flex;
  align-items: center;
  gap: var(--space-8);
  padding: 6px 16px;
  border-radius: var(--radius-xs);
  border: 1.5px solid var(--colour-secondary);
  background: transparent;
  color: var(--colour-secondary);
  font-family: var(--font-header);
  font-weight: var(--font-weight-md);
  font-size: var(--text-xs);
  cursor: pointer;
  transition: background 0.2s;
}

.stats-share-btn:hover {
  background: rgba(31, 138, 192, 0.1);
}

.stats-share-btn svg {
  width: 16px;
  height: 16px;
}

.stats-share-dropdown {
  position: absolute;
  top: calc(100% + var(--space-8));
  right: 0;
  background: var(--colour-paper);
  border-radius: var(--radius-xs);
  box-shadow:
    0 20px 30px rgba(0, 0, 0, 0.15),
    0 8px 10px rgba(0, 0, 0, 0.10);
  padding: var(--space-8);
  min-width: 220px;
  z-index: 100;
  display: none;
}

.stats-share-dropdown.open {
  display: block;
}

.stats-share-action {
  display: flex;
  align-items: center;
  gap: var(--space-8);
  width: 100%;
  padding: var(--space-8) var(--space-16);
  border: none;
  background: none;
  color: var(--colour-text);
  font-family: var(--font-paragraph);
  font-size: var(--text-sm);
  cursor: pointer;
  border-radius: var(--radius-xs);
  text-align: left;
}

.stats-share-action:hover {
  background: var(--colour-popup-bg);
}

.stats-share-action svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: var(--colour-text-muted);
}

.stats-share-divider {
  height: 1px;
  background: var(--colour-border);
  margin: var(--space-4) var(--space-8);
}

.stats-privacy-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-8) var(--space-16);
  font-family: var(--font-paragraph);
  font-size: var(--text-sm);
  color: var(--colour-text);
}

.stats-privacy-toggle {
  position: relative;
  width: 40px;
  height: 22px;
  background: var(--colour-border);
  border-radius: 11px;
  border: none;
  cursor: pointer;
  transition: background-color 0.2s ease;
  padding: 0;
}

.stats-privacy-toggle.active {
  background: var(--colour-primary);
}

.stats-privacy-toggle::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s ease;
}

.stats-privacy-toggle.active::after {
  transform: translateX(18px);
}

/* Share card for screenshots */
.stats-share-card {
  display: none;
  background: linear-gradient(135deg, var(--colour-primary), var(--colour-secondary));
  border-radius: var(--radius-sm);
  padding: var(--space-32);
  color: #FAFAFA;
  text-align: center;
}

.stats-share-card.visible {
  display: block;
}

.stats-share-card-title {
  font-family: var(--font-header);
  font-size: var(--text-md);
  font-weight: var(--font-weight-lg);
  margin: 0 0 var(--space-4);
}

.stats-share-card-subtitle {
  font-family: var(--font-paragraph);
  font-size: var(--text-xs);
  opacity: 0.7;
  margin: 0 0 var(--space-32);
}

.stats-share-card-stats {
  display: flex;
  justify-content: center;
  gap: var(--space-32);
  flex-wrap: wrap;
}

.stats-share-card-stat {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.stats-share-card-value {
  font-family: var(--font-header);
  font-size: var(--text-lg);
  font-weight: var(--font-weight-lg);
}

.stats-share-card-label {
  font-family: var(--font-paragraph);
  font-size: var(--text-xs);
  opacity: 0.7;
}

.stats-share-card-branding {
  margin-top: var(--space-32);
  font-family: var(--font-header);
  font-size: var(--text-xs);
  opacity: 0.5;
}

[data-theme="dark"] .stats-share-card {
  background: linear-gradient(135deg, #0D3A6E, #165F85);
}

/* ========================================
   GUEST CTA / PRIVATE / EMPTY STATES
   ======================================== */

.stats-guest-cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: var(--space-64) var(--space-32) var(--space-32);
  background: var(--colour-paper);
  border-radius: var(--radius-sm);
  box-shadow:
    0 2px 1px -1px var(--shadow-key-umbra),
    0 1px 1px 0 var(--shadow-key-penumbra),
    0 1px 3px 0 var(--shadow-key-ambient);
  gap: var(--space-16);
}

.stats-guest-icon {
  display: flex;
  justify-content: center;
  width: 100%;
}

.stats-guest-icon img {
  height: 120px;
  width: auto;
}

.stats-guest-cta h2 {
  font-family: var(--font-header);
  font-size: var(--text-lg);
  font-weight: var(--font-weight-lg);
  color: var(--colour-text);
  margin: 0;
}

.stats-guest-cta p {
  font-family: var(--font-paragraph);
  font-size: var(--text-sm);
  color: var(--colour-text-muted);
  margin: 0;
  max-width: 500px;
  line-height: 1.6;
}

.stats-guest-cta .signup-button {
  margin-top: var(--space-8);
}

.stats-private-message {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: var(--space-64) var(--space-32);
  background: var(--colour-paper);
  border-radius: var(--radius-sm);
  box-shadow:
    0 2px 1px -1px var(--shadow-key-umbra),
    0 1px 1px 0 var(--shadow-key-penumbra),
    0 1px 3px 0 var(--shadow-key-ambient);
  gap: var(--space-16);
}

.stats-private-message h2 {
  font-family: var(--font-header);
  font-size: var(--text-md);
  font-weight: var(--font-weight-lg);
  color: var(--colour-text);
  margin: 0;
}

.stats-private-message p {
  font-family: var(--font-paragraph);
  font-size: var(--text-sm);
  color: var(--colour-text-muted);
  margin: 0;
}

.stats-empty-message {
  font-family: var(--font-paragraph);
  font-size: var(--text-sm);
  color: var(--colour-text-muted);
  text-align: center;
  padding: var(--space-32) 0;
  margin: 0;
}

/* Toast notification */
.stats-toast {
  position: fixed;
  bottom: var(--space-32);
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--colour-text);
  color: var(--colour-bg);
  padding: var(--space-8) var(--space-16);
  border-radius: var(--radius-xs);
  font-family: var(--font-paragraph);
  font-size: var(--text-sm);
  z-index: 9999;
  pointer-events: none;
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.stats-toast.visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* ========================================
   POKEMON TYPE COLOURS
   ======================================== */

.type-grass     { background: #78C850; }
.type-fire      { background: #F08030; }
.type-water     { background: #6890F0; }
.type-electric  { background: #F8D030; }
.type-psychic   { background: #F85888; }
.type-fighting  { background: #C03028; }
.type-dark      { background: #705848; }
.type-metal     { background: #B8B8D0; }
.type-dragon    { background: #7038F8; }
.type-fairy     { background: #EE99AC; }
.type-normal    { background: #A8A878; }
.type-colorless { background: #C0C0C0; }

/* ========================================
   RESPONSIVE
   ======================================== */

/* Tablet — sidebar collapses, right column goes below stat tiles */
@media (max-width: 1100px) {
  .nav-sidebar {
    width: var(--nav-sidebar-collapsed-width);
    padding-right: 0;
  }
  .nav-sidebar .nav-card-label,
  .nav-sidebar .sidebar-title {
    opacity: 0;
    max-height: 0;
    overflow: hidden;
  }
  .nav-sidebar .sidebar-header {
    justify-content: center;
    padding-bottom: 0;
  }
  .nav-sidebar .nav-cards {
    align-items: center;
  }
  .nav-sidebar .nav-card {
    width: 48px;
    height: 67px;
    padding: 0;
    border-radius: var(--radius-xs);
  }
  .nav-sidebar .nav-card-icon {
    width: 28px;
    height: 28px;
  }

  .overall-panel,
  .activity-panel {
    height: auto;
  }

  .dashboard-grid {
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "overview   overview"
      "unique     total"
      "started    rarity"
      "type       variant"
      "overall    overall"
      "activity   activity"
      "breakdown  breakdown";
  }
}

/* Small tablet — hide search bar */
@media (max-width: 740px) {
  .welcome-search {
    display: none;
  }
}

/* Mobile — everything stacks */
@media (max-width: 600px) {
  .dashboard-layout {
    flex-direction: column;
    padding: var(--space-16);
  }
  .nav-sidebar {
    width: 100% !important;
    border-right: none !important;
    border-bottom: 1px solid var(--bar-track);
    padding-right: 0 !important;
    margin-right: 0 !important;
    padding-bottom: var(--space-16);
  }
  .nav-cards {
    flex-direction: row;
    overflow-x: auto;
  }
  .nav-card {
    min-width: 80px;
    flex-shrink: 0;
  }
  .sidebar-toggle {
    display: none;
  }

  .overall-panel,
  .activity-panel {
    height: auto;
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
    grid-template-areas:
      "overview"
      "overall"
      "unique"
      "total"
      "started"
      "rarity"
      "type"
      "variant"
      "activity"
      "breakdown";
  }

  .welcome-hero {
    flex-direction: column;
    gap: var(--space-16);
  }

  .stats-share-card-stats {
    flex-direction: column;
    gap: var(--space-16);
  }

  .panel {
    padding: var(--space-16);
  }

  .stat-tile {
    padding: var(--space-16);
  }

  .dashboard-main,
  .dashboard-grid,
  .stat-tile,
  .panel {
    max-width: 100%;
    box-sizing: border-box;
  }
}

/* ========================================
   REDUCED MOTION
   ======================================== */

@media (prefers-reduced-motion: reduce) {
  .completion-fill {
    transition: none;
  }

  .nav-card,
  .nav-card-icon,
  .nav-card-label,
  .sidebar-header,
  .sidebar-title,
  .sidebar-toggle-icon,
  .stat-tile,
  .nav-sidebar {
    transition: none;
  }

  .stats-toast {
    transition: none;
  }

  .stats-privacy-toggle,
  .stats-privacy-toggle::after {
    transition: none;
  }

  .nav-card--holo::before {
    animation: none;
  }
}
