/* Dashboard moderno — Tracker Gestor 16.8.4 */
#view-dashboard {
  background: #f5f7fb;
}

.command-head {
  align-items: center;
  margin-bottom: 20px;
}

.command-head h3 {
  color: #111827;
  font-size: 29px;
}

.command-period,
.performance-card,
.goal-card,
.command-panel,
.command-kpi {
  border-color: #e7eaf1;
  box-shadow: 0 8px 24px rgba(11, 16, 32, .055);
}

.command-kpis {
  gap: 14px;
  margin-bottom: 18px;
}

.command-kpi {
  min-height: 116px;
  padding: 18px;
  border-radius: 15px;
  position: relative;
  overflow: hidden;
}

.command-kpi::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 4px;
  background: var(--brand-gradient);
}

.command-kpi.positive::after { background: #00c2a8; }
.command-kpi.danger::after { background: #dc2626; }
.command-kpi strong { font-size: 22px; }
.command-kpi > i { width: 42px; height: 42px; border-radius: 12px; }

.quick-actions button {
  border-color: #e5e8ef;
  border-radius: 10px;
  box-shadow: 0 4px 14px rgba(11, 16, 32, .04);
}

.quick-actions button:hover {
  border-color: var(--brand-purple);
  transform: translateY(-1px);
}

.performance-card,
.goal-card,
.command-panel {
  border-radius: 16px;
}

.performance-card { padding: 22px 24px 12px; }
.command-panel { padding: 20px; }
.daily-chart { height: 250px; }

@media (min-width: 768px) {
  .app-shell {
    display: grid !important;
    grid-template-columns: 270px minmax(0, 1fr) !important;
    align-items: start;
  }

  .sidebar.topbar {
    display: flex !important;
    width: 270px !important;
    height: 100vh !important;
    padding: 26px 18px 18px !important;
    position: sticky !important;
    inset: 0 auto auto 0 !important;
    transform: none !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0;
    border: 0;
    border-right: 1px solid rgba(255, 255, 255, .08);
    box-shadow: 8px 0 28px rgba(7, 11, 22, .12);
    overflow-y: auto;
  }

  .sidebar.topbar::after {
    left: auto;
    top: 0;
    right: 0;
    bottom: 0;
    width: 3px;
    height: auto;
  }

  .topbar .brand {
    padding: 0 8px 22px;
    border: 0;
    border-bottom: 1px solid rgba(255, 255, 255, .12);
    gap: 12px;
  }

  .topbar .brand img { width: 48px; height: 48px; }
  .topbar .brand strong { font-size: 13px; }
  .topbar .brand small {
    max-width: 150px;
    white-space: normal;
    line-height: 1.3;
    font-size: 9px;
  }

  .topbar nav {
    display: grid !important;
    position: static !important;
    align-content: start;
    gap: 6px;
    width: 100%;
    margin: 20px 0;
    padding: 0 !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    grid-template-columns: 1fr !important;
    flex: 1;
  }

  .topbar nav > button,
  .topbar nav .nav-group > button,
  .topbar .logout {
    width: 100%;
    min-height: 42px;
    padding: 11px 13px;
    text-align: left;
    border-radius: 10px;
    font-size: 12px;
  }

  .topbar nav button:hover,
  .topbar nav button.active,
  .nav-group.open > button {
    background: var(--brand-gradient);
  }

  .nav-group { position: static; }
  .nav-submenu {
    position: static;
    min-width: 0;
    margin: 5px 0 4px 12px;
    padding: 5px 0 5px 9px;
    border: 0;
    border-left: 2px solid var(--brand-purple);
    border-radius: 0;
    box-shadow: none;
    background: rgba(0, 0, 0, .14);
  }

  .topbar nav .nav-submenu button {
    min-height: 36px;
    padding: 9px 10px;
    font-size: 11px;
  }

  .topbar-user {
    width: 100%;
    margin: auto 0 0;
    padding: 14px 0 0;
    border: 0;
    border-top: 1px solid rgba(255, 255, 255, .12);
    display: grid;
    gap: 7px;
  }

  .topbar-user > span { padding: 0 10px; color: #fff; }
  main { min-width: 0; }
  .menu { display: none !important; }
  main header {
    height: 74px;
    padding: 10px 30px;
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(255, 255, 255, .96);
    backdrop-filter: blur(10px);
  }
  .view { padding: 26px 30px; }
}

@media (max-width: 900px) {
  .command-head h3 { font-size: 24px; }
  .command-kpi { min-height: 104px; }
}
