/* ============================================================
   GT DASH — Dashboard Mockup (recriado em HTML/CSS)
   Inspirado na imagem enviada; original, não replica marca.
============================================================ */

.dash {
  --dash-bg: #0A0D15;
  --dash-surface: #10141E;
  --dash-surface-2: #161B28;
  --dash-border: rgba(255, 255, 255, 0.06);
  --dash-border-2: rgba(255, 255, 255, 0.10);
  --dash-text: #EAEDF4;
  --dash-text-2: #8A93A6;
  --dash-text-3: #5A6276;
  --dash-green: #22C55E;
  --dash-red: #EF4444;

  display: grid;
  grid-template-columns: 52px 1fr;
  width: 100%;
  aspect-ratio: 1440 / 900;
  background: var(--dash-bg);
  color: var(--dash-text);
  font-size: 11px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--dash-border-2);
}
.dash.is-light {
  --dash-bg: #F6F7FA;
  --dash-surface: #FFFFFF;
  --dash-surface-2: #FAFBFC;
  --dash-border: rgba(15, 21, 36, 0.06);
  --dash-border-2: rgba(15, 21, 36, 0.10);
  --dash-text: #0B0F1A;
  --dash-text-2: #6B7388;
  --dash-text-3: #A8B0C2;
}

/* Sidebar */
.dash-side {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 14px 0;
  gap: 16px;
  border-right: 1px solid var(--dash-border);
}
.dash-logo {
  width: 28px; height: 28px;
  border-radius: 8px;
  background: linear-gradient(135deg, #3B82F6, #8B5CF6);
  display: grid; place-items: center;
  color: white;
  font-weight: 700;
  font-size: 12px;
}
.dash-side-icons {
  display: flex; flex-direction: column; gap: 10px; margin-top: 8px;
  flex: 1;
}
.dash-side-icon {
  width: 28px; height: 28px; border-radius: 8px;
  display: grid; place-items: center;
  color: var(--dash-text-3);
}
.dash-side-icon.active {
  background: var(--dash-surface-2);
  color: var(--dash-text);
}
.dash-side-icon svg { width: 14px; height: 14px; }
.dash-side-bottom {
  font-size: 7px;
  color: var(--dash-text-3);
  letter-spacing: 0.1em;
  transform: rotate(-90deg);
  white-space: nowrap;
  margin-bottom: 16px;
}

/* Main */
.dash-main {
  display: grid;
  grid-template-rows: auto 1fr;
  padding: 14px;
  gap: 12px;
  overflow: hidden;
}
.dash-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.dash-title {
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -0.02em;
}
.dash-header-right {
  display: flex;
  gap: 6px;
  align-items: center;
}
.dash-chip {
  height: 22px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--dash-surface);
  border: 1px solid var(--dash-border);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--dash-text-2);
  font-size: 9px;
}
.dash-chip svg { width: 10px; height: 10px; }
.dash-chip.date { font-size: 9px; color: var(--dash-text); }

/* Grid */
.dash-grid {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 10px;
  min-height: 0;
}
.dash-col {
  display: grid;
  gap: 10px;
  min-height: 0;
}
.dash-col.left  { grid-template-rows: auto 1fr; }
.dash-col.right { grid-template-rows: auto 1fr; }

.dash-card {
  background: var(--dash-surface);
  border: 1px solid var(--dash-border);
  border-radius: 12px;
  padding: 10px;
  min-height: 0;
}
.dash-card-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
.dash-card-head .sel {
  flex: 1;
  height: 22px;
  background: var(--dash-surface-2);
  border-radius: 999px;
  border: 1px solid var(--dash-border);
  padding: 0 10px;
  display: flex; align-items: center;
  color: var(--dash-text-2);
  font-size: 9px;
}
.dash-ico {
  width: 22px; height: 22px;
  border-radius: 999px;
  background: var(--dash-surface-2);
  border: 1px solid var(--dash-border);
  display: grid; place-items: center;
  color: var(--dash-text-2);
}
.dash-ico svg { width: 11px; height: 11px; }

/* KPI row */
.dash-kpi-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
}
.dash-kpi {
  padding: 8px 4px 4px;
}
.dash-kpi-label {
  font-size: 8px;
  color: var(--dash-text-3);
  margin-bottom: 2px;
}
.dash-kpi-value {
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.01em;
}
.dash-kpi-delta {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: 8px;
  color: var(--dash-green);
  margin-top: 2px;
}
.dash-kpi-bar {
  height: 4px;
  border-radius: 999px;
  background: rgba(34, 197, 94, 0.15);
  margin-top: 6px;
  position: relative;
  overflow: hidden;
}
.dash-kpi-bar::after {
  content: "";
  position: absolute;
  inset: 0;
  width: 80%;
  background: linear-gradient(90deg, #22C55E, #16A34A);
  border-radius: inherit;
}
.dash-kpi-sub {
  font-size: 7px;
  color: var(--dash-text-3);
  margin-top: 4px;
  text-align: center;
}

/* Funnel */
.dash-funnel {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 6px;
  padding: 8px 4px;
  min-height: 0;
}
.dash-funnel-side {
  display: flex; flex-direction: column;
  justify-content: space-around;
  gap: 4px;
}
.dash-funnel-item {
  font-size: 7px;
  color: var(--dash-text-3);
  text-align: center;
}
.dash-funnel-item .v {
  font-size: 9px;
  color: var(--dash-text);
  font-weight: 500;
}
.dash-funnel-item .d {
  color: var(--dash-red);
  font-size: 7px;
  margin-top: 1px;
}
.dash-funnel-item .d.green { color: var(--dash-green); }

.dash-funnel-center {
  display: flex;
  flex-direction: column;
  gap: 5px;
  justify-content: center;
}
.dash-step {
  background: var(--dash-surface-2);
  border: 1px solid var(--dash-border);
  border-radius: 999px;
  padding: 5px 0;
  text-align: center;
  transition: transform 0.2s;
}
.dash-step .label {
  font-size: 7px;
  color: var(--dash-text-3);
  display: block;
}
.dash-step .num {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: -0.01em;
  display: block;
}
.dash-step .pct {
  font-size: 7px;
  color: var(--dash-red);
  margin-top: 1px;
}
.dash-step:nth-child(1) { width: 100%; }
.dash-step:nth-child(2) { width: 88%; margin-left: auto; margin-right: auto; }
.dash-step:nth-child(3) { width: 76%; margin-left: auto; margin-right: auto; }
.dash-step:nth-child(4) { width: 64%; margin-left: auto; margin-right: auto; }
.dash-step:nth-child(5) { width: 52%; margin-left: auto; margin-right: auto; }
.dash-step:nth-child(6) { width: 40%; margin-left: auto; margin-right: auto; }

/* Ads row */
.dash-ads {
  display: grid;
  grid-template-columns: repeat(5, 1fr) auto;
  gap: 6px;
  align-items: end;
}
.dash-ad {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.dash-ad-thumb {
  aspect-ratio: 9 / 14;
  border-radius: 8px;
  background:
    linear-gradient(135deg, #1a2338, #0f1524);
  border: 1px solid var(--dash-border);
  position: relative;
  overflow: hidden;
}
.dash-ad-thumb::before {
  content: "";
  position: absolute;
  inset: 10% 12% 35% 12%;
  background: linear-gradient(135deg, rgba(255,255,255,0.08), rgba(255,255,255,0.02));
  border-radius: 4px;
}
.dash-ad-thumb::after {
  content: "";
  position: absolute;
  left: 8px; bottom: 8px;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3B82F6, #8B5CF6);
  border: 1.5px solid var(--dash-surface);
}
.dash.is-light .dash-ad-thumb {
  background: linear-gradient(135deg, #E8ECF2, #F4F6FA);
}
.dash-ad-link {
  font-size: 8px;
  color: var(--dash-text-2);
  text-decoration: underline;
}
.dash-ad-row {
  display: flex;
  justify-content: space-between;
  font-size: 7px;
  color: var(--dash-text-3);
}
.dash-ad-row .v { color: var(--dash-text); }
.dash-ad-bar {
  height: 3px;
  border-radius: 999px;
  background: var(--dash-surface-2);
  overflow: hidden;
}
.dash-ad-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #3B82F6, #60A5FA);
}

.dash-ads-side {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-left: 8px;
  border-left: 1px solid var(--dash-border);
  min-width: 72px;
}
.dash-ads-side-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.dash-ads-side-label {
  font-size: 7px;
  color: var(--dash-text-3);
  display: flex; justify-content: space-between;
}
.dash-ads-side-value {
  font-size: 11px;
  font-weight: 500;
}

/* Demographics */
.dash-demo {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
  padding: 6px 0;
}
.dash-demo-title {
  font-size: 8px;
  color: var(--dash-text-3);
  margin-bottom: 8px;
}
.dash-demo-bars {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.dash-demo-row {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 6px;
  align-items: center;
  font-size: 7px;
  color: var(--dash-text-3);
}
.dash-demo-bar {
  height: 4px;
  background: var(--dash-surface-2);
  border-radius: 999px;
  overflow: hidden;
}
.dash-demo-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #3B82F6, #60A5FA);
  border-radius: inherit;
}
.dash-donut-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
}
.dash-donut {
  width: 56px; height: 56px;
  position: relative;
}
.dash-donut svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.dash-donut-legend {
  display: flex; flex-direction: column; gap: 3px;
  font-size: 7px; color: var(--dash-text-3);
}
.dash-donut-legend span {
  display: flex; align-items: center; gap: 4px;
}
.dash-donut-legend .sw {
  width: 6px; height: 6px; border-radius: 50%;
}

/* Small util: subtle animated elements in mockup */
@keyframes pulse-dot {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}
.dash .pulse { animation: pulse-dot 2.4s ease-in-out infinite; }
