/* Analytics desktop — layout (#dAn-wrap); glass in mytap-glass.css */

#dAn-wrap .mt-tile { display: flex; flex-direction: column; height: 100%; }

#dAn-wrap .mt-hero { padding: 26px 28px 24px; overflow: hidden; }
#dAn-wrap .mt-hero-wave { position: absolute; top: -60px; right: -60px; width: 360px; height: 360px; z-index: 0; pointer-events: none; }
#dAn-wrap .mt-hero-top { display: flex; align-items: flex-start; justify-content: space-between; position: relative; z-index: 1; }
#dAn-wrap .mt-eyebrow { font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--mt-text-tertiary); margin-bottom: 4px; }
#dAn-wrap .mt-hero-name { font-size: 32px; font-weight: 700; letter-spacing: -0.02em; color: var(--mt-text-primary); }
#dAn-wrap .mt-hero-insight { display: flex; align-items: center; gap: 6px; font-size: 13.5px; color: var(--mt-text-secondary); margin-top: 9px; }
#dAn-wrap .mt-hero-insight svg { color: var(--mt-purple-deep); flex-shrink: 0; }
#dAn-wrap .mt-hero-insight b { color: var(--mt-text-primary); font-weight: 600; }
#dAn-wrap .mt-hero-top-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  text-align: right;
}
#dAn-wrap .mt-hero-bottom { display: flex; align-items: center; gap: 26px; margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--mt-divider); position: relative; z-index: 1; }
#dAn-wrap .mt-hero-ring { position: relative; width: 92px; height: 92px; flex-shrink: 0; }
#dAn-wrap .mt-hero-ring svg { transform: rotate(-90deg); width: 100%; height: 100%; }
#dAn-wrap .mt-hero-ring-value { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 21px; font-weight: 700; color: var(--mt-text-primary); transform: none; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
#dAn-wrap .mt-hero-ring-label { flex-shrink: 0; }
#dAn-wrap .mt-hero-ring-title { font-size: 13px; font-weight: 600; white-space: nowrap; }
#dAn-wrap .mt-hero-ring-trend { font-size: 12px; color: var(--mt-purple-deep); font-weight: 600; margin-top: 3px; white-space: nowrap; }
#dAn-wrap .mt-metric-value { font-size: 19px; font-weight: 700; letter-spacing: -0.01em; }
#dAn-wrap .mt-metric-label { font-size: 11.5px; color: var(--mt-text-secondary); margin-top: 3px; }
#dAn-wrap .mt-section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; position: relative; z-index: 1; }
#dAn-wrap .mt-section-title { font-size: 15.5px; font-weight: 700; letter-spacing: -0.01em; }

#dAn-wrap .mt-dash-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  align-items: stretch;
  margin-bottom: 16px;
}

#dAn-wrap .mt-span-1 { grid-column: span 1; }
#dAn-wrap .mt-span-2 { grid-column: span 2; }
#dAn-wrap .mt-span-3 { grid-column: span 3; }

#dAn-wrap .mt-row-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--mt-text-tertiary);
  margin: 22px 2px 10px;
}

#dAn-wrap .mt-filter-rail { padding: 22px 18px; }
#dAn-wrap .mt-filter-rail-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--mt-text-tertiary);
  margin-bottom: 12px;
  position: relative;
  z-index: 1;
}

#dAn-wrap .mt-period-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
  position: relative;
  z-index: 1;
}

#dAn-wrap .dAn-ptab {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 11px;
  border-radius: var(--mt-radius-sm);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--mt-text-secondary);
  cursor: pointer;
  border: none;
  background: transparent;
  font-family: inherit;
  text-align: left;
  width: 100%;
}

#dAn-wrap .dAn-ptab:hover { background: rgba(124, 92, 246, 0.06); }

#dAn-wrap .dAn-ptab.active {
  background: linear-gradient(135deg, rgba(124, 92, 246, 0.12), rgba(124, 92, 246, 0.04));
  color: var(--mt-purple-deep);
  box-shadow: inset 0 0 0 1px rgba(124, 92, 246, 0.14);
}

#dAn-wrap .mt-page-select {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--mt-divider);
  position: relative;
  z-index: 1;
  flex: 1;
}

#dAn-wrap .mt-page-select-label {
  font-size: 11px;
  color: var(--mt-text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
  margin-bottom: 8px;
}

#dAn-wrap #dAn-page-sel-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  padding: 10px 11px;
  border-radius: var(--mt-radius-sm);
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid var(--mt-divider);
  cursor: pointer;
  color: var(--mt-text-primary);
}

#dAn-wrap #dAn-page-sel-val {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  min-width: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--mt-text-primary);
}

#dAn-wrap #dAn-page-sel-arrow {
  color: var(--mt-text-tertiary);
  flex-shrink: 0;
  transition: transform 0.2s;
}

#dAn-wrap #dAn-page-drop {
  display: none;
  background: var(--mt-glass-bg-strong);
  border: 1px solid var(--mt-glass-border);
  border-radius: var(--mt-radius-sm);
  margin-top: 8px;
  overflow: hidden;
  position: relative;
  z-index: 20;
}

#dAn-wrap .dAn-drop-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 14px;
  cursor: pointer;
  font-size: 13px;
  color: var(--mt-text-primary);
  border-top: 1px solid var(--mt-divider);
}

#dAn-wrap .dAn-drop-item:first-child { border-top: none; }
#dAn-wrap .dAn-drop-item:hover { background: rgba(124, 92, 246, 0.06); }
#dAn-wrap .dAn-drop-item.active { background: rgba(124, 92, 246, 0.08); }

#dAn-wrap .mt-stat-card { padding: 20px; }
#dAn-wrap .mt-stat-icon {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: rgba(124, 92, 246, 0.09);
  color: var(--mt-purple-deep);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
  position: relative;
  z-index: 1;
}

#dAn-wrap .mt-stat-value {
  font-size: 25px;
  font-weight: 700;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
  color: var(--mt-text-primary);
  position: relative;
  z-index: 1;
}

#dAn-wrap .mt-stat-label {
  font-size: 12.5px;
  color: var(--mt-text-secondary);
  margin-top: 3px;
  position: relative;
  z-index: 1;
}

#dAn-wrap .mt-stat-badge {
  display: inline-block;
  margin-top: 11px;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  position: relative;
  z-index: 1;
}

#dAn-wrap .mt-stat-badge--up { background: rgba(124, 92, 246, 0.10); color: var(--mt-purple-deep); }
#dAn-wrap .mt-stat-badge--neutral { background: rgba(0, 0, 0, 0.045); color: var(--mt-text-secondary); }
#dAn-wrap .mt-stat-badge--down { background: rgba(217, 66, 90, 0.10); color: #D9425A; }

#dAn-wrap .mt-chart-panel { padding: 22px 24px; }
#dAn-wrap .mt-chart-legend {
  display: flex;
  gap: 16px;
  margin-bottom: 14px;
  position: relative;
  z-index: 1;
}

#dAn-wrap .mt-legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--mt-text-secondary);
  font-weight: 600;
}

#dAn-wrap .mt-legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

#dAn-wrap .mt-line-chart { position: relative; z-index: 1; }
#dAn-wrap .mt-line-chart svg { width: 100%; height: 90px; display: block; }

#dAn-wrap .mt-stack-tile { padding: 0; }
#dAn-wrap .mt-stack-block {
  padding: 20px 22px;
  position: relative;
  z-index: 1;
}

#dAn-wrap .mt-stack-block + .mt-stack-block { border-top: 1px solid var(--mt-divider); }

#dAn-wrap .mt-stack-eyebrow {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--mt-purple-deep);
  margin-bottom: 10px;
}

#dAn-wrap .mt-stack-row { display: flex; align-items: center; gap: 12px; }

#dAn-wrap .mt-stack-icon {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  background: rgba(124, 92, 246, 0.09);
  color: var(--mt-purple-deep);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

#dAn-wrap .mt-stack-name { font-size: 13.5px; font-weight: 600; }
#dAn-wrap .mt-stack-sub {
  font-size: 11.5px;
  color: var(--mt-text-tertiary);
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#dAn-wrap .mt-stack-value { font-size: 18px; font-weight: 700; flex-shrink: 0; }
#dAn-wrap .mt-stack-value-label { font-size: 10.5px; color: var(--mt-text-tertiary); text-align: right; margin-left: auto; }
#dAn-wrap .mt-stack-text-value { font-size: 24px; font-weight: 700; letter-spacing: -0.01em; }
#dAn-wrap .mt-stack-text-label { font-size: 12.5px; color: var(--mt-text-secondary); margin-top: 3px; }
#dAn-wrap .mt-stack-text-sub { font-size: 11.5px; color: var(--mt-text-tertiary); margin-top: 8px; }

#dAn-wrap .mt-origin-panel { padding: 22px 24px; }
#dAn-wrap .mt-origin-top {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 18px;
  position: relative;
  z-index: 1;
}

#dAn-wrap .mt-donut { width: 78px; height: 78px; flex-shrink: 0; }
#dAn-wrap .mt-donut svg { transform: rotate(-90deg); width: 100%; height: 100%; }
#dAn-wrap .mt-origin-top-name { font-size: 17px; font-weight: 700; }
#dAn-wrap .mt-origin-top-pct { font-size: 13px; color: var(--mt-purple-deep); font-weight: 700; }
#dAn-wrap .mt-origin-top-sub { font-size: 12px; color: var(--mt-text-tertiary); }

#dAn-wrap .mt-origin-list {
  display: flex;
  flex-direction: column;
  gap: 11px;
  position: relative;
  z-index: 1;
}

#dAn-wrap .mt-origin-row-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  margin-bottom: 5px;
}

#dAn-wrap .mt-origin-city { display: flex; align-items: center; gap: 7px; font-weight: 600; }
#dAn-wrap .mt-origin-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--mt-purple); }
#dAn-wrap .mt-origin-meta { color: var(--mt-text-tertiary); font-size: 12px; }
#dAn-wrap .mt-origin-bar-track { height: 5px; border-radius: 999px; background: rgba(0, 0, 0, 0.05); overflow: hidden; }
#dAn-wrap .mt-origin-bar-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--mt-purple-soft), var(--mt-purple)); }

#dAn-wrap .mt-connect-panel { padding: 22px 24px; }
#dAn-wrap .mt-connect-desc {
  font-size: 13px;
  color: var(--mt-text-secondary);
  margin-bottom: 18px;
  line-height: 1.5;
  position: relative;
  z-index: 1;
}

#dAn-wrap .mt-field-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--mt-text-secondary);
  margin-bottom: 6px;
  display: block;
  position: relative;
  z-index: 1;
}

#dAn-wrap .mt-field-input {
  width: 100%;
  font-size: 13.5px;
  padding: 11px 13px;
  border-radius: var(--mt-radius-sm);
  border: 1px solid var(--mt-divider);
  background: rgba(255, 255, 255, 0.55);
  color: var(--mt-text-primary);
  margin-bottom: 14px;
  position: relative;
  z-index: 1;
  font-family: inherit;
  box-sizing: border-box;
}

#dAn-wrap .mt-field-input::placeholder { color: var(--mt-text-tertiary); }

#dAn-wrap .mt-btn-primary-block {
  width: 100%;
  text-align: center;
  font-size: 13.5px;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, var(--mt-purple), var(--mt-purple-deep));
  border: none;
  padding: 11px;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(124, 92, 246, 0.3);
  font-family: inherit;
}

#dAn-wrap .mt-hero-divider {
  width: 1px;
  align-self: stretch;
  background: var(--mt-divider);
  flex-shrink: 0;
}

#dAn-wrap .mt-hero-extra {
  flex: 1;
  display: flex;
  gap: 26px;
  min-width: 0;
}

#dAn-wrap .mt-hero-extra-item {
  min-width: 0;
}

#dAn-wrap .mt-scope-tag {
  font-size: 12px;
  color: var(--mt-text-tertiary);
  font-weight: 600;
  text-align: right;
}

#dAn-wrap .mt-hero-name span {
  font-size: 17px;
  font-weight: 600;
  color: var(--mt-text-secondary);
  margin-left: 6px;
}

#dAn-wrap .mt-dash-grid:last-child {
  margin-bottom: 0;
}

#dAn-wrap .mt-row-label:first-of-type {
  margin-top: 0;
}

#dAn-wrap .mt-filter-rail {
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

@media (min-width: 901px) {
  #view-analytics #dAn-wrap {
    display: block;
  }

  #dAn-wrap .mt-hero-bottom {
    flex-wrap: nowrap;
  }

  #dAn-wrap .mt-hero-extra {
    flex-wrap: nowrap;
  }

  #dAn-wrap .mt-stat-card {
    padding: 20px 20px;
  }
}

@media (max-width: 1080px) {
  #dAn-wrap .mt-dash-grid { grid-template-columns: repeat(2, 1fr); }
  #dAn-wrap .mt-span-1,
  #dAn-wrap .mt-span-2,
  #dAn-wrap .mt-span-3 { grid-column: span 2; }
}
